Top Description Fields Constructors Methods
org.apache.fontbox.ttf

public Class SubstitutingCmapLookup

extends Object
implements CmapLookup
Class Inheritance
All Implemented Interfaces
org.apache.fontbox.ttf.CmapLookup
Imports
java.util.List

A cmap lookup that performs substitution via the 'GSUB' table.
Author
Aaron Madlon-Kay

Field Summary

Modifier and TypeField and Description
private final CmapSubtable
private final List<String>
private final GlyphSubstitutionTable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<Integer>
getCharCodes(int
glyph id
gid
)

Implements org.apache.fontbox.ttf.CmapLookup.getCharCodes.

Returns all possible character codes for the given gid, or null if there is none.

public int
getGlyphId(int
the given character code to be mapped
characterCode
)

Implements org.apache.fontbox.ttf.CmapLookup.getGlyphId.

Returns the GlyphId linked with the given character code.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cmapback to summary
private final CmapSubtable cmap
enabledFeaturesback to summary
private final List<String> enabledFeatures
gsubback to summary
private final GlyphSubstitutionTable gsub

Constructor Detail

SubstitutingCmapLookupback to summary
public SubstitutingCmapLookup(CmapSubtable cmap, GlyphSubstitutionTable gsub, List<String> enabledFeatures)

Method Detail

getCharCodesback to summary
public List<Integer> getCharCodes(int gid)

Implements org.apache.fontbox.ttf.CmapLookup.getCharCodes.

Doc from org.apache.fontbox.ttf.CmapLookup.getCharCodes.

Returns all possible character codes for the given gid, or null if there is none.

Parameters
gid:int

glyph id

Returns:List<Integer>

a list with all character codes the given gid maps to

Annotations
@Override
getGlyphIdback to summary
public int getGlyphId(int characterCode)

Implements org.apache.fontbox.ttf.CmapLookup.getGlyphId.

Doc from org.apache.fontbox.ttf.CmapLookup.getGlyphId.

Returns the GlyphId linked with the given character code.

Parameters
characterCode:int

the given character code to be mapped

Returns:int

glyphId the corresponding glyph id for the given character code

Annotations
@Override