<li> category
-This is the category code defined in the @c CATEGORY-TABLE
-of the current stage.
+The category code defined in the @c CATEGORY-TABLE of the current
+stage, or defined in the one of the former stages and not overwritten
+by later stages.
<li> combining-spec
When the layout engine draws text, it at first determines a font and
an FLT for each character in the text. For each subsequence of
-characters that use use the same font and FLT, the layout engine
-generates an intermediate glyph sequence from the character
-subsequence. Each element in the intermediate glyph sequence
-has the corresponding character code as the code attribute and zeroes
-for other attributes. This sequence is processed in the
+characters that use the same font and FLT, the layout engine generates
+a corresponding intermediate glyph sequence. The code attribute of
+each element in the intermediate glyph sequence is its character code,
+and all other attributes are zeros. This sequence is processed in the
first stage of FLT as the current @e run (substring).
Each stage works as follows.
-At first, if the stage has a @c CATEGORY-TABLE, the category of each glyph
-in the current run is updated. If there is a glyph that has no category,
-the current run ends before that glyph.
+At first, if the stage has a @c CATEGORY-TABLE, the category of each
+glyph in the current run is updated. If there is a glyph that has no
+category, the current run ends before that glyph.
-Then, the default values of code-offset, combining-spec, and left-padding-flag
-of this stage are initialized to zero.
+Then, the default values of code-offset, combining-spec, and
+left-padding-flag of this stage are initialized to zero.
Next, the initial conversion rule of the stage is applied to the
current run.
@verbatim
FONT-LAYOUT-TABLE ::= FLT-DECLARATION ? STAGE0 STAGE *
-FLT-DECLARATION ::= '(' 'font' 'layouter' NAME nil PROP * ')'
-NAME ::= SYMBOL
+FLT-DECLARATION ::= '(' 'font' 'layouter' FLT-NAME nil PROP * ')'
+FLT-NAME ::= SYMBOL
PROP :: = VERSION | FONT
VERSION ::= '(' 'version' MTEXT ')'
FONT ::= '(' 'font' FONT-SPEC ')'
... 'Z', 'a', .. 'z'.
The first form of @c CATEGORY-SPEC assigns @c CATEGORY to a glyph
-whose code @c CODE. The second form assigns @c CATEGORY to glyphs
+whose code is @c CODE. The second form assigns @c CATEGORY to glyphs
whose code falls between the two @c CODEs.
@verbatim
MACOR-DEF ::= '(' MACRO-NAME RULE + ')'
@endverbatim
-Each @c RULE specifies glyphs to be consumed and glyphs to be produced. When
-some glyphs are consumed, they are taken away from the current run. A
-rule may fail in some condition. If not described explicitly to
-fail, it should be regarded that the rule succeeds.
+Each @c RULE specifies glyphs to be consumed and glyphs to be
+produced. When some glyphs are consumed, they are taken away from the
+current run. A rule may fail in some condition. If not described
+explicitly to fail, it should be regarded that the rule succeeds.
@verbatim
DIRECT-CODE ::= INTEGER
<li> @c @]
-This rule changes the right-padding-flag of the lastly generated
-glyph to 1.
-No glyph is consumed. No glyph is produced.
+This rule changes the right-padding-flag of the lastly generated glyph
+to 1. No glyph is consumed. No glyph is produced.
<li> @c |
This rule consumes no glyph and produces a special glyph whose
-category is ' ' and other attributes are zero.
-This is the only rule that produces that special glyph.
+category is ' ' and other attributes are zero. This is the only rule
+that produces that special glyph.
</ul>
| '(' 'font-facility' FONT-SPEC ')'
@endverbatim
-If the current font has glyphs for @c CODEs or matches with
+If the current font has glyphs for @c CODEs or matches with @c
FONT-SPEC, this rule succeeds and @c RULEs are executed. Otherwise,
this rule fails.
This rule sequentially executes @c RULEs until one succeeds. If no
rule succeeds, this rule fails. Otherwise, it succeeds.
+@anchor OTF-SPEC
@verbatim
OTF-SPEC ::= SYMBOL
@endverbatim
driver. The name has the following syntax.
@verbatim
- OTF-SPEC-NAME ::= ':otf' SCRIPT LANGSYS ? GSUB-FEATURES ? GPOS-FEATURES ?
+ OTF-SPEC-NAME ::= ':otf=' SCRIPT LANGSYS ? GSUB-FEATURES ? GPOS-FEATURES ?
SCRIPT ::= SYMBOL
LANGSYS is omitted, the Default Language System
table is used.
-For @c GSUB-FEATURES, each @c SYMBOL in @c FEATURE LIST specifies a GSUB Feature tag name
-to apply. '*' is allowed as the last item to specify all remaining
-features. If @c SYMBOL is preceded by '~' and the last item is '*',
-@c SYMBOL is excluded from the features to apply. If no @c SYMBOL is
-specified, no GSUB feature is applied. If @c GSUB-FEATURES itself is
-omitted, all GSUB features are applied.
+For @c GSUB-FEATURES, each @c SYMBOL in @c FEATURE-LIST specifies
+a GSUB Feature tag name to apply. '*' is allowed as the last item to
+specify all remaining features. If @c SYMBOL is preceded by '~' and
+the last item is '*', @c SYMBOL is excluded from the features to
+apply. If no @c SYMBOL is specified, no GSUB feature is applied. If
+@c GSUB-FEATURES itself is omitted, all GSUB features are applied.
+
+When @c OTF-SPEC appears in a @c FONT-SPEC, @c FEATURE-LIST specifies
+features that the font must have (or must not have if preceded by
+'~'), and the last'*', even if exists, has no meaning.
The specification of @c GPOS-FEATURES is analogous to that of @c
GSUB-FEATURES.
COMBINING ::= SYMBOL
@endverbatim
-@c COMBINING is a symbol whose name specifies how
-to combine the next glyph with the previous one. This rule sets the
-default combining-spec to an integer code that is unique to the symbol
-name. The name has the following syntax.
+@c COMBINING is a symbol whose name specifies how to combine the next
+glyph with the previous one. This rule sets the default
+combining-spec to an integer code that is unique to the symbol name.
+The name has the following syntax.
@verbatim
COMBINING-NAME ::= VPOS HPOS OFFSET VPOS HPOS
The left figure shows 12 reference points of a glyph by numbers 0 to
11. The rectangle 0-6-8-2 is the bounding box of the glyph, the
-positions 3, 4, and 5 are on the baseline, 9 and 11 are on the center
-of the lines 0-6 and 2-8 respectively, 1, 10, 4, and 7 are on the
-center of the lines 1-2, 3-5, 9-11, and 6-8 respectively.
+positions 3, 4, and 5 are on the baseline, 9-11 are on the vertical
+center of the box, 0-2 and 6-8 are on the top and on the bottom
+respectively. 1, 10, 4, and 7 are on the horizontal center of the
+box.
The right table shows how those reference points are specified by a
pair of @c VPOS and @c HPOS.
reference points are on the same position.
@c XOFF specifies how much the X position of the reference point of
-the next glyph should be shifted to the right ('<') or left ('>') from
+the next glyph should be shifted to the left ('<') or right ('>') from
the previous reference point.
@c YOFF specifies how much the Y position of the reference point the
@endverbatim
@c MACRO-NAME is a symbol that appears in one of @c MACRO-DEF. It is
-exapanded to the sequence of the correponding @c RULEs.
+exapanded to the sequence of the corresponding @c RULEs.
@section flt-context-dependent CONTEXT DEPENDENT BEHAVIOR