本文整理汇总了C#中OTFontFile.MBOBuffer类的典型用法代码示例。如果您正苦于以下问题:C# MBOBuffer类的具体用法?C# MBOBuffer怎么用?C# MBOBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MBOBuffer类属于OTFontFile命名空间,在下文中一共展示了MBOBuffer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: ValueRecord
public ValueRecord(uint offset, MBOBuffer bufTable, uint offsetPosTable, ushort ValueFormat)
{
m_offsetValueRecord = offset;
m_bufTable = bufTable;
m_offsetPosTable = offsetPosTable;
m_ValueFormat = ValueFormat;
// calculate the offsets to each field
ushort FieldOffset = 0;
if (XPlacementPresent)
{
XPlacementFieldOffset = FieldOffset;
FieldOffset += 2;
}
if (YPlacementPresent)
{
YPlacementFieldOffset = FieldOffset;
FieldOffset += 2;
}
if (XAdvancePresent)
{
XAdvanceFieldOffset = FieldOffset;
FieldOffset += 2;
}
if (YAdvancePresent)
{
YAdvanceFieldOffset = FieldOffset;
FieldOffset += 2;
}
if (XPlaDevicePresent)
{
XPlaDeviceFieldOffset = FieldOffset;
FieldOffset += 2;
}
if (YPlaDevicePresent)
{
YPlaDeviceFieldOffset = FieldOffset;
FieldOffset += 2;
}
if (XAdvDevicePresent)
{
XAdvDeviceFieldOffset = FieldOffset;
FieldOffset += 2;
}
if (YAdvDevicePresent)
{
YAdvDeviceFieldOffset = FieldOffset;
FieldOffset += 2;
}
}
示例4: 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;
}
示例5: Vdmx
public Vdmx(ushort offset, MBOBuffer bufTable)
{
m_offsetVdmx = offset;
m_bufTable = bufTable;
}
示例6: Ratios
public Ratios(ushort offset, MBOBuffer bufTable)
{
m_offsetRatios = offset;
m_bufTable = bufTable;
}
示例7: vTable
public vTable(ushort offset, MBOBuffer bufTable)
{
m_offsetvTable = offset;
m_bufTable = bufTable;
}
示例8: val_cmap
public val_cmap(OTTag tag, MBOBuffer buf) : base(tag, buf)
{
}
示例9: GenerateTable
public override OTTable GenerateTable()
{
ArrayList bytesNameString = new ArrayList();
ushort nLengthOfStrings = 0;
ushort nStartOfStringStorage = (ushort)(6 + (m_nameRecords.Count * 12));
for( ushort i = 0; i < m_nameRecords.Count; i++ )
{
NameRecordCache nrc = (NameRecordCache)m_nameRecords[i];
byte[] byteString = EncodeString(nrc.sNameString, nrc.platformID, nrc.encodingID);
bytesNameString.Add( byteString );
nLengthOfStrings += (ushort)byteString.Length;
}
// create a Motorola Byte Order buffer for the new table
MBOBuffer newbuf = new MBOBuffer( (uint)(Table_name.FieldOffsets.NameRecords + (m_nameRecords.Count * 12) + nLengthOfStrings));
// populate the buffer
newbuf.SetUshort( m_format, (uint)Table_name.FieldOffsets.FormatSelector );
newbuf.SetUshort( (ushort)m_nameRecords.Count, (uint)Table_name.FieldOffsets.NumberNameRecords );
newbuf.SetUshort( nStartOfStringStorage, (uint)Table_name.FieldOffsets.OffsetToStrings );
ushort nOffset = 0;
// Write the NameRecords and Strings
for( ushort i = 0; i < m_nameRecords.Count; i++ )
{
byte[] bString = (byte[])bytesNameString[i];
newbuf.SetUshort( ((NameRecordCache)m_nameRecords[i]).platformID, (uint)(Table_name.FieldOffsets.NameRecords + (i * 12)));
newbuf.SetUshort( ((NameRecordCache)m_nameRecords[i]).encodingID, (uint)(Table_name.FieldOffsets.NameRecords + (i * 12) + 2));
newbuf.SetUshort( ((NameRecordCache)m_nameRecords[i]).languageID, (uint)(Table_name.FieldOffsets.NameRecords + (i * 12) + 4));
newbuf.SetUshort( ((NameRecordCache)m_nameRecords[i]).nameID, (uint)(Table_name.FieldOffsets.NameRecords + (i * 12) + 6));
newbuf.SetUshort( (ushort)bString.Length, (uint)(Table_name.FieldOffsets.NameRecords + (i * 12) + 8));
newbuf.SetUshort( nOffset, (uint)(Table_name.FieldOffsets.NameRecords + (i * 12) + 10));
//Write the string to the buffer
for( int ii = 0; ii < bString.Length; ii++ )
{
newbuf.SetByte( bString[ii], (uint)(nStartOfStringStorage + nOffset + ii));
}
nOffset += (ushort)bString.Length;
}
// put the buffer into a Table_name object and return it
Table_name nameTable = new Table_name("name", newbuf);
return nameTable;
}
示例10: Table_name
/************************
* constructors
*/
public Table_name(OTTag tag, MBOBuffer buf) : base(tag, buf)
{
}
示例11: ScriptTable_val
public ScriptTable_val(ushort offset, MBOBuffer bufTable) : base(offset, bufTable)
{
}
示例12: DeviceTable_val
public DeviceTable_val(uint offset, MBOBuffer bufTable) : base (offset, bufTable)
{
}
示例13: ClassDefFormat2_val
public ClassDefFormat2_val(uint offset, MBOBuffer bufTable) : base(offset, bufTable)
{
}
示例14: CoverageTable_val
public CoverageTable_val(uint offset, MBOBuffer bufTable) : base(offset, bufTable)
{
}
示例15: LookupTable_val
public LookupTable_val(ushort offset, MBOBuffer bufTable, OTTag tag) : base(offset, bufTable, tag)
{
}