org.apache.fop.complexscripts.scripts

## Class KhmerScriptProcessor

- java.lang.Object
- - org.apache.fop.complexscripts.scripts.ScriptProcessor
  - - org.apache.fop.complexscripts.scripts.DefaultScriptProcessor
    - - org.apache.fop.complexscripts.scripts.IndicScriptProcessor
      - - org.apache.fop.complexscripts.scripts.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.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.fop.complexscripts.scripts.IndicScriptProcessor

      `IndicScriptProcessor.DefaultSyllabizer, IndicScriptProcessor.Segment, IndicScriptProcessor.Syllabizer`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ScriptContextTester` | `getPositioningContextTester()` Obtain script specific positioning context tester.
    `protected Class<? extends IndicScriptProcessor.DefaultSyllabizer>` | `getSyllabizerClass()` Get script specific syllabizer class.
    `boolean` | `position(GlyphSequence glyphSequence, String script, String language, int fontSize, GlyphTable.UseSpec[] useSpecs, int[] widths, int[][] adjustments, ScriptContextTester scriptContextTester)` Perform positioning processing using a specific set of ordered glyph table use specifications.
    `CharSequence` | `preProcess(CharSequence charSequence, MultiByteFont font, List associations)`
    `GlyphSequence` | `reorderCombiningMarks(GlyphDefinitionTable gdef, GlyphSequence glyphSequence, int[] unscaledWidths, int[][] glyphPositionAdjustments, String script, String language)` Reorder combining marks in glyph sequence so that they precede (within the sequence) the base character to which they are applied.
    `GlyphSequence` | `substitute(GlyphSequence glyphSequence, String script, String language, GlyphTable.UseSpec[] useSpecs, ScriptContextTester scriptContextTester)` Perform substitution processing using a specific set of ordered glyph table use specifications.

    - ### Methods inherited from class org.apache.fop.complexscripts.scripts.IndicScriptProcessor

      `findPreBaseMatra, findPreBaseMatraTarget, findReph, findRephTarget, getOptionalPositioningFeatures, getOptionalSubstitutionFeatures, getPositioningFeatures, getSubstitutionContextTester, getSubstitutionFeatures, makeProcessor`

    - ### Methods inherited from class org.apache.fop.complexscripts.scripts.DefaultScriptProcessor

      `isReorderedMark`

    - ### Methods inherited from class org.apache.fop.complexscripts.scripts.ScriptProcessor

      `assembleLookups, getInstance, getScript, position, substitute`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### 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

Copyright © 2023 Apache Software Foundation. All rights reserved.