public class GlyphDefinitionTable extends GlyphTable
The GlyphDefinitionTable
class is a glyph table that implements
glyph definition functionality according to the OpenType GDEF table.
This work was originally authored by Glenn Adams (gadams@apache.org).
GlyphTable.ChainedClassSequenceRule, GlyphTable.ChainedCoverageSequenceRule, GlyphTable.ChainedGlyphSequenceRule, GlyphTable.ClassSequenceRule, GlyphTable.CoverageSequenceRule, GlyphTable.GlyphSequenceRule, GlyphTable.HomogeneousRuleSet, GlyphTable.LookupSpec, GlyphTable.LookupTable, GlyphTable.Rule, GlyphTable.RuleLookup, GlyphTable.RuleSet, GlyphTable.UseSpec
Modifier and Type | Field and Description |
---|---|
static int |
GDEF_LOOKUP_TYPE_ATTACHMENT_POINT
attachment point subtable type
|
static int |
GDEF_LOOKUP_TYPE_GLYPH_CLASS
glyph class subtable type
|
static int |
GDEF_LOOKUP_TYPE_LIGATURE_CARET
ligature caret subtable type
|
static int |
GDEF_LOOKUP_TYPE_MARK_ATTACHMENT
mark attachment subtable type
|
static int |
GLYPH_CLASS_BASE
pre-defined glyph class - base glyph
|
static int |
GLYPH_CLASS_COMPONENT
pre-defined glyph class - component glyph
|
static int |
GLYPH_CLASS_LIGATURE
pre-defined glyph class - ligature glyph
|
static int |
GLYPH_CLASS_MARK
pre-defined glyph class - mark glyph
|
GLYPH_TABLE_TYPE_BASELINE, GLYPH_TABLE_TYPE_DEFINITION, GLYPH_TABLE_TYPE_JUSTIFICATION, GLYPH_TABLE_TYPE_POSITIONING, GLYPH_TABLE_TYPE_SUBSTITUTION
Constructor and Description |
---|
GlyphDefinitionTable(java.util.List subtables)
Instantiate a
GlyphDefinitionTable object using the specified subtables. |
Modifier and Type | Method and Description |
---|---|
protected void |
addSubtable(GlyphSubtable subtable)
Add a subtable.
|
static GlyphSubtable |
createSubtable(int type,
java.lang.String id,
int sequence,
int flags,
int format,
GlyphMappingTable mapping,
java.util.List entries)
Create a definition subtable according to the specified arguments.
|
int |
getGlyphClass(int gid)
Determine glyph class.
|
static int |
getLookupTypeFromName(java.lang.String name)
Map a lookup type name to its constant (integer) value.
|
static java.lang.String |
getLookupTypeName(int type)
Map a lookup type constant (integer) value to its name.
|
int |
getMarkAttachClass(int gid)
Determine mark attachment class.
|
boolean |
isGlyphClass(int gid,
int gc)
Determine if glyph belongs to pre-defined glyph class.
|
boolean |
isMarkAttachClass(int gid,
int mac)
Determine if glyph belongs to (font specific) mark attachment class.
|
GlyphSequence |
reorderCombiningMarks(GlyphSequence gs,
int[][] gpa,
java.lang.String script,
java.lang.String language)
Reorder combining marks in glyph sequence so that they precede (within the sequence) the base
character to which they are applied.
|
assembleLookups, findLookupTables, freezeSubtables, getGlyphDefinitions, getLookups, getLookupTable, getLookupTables, getTableTypeFromName, matchLookups, matchLookupSpecs, resolveLookupReferences, toString
public static final int GDEF_LOOKUP_TYPE_GLYPH_CLASS
public static final int GDEF_LOOKUP_TYPE_ATTACHMENT_POINT
public static final int GDEF_LOOKUP_TYPE_LIGATURE_CARET
public static final int GDEF_LOOKUP_TYPE_MARK_ATTACHMENT
public static final int GLYPH_CLASS_BASE
public static final int GLYPH_CLASS_LIGATURE
public static final int GLYPH_CLASS_MARK
public static final int GLYPH_CLASS_COMPONENT
public GlyphDefinitionTable(java.util.List subtables)
GlyphDefinitionTable
object using the specified subtables.subtables
- a list of identified subtablespublic GlyphSequence reorderCombiningMarks(GlyphSequence gs, int[][] gpa, java.lang.String script, java.lang.String language)
gs
- an input glyph sequencegpa
- associated glyph position adjustments (also reordered)script
- a script identifierlanguage
- a language identifierprotected void addSubtable(GlyphSubtable subtable)
addSubtable
in class GlyphTable
subtable
- a (non-null) glyph subtablepublic boolean isGlyphClass(int gid, int gc)
gid
- a glyph identifier (index)gc
- a pre-defined glyph class (GLYPH_CLASS_BASE|GLYPH_CLASS_LIGATURE|GLYPH_CLASS_MARK|GLYPH_CLASS_COMPONENT).public int getGlyphClass(int gid)
gid
- a glyph identifier (index)public boolean isMarkAttachClass(int gid, int mac)
gid
- a glyph identifier (index)mac
- a (font specific) mark attachment classpublic int getMarkAttachClass(int gid)
gid
- a glyph identifier (index)public static int getLookupTypeFromName(java.lang.String name)
name
- lookup type namepublic static java.lang.String getLookupTypeName(int type)
type
- lookup typepublic static GlyphSubtable createSubtable(int type, java.lang.String id, int sequence, int flags, int format, GlyphMappingTable mapping, java.util.List entries)
type
- subtable typeid
- subtable identifiersequence
- subtable sequenceflags
- subtable flags (must be zero)format
- subtable formatmapping
- subtable mapping tableentries
- subtable entriesCopyright 1999-2012 The Apache Software Foundation. All Rights Reserved.