public abstract class GlyphSubstitutionSubtable extends GlyphSubtable implements GlyphSubstitution
The GlyphSubstitutionSubtable
implements an abstract base of a glyph substitution subtable,
providing a default implementation of the GlyphSubstitution
interface.
This work was originally authored by Glenn Adams (gadams@apache.org).
LF_IGNORE_BASE, LF_IGNORE_LIGATURE, LF_IGNORE_MARK, LF_INTERNAL_USE_REVERSE_SCAN, LF_MARK_ATTACHMENT_TYPE, LF_RESERVED, LF_RIGHT_TO_LEFT, LF_USE_MARK_FILTERING_SET
Modifier | Constructor and Description |
---|---|
protected |
GlyphSubstitutionSubtable(java.lang.String id,
int sequence,
int flags,
int format,
GlyphCoverageTable coverage)
Instantiate a
GlyphSubstitutionSubtable . |
Modifier and Type | Method and Description |
---|---|
int |
getTableType() |
java.lang.String |
getTypeName() |
boolean |
isCompatible(GlyphSubtable subtable)
Determine if a glyph subtable is compatible with this glyph subtable.
|
static GlyphSequence |
substitute(GlyphSequence gs,
java.lang.String script,
java.lang.String language,
java.lang.String feature,
GlyphSubstitutionSubtable[] sta,
ScriptContextTester sct)
Apply substitutions.
|
boolean |
substitute(GlyphSubstitutionState ss)
Perform glyph substitution at the current index, mutating the substitution state object as required.
|
static GlyphSequence |
substitute(GlyphSubstitutionState ss,
GlyphSubstitutionSubtable[] sta,
int sequenceIndex)
Apply substitutions using specified state and subtable array.
|
boolean |
usesReverseScan() |
compareTo, equals, getClasses, getCoverage, getCoverageIndex, getCoverageSize, getEntries, getFlags, getFlags, getFormat, getGDEF, getLookupId, getSequence, getTable, getType, hashCode, resolveLookupReferences, setTable, usesReverseScan
protected GlyphSubstitutionSubtable(java.lang.String id, int sequence, int flags, int format, GlyphCoverageTable coverage)
GlyphSubstitutionSubtable
.id
- subtable identifiersequence
- subtable sequenceflags
- subtable flagsformat
- subtable formatcoverage
- subtable coverage tablepublic int getTableType()
getTableType
in class GlyphSubtable
public java.lang.String getTypeName()
getTypeName
in class GlyphSubtable
public boolean isCompatible(GlyphSubtable subtable)
isCompatible
in class GlyphSubtable
subtable
- a glyph subtable to determine compatibilitypublic boolean usesReverseScan()
usesReverseScan
in class GlyphSubtable
public boolean substitute(GlyphSubstitutionState ss)
substitute
in interface GlyphSubstitution
ss
- glyph substitution state objectpublic static final GlyphSequence substitute(GlyphSubstitutionState ss, GlyphSubstitutionSubtable[] sta, int sequenceIndex)
sequenceIndex
is non-negative, then apply subtables only when current position
matches sequenceIndex
in relation to the starting position. Furthermore, upon
successful application at sequenceIndex
, then apply default action for all remaining
glyphs in input sequence.ss
- substitution statesta
- array of subtables to applysequenceIndex
- if non negative, then apply subtables only at specified sequence indexpublic static final GlyphSequence substitute(GlyphSequence gs, java.lang.String script, java.lang.String language, java.lang.String feature, GlyphSubstitutionSubtable[] sta, ScriptContextTester sct)
gs
- input glyph sequencescript
- taglanguage
- tagfeature
- tagsta
- subtable arraysct
- script context testerCopyright 1999-2017 The Apache Software Foundation. All Rights Reserved.