Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-fonts] Interaction between font-synthesis-style and variable fonts #9391

Closed
frivoal opened this issue Sep 21, 2023 · 5 comments
Closed

Comments

@frivoal
Copy link
Collaborator

frivoal commented Sep 21, 2023

The definition of font-synthesis-style says:

This property controls whether user agents are allowed to synthesize oblique font faces when a font family lacks oblique faces.

But step 3 of "If the value of font-style is oblique[…]" in Matching font styles says:

If font-synthesis-style has the value auto, then for variable fonts with a slnt axis a match is created by setting the slnt value with the specified oblique value; otherwise, a fallback match is produced by geometric shearing to the specified oblique value.

Which means that font-synthesis-style: none not only turns off browser synthesis of oblique fonts, but also usage of the slnt axis in variable fonts that have it. This is unexpected: the definition of font-synthesis-style talks about its effects when a font family lacks oblique faces, but variable fonts with a slnt axis don't lack oblique, they have a whole range of them. I don't think we should talk about synthesis when the user agent is rendering a font as designed by the font designer.

I'd suggest splitting this step 3 into two distinct ones:
3.1. For variable fonts with a slnt axis, a match is created by setting the slnt value with the specified oblique value.
3.2 If font-synthesis-style has the value auto, a fallback match is produced by geometric shearing to the specified oblique value

@frivoal frivoal added the css-fonts-4 Current Work label Sep 21, 2023
@svgeesus
Copy link
Contributor

Good catch and, I suspect, not an intended outcome.

@svgeesus
Copy link
Contributor

Re-reading this, there seems to be an assumption that geometric shearing and the use of a slnt axis are equivalently "synthesis" and equally undesirable. Which is false; the former (faux-oblique) is manipulating the glyph outlines in a way not intended by the font designer while the latter is using a feature provided by the font designer, for the intended purpose.

The edit suggestions are good, but I think that needs to be tightened up (for all the font-synthesis-* properties) first.

@svgeesus
Copy link
Contributor

@frivoal do these edits address your comment, or is there more to do?

@svgeesus
Copy link
Contributor

svgeesus commented Feb 8, 2024

ping @frivoal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants