Type1Encoding
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.font.IFontEncoding, com.aspose.font.ISupportsNameAddressing
public class Type1Encoding implements IFontEncoding, ISupportsNameAddressing
Represents Type1 Font encoding.
Methods
Method | Description |
---|---|
decodeToGid(long charCode) | Decodes Gid to unicode. |
decodeToGidParameterized(IEncodingParameters parameters, long charCode) | Parameterized decode method. |
encode(long gid, long charCode) | Encodes the glyph. |
gidToUnicode(GlyphId gid) | Decodes Gid to Unicode. |
unicodeToGid(long unicode) | Returns GlyphId for unicode. |
getNameToCharCodeIndex() | Returns name to character code encoding map. |
decodeToGid(long charCode)
public GlyphId decodeToGid(long charCode)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
charCode | long | Character code to get glyph identifier for. |
Returns: GlyphId - Glyph identifier related to character code passed.
decodeToGidParameterized(IEncodingParameters parameters, long charCode)
public GlyphId decodeToGidParameterized(IEncodingParameters parameters, long charCode)
Parameterized decode method. Not supported for Type1 Font type.
Parameters:
Parameter | Type | Description |
---|---|---|
parameters | IEncodingParameters | Not supported for Type1 Font type. |
charCode | long | Not supported for Type1 Font type. |
Returns: GlyphId - Not supported for Type1 Font type.
encode(long gid, long charCode)
public void encode(long gid, long charCode)
Encodes the glyph. For TTF Fonts the character code is unicode. Not supported for Type1 Font types.
Parameters:
Parameter | Type | Description |
---|---|---|
gid | long | Glyph id. |
charCode | long | Character code associated with the glyph id. |
gidToUnicode(GlyphId gid)
public 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.
Parameters:
Parameter | Type | Description |
---|---|---|
gid | GlyphId | Glyph identifier of symbol to decode. |
Returns: long - Unicode value related to glyph id passed.
unicodeToGid(long unicode)
public GlyphId unicodeToGid(long unicode)
Returns GlyphId for unicode. Or notdef if font doesn’t contain glyph for the 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.
Parameters:
Parameter | Type | Description |
---|---|---|
unicode | long | Unicode to get glyph identifier for. |
Returns: GlyphId - Glyph identifier related to unicode passed.
getNameToCharCodeIndex()
public NameToCodeMap getNameToCharCodeIndex()
Returns name to character code encoding map. Note: Character code is not a unicode. Character code is a char index in Font encoding “table”.
Returns: NameToCodeMap - Name to character code encoding map.