Package com.tom_roush.fontbox.ttf
Class SubstitutingCmapLookup
- java.lang.Object
-
- com.tom_roush.fontbox.ttf.SubstitutingCmapLookup
-
- All Implemented Interfaces:
CmapLookup
public class SubstitutingCmapLookup extends Object implements CmapLookup
A cmap lookup that performs substitution via the 'GSUB' table.
-
-
Constructor Summary
Constructors Constructor Description SubstitutingCmapLookup(CmapSubtable cmap, GlyphSubstitutionTable gsub, List<String> enabledFeatures)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Integer>getCharCodes(int gid)Returns all possible character codes for the given gid, or null if there is none.intgetGlyphId(int characterCode)Returns the GlyphId linked with the given character code.
-
-
-
Constructor Detail
-
SubstitutingCmapLookup
public SubstitutingCmapLookup(CmapSubtable cmap, GlyphSubstitutionTable gsub, List<String> enabledFeatures)
-
-
Method Detail
-
getGlyphId
public int getGlyphId(int characterCode)
Description copied from interface:CmapLookupReturns the GlyphId linked with the given character code.- Specified by:
getGlyphIdin interfaceCmapLookup- 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:CmapLookupReturns all possible character codes for the given gid, or null if there is none.- Specified by:
getCharCodesin interfaceCmapLookup- Parameters:
gid- glyph id- Returns:
- a list with all character codes the given gid maps to
-
-