本文整理汇总了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;
}
示例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;
}
示例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)
{
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例9: Table_name
/************************
* constructors
*/
public Table_name(OTTag tag, MBOBuffer buf) : base(tag, buf)
{
}
示例10: Table_SVG
public Table_SVG(OTTag tag, MBOBuffer buf) : base(tag, buf)
{
}
示例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;
}
}
示例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;
}
示例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;
}
示例14: val_fpgm
/************************
* constructors
*/
public val_fpgm(OTTag tag, MBOBuffer buf) : base(tag, buf)
{
}
示例15: Table_EBDT
/************************
* constructors
*/
public Table_EBDT(OTTag tag, MBOBuffer buf) : base(tag, buf)
{
}