-
Notifications
You must be signed in to change notification settings - Fork 715
[css-fonts-4] What does "italic values less than or equal to 0" mean in "Matching font styles"? #2217
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
Duplicate of #1531 |
I don't think the issue I highlighted here has been discussed as part of #1531. The issue here is that the css-font-4 spec explicitly talks about italic values being "less than or equal to 0" while, according to the font format spec, the negative values are clearly outside of the valid value range for 'italic'. |
You mention “the font format spec” but there are multiple font format specs which are relevant. OpenType disallows these values, but TrueType doesn’t. CSS should work with all (popular) font file formats, not just OpenType. |
TrueType doesn't have 'italic' defined as a registered variation axis. Slant is defined (with 'slnt' tag), but this is very different from 'italic', even though in some cases the results (the way glyphs are rendered) can be similar. So, while slant angle can be defined as a negative value, it's not the same as 'italic', where [0..1] is a valid range, and where, in most of the actual implementations the variation axis is used as an on/off switch for regular / italic transition. |
Yeah, I’m currently in the middle of some research to learn more about the |
In "Matching font styles", in the section describing font style matching, step 4 is described as "If no match is found, italic values less than or equal to 0 are checked in descending order until a match is found".
According to the OpenType spec, valid numeric range for 'ital' variation axis is defined as "Values must be in the range 0 to 1."
What does it mean when the CSS spec recommends searching for italic values less than or equal to zero, and what it is we expect to accomplish in this step?
The text was updated successfully, but these errors were encountered: