Syntax for OpenType mark attachment?
We’re looking for some feedback from the font developer community on how you want the AFDKO/FontLab/FontMaster code syntax to work for mark attachment. Please comment! Comments received by Friday September 29th will be most likely to influence our implementation.
In OpenType fonts, mark attachment is the GPOS (glyph positioning) rule which dynamically positions diacritical marks (accents and the like) relative to base characters or other marks.
The currently available version of Adobe’s Font Development Kit for OpenType (AFDKO) does not support OpenType mark attachment. Hence, other tools based on the AFDKO, such as FontLab or DTL FontMaster, do not support it either. We’re currently implementing such support, which will in turn determine the underlying code used by such third party tools. This also means extending the syntax of the AFDKO language to represent mark attachment. However, mark attachment is complicated, and gets even more so when one makes it contextual. The best way to represent it in the same style as other AFDKO code is not entirely clear. Here’s what we’d like your feedback on.
(Special thanks to Read Roberts, AFDKO engineer, for the remainder of this post!)
[UPDATE 11 Sep 2008: See comments for latest proposal from Read]
The syntax for a mark-to-base positioning rule ( GPOS lookup Type 4) is planned to be:
position # The base glyph # the anchor position on the base glyph mark ;
# define a mark class mark [ acute grave] @TOP_MARKS; # use mark class name in a mark-to-base rule. position [a e o ] mark @TOP_MARKS;
Adding a contextual prefix and suffix to this is not obvious, as the input glyph in a mark-to-base rule ( that is, the glyph which is matched in the current text stream when the rule is applied) is the mark class rather than the base glyph class. The way that this rule is applied is that when the current glyph matches in the mark class for a mark-to-base rule, the application looks back in the input stream for a matching base glyph. (The lookup flag may also instruct the application to skip other mark glyphs when doing so).
Some possible representations:
position " mark '
This option can be described as:
- Write the complete stand-alone base-to-pos position rule
- Add double-quote to the base glyph or glyph class, to show that it is NOT part of preceding context.
- Add one single quote to the mark class name, to show that this is the input that needs to match the current glyph position
- Add the contextual prefix sequence before the base glyph
- Add the contextual suffix after the mark class name