Class PosTableLookup8Format1.PosRuleFormat1
- java.lang.Object
-
- com.itextpdf.io.font.otf.ContextualRule
-
- com.itextpdf.io.font.otf.ContextualPositionRule
-
- com.itextpdf.io.font.otf.lookuptype8.PosTableLookup8Format1.PosRuleFormat1
-
- Enclosing class:
- PosTableLookup8Format1
public static class PosTableLookup8Format1.PosRuleFormat1 extends ContextualPositionRule
-
-
Field Summary
Fields Modifier and Type Field Description private int[]backtrackGlyphIdsprivate int[]inputGlyphIdsprivate int[]lookAheadGlyphIdsprivate PosLookupRecord[]posLookupRecordsprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description PosRuleFormat1(int[] backtrackGlyphIds, int[] inputGlyphIds, int[] lookAheadGlyphIds, PosLookupRecord[] posLookupRecords)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBacktrackContextLength()Gets the length of the backtrack context glyph sequence defined by this ruleintgetContextLength()Gets the length of the context glyph sequence defined by this ruleintgetLookaheadContextLength()Gets the length of the lookahead context glyph sequence defined by this rulePosLookupRecord[]getPosLookupRecords()Retrieves the position lookup records.booleanisGlyphMatchesBacktrack(int glyphId, int atIdx)Checks if glyph line element matches element from backtrack sequence of the rule.booleanisGlyphMatchesInput(int glyphId, int atIdx)Checks if glyph line element matches element from input sequence of the rule.booleanisGlyphMatchesLookahead(int glyphId, int atIdx)Checks if glyph line element matches element from lookahead sequence of the rule.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
inputGlyphIds
private int[] inputGlyphIds
-
backtrackGlyphIds
private int[] backtrackGlyphIds
-
lookAheadGlyphIds
private int[] lookAheadGlyphIds
-
posLookupRecords
private PosLookupRecord[] posLookupRecords
-
-
Constructor Detail
-
PosRuleFormat1
public PosRuleFormat1(int[] backtrackGlyphIds, int[] inputGlyphIds, int[] lookAheadGlyphIds, PosLookupRecord[] posLookupRecords)
-
-
Method Detail
-
getContextLength
public int getContextLength()
Description copied from class:ContextualRuleGets the length of the context glyph sequence defined by this rule- Specified by:
getContextLengthin classContextualRule- Returns:
- length of the context
-
getLookaheadContextLength
public int getLookaheadContextLength()
Description copied from class:ContextualRuleGets the length of the lookahead context glyph sequence defined by this rule- Overrides:
getLookaheadContextLengthin classContextualRule- Returns:
- length of the lookahead context
-
getBacktrackContextLength
public int getBacktrackContextLength()
Description copied from class:ContextualRuleGets the length of the backtrack context glyph sequence defined by this rule- Overrides:
getBacktrackContextLengthin classContextualRule- Returns:
- length of the backtrack context
-
getPosLookupRecords
public PosLookupRecord[] getPosLookupRecords()
Description copied from class:ContextualPositionRuleRetrieves 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:
getPosLookupRecordsin classContextualPositionRule- Returns:
- an array of
PosLookupRecord.
-
isGlyphMatchesInput
public boolean isGlyphMatchesInput(int glyphId, int atIdx)Description copied from class:ContextualRuleChecks 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:
isGlyphMatchesInputin classContextualRule- Parameters:
glyphId- glyph code idatIdx- index in the rule sequence. Shall be: 0 < atIdx <ContextualRule.getContextLength()- Returns:
trueif glyph matches element
-
isGlyphMatchesLookahead
public boolean isGlyphMatchesLookahead(int glyphId, int atIdx)Description copied from class:ContextualRuleChecks if glyph line element matches element from lookahead sequence of the rule.- Overrides:
isGlyphMatchesLookaheadin classContextualRule- Parameters:
glyphId- glyph code idatIdx- index in rule sequence. Shall be: 0 <= atIdx <ContextualRule.getLookaheadContextLength()- Returns:
trueif glyph matches element from lookahead sequence
-
isGlyphMatchesBacktrack
public boolean isGlyphMatchesBacktrack(int glyphId, int atIdx)Description copied from class:ContextualRuleChecks if glyph line element matches element from backtrack sequence of the rule.- Overrides:
isGlyphMatchesBacktrackin classContextualRule- Parameters:
glyphId- glyph code idatIdx- index in rule sequence. Shall be: 0 <= atIdx <ContextualRule.getBacktrackContextLength()- Returns:
trueif glyph matches element from backtrack sequence
-
-