Class SubTableLookup5Format2.SubstRuleFormat2
java.lang.Object
com.itextpdf.io.font.otf.ContextualRule
com.itextpdf.io.font.otf.ContextualSubstRule
com.itextpdf.io.font.otf.lookuptype5.SubTableLookup5Format2.SubstRuleFormat2
- Enclosing class:
SubTableLookup5Format2
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSubstRuleFormat2(SubTableLookup5Format2 subTable, int[] inputClassIds, SubstLookupRecord[] substLookupRecords) -
Method Summary
Modifier and TypeMethodDescriptionintGets the length of the context glyph sequence defined by this ruleRetrieves the substitution lookup records.booleanisGlyphMatchesInput(int glyphId, int atIdx) Checks if glyph line element matches element from input sequence of the rule.Methods inherited from class ContextualRule
getBacktrackContextLength, getLookaheadContextLength, isGlyphMatchesBacktrack, isGlyphMatchesLookahead
-
Field Details
-
inputClassIds
private int[] inputClassIds -
substLookupRecords
-
classDefinition
-
-
Constructor Details
-
SubstRuleFormat2
public SubstRuleFormat2(SubTableLookup5Format2 subTable, int[] inputClassIds, SubstLookupRecord[] substLookupRecords)
-
-
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
-
getSubstLookupRecords
Description copied from class:ContextualSubstRuleRetrieves 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:
getSubstLookupRecordsin classContextualSubstRule- Returns:
- an array of
SubstLookupRecord.
-
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
-