Class TrueTypeCmapSubtable


  • public class TrueTypeCmapSubtable
    extends Object
    Instance of this class represents CMap subtable of Type 1 font.
    Author:
    Sergey Shemyakov
    • Constructor Detail

      • TrueTypeCmapSubtable

        public TrueTypeCmapSubtable​(int platformID,
                                    int encodingID,
                                    long offset)
        Constructor.
        Parameters:
        platformID - is platform ID of CMap.
        encodingID - is encoding ID of CMap.
        offset - is byte offset at which CMap data can be found.
    • Method Detail

      • getOffset

        public long getOffset()
        Returns:
        byte offset at which CMap data can be found.
      • put

        public void put​(Integer key,
                        Integer value)
        Method adds mapping CID -> GID to CMap.
        Parameters:
        key - is CID.
        value - is GID.
      • getGlyph

        public int getGlyph​(int code)
        Gets GID for specified CID.
        Parameters:
        code - is character code.
        Returns:
        glyph ID for this character code.
      • containsGlyph

        public boolean containsGlyph​(int glyphCode)
        Checks if particular glyph ID is present in this CMap.
        Parameters:
        glyphCode - is glyph ID.
        Returns:
        true if glyph is present in this CMap.
      • containsCID

        public boolean containsCID​(int cid)
        Checks if particular character ID is present in this CMap.
        Parameters:
        cid - is character ID.
        Returns:
        true if this CID is present.
      • isStandardEncodingCMap

        public boolean isStandardEncodingCMap()