W3C home > Mailing lists > Public > www-style@w3.org > April 2012

[css3-writing-modes] vertical font features

From: John Daggett <jdaggett@mozilla.com>
Date: Tue, 24 Apr 2012 00:23:38 -0700 (PDT)
To: www-style list <www-style@w3.org>
Message-ID: <1710050978.6628697.1335252218939.JavaMail.root@zmmbox3.mail.corp.phx1.mozilla.com>
In section 5.1.1 of the Writing Modes spec [1]:

> Vertical typesetting features such as vertical metrics and glyph
> alternates are used to set upright characters in ‘mixed-right’ and
> ‘upright’ modes. The UA must synthesize vertical font metrics for
> any such characters that do not have any. (This specification does
> not define heuristics for synthesizing such metrics.) 

As I've said a few times to Koji directly in person, I think it's a
poor choice of words to lump together metrics and actual glyph
substitution and positioning features.  Vertical metrics are the data
required to display runs of upright vertical glyphs, they are used to
determine the spacing between glyphs in the vertical direction, just
as horizontal metrics are used to display text runs horizontally. 
Features are ways of controlling different functionality available
within a given font.  A font can contain vertical metrics and support
no features.

I think what you mean here is:

  Vertical font metrics are used to layout upright characters in
  ‘mixed-right’ and ‘upright’ modes.  User agents must synthesize
  vertical font metrics for fonts that lack them.  (This specification
  does not define heuristics for synthesizing such metrics.)

> Any shaping characters from horizontal scripts that are typeset
> upright are shaped in their isolated forms.

I don't know what this means.  Are you talking about ligated forms in Arabic
or about any sort of contextual glyph substitution?

> In the ‘sideways’, ‘sideways-right’, and ‘sideways-left’ modes, text
> is typeset with horizontal font settings. Vertical metrics and glyph
> variants are not used. 

Horizontal runs are laid out using horizontal *metrics* and the normal
set of features are applied (i.e. "glyph variants are not used" is
entirely incorrect).

I think what you mean here is:

  In the ‘sideways’, ‘sideways-right’, and ‘sideways-left’ modes, text
  is laid out using horizontal metrics and the normal set of features
  used for horizontal text runs.

The main problem with this section is that it doesn't tackle the real
problem which doesn't have an easy answer, namely what are the default
set of features, specifically OpenType features, which are enabled for
vertical runs but not for horizontal runs.

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.

This section really needs to be rewritten to be of some value for
implementors but for now I'd be fine as long as you tag this section
with a "needs reworking" issue.

Regards,

John Daggett

[1] http://dev.w3.org/csswg/css3-writing-modes/#vertical-font-features
Received on Tuesday, 24 April 2012 07:24:11 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT