Interface IFontEncoding

IFontEncoding interface

Defines an interface for Font encoding.

public interface IFontEncoding

Methods

NameDescription
DecodeToGid(uint)Decodes a character code and returns glyph id. Glyph id is a unique number for a glyph, which is font type dependent. For example: Type1’s id is a glyph name, instance of (GlyphStringId) class. TTF’s id is an int index, instance of (GlyphUInt32Id) class. Note: character code is not necessary a unicode. Character code is a char index in Font encoding “table”.
DecodeToGidParameterized(IEncodingParameters, uint)Parameterized decode method. Some font types can have multiple encoding algorithms/maps. So, IEncodingParameters interface is used to create concrete font encoding parameters.
Encode(uint, uint)Encodes the glyph. For TTF Fonts the charCode is unicode.
GidToUnicode(GlyphId)Decodes Gid to unicode. Glyph id is a unique number for a glyph, which is font type dependent. For example: Type1’s id is a glyph name, instance of (GlyphStringId) class. TTF’s id is an int index, instance of (GlyphUInt32Id) class.
UnicodeToGid(uint)Decodes a unicode and returns glyph id. Glyph id is a unique number for a glyph, which is font type dependent. For example: Type1’s id is a glyph name, instance of (GlyphStringId) class. TTF’s id is an int index, instance of (GlyphUInt32Id) class.

See Also