public static class GlyphTable.LookupTable
extends java.lang.Object
implements java.lang.Comparable
LookupTable
class comprising an identifier and an ordered list
of glyph subtables, each of which employ the same lookup identifier.Constructor and Description |
---|
GlyphTable.LookupTable(java.lang.String id,
GlyphSubtable subtable)
Instantiate a LookupTable.
|
GlyphTable.LookupTable(java.lang.String id,
java.util.List subtables)
Instantiate a LookupTable.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addSubtable(GlyphSubtable subtable)
Add a subtable into this lookup table's collecion of subtables according to its
natural order.
|
int |
compareTo(java.lang.Object o) |
boolean |
equals(java.lang.Object o) |
void |
freezeSubtables(java.util.Map lookupTables)
Freeze subtables, i.e., do not allow further subtable addition, and
create resulting cached state.
|
java.lang.String |
getId() |
GlyphSubtable[] |
getSubtables() |
int |
hashCode() |
boolean |
performsPositioning()
Determine if this glyph table performs positioning.
|
boolean |
performsSubstitution()
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,
java.lang.String script,
java.lang.String language,
java.lang.String feature,
int fontSize,
int[] widths,
int[][] adjustments,
ScriptContextTester sct)
Perform positioning processing using this lookup table's subtables.
|
GlyphSequence |
substitute(GlyphSequence gs,
java.lang.String script,
java.lang.String language,
java.lang.String feature,
ScriptContextTester sct)
Perform substitution processing using this lookup table's subtables.
|
GlyphSequence |
substitute(GlyphSubstitutionState ss,
int sequenceIndex)
Perform substitution processing on an existing glyph substitution state object using this lookup table's subtables.
|
java.lang.String |
toString() |
public GlyphTable.LookupTable(java.lang.String id, GlyphSubtable subtable)
id
- the lookup table's identifiersubtable
- an initial subtable (or null)public GlyphTable.LookupTable(java.lang.String id, java.util.List subtables)
id
- the lookup table's identifiersubtables
- a pre-poplated list of subtables or nullpublic java.lang.String getId()
public GlyphSubtable[] getSubtables()
public boolean addSubtable(GlyphSubtable subtable)
subtable
- to addpublic void freezeSubtables(java.util.Map lookupTables)
lookupTables
- map from lookup table identifers, e.g. "lu4", to lookup tablespublic boolean performsSubstitution()
public GlyphSequence substitute(GlyphSequence gs, java.lang.String script, java.lang.String language, java.lang.String feature, ScriptContextTester sct)
gs
- an input glyph sequencescript
- a script identifierlanguage
- a language identifierfeature
- a feature identifiersct
- a script specific context tester (or null)public GlyphSequence substitute(GlyphSubstitutionState ss, int sequenceIndex)
ss
- a glyph substitution state objectsequenceIndex
- if non negative, then apply subtables only at specified sequence indexpublic boolean performsPositioning()
public boolean position(GlyphSequence gs, java.lang.String script, java.lang.String language, java.lang.String feature, int fontSize, int[] widths, int[][] adjustments, ScriptContextTester sct)
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)public boolean position(GlyphPositioningState ps, int sequenceIndex)
ps
- a glyph positioning state objectsequenceIndex
- if non negative, then apply subtables only at specified sequence indexpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.