Re: [csswg-drafts] [css-fonts] avoid fallback from oblique to italic (#9389)

I did look at the original discussion in: https://github.com/w3c/csswg-drafts/issues/8914#issuecomment-1649678597, which was original about controlling the synthetic slant angle (right-leaning vs. left-leaning). The [test case on that issue](https://github.com/w3c/character_phrase_tests/issues/60)  also relies on system fonts and then on availability of system fonts in a particular style.

I am a bit confused as to what actual case we are trying to address, I thought the original issues is about slant direction. With this proposed resolution, I don't think we're getting closer to enabling left-leaning slant, or are we and I missing something?

So here, the proposed resolution is: We should not fallback to italic when oblique is requested and instead prefer synthesis.  

IMO the general fix for getting the correct intended presentation is to use good fonts. When a good portfolio of fonts is provided as web fonts, likely one label in the `@font-face` declarations for the purposes of font matching is sufficient, and it does not really matter whether that's `italic` or `oblique`. 
Here, `italic` and `oblique` would be in conflict if within one declared family for "oblique" synthesis would be preferred, for "italic" the crafted glyphs would be preferred. 

In our implementation, we don't have a strict distinction about "intent to synthesize italic" vs. "intent to synthesize oblique", or in other words, we rely on

> For the purposes of font matching, User agents may treat [italic](https://drafts.csswg.org/css-fonts-4/#valdef-font-style-italic) as a synonym for [oblique](https://drafts.csswg.org/css2/#valdef-font-style-oblique).

So it would be tricky for us to make the proposed change: “Do not allow fallback to italic for oblique in font matching”. 
I am also hesitant to move in the direction of more synthesis vs. less. 

For the slant angle direction problem, I think this can be solved well with variable fonts with a slnt axis. I am also open to looking into better control of the synthesized slant angle direction, as in the original request. But at this point, I don't 
see how the proposed resolution brings us closer to it, other than avoiding dropping to italic, but then still producing an incorrect slant angle direction in the synthesis.










-- 
GitHub Notification of comment by drott
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9389#issuecomment-2049382909 using your GitHub account


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

Received on Thursday, 11 April 2024 10:25:57 UTC