[]
        
(Showing Draft Content)

GrapeCity.Documents.Text.FontTables

Class FontTables

Namespace
GrapeCity.Documents.Text
Assembly
GcDocs.Imaging.dll

Represents a font instance with a set of OpenType tables, and provides methods allowing to retrieve information contained in those tables.

public class FontTables
Inheritance
object
FontTables
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Font

Gets the Font associated with this FontTables instance.

public Font Font { get; }

Property Value

Font

Methods

GetExtenderGlyphs(ScriptTag)

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)

Parameters

scriptTag ScriptTag

Returns

ushort[]

GetGlyphHeight(int)

Returns the advance height for the given glyph.

Depends on 'vmtx' table.

public ushort GetGlyphHeight(int glyphIndex)

Parameters

glyphIndex int

Returns

ushort

GetGlyphName(int)

Returns name of the glyph from "post" table.

Depends on 'post' table.

public string GetGlyphName(int glyphIndex)

Parameters

glyphIndex int

Returns

string

GetGlyphVertOriginY(int)

Gets 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)

Parameters

glyphIndex int

Returns

short

GetGlyphWidth(int)

Returns the advance width for the given glyph.

Depends on 'hmtx' table.

public ushort GetGlyphWidth(int glyphIndex)

Parameters

glyphIndex int

Returns

ushort

GetPaletteEntryLabels()

Returns the array of user interface strings associated with each palette entry.

Depends on 'CpalDraw', 'name' tables.

public string[] GetPaletteEntryLabels()

Returns

string[]

GetPalettes()

Returns the array of font palettes (from CPAL table).

Depends on 'CpalDraw', 'name'(optionally) tables.

public CpalPalette[] GetPalettes()

Returns

CpalPalette[]

GetUnicodeChars()

Returns a HashSet with all supported Unicode characters.

Depends on 'cmap' table.

public HashSet<int> GetUnicodeChars()

Returns

System.Collections.Generic.HashSet<T><int>

GetUnicodeRanges()

Returns a string with the list of supported Unicode ranges.

Depends on 'OS/2' table.

public string GetUnicodeRanges()

Returns

string

IsLoaded(TableTag)

Returns a value indicating if the specified OpenType table is loaded.

public bool IsLoaded(TableTag tag)

Parameters

tag TableTag

Returns

bool

LoadTables(params TableTag[])

Loads the missing OpenType tables specified with an array of tags.

public void LoadTables(params TableTag[] tags)

Parameters

tags TableTag[]

MapChar(int)

Returns the glyph index for the specified Unicode character.

Depends on 'cmap' table.

public ushort MapChar(int unicodeChar)

Parameters

unicodeChar int

Returns

ushort

TryGetGlyphIndex(string, out ushort)

Tries to return index of the glyph by its name from "post" table.

Depends on 'post' table.

public bool TryGetGlyphIndex(string glyphName, out ushort glyphIndex)

Parameters

glyphName string
glyphIndex ushort

Returns

bool

TryMapChars(HashSet<int>, HashSet<int>)

Maps 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)

Parameters

unicodeChars System.Collections.Generic.HashSet<T><int>
mappedChars System.Collections.Generic.HashSet<T><int>

UnloadTables(params TableTag[])

Unloads OpenType tables specified with an array of tags.

public bool UnloadTables(params TableTag[] tags)

Parameters

tags TableTag[]

Returns

bool

True if one or more tables were unloaded, False otherwise.