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

> On Aug 11, 2015, at 9:25 PM, John Daggett <jdaggett@mozilla.com> wrote:
> 
> 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.).

I'm not actually describing "TrueType vs. OpenType" but instead about "specific to one font technology" vs "generalizable to more than one specific font technology."

> 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.

My previous statement is relevant here too.

> 
> 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.

My proposal isn't anything quite so stringent. I am not advocating that a specific mapping be supplied in the fonts spec (or even that the term "TrueType" appear anywhere in it). Instead, I'm simply proposing one sentence encouraging UAs to do their best to map OpenType feature tags & values onto whichever underlying font technology is used. WebKit currently does this for TrueType fonts [1].

> 
> Regards,
> 
> John Daggett
> 
> [1] https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html <https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html>
> 
> ​
[1] http://trac.webkit.org/changeset/188319/trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp

Received on Wednesday, 12 August 2015 19:21:07 UTC