Firefox renders zh-Hani with a Japanese font, not a Chinese one.
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: twisniewski, Assigned: jfkthame)
References
Details
Attachments
(2 files)
As reported in https://webcompat.com/issues/34232, Firefox renders text in lang=zh-Hani
with a Japanese font, rather than a Chinese one, as demonstrated in the attached test-case (when inspected in the devtools font panel).
For instance, on my Macbook, Firefox uses Hiragino Kaku Gothic ProN, whereas for lang=zh
and lang=zh-Han
it uses PingFang SC. (Chrome uses Songti SC and PingFang SC respectively, while Safari uses Songti SC for all three cases). Also, the user who reported the issue mentioned that Edge uses Microsoft YaHei for all cases.
Comment 1•5 years ago
|
||
The priority flag is not set for this bug.
:lsalzman, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
That's very interesting... because it seems that zh-somethingrandom
is correctly using Chinese font, but zh-Hani
is special. There must be some code or data specific for this locale?
Assignee | ||
Comment 3•5 years ago
|
||
More specifically, zh-Hans
and zh-Hant
use Simplified and Traditional Chinese fonts respectively, as expected from the script codes. Similarly, zh-CN
uses Simplified Chinese, while zh-TW
and zh-HK
choose Traditional. Plain zh
(with neither script nor region specified) uses Simplified.
zh-Hani
, on the other hand, uses Japanese. That does seem wrong; while the script subtag Hani
doesn't help differentiate, the zh
language should still be a strong indication to prefer Chinese fonts.
Aha - I suspect this is coming from https://dxr.mozilla.org/mozilla-central/rev/ca257801d86f5d4e9c1768722c7131216c07d38f/intl/locale/nsLanguageAtomService.cpp#61, where the Hani
script subtag is treated as Japanese. I guess we should check the primary language subtag before making that assumption.
Assignee | ||
Comment 4•5 years ago
|
||
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9468067f683b Improve mapping of lang tags to internal langGroup codes for font-prefs selection. r=m_kato
Comment 6•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 7•5 years ago
|
||
So according to ISO 15924 Code Lists, "Hani" means "Han (Hanzi, Kanji, Hanja)", so indeed it shouldn't be mapped to any specific language itself.
Updated•5 years ago
|
Description
•