[css-fonts][css-text] letter-spacing vs. font-variant-ligatures

The CSS3 Fonts spec <http://www.w3.org/TR/2013/WD-css-fonts-3-20130711/#feature-precedence>
specifies the following order of precedence for font features:

   1. font-variant descriptor (@font-face)
   2. font-feature-settings descriptor (@font-face)
   3. Special Rules (like 'letter-spacing')
   4. font-variant property
   5. font-feature-settings descriptor

This means that if an author requests ligatures for their document,
e.g.

   html { font-variant: common-ligatures discretionary-ligatures }

and then later uses tracking:

   em { letter-spacing: 1em }

the element with tracking, depending on whether it ends up having
text that triggers a ligature, will produce some very unevenly-spaced
text. E.g.

   fi n d  vs.  f i n d

Depending on exactly what fonts and exactly what sample text the
author is looking at when designing the site, they may or may not
see the problem compared to the actual production site (which
potentially shows off user-generated content!).

It seems to me that maybe, it would make more sense to put the
Special Rules section last. I think authors are best off being
able to express their variant preferences without having to
always consider bad interactions with other properties deeper
in the document (possibly via styles introduced by another
author). Because they won't consider those things.

Also, I think it's best that the font-variant descriptor and
font-variant property behave as similarly as possible.

If it turns out that some authors really need to override the
special rules in certain cases, I'd suggest instead adding
'force-*' keywords to the font-variant properties that need it
in Level 4.

~fantasai

Received on Tuesday, 30 July 2013 22:50:07 UTC