Class ChainingContextualTableContextualRule>

java.lang.Object
com.itextpdf.io.font.otf.ContextualTable
com.itextpdf.io.font.otf.ChainingContextualTable
Type Parameters:
T - the contextual rule type stored by this table
Direct Known Subclasses:
PosTableLookup8Format1, PosTableLookup8Format2, PosTableLookup8Format3, SubTableLookup6Format1, SubTableLookup6Format2, SubTableLookup6Format3

public abstract class ChainingContextualTableContextualRule> extends ContextualTable
Represents the chaining contextual table component of an OpenType font.
  • Constructor Details

    • ChainingContextualTable

      protected ChainingContextualTable (OpenTypeFontTableReader openReader, int lookupFlag)
      Creates a new chaining contextual table.
      Parameters:
      openReader - the OpenType font reader
      lookupFlag - specifies processing options, e.g. whether to skip base glyphs, marks or ligatures during glyph substitution or positioning. See Lookup table
  • Method Details

    • getMatchingContextRule

      public T getMatchingContextRule (GlyphLine line)
      Returns the matching context rule.
      Overrides:
      getMatchingContextRule in class ContextualTable<T extends ContextualRule>
      Parameters:
      line - the glyph line
      Returns:
      the matching context rule
    • 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 checked
      rule - rule to be compared with a given line
      startIdx - 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 checked
      rule - rule to be compared with a given line
      Returns:
      true if given glyph line matches given rule