-
Notifications
You must be signed in to change notification settings - Fork 715
[css-fonts-4] Avoid font synthesis outside of variable range #7999
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
Comments
Does correctly mean anything special (like a check against the actual font) here? |
I meant this mostly to describe an |
The spec currently says:
That last sentence seems to cover synthesizing outside the range from the descriptor, and also outside the range from the font. Is it clear enough? |
Thanks for following-up. I don't think this is clear enough, because this sentence IMO still leaves room to interpret that synthetization may be required ("font descriptors imply...needed") if oblique or bold requested styles are outside the variable range.
This sounds to me more like it covers |
We propose that if a variable font is declared and embedded with a
@font-face
and correctly declares its available ranges for font-weight and font-style or uses implicitauto
ranges, no synthetic bolding or obliqueing should happen outside the supported or declared ranges of that variable font.Reasoning: We interpret that if an authors embeds and uses a variable font, the intent is to use the supported ranges of this font, and not trigger any synthesis on top.
Otherwise what happens is a weird combination of font-designer-intended oblique or bold styles from the font, plus an additional synthetization applied by the UA.
One extreme example from Firefox (thanks to Munira (@tursunova) for test case and investigation) but similarly happens in Chrome (Chrome can't do variable obliqueing by number of degrees, but when it identifies a need for synthesis, then applies a fixed 20 degree skew):
This was found while @tursunova and I worked on an issue extracted from this interop 2024 proposal: web-platform-tests/interop#64
Related spec parts:
4.4. Font property descriptors: the font-style, font-weight, and font-stretch descriptors
https://drafts.csswg.org/css-fonts-4/#font-style-matching
Additional references
https://bugs.chromium.org/p/chromium/issues/detail?id=1380486
The text was updated successfully, but these errors were encountered: