www.youtube.com - Japanese characters have different font
Categories
(Web Compatibility :: Site Reports, defect, P3)
Tracking
(Webcompat Score:3, Webcompat Priority:P3, firefox146 fixed)
| Tracking | Status | |
|---|---|---|
| firefox146 | --- | fixed |
People
(Reporter: ctanase, Assigned: jfkthame)
References
()
Details
(Keywords: webcompat:needs-diagnosis, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][webcompat:sightline][webcompat:japan])
User Story
platform:windows,mac,linux,android impact:minor-visual configuration:general affects:all branch:release diagnosis-team:layout user-impact-score:30
Attachments
(3 files)
Environment:
Operating system: Linux/Windows 10
Firefox version: Firefox 134.0/135/137
Steps to reproduce:
- Go to https://www.youtube.com/watch?v=l85lZOXbt18
- Observe the font in the video title.
Expected Behavior:
The font is the same as on Chrome.
Actual Behavior:
The font is different.
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in firefox-nightly, and firefox-release
- Does not reproduce in chrome
Created from https://github.com/webcompat/web-bugs/issues/147799
| Reporter | ||
Comment 1•9 months ago
|
||
Updated•9 months ago
|
| Reporter | ||
Comment 2•9 months ago
|
||
It is more noticeable on Linux. Some kanji characters as the original reporter stated on the github report, look different. For example "誤", on Firefox (Linux) it looks very similar to "Noto Sans Simplified Chinese" whereas on Chrome (Linux) it looks like "Noto Sans Japanese".
Updated•9 months ago
|
I reported this on the forum first as this site recommends but I'm guessing it's not monitored?
Copying that info here:
As of today (?), on certain websites, such as Reddit, or on certain elements of some websites, such as text on Google Search's accordion components, Japanese text is suddenly being rendered in Chinese (see images). I have seen reports about this by other users (on Reddit).
This is fixed if
jaunderfont.cjk_pref_fallback_orderis moved to the front. However, I found a comment on Bugzilla stating that thefont.cjk_pref_fallback_ordersetting is only honored if Firefox can't determine system font preferences, butabout:supportlists my locales as ["en-AU","ja-JP"].
This might seem like a trivial issue but the differences in font are extremely noticeable for someone who can read Japanese and makes reading harder.
Updated•1 month ago
|
| Assignee | ||
Comment 5•3 days ago
|
||
Ah, I see what's happening, at least on Windows -- this is a failure of the OSPreferences service.
As noted in the comment here, we try to use the Windows GlobalizationPreferences APIs to get the list of the user's preferred languages. This works in the parent process, so if Japanese is present in the list, this will take precedence in font fallback searches.
However, in content processes, we fail to get the Globalization Prefs service, and so we fall back to GetUserPreferredUILanguages. But as noted in the comment here, this does not return the full list; in fact, as far as I can see from my testing, it seems to return just the "Windows display language" (an individual single-language setting in the Settings UI, separate from the list of "Preferred languages"), plus an entry for en-US that I suspect may be a hard-coded last resort entry. The other languages I have added to the Preferred Languages list (including Japanese) don't appear at all. And so we end up falling back to the font.cjk_pref_fallback_order pref, as noted in comment 3.
The failure to use GlobalizationPreferences in content processes is related to content-process sandboxing. If I set security.sandbox.content.level to 7 or lower, OSPreferences successfully accesses GlobalizationPreferences, we get the expected list of languages, and the desired fonts. But at level 8 or 9 (the default), the service fails and the problem here arises.
| Assignee | ||
Comment 7•3 days ago
|
||
This ensures that content processes use the same list of system locales as the parent,
avoiding the issue (on Windows) that sandboxing prevents the content process using
the preferred APIs, and it ends up getting a different (and less useful) list.
(For completeness, we should also modify the Refresh() method to retrieve the system
locales from the parent again, but currently nothing is hooked up to Refresh() on
Windows so it is unimportant for the time being; the user will have to restart the
browser anyhow to pick up changes in the preferred language list.)
Updated•3 days ago
|
Updated•3 days ago
|
Comment 9•3 days ago
|
||
| bugherder | ||
Description
•