- From: John Daggett <jdaggett@mozilla.com>
- Date: Thu, 5 Jul 2012 23:37:20 -0700 (PDT)
- To: www-style list <www-style@w3.org>
- Cc: www-font@w3.org
I wanted to point out a somewhat subtle point about default font features and how implementations so far have implemented support for font-feature-settings. Doing some tests [1] I noticed that current implementations treat default features differently. In both Webkit and IE10, if the 'font-feature-settings' property is 'normal' then no features are applied. Common ligatures, which are a default feature, are not applied. Language-sensitive forms are also not applied. Consider this example: #p1 { font-feature-settings: normal; } #p2 { font-feature-settings: "blah" on; } <p id="p1">final AW Ta To <span lang="sr">б</span></p> <p id="p2">final AW Ta To <span lang="sr">б</span></p> Since "blah" isn't a feature enabled by any font in use, these two lines *should* render the same. They do in Firefox but in Webkit browsers the first line shows without kerning and ligatures, the second line with. IE10 doesn't enable kerning and ligatures but it does show language specific forms in the second line (some fonts have a Serbian form of the 'б' character, which the lang="sr" tag should enable). The reason for the difference in both cases is a value other than 'normal' for font-feature-settings causes the browser to switch to some form of "typographic rendering mode" which enables a particular set of default features. Having different modes is done for performance reasons to avoid the overhead of running through the OpenType layout process for all text. I think it's important for improving text rendering on the web that default features be on by default. There's been agreement on that in the past but it's possible the implications of that for implementations were not clear to everyone. Rather than having two modes for text rendering that change based on factors that aren't clear to authors or users (e.g. the use of 'font-variant', 'font-feature-settings' or the use of a complex script such as Arabic), text should appear the same, independent of short cuts and optimizations. User agents can of course use fast path codepaths but the resulting text quality should always be the same as the unoptimized path. For situations that require bulk text rendering, authors can explicitly enable fast-path rendering by disabling default features. Regards, John Daggett [1] Simple kerning and ligature tests http://people.mozilla.org/~jdaggett/tests/simplekerningligs.html
Received on Friday, 6 July 2012 06:37:50 UTC