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-4] What does "italic values less than or equal to 0" mean in "Matching font styles"? #2217

Closed
vlevantovsky opened this issue Jan 23, 2018 · 5 comments
Labels
css-fonts-4 Current Work

Comments

@vlevantovsky
Copy link

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?

@gsnedders gsnedders added the css-fonts-4 Current Work label Jan 24, 2018
@litherum
Copy link
Contributor

litherum commented Mar 6, 2018

Duplicate of #1531

@litherum litherum marked this as a duplicate of #1531 Mar 6, 2018
@litherum litherum closed this as completed Mar 6, 2018
@vlevantovsky
Copy link
Author

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'.

@litherum
Copy link
Contributor

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.

@vlevantovsky
Copy link
Author

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.

@litherum
Copy link
Contributor

Yeah, I’m currently in the middle of some research to learn more about the ital axis. I’ll need some more time before I can answer about this axis specifically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-fonts-4 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants