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 Description ScriptContextTester
getPositioningContextTester()
Obtain script specific positioning context tester.protected java.lang.Class<? extends IndicScriptProcessor.DefaultSyllabizer>
getSyllabizerClass()
Get script specific syllabizer class.boolean
position(GlyphSequence glyphSequence, java.lang.String script, java.lang.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.java.lang.CharSequence
preProcess(java.lang.CharSequence charSequence, MultiByteFont font, java.util.List associations)
GlyphSequence
reorderCombiningMarks(GlyphDefinitionTable gdef, GlyphSequence glyphSequence, int[] unscaledWidths, int[][] glyphPositionAdjustments, java.lang.String script, java.lang.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, java.lang.String script, java.lang.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
-
-
-
-
Method Detail
-
getSyllabizerClass
protected java.lang.Class<? extends IndicScriptProcessor.DefaultSyllabizer> getSyllabizerClass()
Description copied from class:IndicScriptProcessor
Get script specific syllabizer class.- Overrides:
getSyllabizerClass
in classIndicScriptProcessor
- Returns:
- a syllabizer class object or null
-
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 classDefaultScriptProcessor
- Parameters:
gdef
- the glyph definition table that appliesglyphSequence
- an input glyph sequenceunscaledWidths
- associated unscaled advance widths (also reordered)glyphPositionAdjustments
- associated glyph position adjustments (also reordered)script
- a script identifierlanguage
- 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 classScriptProcessor
-
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 classIndicScriptProcessor
- Parameters:
glyphSequence
- an input glyph sequencescript
- a script identifierlanguage
- a language identifierfontSize
- size in device unitsuseSpecs
- an ordered array of glyph table use specswidths
- array of default advancements for each glyph in fontadjustments
- 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 sequencescriptContextTester
- 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 classIndicScriptProcessor
- Parameters:
glyphSequence
- an input glyph sequencescript
- a script identifierlanguage
- a language identifieruseSpecs
- an ordered array of glyph table use specsscriptContextTester
- 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 classIndicScriptProcessor
- Returns:
- positioning context tester or null
-
-