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
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
Modifier and TypeMethodDescriptionObtain script specific positioning context tester.protected Class<? extends IndicScriptProcessor.DefaultSyllabizer> Get script specific syllabizer class.booleanposition(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.preProcess(CharSequence charSequence, MultiByteFont font, List associations) 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.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, makeProcessorMethods inherited from class org.apache.fop.complexscripts.scripts.DefaultScriptProcessor
isReorderedMarkMethods inherited from class org.apache.fop.complexscripts.scripts.ScriptProcessor
assembleLookups, getInstance, getScript, position, substitute
-
Method Details
-
getSyllabizerClass
Description copied from class:IndicScriptProcessorGet script specific syllabizer class.- Overrides:
getSyllabizerClassin classIndicScriptProcessor- 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:ScriptProcessorReorder 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:
reorderCombiningMarksin 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
- Overrides:
preProcessin classScriptProcessor
-
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:IndicScriptProcessorPerform positioning processing using a specific set of ordered glyph table use specifications.- Overrides:
positionin 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, String script, String language, GlyphTable.UseSpec[] useSpecs, ScriptContextTester scriptContextTester) Description copied from class:IndicScriptProcessorPerform substitution processing using a specific set of ordered glyph table use specifications.- Overrides:
substitutein 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
Description copied from class:IndicScriptProcessorObtain script specific positioning context tester.- Overrides:
getPositioningContextTesterin classIndicScriptProcessor- Returns:
- positioning context tester or null
-