Re: [csswg-drafts] [css-fonts-4] Behavior for variable fonts with 'ital' axis ambiguous / underspec'ed (#3125)

(Sorry for not replying on this until now.)

I can't really put replies inline, so I'll selectively pull quotes from above.

> The font matching algorithm describes that after no match for `italic` is found, oblique 20deg and above should be tried next

This has now shifted down to 11deg (though the exact value doesn't affect the argument at hand).

> This results in every browser I've tested rendering the text correctly

Right. The idea is that the `@font-face` block should _simply_ report the capabilities of the font file. No more, no less. In this example, there's a font that supports weights from 100 to 900 that isn't italic, and there's another font that supports weights from 100 to 900 that is italic. So far so good.

> Where this breaks down is when you have a single variable font file that contains both upright and italics.

This is indeed the crux of the issue. When I designed this feature, I was assured that it was meaningless to say "0.5 ital", and that italics are, therefore, a boolean toggle. I did, however, neglect to handle the case where a font can support _both values_ of the boolean toggle.

I was also assured that it would be a Bad Thing™ to make it easy for an author to request both oblique and italics at the same time. I think this is an orthogonal concern, though, as it affects the grammar of the `font-style` _property_, and not the `font-style` descriptor within `@font-face`.

I think @jpamental's proposal makes sense, as it agrees with the spirit of making the `@font-face` descriptor simply report the capabilities of the font file.

We do have a choice, though, whether we want a font to be able to advertise that it supports both italics and obliques. Do any such fonts exist?

If the answer is "yes," then this is probably the right grammar:
```
auto | [ normal || italic || [ oblique [ <angle>{1,2} ]? ] ]
```

If the answer is "no," then this is probably the right grammar:
```
auto | [ normal || italic ] | oblique [ <angle>{1,2} ]?
```


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


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

Received on Saturday, 15 October 2022 20:41:11 UTC