本文整理汇总了C#中MS.Internal.Shaping.FontTable.GetOffset方法的典型用法代码示例。如果您正苦于以下问题:C# FontTable.GetOffset方法的具体用法?C# FontTable.GetOffset怎么用?C# FontTable.GetOffset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MS.Internal.Shaping.FontTable
的用法示例。
在下文中一共展示了FontTable.GetOffset方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AdjustPos
public void AdjustPos( FontTable Table,
LayoutMetrics Metrics,
ref LayoutOffset GlyphOffset,
ref int GlyphAdvance
)
{
int curOffset=offset;
if ((format&XPlacmentFlag)!=0)
{
GlyphOffset.dx += Positioning.DesignToPixels(Metrics.DesignEmHeight,Metrics.PixelsEmWidth,
Table.GetShort(curOffset));
curOffset+=2;
}
if ((format&YPlacmentFlag)!=0)
{
GlyphOffset.dy += Positioning.DesignToPixels(Metrics.DesignEmHeight,Metrics.PixelsEmHeight,
Table.GetShort(curOffset));
curOffset+=2;
}
if ((format&XAdvanceFlag)!=0)
{
GlyphAdvance += Positioning.DesignToPixels(Metrics.DesignEmHeight,Metrics.PixelsEmWidth,
Table.GetShort(curOffset));
curOffset+=2;
}
if ((format&YAdvanceFlag)!=0)
{
GlyphAdvance += Positioning.DesignToPixels(Metrics.DesignEmHeight,Metrics.PixelsEmHeight,
Table.GetShort(curOffset));
curOffset+=2;
}
if ((format&XPlacementDeviceFlag)!=0)
{
int deviceTableOffset = Table.GetOffset(curOffset);
if (deviceTableOffset != FontTable.NullOffset)
{
DeviceTable deviceTable = new DeviceTable(baseTableOffset+deviceTableOffset);
GlyphOffset.dx += deviceTable.Value(Table,Metrics.PixelsEmWidth);
}
curOffset+=2;
}
if ((format&YPlacementDeviceFlag)!=0)
{
int deviceTableOffset = Table.GetOffset(curOffset);
if (deviceTableOffset != FontTable.NullOffset)
{
DeviceTable deviceTable = new DeviceTable(baseTableOffset+deviceTableOffset);
GlyphOffset.dy += deviceTable.Value(Table,Metrics.PixelsEmHeight);
}
curOffset+=2;
}
if ((format&XAdvanceDeviceFlag)!=0)
{
if (Metrics.Direction==TextFlowDirection.LTR || Metrics.Direction==TextFlowDirection.RTL)
{
int deviceTableOffset = Table.GetOffset(curOffset);
if (deviceTableOffset != FontTable.NullOffset)
{
DeviceTable deviceTable = new DeviceTable(baseTableOffset+deviceTableOffset);
GlyphAdvance += deviceTable.Value(Table,Metrics.PixelsEmWidth);
}
}
curOffset+=2;
}
if ((format&YAdvanceDeviceFlag)!=0)
{
if (Metrics.Direction==TextFlowDirection.TTB || Metrics.Direction==TextFlowDirection.BTT)
{
int deviceTableOffset = Table.GetOffset(curOffset);
if (deviceTableOffset != FontTable.NullOffset)
{
DeviceTable deviceTable = new DeviceTable(baseTableOffset+deviceTableOffset);
GlyphAdvance += deviceTable.Value(Table,Metrics.PixelsEmHeight);
}
}
curOffset+=2;
}
}
示例2: Coverage
private CoverageTable Coverage(FontTable Table)
{
return new CoverageTable(offset + Table.GetOffset(offset + offsetCoverage));
}
示例3: GetLangSysTable
public LangSysTable GetLangSysTable(FontTable Table,ushort Index)
{
return new LangSysTable(offset + Table.GetOffset(offset+
offsetLangSysRecordArray +
Index*sizeLangSysRecord +
offsetLangSysRecordOffset));
}
示例4: SubtableOffset
public int SubtableOffset(FontTable Table, ushort Index)
{
Debug.Assert(Index < SubTableCount());
return offset+Table.GetOffset(offset + offsetSubtableArray +
Index*sizeSubtableOffset);
}
示例5: IsDefaultLangSysExists
public bool IsDefaultLangSysExists(FontTable Table)
{
return Table.GetOffset(offset + offsetDefaultLangSys)!=0;
}
示例6: GetDefaultLangSysTable
public LangSysTable GetDefaultLangSysTable(FontTable Table)
{
if (IsDefaultLangSysExists(Table))
return new LangSysTable(offset+Table.GetOffset(offset+offsetDefaultLangSys));
return new LangSysTable(FontTable.InvalidOffset);
}
示例7: GetScriptTable
public ScriptTable GetScriptTable(FontTable Table, ushort Index)
{
return new ScriptTable(offset +
Table.GetOffset(offset + offsetScriptRecordArray +
Index*sizeScriptRecord +
offsetScriptRecordOffset));
}
示例8: FindLangSys
public LangSysTable FindLangSys(FontTable Table, uint Tag)
{
if (IsNull)
{
return new LangSysTable(FontTable.InvalidOffset);
}
if ((OpenTypeTags)Tag==OpenTypeTags.dflt)
{
if (IsDefaultLangSysExists(Table))
return new LangSysTable(offset +
Table.GetOffset(offset + offsetDefaultLangSys));
return new LangSysTable(FontTable.InvalidOffset);
}
for(ushort i=0;i<GetLangSysCount(Table);i++)
{
if (GetLangSysTag(Table,i)==Tag)
{
return GetLangSysTable(Table,i);
}
}
return new LangSysTable(FontTable.InvalidOffset);
}
示例9: GetMarkAttachClassDef
// /// <summary>
// /// Under construction
// /// Glyph attachment points list
// /// </summary>
// /// <param name="Table"></param>
// /// <returns></returns>
//public GlyphAttachList GetGlyphAttachList(FontTable Table)
//{
// return new GlyphAttachList(offset + Table.GetOffset(offset + offsetGlyphAttachList));
//}
// /// <summary>
// /// Under construction
// /// Ligature caret positioning data
// /// </summary>
// /// <param name="Table"></param>
// /// <returns></returns>
// //public LigatureCaretList GetLigatureCaretlist(FontTable Table)
// //{
// // return new LigatureCaretList(offset + Table.GetOffset(offset + offsetLigaCaretList));
// //}
public ClassDefTable GetMarkAttachClassDef(FontTable Table)
{
//There is only one place where GDEF classdef is retireved -
// GetNextGlyphInLokup We will check if GDEF is present there.
Invariant.Assert(Table.IsPresent);
return new ClassDefTable(offset+Table.GetOffset(offset+offsetMarkAttachClassDef));
}
示例10: GetGlyphClassDef
public ClassDefTable GetGlyphClassDef(FontTable Table)
{
//There is only one place where GDEF classdef is retireved -
// UpdateGlyphFlags. We will check if GDEF is present there
Invariant.Assert(Table.IsPresent);
return new ClassDefTable(offset + Table.GetOffset(offset + offsetGlyphClassDef));
}
示例11: GetLookupList
public LookupList GetLookupList(FontTable Table)
{
return new LookupList(offset+Table.GetOffset(offset+offsetLookupList));
}
示例12: GetFeatureList
public FeatureList GetFeatureList(FontTable Table)
{
return new FeatureList(offset+Table.GetOffset(offset+offsetFeatureList));
}
示例13: GetScriptList
public ScriptList GetScriptList(FontTable Table)
{
return new ScriptList(offset+Table.GetOffset(offset+offsetScriptList));
}