Class KhmerScriptProcessor


public class KhmerScriptProcessor extends IndicScriptProcessor

The KhmerScriptProcessor class implements a script processor for performing glyph substitution and positioning operations on content associated with the Khmer script.

  • Method Details

    • getSyllabizerClass

      protected Class<? extends IndicScriptProcessor.DefaultSyllabizer> getSyllabizerClass()
      Description copied from class: IndicScriptProcessor
      Get script specific syllabizer class.
      Overrides:
      getSyllabizerClass in class IndicScriptProcessor
      Returns:
      a syllabizer class object or null
    • reorderCombiningMarks

      public GlyphSequence reorderCombiningMarks(GlyphDefinitionTable gdef, GlyphSequence glyphSequence, int[] unscaledWidths, int[][] glyphPositionAdjustments, String script, String language)
      Description copied from class: ScriptProcessor
      Reorder combining marks in glyph sequence so that they precede (within the sequence) the base character to which they are applied. N.B. In the case of RTL segments, marks are not reordered by this, method since when the segment is reversed by BIDI processing, marks are automatically reordered to precede their base glyph.
      Overrides:
      reorderCombiningMarks in class DefaultScriptProcessor
      Parameters:
      gdef - the glyph definition table that applies
      glyphSequence - an input glyph sequence
      unscaledWidths - associated unscaled advance widths (also reordered)
      glyphPositionAdjustments - associated glyph position adjustments (also reordered)
      script - a script identifier
      language - a language identifier
      Returns:
      the reordered (output) glyph sequence
    • preProcess

      public CharSequence preProcess(CharSequence charSequence, MultiByteFont font, List associations)
      Overrides:
      preProcess in class ScriptProcessor
    • position

      public boolean position(GlyphSequence glyphSequence, String script, String language, int fontSize, GlyphTable.UseSpec[] useSpecs, int[] widths, int[][] adjustments, ScriptContextTester scriptContextTester)
      Description copied from class: IndicScriptProcessor
      Perform positioning processing using a specific set of ordered glyph table use specifications.
      Overrides:
      position in class IndicScriptProcessor
      Parameters:
      glyphSequence - an input glyph sequence
      script - a script identifier
      language - a language identifier
      fontSize - size in device units
      useSpecs - an ordered array of glyph table use specs
      widths - array of default advancements for each glyph in font
      adjustments - accumulated adjustments array (sequence) of 4-tuples of placement [PX,PY] and advance [AX,AY] adjustments, in that order, with one 4-tuple for each element of glyph sequence
      scriptContextTester - a script specific context tester (or null)
      Returns:
      true if some adjustment is not zero; otherwise, false
    • substitute

      public GlyphSequence substitute(GlyphSequence glyphSequence, String script, String language, GlyphTable.UseSpec[] useSpecs, ScriptContextTester scriptContextTester)
      Description copied from class: IndicScriptProcessor
      Perform substitution processing using a specific set of ordered glyph table use specifications.
      Overrides:
      substitute in class IndicScriptProcessor
      Parameters:
      glyphSequence - an input glyph sequence
      script - a script identifier
      language - a language identifier
      useSpecs - an ordered array of glyph table use specs
      scriptContextTester - a script specific context tester (or null)
      Returns:
      the substituted (output) glyph sequence
    • getPositioningContextTester

      public ScriptContextTester getPositioningContextTester()
      Description copied from class: IndicScriptProcessor
      Obtain script specific positioning context tester.
      Overrides:
      getPositioningContextTester in class IndicScriptProcessor
      Returns:
      positioning context tester or null