public guiAssetManagerProjectTools(BASE mog, MogMainForm main)
        {
            mMog     = mog;
            mainForm = main;

            mButtons = new guiAssetManagerCustomButtons(mainForm);
        }
예제 #2
0
        private void agregarINICIO_Click(object sender, EventArgs e)
        {
            string nombre  = BASE.Text;
            int    minutos = Convert.ToInt32(MINUTOS.Text);

            b1 = new Base(nombre, minutos);
            rutaNueva.agregarInicio(b1);
            BASE.Clear();
            MINUTOS.Clear();
        }
예제 #3
0
        public MessageForm(MogMainForm main)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            mMog     = main.gMog;
            mMessage = new MOG_ControllerMessage(mMog);
        }
예제 #4
0
 public MilestoneForm(BASE mog)
 {
     mMog = mog;
     //
     // Required for Windows Form Designer support
     //
     InitializeComponent();
     InitializePlatforms();
     InitializeSourceVersions();
 }
예제 #5
0
        private void button3_Click(object sender, EventArgs e)
        {
            string nombre  = BASE.Text;
            int    minutos = Convert.ToInt32(MINUTOS.Text);

            b1 = new Base(nombre, minutos);
            rutaNueva.insertarDespues(seleccionBase.Text, b1);
            BASE.Clear();
            MINUTOS.Clear();
        }
예제 #6
0
        public StaticSetWindow()
        {
            InitializeComponent();
            head = BASE.getBASE();

            maxY.Text   = $"{head.val.AXISYMAX}";
            minY.Text   = $"{head.val.AXISYMIN}";
            valOn.Text  = $"{head.val.ONVALUE}";
            valOff.Text = $"{head.val.OFFVALUE}";
        }
예제 #7
0
        public static MOG_User EditUser(BASE mog, MOG_User user)
        {
            AddUserForm auf = new AddUserForm(mog, user);

            if (auf.ShowDialog() == DialogResult.OK)
            {
                return(auf.UserInfo());
            }

            return(null);
        }
예제 #8
0
        public AddUserForm(BASE mMog)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.Text = "Add User";
            this.mog  = mMog;
            init();
        }
예제 #9
0
        public DBConnectWindow()
        {
            InitializeComponent();

            head = BASE.getBASE();

            ip.Text         = head.dbDetail.ip;
            port.Text       = head.dbDetail.port;
            user.Text       = head.dbDetail.uid;
            passwd.Password = head.dbDetail.passwd;
        }
예제 #10
0
        public TaskNewForm(BASE Mog)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            originalWidth = this.Width;
            lMog          = Mog;

            InitializeUsers();
        }
예제 #11
0
        public MainPage()
        {
            InitializeComponent();
            head = BASE.getBASE();

            vm = head.getMV_MainPage();
            this.DataContext = vm;

            Thread t = new Thread(vm.CreateSearchData_Influx);

            t.Start();
            //vm.CreateSearchData();
        }
예제 #12
0
        public MainFrame()
        {
            InitializeComponent();

            head             = BASE.getBASE();
            vm               = head.getMV_MainFrame();
            this.DataContext = vm;

            mp = new MainPage();
            Page.NavigationService.Navigate(mp);

            //this.ShowInTaskbar = false;
        }
예제 #13
0
 //-------------------------------------------------------
 //experiment
 internal void LoadOpenFontLayoutInfo(GDEF gdefTable, GSUB gsubTable, GPOS gposTable, BASE baseTable)
 {
     //***
     this.GDEFTable = gdefTable;
     this.GSUBTable = gsubTable;
     this.GPOSTable = gposTable;
     this.BaseTable = baseTable;
     //---------------------------
     //1. fill glyph definition
     if (gdefTable != null)
     {
         gdefTable.FillGlyphData(this.Glyphs);
     }
 }
예제 #14
0
        public AddUserForm(BASE mMog, MOG_User user)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.Text = string.Concat("Edit User - ", user.GetUserName());
            this.mog  = mMog;
            init();

            FillFields(user);
            this.NameTextBox.Enabled = false;
        }
예제 #15
0
        public ChatForm(MogMainForm main, guiChatManager parent, string invited, string handle)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            mMog     = main.gMog;
            mainForm = main;
            mInvite  = invited;
            mHandle  = handle;
            mParent  = parent;

            Initialize();
        }
예제 #16
0
        public void insert(List <Ticker> tickers)
        {
            OleDbCommand     cmd = new OleDbCommand(insSql + insTicker);
            OleDbDataAdapter da  = new OleDbDataAdapter();
            OleDbParameter   parm;

            cmd.Connection = cn;

            foreach (Ticker t in tickers)
            {
                //Console.WriteLine("Moneda: " + t.symbol + " - Fecha: " + t.last_updated);
                //Console.WriteLine(Math.Round(t.price_usd / Config.getEuro(), 2));


                cmd.Parameters.AddWithValue("Moneda", t.symbol);
                cmd.Parameters.AddWithValue("Epoch", t.last_updated);
                cmd.Parameters.AddWithValue("Fecha", BASE.epoch2DateTime(t.last_updated));

                parm       = new OleDbParameter("USD", OleDbType.VarChar);
                parm.Value = t.price_usd.ToString();
                cmd.Parameters.Add(parm);
                parm       = new OleDbParameter("EUR", OleDbType.VarChar);
                parm.Value = Math.Round(t.price_usd / CFG.getEuro(), 2);
                cmd.Parameters.Add(parm);
                parm       = new OleDbParameter("BTC", OleDbType.VarChar);
                parm.Value = t.price_btc.ToString();
                cmd.Parameters.Add(parm);

                cmd.Parameters.AddWithValue("Volumen", t.volume_usd / 1000);
                cmd.Parameters.AddWithValue("MarketCap", t.market_cap_usd / 1000);
                cmd.Parameters.AddWithValue("Available", t.available_supply / 1000);
                cmd.Parameters.AddWithValue("Total", t.total_supply / 100);
                da.InsertCommand = cmd;
                try {
                    da.InsertCommand.ExecuteNonQuery();
                }
                // Ignoramos el catch
                // En principio esto solo puede darse si un ticker
                // No ha sido actualizado en el servidor desde la ultima carga
                catch (Exception e) {
                    msg = e.Message;
                }
                finally {
                    cmd.Parameters.Clear();
                }
            }
            //Console.WriteLine("Fin");
        }
예제 #17
0
        public CopyToolForm(CopyToolType type, BASE mog)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.mog = mog;

            this.imageList = new ImageList();
            this.imageList.Images.Add((Image) new Bitmap("C:\\Documents and Settings\\jbianchi\\My Documents\\work\\MOG.Net\\MOG_Server\\Server_Gui\\guiConfigurationsHelpers\\fileicon.bmp"));
            this.imageList.Images.Add((Image) new Bitmap("C:\\Documents and Settings\\jbianchi\\My Documents\\work\\MOG.Net\\MOG_Server\\Server_Gui\\guiConfigurationsHelpers\\foldericon.bmp"));
            this.FilesTreeView.ImageList  = this.imageList;
            this.btnGetExecutable.Enabled = false;
            this.selectedNode             = null;
            this.executableNode           = null;

            switch (type)
            {
            case CopyToolType.Ripper:
                this.Text = "Select Ripper Components";
                this.FilesListViewLabel.Text  = "Ripper components";
                this.CopyToToolsCheckBox.Text = "Copy ripper to project \"Tools\" tree";
                break;

            case CopyToolType.RipTasker:
                this.Text = "Select Rip Tasker Components";
                this.FilesListViewLabel.Text  = "Rip tasker components";
                this.CopyToToolsCheckBox.Text = "Copy rip tasker to project \"Tools\" tree";
                break;

            case CopyToolType.Viewer:
                this.Text = "Select Viewer Components";
                this.FilesListViewLabel.Text  = "Viewer components";
                this.CopyToToolsCheckBox.Text = "Copy viewer to project \"Tools\" tree";
                break;

            case CopyToolType.Generic:
                this.Text = "Select Tool Components";
                this.FilesListViewLabel.Text  = "Tool components";
                this.CopyToToolsCheckBox.Text = "Copy tool to project \"Tools\" tree";
                break;
            }

            updateDestFolderLabel();
        }
예제 #18
0
        public guiPlatformSinc(string targetConsole, string sourcePath, MogMainForm main, string userName, bool useDefaultUser, bool force, bool runAfterSync, bool showSummary)
        {
            mTargetConsole  = targetConsole;
            mSourcePath     = sourcePath.ToLower();
            mMog            = main.gMog;
            mUserName       = userName;
            mUseDefaultUser = useDefaultUser;
            mForce          = force;
            mRunAfterSync   = runAfterSync;
            mShowSummary    = showSummary;

            mUserSyncFile    = "None";
            mProjectSyncFile = "Platform." + mMog.GetActivePlatform().mPlatformName + ".sync";
            mConsoleCopy     = true;
            mFileMapCreate   = false;

            mainForm = main;
        }
예제 #19
0
        public void AdvanceRunnerOnBase(BASE _base)
        {
            switch (_base)
            {
                case BASE.FIRST:
                    AdvanceRunnerOnFirst();
                    break;

                case BASE.SECOND:
                    AdvanceRunnerOnSecond();
                    break;

                case BASE.THIRD:
                    AdvanceRunnerOnThird();
                    break;

                default:
                    // TODO: throw exception
                    break;
            }
        }
예제 #20
0
        static public void CSV_Write(ChartData chart)
        {
            DirectoryInfo dir = new DirectoryInfo(_path);

            if (dir.Exists == false)
            {
                dir.Create();
            }
            string filename = $"{chart.searches.DANJI_ID}_{chart.searches.BUILD_ID}_{chart.searches.HOUSE_ID}_{chart.searches.ROOM_ID}" +
                              $"[{TimeConverter.GetDate(chart.searches.mintime)}~{TimeConverter.GetDate(chart.searches.maxtime)}].csv";

#if DEBUG
            Console.WriteLine($"{_path}~{filename}");
#endif
            using (StreamWriter stream = new StreamWriter(_path + @"\" + filename, false, Encoding.Default))
            {
                string time;
                double cur, set;
                bool   onff;
                stream.WriteLine("CUR_TEMP,SET_TEMP,VAVLE_STATUS,TIME");
                int flag = BASE.getBASE().val.ONVALUE;
                for (int i = 0; i < chart.set.Count; i++)
                {
                    cur  = chart.cur[i].Y;
                    set  = chart.set[i].Y;
                    onff = (chart.onff[i].Y == flag) ? true : false;
                    time = DateTimeAxis.ToDateTime(chart.cur[i].X).ToString();
                    try
                    {
                        stream.WriteLine($"{cur},{set},{onff},{time}");
                    }catch (Exception e)
                    {
                        break;
                    }
                }

                Process.Start(_path);
            }
        }
예제 #21
0
        public PriviledgesForm(BASE mMog)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //

            mPriviledgesIni = mMog.GetPriviledgesIni();

            if (mPriviledgesIni != null && mPriviledgesIni.CountSections() > 0)
            {
                PopulatePermissions();
            }
            else
            {
                PriviledgesTreeView.Nodes.Clear();
                PriviledgesTreeView.Nodes.Add(new TreeNode("No permissions set for this project"));
            }
        }
예제 #22
0
        internal Typeface ReadTableEntryCollection(TableEntryCollection tables, BinaryReader input)
        {
            OS2Table  os2Table  = ReadTableIfExists(tables, input, new OS2Table());
            NameEntry nameEntry = ReadTableIfExists(tables, input, new NameEntry());

            Head              header            = ReadTableIfExists(tables, input, new Head());
            MaxProfile        maximumProfile    = ReadTableIfExists(tables, input, new MaxProfile());
            HorizontalHeader  horizontalHeader  = ReadTableIfExists(tables, input, new HorizontalHeader());
            HorizontalMetrics horizontalMetrics = ReadTableIfExists(tables, input, new HorizontalMetrics(horizontalHeader.HorizontalMetricsCount, maximumProfile.GlyphCount));

            //---
            PostTable postTable = ReadTableIfExists(tables, input, new PostTable());
            CFFTable  ccf       = ReadTableIfExists(tables, input, new CFFTable());

            //--------------
            Cmap           cmaps          = ReadTableIfExists(tables, input, new Cmap());
            GlyphLocations glyphLocations = ReadTableIfExists(tables, input, new GlyphLocations(maximumProfile.GlyphCount, header.WideGlyphLocations));

            Glyf glyf = ReadTableIfExists(tables, input, new Glyf(glyphLocations));
            //--------------
            Gasp gaspTable             = ReadTableIfExists(tables, input, new Gasp());
            VerticalDeviceMetrics vdmx = ReadTableIfExists(tables, input, new VerticalDeviceMetrics());
            //--------------


            Kern kern = ReadTableIfExists(tables, input, new Kern());
            //--------------
            //advanced typography
            GDEF           gdef      = ReadTableIfExists(tables, input, new GDEF());
            GSUB           gsub      = ReadTableIfExists(tables, input, new GSUB());
            GPOS           gpos      = ReadTableIfExists(tables, input, new GPOS());
            BASE           baseTable = ReadTableIfExists(tables, input, new BASE());
            COLR           colr      = ReadTableIfExists(tables, input, new COLR());
            CPAL           cpal      = ReadTableIfExists(tables, input, new CPAL());
            VerticalHeader vhea      = ReadTableIfExists(tables, input, new VerticalHeader());

            if (vhea != null)
            {
                VerticalMetrics vmtx = ReadTableIfExists(tables, input, new VerticalMetrics(vhea.NumOfLongVerMetrics));
            }



            //test math table
            MathTable mathtable    = ReadTableIfExists(tables, input, new MathTable());
            EBLCTable fontBmpTable = ReadTableIfExists(tables, input, new EBLCTable());
            //---------------------------------------------
            //about truetype instruction init

            //---------------------------------------------
            Typeface typeface            = null;
            bool     isPostScriptOutline = false;

            if (glyf == null)
            {
                //check if this is cff table ?
                if (ccf == null)
                {
                    //TODO: review here
                    throw new NotSupportedException();
                }
                //...
                //PostScript outline font
                isPostScriptOutline = true;
                typeface            = new Typeface(
                    nameEntry,
                    header.Bounds,
                    header.UnitsPerEm,
                    ccf,
                    horizontalMetrics,
                    os2Table);
            }
            else
            {
                typeface = new Typeface(
                    nameEntry,
                    header.Bounds,
                    header.UnitsPerEm,
                    glyf.Glyphs,
                    horizontalMetrics,
                    os2Table);
            }

            //----------------------------
            typeface.CmapTable  = cmaps;
            typeface.KernTable  = kern;
            typeface.GaspTable  = gaspTable;
            typeface.MaxProfile = maximumProfile;
            typeface.HheaTable  = horizontalHeader;
            //----------------------------

            if (!isPostScriptOutline)
            {
                FpgmTable fpgmTable = ReadTableIfExists(tables, input, new FpgmTable());
                //control values table
                CvtTable cvtTable = ReadTableIfExists(tables, input, new CvtTable());
                if (cvtTable != null)
                {
                    typeface.ControlValues = cvtTable._controlValues;
                }
                if (fpgmTable != null)
                {
                    typeface.FpgmProgramBuffer = fpgmTable._programBuffer;
                }
                PrepTable propProgramTable = ReadTableIfExists(tables, input, new PrepTable());
                if (propProgramTable != null)
                {
                    typeface.PrepProgramBuffer = propProgramTable._programBuffer;
                }
            }
            //-------------------------
            typeface.LoadOpenFontLayoutInfo(
                gdef,
                gsub,
                gpos,
                baseTable,
                colr,
                cpal);

            //------------


            //test
            {
                SvgTable svgTable = ReadTableIfExists(tables, input, new SvgTable());
                if (svgTable != null)
                {
                    typeface._svgTable = svgTable;
                }
            }

            typeface.PostTable = postTable;
            if (mathtable != null)
            {
                var mathGlyphLoader = new MathGlyphLoader();
                mathGlyphLoader.LoadMathGlyph(typeface, mathtable);
            }
#if DEBUG
            //test
            //int found = typeface.GetGlyphIndexByName("Uacute");
            if (typeface.IsCffFont)
            {
                //optional
                typeface.UpdateAllCffGlyphBounds();
            }
#endif
            return(typeface);
        }
예제 #23
0
        public TtfTypeface Read(Stream stream, ReadFlags readFlags = ReadFlags.Full)
        {
            var little = BitConverter.IsLittleEndian;

            using (var input = new ByteOrderSwappingBinaryReader(stream))
            {
                ushort majorVersion  = input.ReadUInt16();
                ushort minorVersion  = input.ReadUInt16();
                ushort tableCount    = input.ReadUInt16();
                ushort searchRange   = input.ReadUInt16();
                ushort entrySelector = input.ReadUInt16();
                ushort rangeShift    = input.ReadUInt16();
                var    tables        = new TableEntryCollection();
                for (int i = 0; i < tableCount; i++)
                {
                    tables.AddEntry(new UnreadTableEntry(ReadTableHeader(input)));
                }
                //------------------------------------------------------------------
                OS2Table  os2Table  = ReadTableIfExists(tables, input, new OS2Table());
                NameEntry nameEntry = ReadTableIfExists(tables, input, new NameEntry());


                Head              header            = ReadTableIfExists(tables, input, new Head());
                MaxProfile        maximumProfile    = ReadTableIfExists(tables, input, new MaxProfile());
                HorizontalHeader  horizontalHeader  = ReadTableIfExists(tables, input, new HorizontalHeader());
                HorizontalMetrics horizontalMetrics = ReadTableIfExists(tables, input, new HorizontalMetrics(horizontalHeader.HorizontalMetricsCount, maximumProfile.GlyphCount));

                //--------------
                Cmap           cmaps          = ReadTableIfExists(tables, input, new Cmap());
                GlyphLocations glyphLocations = ReadTableIfExists(tables, input, new GlyphLocations(maximumProfile.GlyphCount, header.WideGlyphLocations));
                Glyf           glyf           = ReadTableIfExists(tables, input, new Glyf(glyphLocations));
                //--------------
                Gasp gaspTable             = ReadTableIfExists(tables, input, new Gasp());
                VerticalDeviceMetrics vdmx = ReadTableIfExists(tables, input, new VerticalDeviceMetrics());
                //--------------
                PostTable postTable = ReadTableIfExists(tables, input, new PostTable());
                Kern      kern      = ReadTableIfExists(tables, input, new Kern());
                //--------------
                //advanced typography
                GDEF           gdef      = ReadTableIfExists(tables, input, new GDEF());
                GSUB           gsub      = ReadTableIfExists(tables, input, new GSUB());
                GPOS           gpos      = ReadTableIfExists(tables, input, new GPOS());
                BASE           baseTable = ReadTableIfExists(tables, input, new BASE());
                COLR           colr      = ReadTableIfExists(tables, input, new COLR());
                CPAL           cpal      = ReadTableIfExists(tables, input, new CPAL());
                VerticalHeader vhea      = ReadTableIfExists(tables, input, new VerticalHeader());
                if (vhea != null)
                {
                    VerticalMatric vmtx = ReadTableIfExists(tables, input, new VerticalMatric(vhea.NumOfLongVerMetrics));
                }

                EBLCTable fontBmpTable = ReadTableIfExists(tables, input, new EBLCTable());
                //---------------------------------------------
                //about truetype instruction init

                //---------------------------------------------
                var typeface = new TtfTypeface(
                    nameEntry,
                    header.Bounds,
                    header.UnitsPerEm,
                    glyf.Glyphs,
                    horizontalMetrics,
                    os2Table);
                //----------------------------
                typeface.CmapTable  = cmaps;
                typeface.KernTable  = kern;
                typeface.GaspTable  = gaspTable;
                typeface.MaxProfile = maximumProfile;
                typeface.HheaTable  = horizontalHeader;
                //----------------------------
                FpgmTable fpgmTable = ReadTableIfExists(tables, input, new FpgmTable());
                //control values table
                CvtTable cvtTable = ReadTableIfExists(tables, input, new CvtTable());
                if (cvtTable != null)
                {
                    typeface.ControlValues = cvtTable.controlValues;
                }
                if (fpgmTable != null)
                {
                    typeface.FpgmProgramBuffer = fpgmTable.programBuffer;
                }
                PrepTable propProgramTable = ReadTableIfExists(tables, input, new PrepTable());
                if (propProgramTable != null)
                {
                    typeface.PrepProgramBuffer = propProgramTable.programBuffer;
                }
                //-------------------------
                typeface.LoadOpenFontLayoutInfo(
                    gdef,
                    gsub,
                    gpos,
                    baseTable,
                    colr,
                    cpal);
                return(typeface);
            }
        }
예제 #24
0
 public void Awake()
 {
     Instance = this;
 }
예제 #25
0
        internal bool ReadTableEntryCollection(Typeface typeface, RestoreTicket ticket, TableEntryCollection tables, BinaryReader input)
        {
            if (ticket != null)
            {
                return(ReadTableEntryCollectionOnRestoreMode(typeface, ticket, tables, input));
            }

            typeface.SetTableEntryCollection(tables.CloneTableHeaders());

            var rd = new EntriesReaderHelper(tables, input);
            //PART 1: basic information
            OS2Table          os2Table          = rd.Read(new OS2Table());
            Meta              meta              = rd.Read(new Meta());
            NameEntry         nameEntry         = rd.Read(new NameEntry());
            Head              head              = rd.Read(new Head());
            MaxProfile        maxProfile        = rd.Read(new MaxProfile());
            HorizontalHeader  horizontalHeader  = rd.Read(new HorizontalHeader());
            HorizontalMetrics horizontalMetrics = rd.Read(new HorizontalMetrics(horizontalHeader.NumberOfHMetrics, maxProfile.GlyphCount));
            VerticalHeader    vhea              = rd.Read(new VerticalHeader());

            if (vhea != null)
            {
                VerticalMetrics vmtx = rd.Read(new VerticalMetrics(vhea.NumOfLongVerMetrics));
            }

            Cmap cmaps = rd.Read(new Cmap());
            VerticalDeviceMetrics vdmx = rd.Read(new VerticalDeviceMetrics());
            Kern kern = rd.Read(new Kern());
            //------------------------------------
            //PART 2: glyphs detail
            //2.1 True type font

            GlyphLocations glyphLocations = rd.Read(new GlyphLocations(maxProfile.GlyphCount, head.WideGlyphLocations));
            Glyf           glyf           = rd.Read(new Glyf(glyphLocations));
            Gasp           gaspTable      = rd.Read(new Gasp());
            COLR           colr           = rd.Read(new COLR());
            CPAL           cpal           = rd.Read(new CPAL());

            //2.2 Cff font
            PostTable postTable = rd.Read(new PostTable());
            CFFTable  cff       = rd.Read(new CFFTable());

            //additional math table (if available)
            MathTable mathtable = rd.Read(new MathTable());
            //------------------------------------

            //PART 3: advanced typography
            GDEF gdef      = rd.Read(new GDEF());
            GSUB gsub      = rd.Read(new GSUB());
            GPOS gpos      = rd.Read(new GPOS());
            BASE baseTable = rd.Read(new BASE());
            JSTF jstf      = rd.Read(new JSTF());

            STAT stat = rd.Read(new STAT());

            if (stat != null)
            {
                //variable font
                FVar fvar = rd.Read(new FVar());
                if (fvar != null)
                {
                    GVar gvar = rd.Read(new GVar());
                    CVar cvar = rd.Read(new CVar());
                    HVar hvar = rd.Read(new HVar());
                    MVar mvar = rd.Read(new MVar());
                    AVar avar = rd.Read(new AVar());
                }
            }

            bool isPostScriptOutline = false;
            bool isBitmapFont        = false;

            typeface.SetBasicTypefaceTables(os2Table, nameEntry, head, horizontalMetrics);
            if (glyf == null)
            {
                //check if this is cff table ?
                if (cff == null)
                {
                    //check  cbdt/cblc ?
                    CBLC cblcTable = rd.Read(new CBLC());
                    if (cblcTable != null)
                    {
                        CBDT cbdtTable = rd.Read(new CBDT());
                        //read cbdt
                        //bitmap font

                        BitmapFontGlyphSource bmpFontGlyphSrc = new BitmapFontGlyphSource(cblcTable);
                        bmpFontGlyphSrc.LoadCBDT(cbdtTable);
                        Glyph[] glyphs = bmpFontGlyphSrc.BuildGlyphList();
                        typeface.SetBitmapGlyphs(glyphs, bmpFontGlyphSrc);
                        isBitmapFont = true;
                    }
                    else
                    {
                        //TODO:
                        EBLC fontBmpTable = rd.Read(new EBLC());
                        throw new NotSupportedException();
                    }
                }
                else
                {
                    isPostScriptOutline = true;
                    typeface.SetCffFontSet(cff.Cff1FontSet);
                }
            }
            else
            {
                typeface.SetTtfGlyphs(glyf.Glyphs);
            }

            //----------------------------
            typeface.CmapTable  = cmaps;
            typeface.KernTable  = kern;
            typeface.MaxProfile = maxProfile;
            typeface.HheaTable  = horizontalHeader;
            //----------------------------
            typeface.GaspTable = gaspTable;

            if (!isPostScriptOutline && !isBitmapFont)
            {
                //for true-type font outline
                FpgmTable fpgmTable = rd.Read(new FpgmTable());
                //control values table
                CvtTable  cvtTable         = rd.Read(new CvtTable());
                PrepTable propProgramTable = rd.Read(new PrepTable());

                typeface.ControlValues     = cvtTable?._controlValues;
                typeface.FpgmProgramBuffer = fpgmTable?._programBuffer;
                typeface.PrepProgramBuffer = propProgramTable?._programBuffer;
            }

            //-------------------------
            typeface.LoadOpenFontLayoutInfo(
                gdef,
                gsub,
                gpos,
                baseTable,
                colr,
                cpal);
            //------------

            typeface.SetSvgTable(rd.Read(new SvgTable()));
            typeface.PostTable = postTable;

            if (mathtable != null)
            {
                MathGlyphLoader.LoadMathGlyph(typeface, mathtable);
            }
#if DEBUG
            //test
            //int found = typeface.GetGlyphIndexByName("Uacute");
            if (typeface.IsCffFont)
            {
                //optional
                typeface.UpdateAllCffGlyphBounds();
            }
#endif
            typeface.UpdateLangs(meta);
            typeface.UpdateFrequentlyUsedValues();
            return(true);
        }
예제 #26
0
 public guiSurveyManager(MogMainForm main)
 {
     mainForm = main;
     mMog     = mainForm.gMog;
 }
예제 #27
0
        //-------------------------------------------------------



        //experiment
        internal void LoadOpenFontLayoutInfo(GDEF gdefTable, GSUB gsubTable, GPOS gposTable, BASE baseTable, COLR colrTable, CPAL cpalTable)
        {
            //***
            this.GDEFTable = gdefTable;
            this.GSUBTable = gsubTable;
            this.GPOSTable = gposTable;
            this.BaseTable = baseTable;
            this.COLRTable = colrTable;
            this.CPALTable = cpalTable;
            //---------------------------
            //1. fill glyph definition
            if (gdefTable != null)
            {
                gdefTable.FillGlyphData(this.Glyphs);
                //if (this.Glyphs != null)
                //{

                //}
                //else if (_cffTable != null)
                //{
                //    //post script outline
                //    //TODO: fill gdef for cff font

                //}
            }
        }
예제 #28
0
        public void PutRunnerOnBaseAdvancingOthers(BASE _base, InMatchPositionPlayer _newRunner)
        {
            switch (_base)
            {
                case BASE.FIRST:
                    AdvanceRunnerOnFirst();
                    runnerOnFirst = _newRunner;
                    break;

                case BASE.SECOND:
                    AdvanceRunnerOnSecond();
                    AdvanceRunnerOnFirst();
                    runnerOnSecond = _newRunner;
                    break;

                case BASE.THIRD:
                    AdvanceRunnerOnThird();
                    AdvanceRunnerOnSecond();
                    AdvanceRunnerOnFirst();
                    runnerOnThird = _newRunner;
                    break;

                default:
                    // TODO: throw exception
                    break;
            }
        }