[]
Represents a Compact Font Format (CFF) table.
public class CffTable
Gets the charset array (GID to SID mapping, or GID to CID for CID-key fonts).
public ushort[] CharSet { get; }
Gets the factor to recalculate character space units to user space units (em).
public float CharSpaceToEm { get; }
Gets the array of glyph charstrings.
public CffTable.CharString[] CharStrings { get; }
Maps GIDs to indices in the CIDGroups array.
public byte[] CIDGroupIndices { get; }
If a glyph width equals the DefaultWidthX value it can be omitted from the charstring.
public float DefaultWidthX { get; }
Gets the encoding array (for non-CID fonts). It maps 1-byte code to GID.
public ushort[] Encoding { get; }
Gets the FontName or CIDFontName for CID-keyed fonts.
public string FontName { get; }
Gets the format major version (starting at 1).
public int FormatMajorVersion { get; }
Gets the format minor version (starting at 0).
public int FormatMinorVersion { get; }
Gets the array of charstrings with global subrs.
public CffTable.CharString[] GlobalSubrs { get; }
Gets the number of glyphs.
public int GlyphCount { get; }
Gets a value indicating if this is a CID-keyed font.
public bool IsCIDFont { get; }
Gets the italic angle in counter-clockwise degrees from the vertical. Zero for upright text, negative for text that leans to the right (forward).
public float ItalicAngle { get; }
Gets the array of charstrings with local subrs.
public CffTable.CharString[] LocalSubrs { get; }
The glyph width is computed by adding the CharString width to NominalWidthX value.
public float NominalWidthX { get; }
Gets the suggested distance of the top of the underline from the baseline (negative values indicate below baseline).
public float UnderlinePosition { get; }
Gets the suggested value for the underline thickness.
public float UnderlineThickness { get; }
Gets the glyph index for specified character code.
public ushort GetGid(byte charCode)
charCode
byteReturns a string with the specified SID. Note! Method can return null if string with specified SID not found.
public string GetString(int sid)
sid
intTries to get glyph index (GID) by glyph name.
public bool TryGetGID(string glyphName, out ushort gid)
glyphName
stringgid
ushortTries to get glyph index (GID) by glyph name represented by SID.
public bool TryGetGID(ushort sid, out ushort gid)
sid
ushortgid
ushortTries to get glyph name represented by SID by glyph index.
public bool TryGetSID(ushort gid, out ushort sid)
gid
ushortsid
ushort