Package com.itextpdf.io.font.otf
Class ChainingContextualTable<T extends ContextualRule>
- java.lang.Object
-
- com.itextpdf.io.font.otf.ContextualTable<T>
-
- com.itextpdf.io.font.otf.ChainingContextualTable<T>
-
- Direct Known Subclasses:
PosTableLookup8Format1
,PosTableLookup8Format2
,PosTableLookup8Format3
,SubTableLookup6Format1
,SubTableLookup6Format2
,SubTableLookup6Format3
public abstract class ChainingContextualTable<T extends ContextualRule> extends ContextualTable<T>
-
-
Field Summary
-
Fields inherited from class com.itextpdf.io.font.otf.ContextualTable
lookupFlag, openReader
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ChainingContextualTable(OpenTypeFontTableReader openReader, int lookupFlag)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkIfBacktrackContextMatch(GlyphLine line, T rule)
Checks if given glyph line at the given position matches given rule.protected boolean
checkIfLookaheadContextMatch(GlyphLine line, T rule, int startIdx)
Checks if given glyph line at the given position matches given rule.T
getMatchingContextRule(GlyphLine line)
Gets a most preferable context rule that matches the line at current position.-
Methods inherited from class com.itextpdf.io.font.otf.ContextualTable
checkIfContextMatch, getSetOfRulesForStartGlyph
-
-
-
-
Constructor Detail
-
ChainingContextualTable
protected ChainingContextualTable(OpenTypeFontTableReader openReader, int lookupFlag)
-
-
Method Detail
-
getMatchingContextRule
public T getMatchingContextRule(GlyphLine line)
Description copied from class:ContextualTable
Gets a most preferable context rule that matches the line at current position. If no matching context rule is found, it returnsnull
.
NOTE: if matching context rule is found, theGlyphLine.start
andGlyphLine.end
will be changed in such way that they will point at start and end of the matching context glyph sequence inside the glyph line.- Overrides:
getMatchingContextRule
in classContextualTable<T extends ContextualRule>
- Parameters:
line
- a line, which is to be checked if it matches some context.- Returns:
- matching context rule or null, if none was found.
-
checkIfLookaheadContextMatch
protected boolean checkIfLookaheadContextMatch(GlyphLine line, T rule, int startIdx)
Checks if given glyph line at the given position matches given rule.- Parameters:
line
- glyph line to be checkedrule
- rule to be compared with a given linestartIdx
- glyph line position- Returns:
- true if given glyph line at the given position matches given rule
-
checkIfBacktrackContextMatch
protected boolean checkIfBacktrackContextMatch(GlyphLine line, T rule)
Checks if given glyph line at the given position matches given rule.- Parameters:
line
- glyph line to be checkedrule
- rule to be compared with a given line- Returns:
- true if given glyph line matches given rule
-
-