Re: [css3-fonts] TrueType support for font-feature-settings

Myles Maxfield wrote:

> font-feature-settings takes OpenType font feature tags, but if there
> are multiple font assets specified, the used font's underlying font
> technology (TrueType or OpenType) may not be known. I think the spec
> should recommend adding text to the specification recommending that
> UAs translate the given feature tag into whichever font technology is
> in use for a given font (as best as possible), thereby allowing
> authors to not require a specific font technology.

The distinction you're making here isn't really "TrueType" vs.
"OpenType" but between fonts supporting font features via OpenType
layout tables (GSUB/GPOS/GDEF) vs. AAT tables (morx, etc.). OpenType
layout is part of the OpenType spec and in common use while the AAT
tables are Apple-defined and, in general, only supported only by Apple.

In general, the 'font-feature-settings' property is intended to provide
low-level access to the specific features supported by a font. In many
of the early drafts of font feature support in the CSS Fonts spec, I
included a discussion of how to support AAT features but there was
*zero* interest from Apple folks, both on and off the CSS working group.
Type developers in general are focused almost exclusively on OpenType
layout support and not on AAT and that's why the spec focuses
exclusively on OpenType support.

Rather than mapping feature tags in 'font-feature-settings' to Apple
font feature constants [1], I think the best way forward for Apple would
be to map the property values of 'font-variant' to associated AAT
feature id's, where they exist. This would be fairly easy to support in
existing Webkit code. We could incorporate this sort of mapping into a
future version of the spec.


John Daggett



Received on Wednesday, 12 August 2015 04:25:33 UTC