Re: [css3-fonts] computed style for font-feature-settings?

Glenn Adams wrote:

> > The computed value is "as specified".  You get out the same values
> > you put in.
> Ah, thanks, I'd missed the Computed value line. I guess it was too
> much to hope that it would be possible to indirectly discover the
> font's supported features through getComputedStyle.

Both the 'font-variant' and 'font-feature-settings' are basically
"hints" to the layout system, unlike other CSS properties they don't
require something to be altered in the layout and display of text [*].
They are simply inputs to the OpenType layout system.

Whether glyph selection or positioning is altered by a given font
feature is determined by a few factors. After all the default glyph
for each character is selected from the character map of the font, for
each glyph in a text run these things affect glyph selection and

1. Is the feature defined for the given language/script?
2. Did other features already applied affect the glyph selection?
3. Do the lookups defined for a feature match the glyph?
4. If the lookups are conditional, do the adjacent glyphs match the conditions?

So there isn't really a way to use the application of features as a
way to determine just (1).  Like many things in life, the answer is "it's
complicated". ;)


John Daggett

[*] Except where explicit fallback is defined for the
'font-variant-position' and 'font-variant-caps' properties.

Received on Saturday, 1 June 2013 01:03:32 UTC