RE: [css3-fonts] default font features

I am all for enabling great typography on the Web. But as much as I want to turn on default OpenType features in IE, I am not ready to say we will be able to do that now.

Pulling shaping data like kerning from the font is not expensive. Expensive is finding right line break, and this can’t be achieved easily at the same speed as simple text layout pass. I just made quick measurements and Firefox is about 3 times slower than IE’s simple mode. As I understand, Firefox takes shortcut by interrupting shaping words independently, breaking context between them. This definitely can speed up layout, but will break highly contextual fonts. IE with default features enabled is 3 times slower than Firefox. Of course, this is simple text micro-benchmark, so difference in real life sites will be smaller.

I don’t say IE can’t be optimized, I know we can make it much faster even without changing public Windows APIs (my understanding is the Firefox uses Harfbuzz and have flexibility of using and optimizing functionality on very low level). But reality now is that performance is not something we can ignore. It is very high priority for IE, and management will expect convincing arguments to accept this performance hit out of the box. Especially if there is a trivial way to turn feature on through CSS. With many  system fonts getting OpenType treatment in Windows8, this will affect lots of Web pages.

So, my preference is to have ‘auto’ as default, to use UA preferred rendering and ‘normal’ value, to give author control over better quality text without going into details of what is involved. Features like <ccmp> or <locl> would be turned on automatically under ‘normal’ or explicit feature settings because they are mandatory for script behavior, much like init/medi/fina for Arabic. So they can’t be disabled by using any CSS property.

As I understand, Firefox will turn on kerning depending on font size. How CSS would classify this behavior, can this be acceptable under ‘normal’ value? Similar question about ligatures. I think InDesign automatically disabled ligatures if tracking was greater than 0.25em. Would this acceptable under ‘normal’?

Thanks,
Sergey

Received on Tuesday, 17 July 2012 02:11:01 UTC