當前位置: 首頁>>代碼示例>>C#>>正文


C# OTFontFile.OTTag類代碼示例

本文整理匯總了C#中OTFontFile.OTTag的典型用法代碼示例。如果您正苦於以下問題:C# OTTag類的具體用法?C# OTTag怎麽用?C# OTTag使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


OTTag類屬於OTFontFile命名空間,在下文中一共展示了OTTag類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Table_hmtx

        public Table_hmtx(OTTag tag, MBOBuffer buf, Table_hhea hheaTable, ushort nGlyphsInTheFont) : base(tag, buf)
        {
            m_hheaTable = hheaTable;
            m_nGlyphsInTheFont = nGlyphsInTheFont;

            Debug.Assert(m_hheaTable != null);

            m_nNumberOfHMetrics = m_hheaTable.numberOfHMetrics;            
        }
開發者ID:schriftgestalt,項目名稱:Font-Validator,代碼行數:9,代碼來源:Table_hmtx.cs

示例2: Table_vmtx

        public Table_vmtx(OTTag tag, MBOBuffer buf, Table_vhea vheaTable, ushort nGlyphsInTheFont) : base(tag, buf)
        {
            m_vheaTable = vheaTable;
            m_nGlyphsInTheFont = nGlyphsInTheFont;

            Debug.Assert(m_vheaTable != null);

            m_nLongVerMetrics = m_vheaTable.numOfLongVerMetrics;            
        }
開發者ID:schriftgestalt,項目名稱:Font-Validator,代碼行數:9,代碼來源:Table_vmtx.cs

示例3: ValidationInfo

        /*
         *        CONSTRUCTORS
         */
    /*
        public ValidationInfo(ValInfoType VIType, string StringName, OTTag tag, string stringTestName):
            base(VIType, StringName, null, "OTFontFile.ValStrings", "OTFontFile", tag, stringTestName)
        {
        }
    */

        /// <summary>Hardwires <c>OTFontFileVal.ValStrings</c> as
        /// the <c>nameFileErrs</c> and <c>OTFontFileVal</c> as
        /// the <c>nameAsmFileErrs</c> in the underlying
        /// <c>ValInfoBasic</c>.
        /// </summary>
        public ValidationInfo( ValInfoType VIType, 
                               string StringName, 
                               OTTag tag, 
                               string StringDetails, 
                               string stringTestName):
            base(VIType, StringName, StringDetails, 
                 "OTFontFileVal.ValStrings", "OTFontFileVal", 
                 tag, stringTestName)
        {
        }
開發者ID:bitforks,項目名稱:Font-Validator,代碼行數:25,代碼來源:ValidationInfo.cs

示例4: ValInfoBasic

        //protected OTTag m_OTTagRelated;

        // constructors
        public ValInfoBasic()
        {
            this.m_Type=ValInfoType.Info;
            this.m_StringName=null;
            this.m_StringValueName=null;
            this.m_StringValueUser=null;
            this.m_NameFileErrs=null;
            this.m_NameAsmFileErrs=null;
            this.m_OTTagPrincipal=null;
            this.m_StringTestName=null;
            //this.m_OTTagRelated=null;
        }
開發者ID:bitforks,項目名稱:Font-Validator,代碼行數:15,代碼來源:ValInfoBasic.cs

示例5: CreateTableObject

        /************************
         * public methods
         */

        public override OTTable CreateTableObject(OTTag tag, MBOBuffer buf)
        {
            OTTable table = null;

            string sName = GetUnaliasedTableName(tag);

            switch (sName)
            {
                case "BASE": table = new val_BASE(tag, buf); break;
                case "CFF ": table = new val_CFF(tag, buf); break;
                case "cmap": table = new val_cmap(tag, buf); break;
                case "cvt ": table = new val_cvt(tag, buf); break;
                case "DSIG": table = new val_DSIG(tag, buf); break;
                case "EBDT": table = new val_EBDT(tag, buf); break;
                case "EBLC": table = new val_EBLC(tag, buf); break;
                case "EBSC": table = new val_EBSC(tag, buf); break;
                case "fpgm": table = new val_fpgm(tag, buf); break;
                case "gasp": table = new val_gasp(tag, buf); break;
                case "GDEF": table = new val_GDEF(tag, buf); break;
                case "glyf": table = new val_glyf(tag, buf); break;
                case "GPOS": table = new val_GPOS(tag, buf); break;
                case "GSUB": table = new val_GSUB(tag, buf); break;
                case "hdmx": table = new val_hdmx(tag, buf); break;
                case "head": table = new val_head(tag, buf); break;
                case "hhea": table = new val_hhea(tag, buf); break;
                case "hmtx": table = new val_hmtx(tag, buf); break;
                case "JSTF": table = new val_JSTF(tag, buf); break;
                case "kern": table = new val_kern(tag, buf); break;
                case "loca": table = new val_loca(tag, buf); break;
                case "LTSH": table = new val_LTSH(tag, buf); break;
                case "maxp": table = new val_maxp(tag, buf); break;
                case "name": table = new val_name(tag, buf); break;
                case "OS/2": table = new val_OS2(tag, buf); break;
                case "PCLT": table = new val_PCLT(tag, buf); break;
                case "post": table = new val_post(tag, buf); break;
                case "prep": table = new val_prep(tag, buf); break;
                case "SVG ": table = new val_SVG(tag, buf); break;
                case "VDMX": table = new val_VDMX(tag, buf); break;
                case "vhea": table = new val_vhea(tag, buf); break;
                case "vmtx": table = new val_vmtx(tag, buf); break;
                case "VORG": table = new val_VORG(tag, buf); break;
                //case "Zapf": table = new val_Zapf(tag, buf); break;

                default: table = new val__Unknown(tag, buf); break;
            }

            return table;
        }
開發者ID:schriftgestalt,項目名稱:Font-Validator,代碼行數:52,代碼來源:TableManagerVal.cs

示例6: IsKnownOTTableType

        public static bool IsKnownOTTableType(OTTag tag)
        {
            bool bFound = false;

            string [] sTables = GetKnownOTTableTypes();
            for (uint i=0; i<sTables.Length; i++)
            {
                if (sTables[i] == (string)tag)
                {
                    bFound = true;
                    break;
                }
            }

            return bFound;
        }
開發者ID:davelab6,項目名稱:Font-Validator,代碼行數:16,代碼來源:TableManager.cs

示例7: TestTable

        /// <summary>Return <c>true</c> iff table has not been deselected
        /// and user has not cancelled.
        /// </summary>
        public bool TestTable(OTTag tagTable)
        {
            bool bTest = true;  // if the table hasn't been deselected, then it will default to getting tested

            if (m_hashTestsToPerform.ContainsKey((string)tagTable))
            {
                bTest = (bool)m_hashTestsToPerform[(string)tagTable];
            }

            if (CancelFlag)
            {
                bTest = false;
            }

            return bTest;
        }
開發者ID:bitforks,項目名稱:Font-Validator,代碼行數:19,代碼來源:Validator.cs

示例8: GetUnaliasedTableName

        public string GetUnaliasedTableName(OTTag tag)
        {
            if (tag == null) return "";

            string sName = tag;
            if (sName == "bloc")
            {
                sName = "EBLC";
            }
            else if (sName == "bdat")
            {
                sName = "EBDT";
            }
            
            return sName;
        }
開發者ID:bitforks,項目名稱:Font-Validator,代碼行數:16,代碼來源:TableManager.cs

示例9: Table_name

 /************************
  * constructors
  */
 
 public Table_name(OTTag tag, MBOBuffer buf) : base(tag, buf)
 {
 }
開發者ID:schriftgestalt,項目名稱:Font-Validator,代碼行數:7,代碼來源:Table_name.cs

示例10: Table_SVG

 public Table_SVG(OTTag tag, MBOBuffer buf) : base(tag, buf)
 {
 }
開發者ID:schriftgestalt,項目名稱:Font-Validator,代碼行數:3,代碼來源:Table_SVG.cs

示例11: RemoveTable

        /// <summary>Rmove a table to an non-file based table. Throws
        /// exception if table is not in font.
        /// </summary>
        public void RemoveTable(OTTag tag)
        {
            if (m_File != null)
            {
                throw new ApplicationException("attempted to remove a table from a file-based OTFont object");
            }

            if (GetDirectoryEntry(tag) == null)
            {
                throw new ArgumentException("the specified table doesn't doesn't exist in the font");
            }


            // remove the directory entry

            for (int i=0; i<m_OffsetTable.DirectoryEntries.Count; i++)
            {
                DirectoryEntry de = (DirectoryEntry)m_OffsetTable.DirectoryEntries[i];
                if (tag == de.tag)
                {
                    m_OffsetTable.DirectoryEntries.RemoveAt(i);
                    m_OffsetTable.numTables--;
                    break;
                }
            }
            

            // remove the table from the list of tables in memory

            for (int i=0; i<MemBasedTables.Count; i++)
            {
                OTTable t = (OTTable)MemBasedTables[i];
                if (tag == t.m_tag)
                {
                    MemBasedTables.RemoveAt(i);
                    break;
                }
            }

            string sTable = (string)tag;
            if (sTable == "CFF ")
            {
                m_OutlineType = OutlineType.OUTLINE_INVALID;
            }
            else if (sTable == "glyf")
            {
                m_OutlineType = OutlineType.OUTLINE_INVALID;
            }
        }
開發者ID:schriftgestalt,項目名稱:Font-Validator,代碼行數:52,代碼來源:OTFont.cs

示例12: GetDirectoryEntry

        /// <summary>Return the first directory entry with 
        /// tag == <c>tag</c>
        /// or null if there is no such entry.
        /// </summary>
        public DirectoryEntry GetDirectoryEntry(OTTag tag)
        {
            Debug.Assert(m_OffsetTable != null);

            DirectoryEntry de = null;

            if (m_OffsetTable != null)
            {
                for (int i = 0; i<m_OffsetTable.DirectoryEntries.Count; i++)
                {
                    DirectoryEntry temp = (DirectoryEntry)m_OffsetTable.DirectoryEntries[i];
                    if (temp.tag == tag)
                    {
                        de = temp;
                        break;
                    }
                }

                // Try aliases after direct match
                if ( de == null )
                    for (int i = 0; i<m_OffsetTable.DirectoryEntries.Count; i++)
                    {
                        DirectoryEntry temp = (DirectoryEntry)m_OffsetTable.DirectoryEntries[i];
                        if ( ( (temp.tag == "bloc" || temp.tag == "CBLC") && tag == "EBLC")
                             || ( (temp.tag == "bdat" || temp.tag == "CBDT" ) && tag == "EBDT") )
                        {
                            de = temp;
                            break;
                        }
                    }
            }

            return de;
        }
開發者ID:schriftgestalt,項目名稱:Font-Validator,代碼行數:38,代碼來源:OTFont.cs

示例13: GetTable

        /// <summary>Return the first table with tag == <c>tag</c>
        /// or null if there is no such table.
        /// </summary>
        public OTTable GetTable(OTTag tag)
        {
            OTTable table = null;

            // find the directory entry in this font that matches the tag
            DirectoryEntry de = GetDirectoryEntry(tag);

            if (de != null)
            {
                table = GetTable(de);
            }

            return table;
        }
開發者ID:schriftgestalt,項目名稱:Font-Validator,代碼行數:17,代碼來源:OTFont.cs

示例14: val_fpgm

 /************************
  * constructors
  */
 
 
 public val_fpgm(OTTag tag, MBOBuffer buf) : base(tag, buf)
 {
 }
開發者ID:bitforks,項目名稱:Font-Validator,代碼行數:8,代碼來源:val_fpgm.cs

示例15: Table_EBDT

 /************************
  * constructors
  */
 
 
 public Table_EBDT(OTTag tag, MBOBuffer buf) : base(tag, buf)
 {
 }
開發者ID:bitforks,項目名稱:Font-Validator,代碼行數:8,代碼來源:Table_EBDT.cs


注:本文中的OTFontFile.OTTag類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。