[mpeg-OTspec] Vertical ligatures
John Daggett
jdaggett at mozilla.com
Fri Apr 27 08:20:09 CEST 2012
Hi David,
> >Over on the CSS3 discussion list, John Daggett wrote something that
> >I think should be discussed re. use of vertical ligatures in
> >OpenType fonts:
> >
> > The OpenType spec defines a basic set of defaults for some
> > scripts in the horizontal case. But for the vertical case,
> > there really isn't a clear model defined in the spec or in any
> > public documentation that I've seen. For example, is the
> > "common ligatures" feature ('liga') enabled for upright text?
> > The Kazuraki font from Adobe depends on 'liga' and 'vert' being
> > enabled for vertical runs to get proper vertical ligatures.
> > However, I'm not really sure this is the right model for the
> > general case, since enabling common ligatures enables lots
> > ligatures intended for horizontal runs. For example, in stacked
> > Latin you don't want fi-ligatures to be used. I think for
> > vertical runs there really should be a separate and distinct
> > feature ('vlig'?) for vertical ligatures rather than
> > overloading the common ligatures ('liga') feature.
>
> Back in 2004 when we developed the first version of Kazuraki we had
> an extensive conversation with Microsoft about whether to register a
> 'vlig' layout feature, and (clearly) agreed not to in the end. A key
> philosophical aspect is that we believe layout features should be
> defined and used as generally as practical - don't define two when
> one will do. (There are already too many layout features we wouldn't
> have defined separately if we had it to do over again.)
Thanks for this background, this is very useful to understand the
thinking that went into the design of Kazuraki. But I still think
there's a fundamental problem that hasn't been addressed and *will*
cause problems, namely that horizontal layout mode is fundamentally
distinct from vertical or "stacked" layout mode and sharing default
features has the potential to cause problems.
As I understand it, the way Kazuraki disambiguates between vertical
and horizontal ligatures is via the 'vert' feature. This is a
substitution feature only applied to vertical runs. It's typically
used for characters for which the glyph in vertical runs is placed
differently within the em-square (e.g. U+3002 Ideographic Stop) or for
which the nature of the glyph requires a vertical-specific glyph (e.g.
the square katakana codepoints such at U+3300). But to make it so
that the vertical ligatures don't end up in horizontal text runs, the
font supplies a set of "dummy" vertical alternate glyphs for
characters included in vertical ligatures. The vertical ligature is
then defined in terms of these dummy vertical alternate glyphs, such
that when the 'vert' feature is applied a vertical ligature results
but not in the horizontal case where 'vert' is not used.
> I'd be interested in a realistic case where 'liga' is problematic in
> vertical setting. John D's example is unrealistic, because
> proportional Latin is rotated (not stacked) and monospaced Latin
> wouldn't be ligated.
For Japanese at least this is generally true but not exclusively so.
There are lots of examples of mixed use of stacked and sideways runs
of Latin text in Japanese design.
Samples of book spines from a Tokyo bookstore:
http://people.mozilla.org/~jdaggett/images/bookspineexamples.jpg
AERA article on the iPad:
http://people.mozilla.org/~jdaggett/images/ex7-aera20100607-p26-ipad.png
Note the title of the Ryu Murakami novel "69" or the use of "Wi-Fi" in
the iPad article, if the book was named "59" instead and the term
"Wifi" used, both these examples with a standard OpenType Japanese
font (e.g. Hiragino or Kozuka families) would exhibit the problem, the
'fi' ligature would appear since the 'liga' feature is on by default.
So this *isn't* pure theoretics.
And this isn't just ligatures, it's any substitution or positioning
feature used in a font designed purely with horizontal text runs in
mind. Just imagine what would happen when a Japanese designer starts
playing with a contextual feature heavy font like Bello from Underware
[1] in stacked runs.
It seems to me there needs to be some way of specifying different
lookups for the vertical stacked case, ones that would not apply for
horizontal runs. Creating vertical-specific features is one way but I
agree that it's not really the ideal way.
> Indeed; we concluded that there was no real need to duplicate a set
> of horizontal layout features for vertical use. (See "philosophy"
> above.) By putting the 'vert' feature first for vertical text (as
> Ken noted), the font determines which glyphs get ligated.
This is a somewhat brittle strategy. For example, fonts like those in
the Hiragino family, have discretionary ligatures for sequences such
as "株式会社" and "アパート", substitutions that yield the same glyph as for
U+337F and U+3300 respectively. With the Kazuraki method of ordering
'vert' first, you'd need to create vertical alternates for each of the
base characters involved in the ligature to get the correct
orientation in vertical runs. For examples, see the proposal for
adding text orientation properties to Unicode for use with vertical
text. [2]
Regards,
John Daggett
Mozilla Japan
[1] http://www.underware.nl/fonts/bello/features/
[2] http://unicode.org/reports/tr50/
More information about the mpeg-otspec
mailing list