Class SubstitutingCmapLookup

java.lang.Object
org.apache.fontbox.ttf.SubstitutingCmapLookup
All Implemented Interfaces:
CmapLookup

public class SubstitutingCmapLookup extends Object implements CmapLookup
A cmap lookup that performs substitution via the 'GSUB' table.
  • Field Details

  • Constructor Details

  • Method Details

    • getGlyphId

      public int getGlyphId(int characterCode)
      Description copied from interface: CmapLookup
      Returns the GlyphId linked with the given character code.
      Specified by:
      getGlyphId in interface CmapLookup
      Parameters:
      characterCode - the given character code to be mapped
      Returns:
      glyphId the corresponding glyph id for the given character code
    • getCharCodes

      public List<Integer> getCharCodes(int gid)
      Description copied from interface: CmapLookup
      Returns all possible character codes for the given gid, or null if there is none.
      Specified by:
      getCharCodes in interface CmapLookup
      Parameters:
      gid - glyph id
      Returns:
      a list with all character codes the given gid maps to