public interface IFontEncoding
Defines an interface for Font encoding.
| Modifier and Type | Method and Description |
|---|---|
GlyphId |
decodeToGid(long charCode)
Decodes a character code and returns glyph id.
|
GlyphId |
decodeToGidParameterized(IEncodingParameters parameters,
long charCode)
Parameterized decode method.
|
void |
encode(long gid,
long charCode)
Encodes the glyph.
|
long |
gidToUnicode(GlyphId gid)
Decodes Gid to unicode.
|
GlyphId |
unicodeToGid(long unicode)
Decodes a unicode and returns glyph id.
|
long gidToUnicode(GlyphId gid)
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.
gid - Glyph identifier of symbol to decode.void encode(long gid,
long charCode)
Encodes the glyph. For TTF Fonts the charCode is unicode.
gid - Glyph id.charCode - Character code associated with the glyph id.GlyphId unicodeToGid(long unicode)
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.
unicode - Unicode to get glyph identifier for.GlyphId decodeToGid(long charCode)
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.
charCode - Character code to get glyph identifier for.GlyphId decodeToGidParameterized(IEncodingParameters parameters, long charCode)
Parameterized decode method.
Some font types can have multiple encoding algorithms/maps.
So, IEncodingParameters interface is used to create concrete font encoding parameters.
parameters - Implementation of IEncodingParameters interface.charCode - Character code to get glyph identifier for.Copyright © 2025 Aspose. All Rights Reserved.