|
fop 2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.complexscripts.fonts.GlyphTable
public class GlyphTable
Base class for all advanced typographic glyph tables.
This work was originally authored by Glenn Adams (gadams@apache.org).
Nested Class Summary | |
---|---|
static class |
GlyphTable.ChainedClassSequenceRule
The ChainedClassSequenceRule class implements a subclass of ClassSequenceRule
that supports matching on a specific glyph class sequence in a specific chained contextual. |
static class |
GlyphTable.ChainedCoverageSequenceRule
The ChainedCoverageSequenceRule class implements a subclass of CoverageSequenceRule
that supports matching on a specific glyph class sequence in a specific chained contextual. |
static class |
GlyphTable.ChainedGlyphSequenceRule
The ChainedGlyphSequenceRule class implements a subclass of GlyphSequenceRule
that supports matching on a specific glyph sequence in a specific chained contextual. |
static class |
GlyphTable.ClassSequenceRule
The ClassSequenceRule class implements a subclass of Rule
that supports matching on a specific glyph class sequence. |
static class |
GlyphTable.CoverageSequenceRule
The CoverageSequenceRule class implements a subclass of Rule
that supports matching on a specific glyph coverage sequence. |
static class |
GlyphTable.GlyphSequenceRule
The GlyphSequenceRule class implements a subclass of Rule
that supports matching on a specific glyph sequence. |
static class |
GlyphTable.HomogeneousRuleSet
The HomogenousRuleSet class implements a collection of rules, which
must be the same rule type (i.e., same concrete rule class) or null. |
static class |
GlyphTable.LookupSpec
A structure class encapsulating a lookup specification as a <script,language,feature> tuple. |
static class |
GlyphTable.LookupTable
The LookupTable class comprising an identifier and an ordered list
of glyph subtables, each of which employ the same lookup identifier. |
static class |
GlyphTable.Rule
The Rule class implements an array of rule lookup records. |
static class |
GlyphTable.RuleLookup
The RuleLookup class implements a rule lookup record, comprising
a glyph sequence index and a lookup table index (in an applicable lookup list). |
static class |
GlyphTable.RuleSet
The RuleSet class implements a collection of rules, which
may or may not be the same rule type. |
static class |
GlyphTable.UseSpec
The UseSpec class comprises a lookup table reference
and the feature that selected the lookup table. |
Field Summary | |
---|---|
static int |
GLYPH_TABLE_TYPE_BASELINE
baseline glyph table type |
static int |
GLYPH_TABLE_TYPE_DEFINITION
definition glyph table type |
static int |
GLYPH_TABLE_TYPE_JUSTIFICATION
justification glyph table type |
static int |
GLYPH_TABLE_TYPE_POSITIONING
positioning glyph table type |
static int |
GLYPH_TABLE_TYPE_SUBSTITUTION
substitution glyph table type |
protected java.util.Map<java.lang.String,ScriptProcessor> |
processors
|
Constructor Summary | |
---|---|
GlyphTable(GlyphTable gdef,
java.util.Map<GlyphTable.LookupSpec,java.util.List<java.lang.String>> lookups,
java.util.Map<java.lang.String,ScriptProcessor> processors)
Instantiate glyph table with specified lookups. |
Method Summary | |
---|---|
protected void |
addSubtable(GlyphSubtable subtable)
Add a subtable. |
GlyphTable.UseSpec[] |
assembleLookups(java.lang.String[] features,
java.util.Map<GlyphTable.LookupSpec,java.util.List<GlyphTable.LookupTable>> lookups)
Assemble ordered array of lookup table use specifications according to the specified features and candidate lookups, where the order of the array is in accordance to the order of the applicable lookup list. |
java.util.List<GlyphTable.LookupTable> |
findLookupTables(GlyphTable.LookupSpec ls)
Obtain ordered list of glyph lookup tables that match a specific lookup specification. |
protected void |
freezeSubtables()
Freeze subtables, i.e., do not allow further subtable addition, and create resulting cached state. |
GlyphDefinitionTable |
getGlyphDefinitions()
Obtain glyph definition table. |
java.util.List<GlyphTable.LookupSpec> |
getLookups()
Obtain list of all lookup specifications. |
GlyphTable.LookupTable |
getLookupTable(java.lang.String lid)
Obtain lookup table by lookup id. |
java.util.List<GlyphTable.LookupTable> |
getLookupTables()
Obtain ordered list of all lookup tables, where order is by lookup identifier, which lexicographic ordering follows the lookup list order. |
static int |
getTableTypeFromName(java.lang.String name)
Obtain glyph table type from name. |
boolean |
hasFeature(java.lang.String script,
java.lang.String language,
java.lang.String feature)
Determine if table supports specific feature, i.e., supports at least one lookup. |
java.util.Map<GlyphTable.LookupSpec,java.util.List<GlyphTable.LookupTable>> |
matchLookups(java.lang.String script,
java.lang.String language,
java.lang.String feature)
Match lookup specifications according to <script,language,feature> tuple, where '*' is a wildcard for a tuple component. |
java.util.List<GlyphTable.LookupSpec> |
matchLookupSpecs(java.lang.String script,
java.lang.String language,
java.lang.String feature)
Match lookup specifications according to <script,language,feature> tuple, where '*' is a wildcard for a tuple component. |
static void |
resolveLookupReferences(GlyphTable.RuleSet[] rsa,
java.util.Map<java.lang.String,GlyphTable.LookupTable> lookupTables)
Resolve references to lookup tables in a collection of rules sets. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int GLYPH_TABLE_TYPE_SUBSTITUTION
public static final int GLYPH_TABLE_TYPE_POSITIONING
public static final int GLYPH_TABLE_TYPE_JUSTIFICATION
public static final int GLYPH_TABLE_TYPE_BASELINE
public static final int GLYPH_TABLE_TYPE_DEFINITION
protected java.util.Map<java.lang.String,ScriptProcessor> processors
Constructor Detail |
---|
public GlyphTable(GlyphTable gdef, java.util.Map<GlyphTable.LookupSpec,java.util.List<java.lang.String>> lookups, java.util.Map<java.lang.String,ScriptProcessor> processors)
gdef
- glyph definition table that applieslookups
- map from lookup specs to lookup tablesMethod Detail |
---|
public GlyphDefinitionTable getGlyphDefinitions()
public java.util.List<GlyphTable.LookupSpec> getLookups()
public java.util.List<GlyphTable.LookupTable> getLookupTables()
public GlyphTable.LookupTable getLookupTable(java.lang.String lid)
lid
- lookup id
protected void addSubtable(GlyphSubtable subtable)
subtable
- a (non-null) glyph subtableprotected void freezeSubtables()
public java.util.List<GlyphTable.LookupSpec> matchLookupSpecs(java.lang.String script, java.lang.String language, java.lang.String feature)
script
- a script identifierlanguage
- a language identifierfeature
- a feature identifier
public java.util.Map<GlyphTable.LookupSpec,java.util.List<GlyphTable.LookupTable>> matchLookups(java.lang.String script, java.lang.String language, java.lang.String feature)
script
- a script identifierlanguage
- a language identifierfeature
- a feature identifier
public java.util.List<GlyphTable.LookupTable> findLookupTables(GlyphTable.LookupSpec ls)
ls
- a (non-null) lookup specification
public GlyphTable.UseSpec[] assembleLookups(java.lang.String[] features, java.util.Map<GlyphTable.LookupSpec,java.util.List<GlyphTable.LookupTable>> lookups)
features
- array of feature identifiers to applylookups
- a mapping from lookup specifications to lists of look tables from which to select lookup tables according to the specified features
public boolean hasFeature(java.lang.String script, java.lang.String language, java.lang.String feature)
script
- to qualify feature lookuplanguage
- to qualify feature lookupfeature
- to test
public java.lang.String toString()
toString
in class java.lang.Object
public static int getTableTypeFromName(java.lang.String name)
name
- of table type to map to type value
public static void resolveLookupReferences(GlyphTable.RuleSet[] rsa, java.util.Map<java.lang.String,GlyphTable.LookupTable> lookupTables)
rsa
- array of rule setslookupTables
- map from lookup table identifers, e.g. "lu4", to lookup tables
|
fop 2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |