Class PosTableLookup7Format2.PosRuleFormat2
java.lang.Object
com.itextpdf.io.font.otf.ContextualRule
com.itextpdf.io.font.otf.ContextualPositionRule
com.itextpdf.io.font.otf.lookuptype7.PosTableLookup7Format2.PosRuleFormat2
- Enclosing class:
- PosTableLookup7Format2
Represents the positioning rule format2 of an OpenType font.
-
Constructor Summary
ConstructorsConstructorDescriptionPosRuleFormat2(PosTableLookup7Format2 subTable, int[] inputClassIds, PosLookupRecord[] posLookupRecords) Creates a new positioning rule format2. -
Method Summary
Modifier and TypeMethodDescriptionintGets the length of the context glyph sequence defined by this rule.Retrieves the position lookup records.booleanisGlyphMatchesInput(int glyphId, int atIdx) Checks if glyph line element matches element from input sequence of the rule.Methods inherited from class com.itextpdf.io.font.otf.ContextualRule
getBacktrackContextLength, getLookaheadContextLength, isGlyphMatchesBacktrack, isGlyphMatchesLookahead
-
Constructor Details
-
PosRuleFormat2
public PosRuleFormat2(PosTableLookup7Format2 subTable, int[] inputClassIds, PosLookupRecord[] posLookupRecords) Creates a new positioning rule format2.- Parameters:
-
subTable- the sub table -
inputClassIds- the input class ids -
posLookupRecords- the positioning lookup records
-
-
Method Details
-
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
-
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 id -
atIdx- index in the rule sequence. Shall be: 0 < atIdx <ContextualRule.getContextLength() - Returns:
-
trueif glyph matches element
-