Class SubTableLookup5Format1.SubstRuleFormat1
- java.lang.Object
-
- com.itextpdf.io.font.otf.ContextualRule
-
- com.itextpdf.io.font.otf.ContextualSubstRule
-
- com.itextpdf.io.font.otf.lookuptype5.SubTableLookup5Format1.SubstRuleFormat1
-
- Enclosing class:
- SubTableLookup5Format1
public static class SubTableLookup5Format1.SubstRuleFormat1 extends ContextualSubstRule
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
inputGlyphIds
private SubstLookupRecord[]
substLookupRecords
-
Constructor Summary
Constructors Constructor Description SubstRuleFormat1(int[] inputGlyphIds, SubstLookupRecord[] substLookupRecords)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getContextLength()
Gets the length of the context glyph sequence defined by this ruleSubstLookupRecord[]
getSubstLookupRecords()
Retrieves the substitution lookup records.boolean
isGlyphMatchesInput(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
-
-
-
-
Field Detail
-
inputGlyphIds
private int[] inputGlyphIds
-
substLookupRecords
private SubstLookupRecord[] substLookupRecords
-
-
Constructor Detail
-
SubstRuleFormat1
public SubstRuleFormat1(int[] inputGlyphIds, 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
-
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
-
-