com.aspose.font

Interfaces

Classes

Enums

Exceptions

com.aspose.font

Class Type1Encoding

    • Method Detail

      • decodeToGid

        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.

        Specified by:
        decodeToGid in interface IFontEncoding
        Parameters:
        charCode - Character code to get glyph identifier for.
        Returns:
        Glyph identifier related to character code passed.
      • decodeToGidParameterized

        public GlyphId decodeToGidParameterized(IEncodingParameters parameters,
                                                long charCode)

        Parameterized decode method. Not supported for Type1 Font type.

        Specified by:
        decodeToGidParameterized in interface IFontEncoding
        Parameters:
        parameters - Not supported for Type1 Font type.
        charCode - Not supported for Type1 Font type.
        Returns:
        Not supported for Type1 Font type.
      • encode

        public void encode(long gid,
                           long charCode)

        Encodes the glyph. For TTF Fonts the character code is unicode. Not supported for Type1 Font types.

        Specified by:
        encode in interface IFontEncoding
        Parameters:
        gid - Glyph id.
        charCode - Character code associated with the glyph id.
      • gidToUnicode

        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.

        Specified by:
        gidToUnicode in interface IFontEncoding
        Parameters:
        gid - Glyph identifier of symbol to decode.
        Returns:
        Unicode value related to glyph id passed.
      • unicodeToGid

        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.

        Specified by:
        unicodeToGid in interface IFontEncoding
        Parameters:
        unicode - Unicode to get glyph identifier for.
        Returns:
        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".

        Specified by:
        getNameToCharCodeIndex in interface ISupportsNameAddressing
        Returns:
        Name to character code encoding map.