from-font keyword for text-underline-position should take MVAR `unds` `undo` into account
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | verified |
People
(Reporter: drott, Assigned: jfkthame)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36
Steps to reproduce:
I am working on implementing text-underline-position from-font keyword support in Chromium and added a new test case, comparing a static font's underline position with a variable font's underline position in a reftest.
I tried running https://wpt.fyi/results/css/css-text-decor/text-underline-position-from-font-variable.html?sha=a4482f355e&label=master&max-count=1 in Firefox.
Actual results:
Test failed.
Expected results:
Test should pass.
The variable fonts MVAR table contains variable metrics unds
and undo
for underline size and offset. The user agent should extract these according to axis parameters set from font-variation-settings and apply the underline offset that is set in the variable font if the text-underline-position style is set to value from-font
.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Reporter | ||
Comment 2•5 years ago
|
||
Reporter | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
Good point. Firefox has historically used the underline position/thickness values from the font as its default behavior, but that long predates variable fonts, and we haven't updated to take account of that.
Reporter | ||
Comment 5•5 years ago
|
||
Thanks for the quick triage.
Assignee | ||
Comment 6•5 years ago
|
||
So it turns out this does work on Windows and Linux, because we get the underline metrics through APIs (DirectWrite and FreeType respectively) that handle the variation. (The example doesn't currently work in Firefox on these platforms, but that's because the testcase is faulty: https://github.com/web-platform-tests/wpt/issues/22944. With that fixed, it works as expected.)
But it is indeed a bug on macOS, where we read the values from the OS/2 table directly. So we need to fix that here.
Assignee | ||
Comment 7•5 years ago
|
||
Updated•5 years ago
|
Comment 9•5 years ago
|
||
bugherder |
Reporter | ||
Comment 10•5 years ago
|
||
From report to fix in ~2 days, with a complex code change to make that happen. Thank you, Jonathan, great work!
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Reproduced the issue on Firefox 77.0a1 (20200414214610) on MacOS 10.15
Verified - fixed on Firefox 77.0a1 (20200415215103)
Description
•