"font-weight: 1000;" is in the CSS Spec, but font weights above 900 fail in Firefox
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox72 | --- | fixed |
People
(Reporter: arrowtypeco, Assigned: jfkthame)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36
Steps to reproduce:
According to the CSS spec:
"values greater than or equal to 1 and less than or equal to 1000 are valid"
(https://drafts.csswg.org/css-fonts-4/#font-weight-numeric-values)
Therefore, I tried to use font-weight: 1000; on a variable font that supports this. I then compared that result to font-variation-settings: 'wght' 1000; to check if there was a difference.
This showed that font-weight1 is not yet fully supported in Firefox, as tested on macOS.
Test results as of Oct 30, 2019:
- In Firefox 70 on macOS: font-weight values above 900 is ignored and falls back to 900.
- In Chrome 78 on macOS, this test does work as expected.
Actual results:
In Firefox 70 and 72 on macOS: font-weight values above 900 are ignored and fall back to 900.
Web test:
https://arrowtype.github.io/recursive/font-weight-1000--testing/index.html
(This is also failing in Safari, in a different way, and I'll file a separate bug there.)
Expected results:
font-weight: 1000; and font-variation-settings: 'wght' 1000; should yield equivalent font weight
| Reporter | ||
Comment 1•6 years ago
|
||
Here's a screenshot of the web test for this issue.
| Assignee | ||
Comment 2•6 years ago
|
||
Yes, it looks like we have some obsolete code that clamps the used font-weight value to the old 100..900 range; this is no longer correct. I'm just testing a fix locally, will post a patch once I've checked that it works as expected.
| Assignee | ||
Comment 3•6 years ago
|
||
| Assignee | ||
Comment 4•6 years ago
|
||
This was simply overlooked when we were extending font-weight for the new values allowed by CSS Fonts 4.
| Reporter | ||
Comment 5•6 years ago
|
||
Awesome! Looks like you already found and fixed the bug?
Out of curiosity: how long does that kind of fix tend to take to make it into the stable build, generally?
| Assignee | ||
Comment 6•6 years ago
|
||
The fix should appear in Nightly test builds of Firefox 72 within a day or so; then Firefox 72 is due to go to the Beta channel in early December, and to Release in January. (https://wiki.mozilla.org/Release_Management/Calendar)
Comment 8•6 years ago
|
||
| bugherder | ||
Description
•