public abstract class GlyphSubtable extends Object implements Comparable
The GlyphSubtable
implements an abstract glyph subtable that
encapsulates identification, type, format, and coverage information.
This work was originally authored by Glenn Adams (gadams@apache.org).
Modifier and Type | Field and Description |
---|---|
static int |
LF_IGNORE_BASE
lookup flag - ignore base glyphs
|
static int |
LF_IGNORE_LIGATURE
lookup flag - ignore ligatures
|
static int |
LF_IGNORE_MARK
lookup flag - ignore marks
|
static int |
LF_INTERNAL_USE_REVERSE_SCAN
internal flag - use reverse scan
|
static int |
LF_MARK_ATTACHMENT_TYPE
lookup flag - mark attachment type
|
static int |
LF_RESERVED
lookup flag - reserved
|
static int |
LF_RIGHT_TO_LEFT
lookup flag - right to left
|
static int |
LF_USE_MARK_FILTERING_SET
lookup flag - use mark filtering set
|
Modifier | Constructor and Description |
---|---|
protected |
GlyphSubtable(String lookupId,
int sequence,
int flags,
int format,
GlyphMappingTable mapping)
Instantiate this glyph subtable.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o) |
boolean |
equals(Object o) |
GlyphClassMapping |
getClasses() |
GlyphCoverageMapping |
getCoverage() |
int |
getCoverageIndex(int gid)
Map glyph id to coverage index.
|
int |
getCoverageSize()
Map glyph id to coverage index.
|
abstract List |
getEntries() |
int |
getFlags() |
static int |
getFlags(GlyphSubtable[] subtables)
Determine consistent flags for a set of subtables.
|
int |
getFormat() |
GlyphDefinitionTable |
getGDEF() |
String |
getLookupId() |
int |
getSequence() |
GlyphTable |
getTable() |
abstract int |
getTableType() |
abstract int |
getType() |
abstract String |
getTypeName() |
int |
hashCode() |
abstract boolean |
isCompatible(GlyphSubtable subtable)
Determine if a glyph subtable is compatible with this glyph subtable.
|
void |
resolveLookupReferences(Map<String,GlyphTable.LookupTable> lookupTables)
Resolve references to lookup tables, e.g., in RuleLookup, to the lookup tables themselves.
|
void |
setTable(GlyphTable table)
Establish a weak reference from this subtable to its parent
table.
|
abstract boolean |
usesReverseScan() |
static boolean |
usesReverseScan(GlyphSubtable[] subtables)
Determine if any of the specified subtables uses reverse scanning.
|
public static final int LF_RIGHT_TO_LEFT
public static final int LF_IGNORE_BASE
public static final int LF_IGNORE_LIGATURE
public static final int LF_IGNORE_MARK
public static final int LF_USE_MARK_FILTERING_SET
public static final int LF_RESERVED
public static final int LF_MARK_ATTACHMENT_TYPE
public static final int LF_INTERNAL_USE_REVERSE_SCAN
protected GlyphSubtable(String lookupId, int sequence, int flags, int format, GlyphMappingTable mapping)
lookupId
- lookup identifier, having form of "lu%d" where %d is index of lookup in lookup listsequence
- subtable sequence (within lookup), starting with zeroflags
- subtable flagsformat
- subtable formatmapping
- subtable mapping tablepublic String getLookupId()
public abstract int getTableType()
public abstract int getType()
public abstract String getTypeName()
public abstract boolean isCompatible(GlyphSubtable subtable)
subtable
- a glyph subtable to determine compatibilitypublic abstract boolean usesReverseScan()
public int getSequence()
public int getFlags()
public int getFormat()
public GlyphDefinitionTable getGDEF()
public GlyphCoverageMapping getCoverage()
public GlyphClassMapping getClasses()
public abstract List getEntries()
public GlyphTable getTable()
public void setTable(GlyphTable table) throws IllegalStateException
null
, then
clear and remove weak reference.table
- the table or nullIllegalStateException
- if table is already set to non-nullpublic void resolveLookupReferences(Map<String,GlyphTable.LookupTable> lookupTables)
lookupTables
- map from lookup table identifers, e.g. "lu4", to lookup tablespublic int getCoverageIndex(int gid)
gid
- glyph idpublic int getCoverageSize()
public boolean equals(Object o)
public int compareTo(Object o)
compareTo
in interface Comparable
public static boolean usesReverseScan(GlyphSubtable[] subtables)
subtables
- array of glyph subtablespublic static int getFlags(GlyphSubtable[] subtables) throws IllegalStateException
subtables
- array of glyph subtablesIllegalStateException
- if inconsistent flagsCopyright © 2025 Apache Software Foundation. All rights reserved.