Class SubTableLookup6Format2.SubstRuleFormat2
- java.lang.Object
-
- com.itextpdf.io.font.otf.ContextualRule
-
- com.itextpdf.io.font.otf.ContextualSubstRule
-
- com.itextpdf.io.font.otf.lookuptype6.SubTableLookup6Format2.SubstRuleFormat2
-
- Enclosing class:
- SubTableLookup6Format2
public static class SubTableLookup6Format2.SubstRuleFormat2 extends ContextualSubstRule
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
backtrackClassIds
private int[]
inputClassIds
private int[]
lookAheadClassIds
private SubstLookupRecord[]
substLookupRecords
private SubTableLookup6Format2
subTable
-
Constructor Summary
Constructors Constructor Description SubstRuleFormat2(SubTableLookup6Format2 subTable, int[] backtrackClassIds, int[] inputClassIds, int[] lookAheadClassIds, SubstLookupRecord[] substLookupRecords)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBacktrackContextLength()
Gets the length of the backtrack context glyph sequence defined by this ruleint
getContextLength()
Gets the length of the context glyph sequence defined by this ruleint
getLookaheadContextLength()
Gets the length of the lookahead context glyph sequence defined by this ruleSubstLookupRecord[]
getSubstLookupRecords()
Retrieves the substitution lookup records.boolean
isGlyphMatchesBacktrack(int glyphId, int atIdx)
Checks if glyph line element matches element from backtrack sequence of the rule.boolean
isGlyphMatchesInput(int glyphId, int atIdx)
Checks if glyph line element matches element from input sequence of the rule.boolean
isGlyphMatchesLookahead(int glyphId, int atIdx)
Checks if glyph line element matches element from lookahead sequence of the rule.
-
-
-
Field Detail
-
backtrackClassIds
private int[] backtrackClassIds
-
inputClassIds
private int[] inputClassIds
-
lookAheadClassIds
private int[] lookAheadClassIds
-
substLookupRecords
private SubstLookupRecord[] substLookupRecords
-
subTable
private SubTableLookup6Format2 subTable
-
-
Constructor Detail
-
SubstRuleFormat2
public SubstRuleFormat2(SubTableLookup6Format2 subTable, int[] backtrackClassIds, int[] inputClassIds, int[] lookAheadClassIds, SubstLookupRecord[] substLookupRecords)
-
-
Method Detail
-
getContextLength
public int getContextLength()
Description copied from class:ContextualRule
Gets the length of the context glyph sequence defined by this rule- Specified by:
getContextLength
in classContextualRule
- Returns:
- length of the context
-
getLookaheadContextLength
public int getLookaheadContextLength()
Description copied from class:ContextualRule
Gets the length of the lookahead context glyph sequence defined by this rule- Overrides:
getLookaheadContextLength
in classContextualRule
- Returns:
- length of the lookahead context
-
getBacktrackContextLength
public int getBacktrackContextLength()
Description copied from class:ContextualRule
Gets the length of the backtrack context glyph sequence defined by this rule- Overrides:
getBacktrackContextLength
in classContextualRule
- Returns:
- length of the backtrack context
-
getSubstLookupRecords
public SubstLookupRecord[] getSubstLookupRecords()
Description copied from class:ContextualSubstRule
Retrieves the substitution lookup records. Each record specifies a position in the context glyph sequence and a LookupListIndex to the substitution lookup that is applied at that position.- Specified by:
getSubstLookupRecords
in classContextualSubstRule
- Returns:
- an array of
SubstLookupRecord
.
-
isGlyphMatchesInput
public boolean isGlyphMatchesInput(int glyphId, int atIdx)
Description copied from class:ContextualRule
Checks if glyph line element matches element from input sequence of the rule.
NOTE: rules do not contain the first element of the input sequence, the first element is defined by rule position in substitution table. Therefore atIdx shall not be 0.- Specified by:
isGlyphMatchesInput
in classContextualRule
- Parameters:
glyphId
- glyph code idatIdx
- index in the rule sequence. Shall be: 0 < atIdx <ContextualRule.getContextLength()
- Returns:
true
if glyph matches element
-
isGlyphMatchesLookahead
public boolean isGlyphMatchesLookahead(int glyphId, int atIdx)
Description copied from class:ContextualRule
Checks if glyph line element matches element from lookahead sequence of the rule.- Overrides:
isGlyphMatchesLookahead
in classContextualRule
- Parameters:
glyphId
- glyph code idatIdx
- index in rule sequence. Shall be: 0 <= atIdx <ContextualRule.getLookaheadContextLength()
- Returns:
true
if glyph matches element from lookahead sequence
-
isGlyphMatchesBacktrack
public boolean isGlyphMatchesBacktrack(int glyphId, int atIdx)
Description copied from class:ContextualRule
Checks if glyph line element matches element from backtrack sequence of the rule.- Overrides:
isGlyphMatchesBacktrack
in classContextualRule
- Parameters:
glyphId
- glyph code idatIdx
- index in rule sequence. Shall be: 0 <= atIdx <ContextualRule.getBacktrackContextLength()
- Returns:
true
if glyph matches element from backtrack sequence
-
-