Closed Bug 1596875 Opened 5 years ago Closed 5 years ago

Add a CJK font order preference

Categories

(Core :: Layout: Text and Fonts, defect)

72 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox-esr68 --- unaffected
firefox70 --- unaffected
firefox71 --- unaffected
firefox72 --- fixed

People

(Reporter: aleb, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

With bug 1581822 changing the default CJK font order it caused an issue as a non-native Japanese/Chinese speaker. Going to a page in Japanese such as https://www3.nhk.or.jp/news/ with a non-Japanese system locale results with the page using Chinese font. A workaround for this is setting Simplified Chinese font to a Japanese one, but obviously this will make every site in Chinese have mixed/wrong fonts.

Sites like https://www.yomiuri.co.jp/ have the correct HTML language tag for Firefox resulting in the page using correct font, but the tab title is still incorrectly using Chinese font.

While changing Accept-Language header changes the order, it is also sent to every website and has privacy implications. Accept-Language also only changes page font, the overall UI font is still incorrectly Chinese. (tab titles, bookmarks etc.)

The only way to change the preference is to change system locale. I am able to do this only for Firefox on Linux with LC_ALL, but on my Windows machine AFAIK I'd have to change the entire system language to Japanese. That is an impossible change to make as I will not understand enough.

Having the order set by a preference would solve this issue by letting the user decide fallback CJK order.

Flags: needinfo?(jfkthame)
Regressed by: 1581822

Bugbug thinks this bug is a defect, but please change it back in case of error.

Type: enhancement → defect

(In reply to aleb from comment #0)

With bug 1581822 changing the default CJK font order it caused an issue as a non-native Japanese/Chinese speaker. Going to a page in Japanese such as https://www3.nhk.or.jp/news/ with a non-Japanese system locale results with the page using Chinese font.

Yes, this is to be expected in some cases. (The alternative, of course, is that similarly-unmarked Chinese pages may be displayed with a Japanese font. Neither case is ideal.)

Having said that, I'm seeing Japanese fonts when I visit https://www3.nhk.or.jp/news/ although my browser and system locale is en-US, and I don't have Japanese in accept-languages. Checking the site, I see

font-family: "ヒラギノ角ゴ ProN W3","Hiragino Kaku Gothic ProN","メイリオ",Meiryo,"MS Pゴシック","MS PGothic",sans-serif;

on the body element. That should be sufficient to find an appropriate Japanese font for most Windows users, shouldn't it?

I can imagine that on Linux, though, where none of these specific families may be present, you end up seeing a Chinese font. Adding a pref to control the order of the prefs could help in that case.

Flags: needinfo?(jfkthame)

(In reply to Jonathan Kew (:jfkthame) from comment #2)

Yes, this is to be expected in some cases. (The alternative, of course, is that similarly-unmarked Chinese pages may be displayed with a Japanese font. Neither case is ideal.)

True, this was the reason for making the feature request for a preference instead of asking if revert to original was possible. It is incorrect in some way regardless without additional info on language, just happens that I've used Japanese for years and Chinese as a recently picked up so for my personal use case it worked well as it used to be.

Having said that, I'm seeing Japanese fonts when I visit https://www3.nhk.or.jp/news/ although my browser and system locale is en-US, and I don't have Japanese in accept-languages. Checking the site, I see

font-family: "ヒラギノ角ゴ ProN W3","Hiragino Kaku Gothic ProN","メイリオ",Meiryo,"MS Pゴシック","MS PGothic",sans-serif;

on the body element. That should be sufficient to find an appropriate Japanese font for most Windows users, shouldn't it?

Yes, that is sufficent for Windows. Windows is only for work for me and running stable Firefox so I didn't hit this change with it. I only checked for "lang" meta tags and missed the direct font specifications. Using Nightly only on Linux.

Thank you for looking at this!

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1980f3681547 patch 1 - Clean up some of the font-language-prefs code for easier maintenance. r=m_kato https://hg.mozilla.org/integration/autoland/rev/2c41d7a6ba14 patch 2 - Add a pref to control the fallback order of CJK font prefs when no lang/locale hint is available. r=m_kato
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Assignee: nobody → jfkthame
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: