Class PosTableLookup8Format2.PosRuleFormat2
java.lang.Object
com.itextpdf.io.font.otf.ContextualRule
com.itextpdf.io.font.otf.ContextualPositionRule
com.itextpdf.io.font.otf.lookuptype8.PosTableLookup8Format2.PosRuleFormat2
- Enclosing class:
PosTableLookup8Format2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]
private int[]
private int[]
private PosLookupRecord[]
private PosTableLookup8Format2
private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionPosRuleFormat2
(PosTableLookup8Format2 posTable, int[] backtrackClassIds, int[] inputClassIds, int[] lookAheadClassIds, PosLookupRecord[] posLookupRecords) -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the length of the backtrack context glyph sequence defined by this ruleint
Gets the length of the context glyph sequence defined by this ruleint
Gets the length of the lookahead context glyph sequence defined by this ruleRetrieves the position 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 Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
backtrackClassIds
private int[] backtrackClassIds -
inputClassIds
private int[] inputClassIds -
lookAheadClassIds
private int[] lookAheadClassIds -
posLookupRecords
-
posTable
-
-
Constructor Details
-
PosRuleFormat2
public PosRuleFormat2(PosTableLookup8Format2 posTable, int[] backtrackClassIds, int[] inputClassIds, int[] lookAheadClassIds, PosLookupRecord[] posLookupRecords)
-
-
Method Details
-
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
-
getPosLookupRecords
Description copied from class:ContextualPositionRule
Retrieves the position lookup records. Each record specifies a position in the context glyph sequence and a LookupListIndex to the position lookup that is applied at that position.- Specified by:
getPosLookupRecords
in classContextualPositionRule
- Returns:
- an array of
PosLookupRecord
.
-
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
-
getPosTable
-