org.apache.fontbox.ttf.gsub

## Class GlyphSubstitutionDataExtractor

- java.lang.Object
- - org.apache.fontbox.ttf.gsub.GlyphSubstitutionDataExtractor

    public class GlyphSubstitutionDataExtractor
    extends Object

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
Constructor and Description
`GlyphSubstitutionDataExtractor()`

### Method Summary

All Methods Instance Methods Concrete Methods
`GsubData` `getGsubData(Map<String,ScriptTable> scriptList, FeatureListTable featureListTable, LookupListTable lookupListTable)`
`GsubData` `getGsubData(String scriptName, ScriptTable scriptTable, FeatureListTable featureListTable, LookupListTable lookupListTable)` Unlike `getGsubData(Map, FeatureListTable, LookupListTable)`, this method doesn't iterate over supported `Language`'s searching for the first match with the scripts of the font.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### GlyphSubstitutionDataExtractor

    public GlyphSubstitutionDataExtractor()

### Method Detail

#### getGsubData

    public GsubData getGsubData(Map<String,ScriptTable> scriptList,
                                FeatureListTable featureListTable,
                                LookupListTable lookupListTable)

#### getGsubData

    public GsubData getGsubData(String scriptName,
                                ScriptTable scriptTable,
                                FeatureListTable featureListTable,
                                LookupListTable lookupListTable)

Unlike `getGsubData(Map, FeatureListTable, LookupListTable)`, this method doesn't iterate over supported `Language`'s searching for the first match with the scripts of the font. Instead, it unconditionally creates `ScriptTableDetails` instance with language left unspecified.

Parameters:
  `scriptName` -
  `scriptTable` -
  `featureListTable` -
  `lookupListTable` -
Returns:
  `GsubData` instance built especially for the given `scriptName`