Class GlyphTable.LookupTable
java.lang.Object
org.apache.fop.complexscripts.fonts.GlyphTable.LookupTable
- All Implemented Interfaces:
Comparable
- Enclosing class:
- GlyphTable
The
LookupTable
class comprising an identifier and an ordered list
of glyph subtables, each of which employ the same lookup identifier.-
Constructor Summary
ConstructorDescriptionLookupTable
(String id, List<GlyphSubtable> subtables) Instantiate a LookupTable.LookupTable
(String id, GlyphSubtable subtable) Instantiate a LookupTable. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addSubtable
(GlyphSubtable subtable) Add a subtable into this lookup table's collecion of subtables according to its natural order.int
boolean
void
freezeSubtables
(Map<String, GlyphTable.LookupTable> lookupTables) Freeze subtables, i.e., do not allow further subtable addition, and create resulting cached state.int
hashCode()
boolean
Determine if this glyph table performs positioning.boolean
Determine if this glyph table performs substitution.boolean
position
(GlyphPositioningState ps, int sequenceIndex) Perform positioning processing on an existing glyph positioning state object using this lookup table's subtables.boolean
position
(GlyphSequence gs, String script, String language, String feature, int fontSize, int[] widths, int[][] adjustments, ScriptContextTester sct) Perform positioning processing using this lookup table's subtables.substitute
(GlyphSubstitutionState ss, int sequenceIndex) Perform substitution processing on an existing glyph substitution state object using this lookup table's subtables.substitute
(GlyphSequence gs, String script, String language, String feature, ScriptContextTester sct) Perform substitution processing using this lookup table's subtables.toString()
-
Constructor Details
-
LookupTable
Instantiate a LookupTable.- Parameters:
id
- the lookup table's identifiersubtable
- an initial subtable (or null)
-
LookupTable
Instantiate a LookupTable.- Parameters:
id
- the lookup table's identifiersubtables
- a pre-poplated list of subtables or null
-
-
Method Details
-
getSubtables
- Returns:
- the subtables as an array
-
addSubtable
Add a subtable into this lookup table's collecion of subtables according to its natural order.- Parameters:
subtable
- to add- Returns:
- true if subtable was not already present, otherwise false
-
freezeSubtables
Freeze subtables, i.e., do not allow further subtable addition, and create resulting cached state. In addition, resolve any references to lookup tables that appear in this lookup table's subtables.- Parameters:
lookupTables
- map from lookup table identifers, e.g. "lu4", to lookup tables
-
performsSubstitution
public boolean performsSubstitution()Determine if this glyph table performs substitution.- Returns:
- true if it performs substitution
-
substitute
public GlyphSequence substitute(GlyphSequence gs, String script, String language, String feature, ScriptContextTester sct) Perform substitution processing using this lookup table's subtables.- Parameters:
gs
- an input glyph sequencescript
- a script identifierlanguage
- a language identifierfeature
- a feature identifiersct
- a script specific context tester (or null)- Returns:
- the substituted (output) glyph sequence
-
substitute
Perform substitution processing on an existing glyph substitution state object using this lookup table's subtables.- Parameters:
ss
- a glyph substitution state objectsequenceIndex
- if non negative, then apply subtables only at specified sequence index- Returns:
- the substituted (output) glyph sequence
-
performsPositioning
public boolean performsPositioning()Determine if this glyph table performs positioning.- Returns:
- true if it performs positioning
-
position
public boolean position(GlyphSequence gs, String script, String language, String feature, int fontSize, int[] widths, int[][] adjustments, ScriptContextTester sct) Perform positioning processing using this lookup table's subtables.- Parameters:
gs
- an input glyph sequencescript
- a script identifierlanguage
- a language identifierfeature
- a feature identifierfontSize
- size in device unitswidths
- array of default advancements for each glyph in fontadjustments
- accumulated adjustments array (sequence) of 4-tuples of placement [PX,PY] and advance [AX,AY] adjustments, in that order, with one 4-tuple for each element of glyph sequencesct
- a script specific context tester (or null)- Returns:
- true if some adjustment is not zero; otherwise, false
-
position
Perform positioning processing on an existing glyph positioning state object using this lookup table's subtables.- Parameters:
ps
- a glyph positioning state objectsequenceIndex
- if non negative, then apply subtables only at specified sequence index- Returns:
- true if some adjustment is not zero; otherwise, false
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable
- Returns:
- the result of comparing the identifier of the specified lookup table with the identifier of this lookup table; lookup table identifiers take the form "lu(DIGIT)+", with comparison based on numerical ordering of numbers expressed by (DIGIT)+.
-
toString
-