- From: Chris Lilley <chris@w3.org>
- Date: Tue, 22 Jun 2010 12:32:54 +0200
- To: John Daggett <jdaggett@mozilla.com>
- CC: www-font <www-font@w3.org>
On Tuesday, June 22, 2010, 4:48:10 AM, John wrote: JD> I originally posted this to www-style since it's related to CSS syntax but JD> I thought I would repost this here to increase the feedback. I saw it there and had it flagged to reply , but .... JD> Defining the syntax as a string potentially allows other new font formats JD> to be supported in the future. But it is slightly odd to be defining it as JD> a string but then specifying a syntax for OpenType fonts only. Yes, it is. There should be some extensibility, although it should also be clear that OpenType is the primary focus. JD> To simplify this a bit, I'm thinking of revising this to: JD> font-feature-settings: <featuretaglist> | <string> JD> <featuretaglist> = ident[( <integer> )]? [, ident[( <integer> )]?]* JD> JD> For OpenType fonts, <featuretaglist> must be used while for other font JD> formats either <featuretaglist> or <string> can be used, without no JD> defined format for non-OpenType fonts. The <integer> value must be 0 or JD> greater; if omitted the value of 1 is assumed. Feature tags that don't JD> exist are simply ignored. That looks reasonable to me. JD> An example using the current syntax: JD> /* Turn capital spacing on, turn proportional kana off */ JD> font-feature-settings: "cpsp=1, pkna=0"; JD> JD> Using the proposed revised syntax: JD> font-feature-settings: cpsp, pkna(0); I like the proposed new syntax better than the old one. It seems more natural, and the functional notation mirrors similar usage in other parts of CSS. JD> For OpenType fonts, the example below would be valid syntax but would be JD> effectively ignored since neither of the tags are valid OpenType feature JD> tags: JD> font-feature-settings: this(5), that(0); That seems ok (and allows deploying stylesheets in the future that deal with multiple revisions of OpenType. JD> This syntax feels more CSS-like and eliminates the use of quoted strings JD> for OpenType fonts. I don't know if it can completely express feature JD> settings for other font formats. I suggest concentrating on a couple of likely-to-be-used other formats rather than worrying that some future format might be incompatible. if that happens the spec can always be revised if necessary. JD> The ability to specify a <string> JD> allows some room for defining a way of specifying feature settings for JD> future font formats. JD> It would be very helpful to hear whether better support for AAT font JD> features should also be defined here (especially folks from Apple) or JD> if there are other font formats that should also be considered. I agree that AAT and Graphite, both applied to sfnt fonts, would be two real-world use cases to consider here in terms of applicability of the syntax. -- Chris Lilley mailto:chris@w3.org Technical Director, Interaction Domain W3C Graphics Activity Lead Co-Chair, W3C Hypertext CG
Received on Tuesday, 22 June 2010 10:32:57 UTC