W3C home > Mailing lists > Public > www-style@w3.org > October 2009

Re: font features in CSS

From: Thomas Phinney <tphinney@cal.berkeley.edu>
Date: Mon, 26 Oct 2009 10:41:30 -0700
Message-ID: <f49ae6ac0910261041j2e6f036ag69c22cbe53fd0570@mail.gmail.com>
To: Håkon Wium Lie <howcome@opera.com>
Cc: www-style <www-style@w3.org>, www-font <www-font@w3.org>
On Mon, Oct 26, 2009 at 7:46 AM, Håkon Wium Lie <howcome@opera.com> wrote:
>  - Are features binary or do they need integer values? It seems that
>    Prince has implemented features as binary switches, e.g.:
>
>      font-variant: prince-opentype(salt2);
>
>    while Mozilla uses integer values:
>
>      -moz-font-feature-opentype: "salt=2";
>
>    Personally, I hope to avoid numbers altogeter; they seem even more
>    arbitrary than the alt/salt/ss names we're currently seeing.

There are several different cases to consider regarding substitution
(GSUB) layout features:

A) Some take a "choose one of many" argument to determine the output
glyph. Stylistic alternates ('salt') are one of these, where there may
be several possible results and an argument must be given for which
one is desired. Ornaments ('ornm') is another.

B) GSUB features should be assumed to be potentially
cumulative/interactive with most other features. Naming a few of the
more common ones: stylistic sets (even with each other), superscript,
ligatures. So for example in my typeface Hypatia Sans, there is a
multi-way interaction between several of the different stylistic sets
and superscript, in which toggling any one of them changes the output
glyphs. Or similarly in Poetica, there's a nice interaction between
ligatures and swash variants....

C) Cases "A" and "B" above can theoretically interact. Nothing
stopping somebody from building a font in which "choose stylistic
alternate #2" interacts with "superscript" for example, and that might
seem pretty reasonable.

D) Some few GSUB features could reasonably be treated as mutually
exclusive, though one could also rely on the author not specifying
both, and not worry about what happens when both are assigned. For
example, proportional numbers and tabular numbers are mutually
exclusive, as are superscript and subscript.

>  - personal peeve: I don't like the term "font feature". The term
>    "feature" seems much to generic to be used for a very specific
>    feature (ouch): alternate glyphs.

In some folks' usage, the full term is "font layout feature." In any
case, it certainly includes a host of glyph positioning (GPOS)
features, such as kerning, and not only alternate glyphs.

Cheers,

T
Received on Monday, 26 October 2009 17:42:04 GMT

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