| Summary: | Optical Size (opsz) axis is handled very inconsistently in variable fonts | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Stephen Nixon <stephen> | ||||||||||
| Component: | Text | Assignee: | Nobody <webkit-unassigned> | ||||||||||
| Status: | NEW --- | ||||||||||||
| Severity: | Major | CC: | ahmad.saleem792, mmaxfield, webkit-bug-importer | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | Safari Technology Preview | ||||||||||||
| Hardware: | Mac (Apple Silicon) | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Stephen Nixon
2023-07-06 13:20:27 PDT
Created attachment 466957 [details]
Screenshot of an example of the issue
Here is one of several tests of the issue, showing that the rendered opsz is incorrect when opsz and wght axes are at their defaults.
I don’t think I can edit a previous comment, so to add detail to this:
> in the current main Safari, there are other `opsz` inconsistencies
There, I am referring to my experience in Version 16.1 (18614.2.9.1.12).
Additionally, I am viewing this on an M1 Mac, Ventura 13.0 (22A380)
Created attachment 466958 [details]
WebKit ToT Screenshot (for Reference)
Ah, seeing Ahmad’s latest screenshot makes me realize I had slightly misdiagnosed the error. When the opsz is specifically set to its default, the text isn’t rended as only the *maximum* opsz. Instead, it is rendered with opsz as the current px size – it is basically acting with "auto" opsz forced, even when font-variation-settings should be overriding that behavior. ...and the above true in both Safari Technology Preview (Release 173 (Safari 17.0), and also appears to be happening in Ahmad’s screenshot of WebKit ToT. But yes, that is why it doesn’t match the max opsz in Ahmad’s screenshot. And indeed, if I scale my browser window down, the fact that the text is sized with vw units means that a smaller window starts to change what auto opsz is (wrongly) applied to that text that has been assigned the default opsz value. Created attachment 466982 [details]
Updated reproduction repo
I noticed that my tests weren't very predictable, because font sizing with using the vw (viewport width) unit. I have since updated example fonts to be 64px, which better shows that the default opsz gets ignored and the font is set to the current px size, despite font-variation-settings being used. |