font-family: system-ui breaks font fallback mechanism
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox-esr91 | --- | unaffected |
firefox91 | --- | unaffected |
firefox92 | --- | verified |
firefox93 | --- | verified |
People
(Reporter: RSChiang, Assigned: emilio)
References
(Regression, )
Details
(Keywords: regression)
Attachments
(5 files)
103.18 KB,
image/png
|
Details | |
101.84 KB,
image/png
|
Details | |
88.83 KB,
image/png
|
Details | |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
Regressed by: 1226042
Keyword: Nightly-community
Description:
After the recent rollout of system-ui
font family on Nightly, elements with either:
system-ui
as their onlyfont-family
orsystem-ui
as their preferredfont-family
whilelang
attribute is present
would render non-Latin alphabets with the browser default font for that language, instead of the correct system font or the next font specified in CSS font-family
fallback list.
The problem is illustrated in the attached screenshot. For the provided text sample, Firefox is expected to use either the coordinated .AppleSystemUIFont
as in Safari, or .SF NS
(the Latin system font), PingFang TC
(CJK system font for zh-TW
locale) and so on for their locale. Instead, Arial
and Songti SC
(the serif CJK font for zh-CN
locale) is used for the non-Latin glyphs.
This behavior is not shown in the previous -apple-system
implementation.
Reporter | ||
Comment 1•3 years ago
|
||
Reporter | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Will look, thanks.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
As it's usually not very useful. I don't know how easily we can add a
reliable test for this, let me know if you come up with an idea to do
that.
Reporter | ||
Comment 5•3 years ago
|
||
Thanks for looking into this! As far as I know, Facebook has already made system-ui
as their preferred font on web, and the problem will thus be pretty noticeable to ordinary users if it landed on stable.
Kudos for the quick patch ✨
Assignee | ||
Comment 6•3 years ago
|
||
Confirming on try that it behaves as expected.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9818a76ba62c Don't use system-ui as a fallback generic. r=jfkthame
Comment 8•3 years ago
|
||
bugherder |
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/766266465e59 Reftest. r=jfkthame
Comment 10•3 years ago
|
||
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/99e35344e152 Annotate reftest as failing on Android.
Comment 11•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Assignee | ||
Comment 12•3 years ago
|
||
Comment on attachment 9235573 [details]
Bug 1724907 - Don't use system-ui as a fallback generic. r=jfkthame
Beta/Release Uplift Approval Request
- User impact if declined: system-ui rendering when unsupported characters are used will use wrong fallback.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Very simple patch to use same fallbacks as named families.
- String changes made/needed: none
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 14•3 years ago
|
||
Comment on attachment 9235573 [details]
Bug 1724907 - Don't use system-ui as a fallback generic. r=jfkthame
Approved for 92.0b4.
Updated•3 years ago
|
Comment 15•3 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/d74c26ca4cae
https://hg.mozilla.org/releases/mozilla-beta/rev/495f1e54ee7d
Updated•3 years ago
|
Updated•3 years ago
|
Comment 16•3 years ago
|
||
Reproduced the issue on Firefox 93.0a1 (2021-08-08) under macOS 11.5 by following the infos provided in the first comments.
The issue is fixed and the correct fonts are used on 93.0a1 (2021-08-16) and Firefox 92.0b4 on the same system.
Description
•