Class DefaultScriptProcessor
java.lang.Object
org.apache.fop.complexscripts.scripts.ScriptProcessor
org.apache.fop.complexscripts.scripts.DefaultScriptProcessor
- Direct Known Subclasses:
ArabicScriptProcessor
,HebrewScriptProcessor
,IndicScriptProcessor
,ThaiScriptProcessor
Default script processor, which enables default glyph composition/decomposition, common ligatures, localized forms and kerning.
This work was originally authored by Glenn Adams (gadams@apache.org).
-
Method Summary
Modifier and TypeMethodDescriptionObtain script specific positioning context tester.String[]
Obtain script specific required positioning features.Obtain script specific substitution context tester.String[]
Obtain script specific required substitution features.protected boolean
isReorderedMark
(GlyphDefinitionTable gdef, int[] glyphs, int[] unscaledWidths, int index, int[] pa) reorderCombiningMarks
(GlyphDefinitionTable gdef, GlyphSequence gs, int[] unscaledWidths, int[][] gpa, 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.Methods inherited from class org.apache.fop.complexscripts.scripts.ScriptProcessor
assembleLookups, getInstance, getOptionalPositioningFeatures, getOptionalSubstitutionFeatures, getScript, position, position, preProcess, substitute, substitute
-
Method Details
-
getSubstitutionFeatures
Description copied from class:ScriptProcessor
Obtain script specific required substitution features.- Specified by:
getSubstitutionFeatures
in classScriptProcessor
- Returns:
- array of suppported substitution features or null
-
getSubstitutionContextTester
Description copied from class:ScriptProcessor
Obtain script specific substitution context tester.- Specified by:
getSubstitutionContextTester
in classScriptProcessor
- Returns:
- substitution context tester or null
-
getPositioningFeatures
Description copied from class:ScriptProcessor
Obtain script specific required positioning features.- Specified by:
getPositioningFeatures
in classScriptProcessor
- Returns:
- array of suppported positioning features or null
-
getPositioningContextTester
Description copied from class:ScriptProcessor
Obtain script specific positioning context tester.- Specified by:
getPositioningContextTester
in classScriptProcessor
- Returns:
- positioning context tester or null
-
reorderCombiningMarks
public GlyphSequence reorderCombiningMarks(GlyphDefinitionTable gdef, GlyphSequence gs, int[] unscaledWidths, int[][] gpa, 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 classScriptProcessor
- Parameters:
gdef
- the glyph definition table that appliesgs
- an input glyph sequenceunscaledWidths
- associated unscaled advance widths (also reordered)gpa
- associated glyph position adjustments (also reordered)script
- a script identifierlanguage
- a language identifier- Returns:
- the reordered (output) glyph sequence
-
isReorderedMark
protected boolean isReorderedMark(GlyphDefinitionTable gdef, int[] glyphs, int[] unscaledWidths, int index, int[] pa)
-