I encourage anyone interested in Variations Fonts to read the draft CSS spec carefully:
https://drafts.csswg.org/css-fonts-4/#low-level-font-variation-settings-control-the-font-variation-settings-propertyI was surprised to read this: “Axis values not present in the font, or axis values greater or less than the range supported by the font, are ignored and therefore have no effect…”
I would have thought it makes more sense to clamp values outside the axis’s range to either its max or its min, as recorded in the fvar table, rather than its default. Furthermore, there does not seem to be a way to obtain the max and min values — something that seems to me quite a desirable capability, whether or not there are instances to access them. Would it make sense to allow special values of
max,
min and
default in font-variation-settings? For example:
font-variation-settings: 'wght' default, 'wdth' min;
Note: Webkit Nightly supports font-variation-settings but I have found it unpredictable when using values just within the extremes.
Comments
The OT 1.8 spec says that an application (or whatever platform layer is doing interpolation) must clamp the requested user values to the axis min/max values defined in the 'fvar' table. Search for the first instance of "clamp" in this page:
https://www.microsoft.com/typography/otspec/otvaroverview.htm
Now, in principle, you could view CSS as a higher-level protocol that enforces different requirements. The OT spec doesn't prevent that; the higher-level protocol wouldn't conform to the OT 1.8 guidance for processing variation instance coordinates, but that doesn't necessarily imply that anyone will care.
But if people do care about what CSS does, they should open issues or comment on issues in the GitHub rep that the CSS WG uses for their process. I have opened an issue for this item (specifically, clamping vs. ignore; I haven't mentioned support for "min" and "max" values):
https://github.com/w3c/csswg-drafts/issues/647
Being able to ask for max, min, absolute percentage, and relative percentage all seem useful.
Dave, I like the idea of a percentage along an axis, so 0% gets its min, and 100% gets its max. Could you clarify what you mean by relative and absolute percentage?