|
Unified Typesetting API M1-20040817 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A script encapsulates the rules needed to typeset a single script and it does the actual typesetting.
Implementations of the same locale may differ in their support level
which is one of QualityReport.NO_SUPPORT,
QualityReport.MINIMAL_SUPPORT,
QualityReport.BASIC_SUPPORT,
QualityReport.ADVANCED_SUPPORT or
QualityReport.FULL_SUPPORT. The support
level is determinated by
reference list
which defines features required for basic/full supportThe central method is typeset(int, Glyph). Typesetting
is context sensitive. Therefore a script may or may not put a glyph
to the active embedding level for every call to typeset.
| Method Summary | |
void |
addScriptListener(ScriptListener aListener)
Adds a script listener to the script. |
FeatureList |
getFeatures()
The list of supported features. |
Locale |
getLocale()
Returns the locale supported by this script. |
EmbeddingLevel |
newEmbeddingLevel(int order)
Returns the embedding level to use for the given order. |
void |
relax()
Tells the script that the next glyph will be processed by another script. |
void |
removeScriptListener(ScriptListener aListener)
Removes a script listener. |
void |
setEmbeddingLevel(EmbeddingLevel anEmbeddingLevel)
Sets the embedding level this script should place its generated glyphs in. |
void |
typeset(int aChar,
Glyph aGlyph)
The typesetter calls this method for every glyph this script should set. |
void |
wakeup(Script prevScript,
EmbeddingLevel prevEmbeddingLevel)
This method tells a script to prepare for typesetting. |
| Method Detail |
public Locale getLocale()
public FeatureList getFeatures()
The returned features are compared to a reference list for the corresponding locale (if there is one).
getFeatures in interface QManageablepublic void setEmbeddingLevel(EmbeddingLevel anEmbeddingLevel)
anEmbeddingLevel - The embedding level to place the generated gylphs.public void relax()
public void wakeup(Script prevScript,
EmbeddingLevel prevEmbeddingLevel)
null, null if
there is no previous script (single language environment). Therefore
simple script implementations will most probably not interpret the
arguments.
This method is the glue between two scripts. The arguments are meant
to deal with some complicated situations, especially with interpunctation
issues. Imagine you have something like ,car MEANS CAR' in
logical order, where uppercase is Arabic and lowercase is English and the
quotion marks are also Arabic. Than the result should look like
'RAC SNAEM car, in optical order (the single glyphs are of
course not mirrored in this example although it would be useful). Note
that the opening mark now is at the right of the word car
whereas it was at the left before. In such a case the optimal spacing
would be r, and not ,c.
prevScript - The previously called script. null
if there' no previous script.prevEmbeddingLevel - The previous embedding level. null
if there is no previous script.
public void typeset(int aChar,
Glyph aGlyph)
aChar - The character to typeset. Although aGlyph
already contains a reference this is simply
to save a method call.aGlyph - An empty glyph which has to be filled.public void addScriptListener(ScriptListener aListener)
ScriptListener gets
informed if e.g. a new item is generated.
aListener - The listener to add.public void removeScriptListener(ScriptListener aListener)
aListener - The listener to remove.public EmbeddingLevel newEmbeddingLevel(int order)
setEmbeddingLevel(EmbeddingLevel) method is called directly
afterwards.
order - The order of the embedding level.
|
Unified Typesetting API M1-20040817 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
![]() An inghuimische.de project. | Copyright (C) 2004 Christian Ziesemer; See the Mozilla Public License for more details. |