Class GlyphTable.UseSpec
- java.lang.Object
-
- org.apache.fop.complexscripts.fonts.GlyphTable.UseSpec
-
- All Implemented Interfaces:
java.lang.Comparable
- Enclosing class:
- GlyphTable
public static class GlyphTable.UseSpec extends java.lang.Object implements java.lang.Comparable
TheUseSpec
class comprises a lookup table reference and the feature that selected the lookup table.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
feature
feature that caused selection of the lookup tableprivate GlyphTable.LookupTable
lookupTable
lookup table to apply
-
Constructor Summary
Constructors Constructor Description UseSpec(GlyphTable.LookupTable lookupTable, java.lang.String feature)
Construct a glyph lookup table use specification.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(java.lang.Object o)
boolean
equals(java.lang.Object o)
java.lang.String
getFeature()
GlyphTable.LookupTable
getLookupTable()
int
hashCode()
boolean
position(GlyphSequence gs, java.lang.String script, java.lang.String language, int fontSize, int[] widths, int[][] adjustments, ScriptContextTester sct)
Perform positioning processing using this use specification's lookup table.GlyphSequence
substitute(GlyphSequence gs, java.lang.String script, java.lang.String language, ScriptContextTester sct)
Perform substitution processing using this use specification's lookup table.
-
-
-
Field Detail
-
lookupTable
private final GlyphTable.LookupTable lookupTable
lookup table to apply
-
feature
private final java.lang.String feature
feature that caused selection of the lookup table
-
-
Constructor Detail
-
UseSpec
public UseSpec(GlyphTable.LookupTable lookupTable, java.lang.String feature)
Construct a glyph lookup table use specification.- Parameters:
lookupTable
- a glyph lookup tablefeature
- a feature that caused lookup table selection
-
-
Method Detail
-
getLookupTable
public GlyphTable.LookupTable getLookupTable()
- Returns:
- the lookup table
-
getFeature
public java.lang.String getFeature()
- Returns:
- the feature that selected this lookup table
-
substitute
public GlyphSequence substitute(GlyphSequence gs, java.lang.String script, java.lang.String language, ScriptContextTester sct)
Perform substitution processing using this use specification's lookup table.- Parameters:
gs
- an input glyph sequencescript
- a script identifierlanguage
- a language identifiersct
- a script specific context tester (or null)- Returns:
- the substituted (output) glyph sequence
-
position
public boolean position(GlyphSequence gs, java.lang.String script, java.lang.String language, int fontSize, int[] widths, int[][] adjustments, ScriptContextTester sct)
Perform positioning processing using this use specification's lookup table.- Parameters:
gs
- an input glyph sequencescript
- a script identifierlanguage
- a language 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
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interfacejava.lang.Comparable
-
-