[csswg-drafts] Add "font-synthesis: super" (#7441)

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

== Add "font-synthesis: super" ==
CSS fonts 4 has this:

> Because of the semantic nature of subscripts and superscripts, when the value is either sub or super for a given contiguous run of text, if a variant glyph is not available for all the characters in the run, simulated glyphs should be synthesized for all characters using reduced forms of the glyphs that would be used without this feature applied. 

Which is nice, but it's currently implemented in Gecko only. The spec also marks this as "at risk".

This means `font-variant-position` is a bit useless - as it may or may not generate superscript, everyone just uses `font-size` and `vertical-align` instead which is guaranteed to work cross-browser, even if it's not as nice typographically.

Ideally all platforms would implement it, but an alternative would be: add `font-synthesis: super` to control whether this substitution takes place, and have it set by default. My presumption is this would be pretty easy to implement.

More useful than turning it off is checking for whether it's supported. This would make `font-variant-position` safe to use in a cross-browser way.

```css
.call {
    font-size: 0.7em;
    vertical-align: super;
}
@supports (font-synthesis: super) {
    .call {
        font-size: inherit;
        vertical-align: inherit;
        font-variant-position: super;
    }
}
```

Technically it applies to subscript too, so could be `font-synthesis: position`?

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 30 June 2022 19:03:27 UTC