[]
Represents a font instance with a set of OpenType tables, and provides methods allowing to retrieve information contained in those tables.
public class FontTables
Gets the Font associated with this FontTables instance.
public Font Font { get; }
Gets the array of glyph indices, such as Arabic kashidas, that a client may insert to extend the length of the line for justification.
Depends on 'JSTF' table.
public ushort[] GetExtenderGlyphs(ScriptTag scriptTag)
scriptTag
ScriptTagReturns the advance height for the given glyph.
Depends on 'vmtx' table.
public ushort GetGlyphHeight(int glyphIndex)
glyphIndex
intReturns name of the glyph from "post" table.
Depends on 'post' table.
public string GetGlyphName(int glyphIndex)
glyphIndex
intGets the y coordinate of a glyph's vertical origin, in design units.
Depends on 'vmtx', 'glyf', 'VORG', 'cff', 'cff2' tables.
public short GetGlyphVertOriginY(int glyphIndex)
glyphIndex
intReturns the advance width for the given glyph.
Depends on 'hmtx' table.
public ushort GetGlyphWidth(int glyphIndex)
glyphIndex
intReturns the array of user interface strings associated with each palette entry.
Depends on 'CpalDraw', 'name' tables.
public string[] GetPaletteEntryLabels()
Returns the array of font palettes (from CPAL table).
Depends on 'CpalDraw', 'name'(optionally) tables.
public CpalPalette[] GetPalettes()
Returns a HashSet with all supported Unicode characters.
Depends on 'cmap' table.
public HashSet<int> GetUnicodeChars()
Returns a string with the list of supported Unicode ranges.
Depends on 'OS/2' table.
public string GetUnicodeRanges()
Returns a value indicating if the specified OpenType table is loaded.
public bool IsLoaded(TableTag tag)
tag
TableTagLoads the missing OpenType tables specified with an array of tags.
public void LoadTables(params TableTag[] tags)
tags
TableTag[]Returns the glyph index for the specified Unicode character.
Depends on 'cmap' table.
public ushort MapChar(int unicodeChar)
unicodeChar
intTries to return index of the glyph by its name from "post" table.
Depends on 'post' table.
public bool TryGetGlyphIndex(string glyphName, out ushort glyphIndex)
glyphName
stringglyphIndex
ushortMaps the specified set of Unicode characters to the font glyphs and fills the set of successfully mapped characters.
Depends on 'cmap' table.
public void TryMapChars(HashSet<int> unicodeChars, HashSet<int> mappedChars)
unicodeChars
System.Collections.Generic.HashSet<T><int>mappedChars
System.Collections.Generic.HashSet<T><int>Unloads OpenType tables specified with an array of tags.
public bool UnloadTables(params TableTag[] tags)
tags
TableTag[]True if one or more tables were unloaded, False otherwise.