Package org.apache.fontbox.ttf.gsub
Class GlyphSubstitutionDataExtractor
java.lang.Object
org.apache.fontbox.ttf.gsub.GlyphSubstitutionDataExtractor
This class has utility methods to extract meaningful GsubData from the highly obfuscated GSUB
Tables. This GsubData is then used to determine which combination of glyphs or words have to be
replaced.
- Author:
- Palash Ray
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGsubData(String scriptName, ScriptTable scriptTable, FeatureListTable featureListTable, LookupListTable lookupListTable) UnlikegetGsubData(Map, FeatureListTable, LookupListTable), this method doesn't iterate over supportedLanguage's searching for the first match with the scripts of the font.getGsubData(Map<String, ScriptTable> scriptList, FeatureListTable featureListTable, LookupListTable lookupListTable)
-
Constructor Details
-
GlyphSubstitutionDataExtractor
public GlyphSubstitutionDataExtractor()
-
-
Method Details
-
getGsubData
public GsubData getGsubData(Map<String, ScriptTable> scriptList, FeatureListTable featureListTable, LookupListTable lookupListTable) -
getGsubData
public GsubData getGsubData(String scriptName, ScriptTable scriptTable, FeatureListTable featureListTable, LookupListTable lookupListTable) UnlikegetGsubData(Map, FeatureListTable, LookupListTable), this method doesn't iterate over supportedLanguage's searching for the first match with the scripts of the font. Instead, it unconditionally createsGlyphSubstitutionDataExtractor.ScriptTableDetailsinstance with language left unspecified.- Parameters:
scriptName-scriptTable-featureListTable-lookupListTable-- Returns:
GsubDatainstance built especially for the givenscriptName
-