[csswg-drafts] [css-fonts-4] Proposed revisions to "Low-level font variation settings control".

vlevantovsky has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-fonts-4] Proposed revisions to "Low-level font variation settings control". ==
In section 8.2 "[Low-level font variation settings control](https://drafts.csswg.org/css-fonts-4/#font-variation-settings-def)", the 5th paragraph says "Axis values not present in the font are ignored and therefore have no effect; a user agent must not attempt to synthesize fallback behavior based on these axis tags." I am not sure how to interpret this in the context of font fallback selection, and whether the specified behavior would always produce a desirable outcome - I think that a revision to this would be needed.

Let's consider the following example where an author would like to use @font-face rule to define myVariableFontA using a variation font resource that supports both 'wdth' (in 50 to 200 range) and 'wght' (in 100 to 900 range) axes, with its capabilities similar to what is illustrated by [this OpenType spec example](https://www.microsoft.com/typography/otspec/otvaroverview.htm#CSN). Let us also assume that the platform-supplied variable font SysVariableFontB implements a condensed typeface supporting only weight variation axis in the range of 300 to 600, and is available to be used as a fallback choice.

The primary font choice is defined as `@font-face { font-family: myVariableFontA; font-variation-settings: 'wght' 700, 'wdth' 70; }` where both variation axis have values assigned in their valid and supported value range specifying bold condensed typeface. 

If my primary font choice myVariableFontA fails to load, the SysVariableFontB would be used as a fallback font; however, this font doesn't support 'wdth' variation axis, and, being a condensed typeface by design, only supports a limited 300..600 range of weight variation. 

What would happen in this case? Would the required behavior of ignoring unsupported axis value be applied to the fallback font? It's understandable that the width axis is not supported by the fallback font and has to be ignored, but my primary font choice calls for 'wght' settings of 700 that are also outside of fallback font range of 300.600. The "ideal" behavior would be to use fallback SysVariableFontB with its nearest max supported 'wght' settings of 600, but, according to the spec as written, it looks like the unsupported value of 700 should also be ignored and the regular default weight of 400 would be applied - hardly the best choice from author's point of view.

I suggest to revise the 5th paragraph of section 8.2 to say that
- if the variation axis (defined by font-variation-settings) is not supported by the font the settings should be ignored;
- if the variation axis is supported but the defined value is out of supported range, the nearest value on supported range boundaries should be used.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2221 using your GitHub account

Received on Tuesday, 23 January 2018 18:49:34 UTC