TtfEncoding

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.font.IFontEncoding

public class TtfEncoding implements IFontEncoding

Represents TTF Font encoding.

Methods

MethodDescription
decodeToGid(long unicode)TTF Font’s DecodeToGlyphId implementation finds unicode table and returns glyph id for unicode char.
decodeToGidParameterized(IEncodingParameters parameters, long charCode)Parametrized version allows to use specific CMap table (not unicode).
encode(long gid, long charCode)Encodes the glyph.
equals(Object arg0)
getClass()
gidToUnicode(GlyphId glyphId)Decodes glyph id to unicode.
hashCode()
notify()
notifyAll()
toString()
unicodeToGid(long unicode)Decodes a unicode and returns glyph id.
wait()
wait(long arg0)
wait(long arg0, int arg1)

decodeToGid(long unicode)

public GlyphId decodeToGid(long unicode)

TTF Font’s DecodeToGlyphId implementation finds unicode table and returns glyph id for unicode char. 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:

ParameterTypeDescription
unicodelongCharacter 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)

Parametrized version allows to use specific CMap table (not unicode).

Parameters:

ParameterTypeDescription
parametersIEncodingParametersImplementation of IEncodingParameters interface.
charCodelongcharacter code to get glyph identifier for.

Returns: GlyphId - Glyph identifier related to character code passed.

encode(long gid, long charCode)

public void encode(long gid, long charCode)

Encodes the glyph. For TTF Fonts the character code is unicode.

Parameters:

ParameterTypeDescription
gidlongGlyph identifier.
charCodelongCharacter code.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

gidToUnicode(GlyphId glyphId)

public long gidToUnicode(GlyphId glyphId)

Decodes glyph id 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:

ParameterTypeDescription
glyphIdGlyphIdGlyph identifier of symbol to decode.

Returns: long - Unicode value related to glyph id passed.

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toString()

public String toString()

Returns: java.lang.String

unicodeToGid(long unicode)

public GlyphId unicodeToGid(long unicode)

Decodes a unicode and returns glyph id.

Parameters:

ParameterTypeDescription
unicodelongUnicode to get glyph identifier for.

Returns: GlyphId - Glyph identifier related to unicode passed.

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int