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.

    • Field Detail

      • associations

        private java.util.List associations
      • chars

        private int[] chars
    • Constructor Detail

      • KhmerScriptProcessor

        KhmerScriptProcessor​(java.lang.String script)
    • Method Detail

      • reorderCombiningMarks

        public GlyphSequence reorderCombiningMarks​(GlyphDefinitionTable gdef,
                                                   GlyphSequence glyphSequence,
                                                   int[] unscaledWidths,
                                                   int[][] glyphPositionAdjustments,
                                                   java.lang.String script,
                                                   java.lang.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 java.lang.CharSequence preProcess​(java.lang.CharSequence charSequence,
                                                 MultiByteFont font,
                                                 java.util.List associations)
        Overrides:
        preProcess in class ScriptProcessor
      • position

        public boolean position​(GlyphSequence glyphSequence,
                                java.lang.String script,
                                java.lang.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,
                                        java.lang.String script,
                                        java.lang.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