Class GlyphSubstitutionTable.MultipleSubtable

All Implemented Interfaces:
Comparable, GlyphSubstitution
Direct Known Subclasses:
GlyphSubstitutionTable.MultipleSubtableFormat1
Enclosing class:
GlyphSubstitutionTable

private abstract static class GlyphSubstitutionTable.MultipleSubtable extends GlyphSubstitutionSubtable
  • Constructor Details

    • MultipleSubtable

      public MultipleSubtable(String id, int sequence, int flags, int format, GlyphCoverageTable coverage, List entries)
  • Method Details

    • getType

      public int getType()
      Specified by:
      getType in class GlyphSubtable
      Returns:
      this subtable's type
    • isCompatible

      public boolean isCompatible(GlyphSubtable subtable)
      Determine if a glyph subtable is compatible with this glyph subtable. Two glyph subtables are compatible if the both may appear in a single lookup table.
      Overrides:
      isCompatible in class GlyphSubstitutionSubtable
      Parameters:
      subtable - a glyph subtable to determine compatibility
      Returns:
      true if specified subtable is compatible with this glyph subtable, where by compatible is meant that they share the same lookup type
    • substitute

      public boolean substitute(GlyphSubstitutionState ss)
      Perform glyph substitution at the current index, mutating the substitution state object as required. Only the context associated with the current index is processed.
      Specified by:
      substitute in interface GlyphSubstitution
      Overrides:
      substitute in class GlyphSubstitutionSubtable
      Parameters:
      ss - glyph substitution state object
      Returns:
      true if the glyph subtable was applied, meaning that the current context matches the associated input context glyph coverage table
    • getGlyphsForCoverageIndex

      public abstract int[] getGlyphsForCoverageIndex(int ci, int gi) throws IllegalArgumentException
      Obtain glyph sequence for coverage index.
      Parameters:
      ci - coverage index
      gi - original glyph index
      Returns:
      sequence of glyphs to substitute for input glyph
      Throws:
      IllegalArgumentException - if coverage index is not valid
    • create

      static GlyphSubstitutionSubtable create(String id, int sequence, int flags, int format, GlyphCoverageTable coverage, List entries)