Closed Bug 548311 Opened 14 years ago Closed 7 years ago

Default Japanese font should be Meiryo or Yu Gothic for modern Windows

Categories

(Core :: Internationalization, defect)

All
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
relnote-firefox --- 57+
firefox55 --- fixed

People

(Reporter: jmdesp, Assigned: masayuki)

References

(Depends on 2 open bugs, Regressed 1 open bug, )

Details

(Keywords: site-compat)

Attachments

(5 files)

The recommended default japanese font for Vista is now Meiryo.
See http://en.wikipedia.org/wiki/Meiryo

It should be much better than MS Mincho/MS Gothic for all text that mixes the japanese and roman script.

It's also possible to get it for Windows XP as a free download, so it should made also the default for XP, defaulting to Mincho/Gothic when absent.

An update to the "#ifdef XP_WIN" section of modules/libpref/src/init/all.js is needed to correct this.

font.name.serif.ja
font.name.sans-serif.ja
font.name-list.serif.ja
font.name-list.sans-serif.ja
are all affected since Meiryo is the recommended default for both serif, and sans-serif.

But as it's a proportional font, maybe Mincho must be keep for the monospace prefs (font.name.monospace.ja, font.name-list.monospace.ja) ?
bug 540521 needs to be fixed before this is activated.
Depends on: 540521
Why do you think that this is a good thing? Meiryo shouldn't be used for web pages in default settings by some reasons. The other browsers also don't use Meiryo in default settings.

As you said, there are no Meiryo compatible serif fonts and monospace fonts. And the Meiryo's font metrics has lager internal leading than other Japanese fonts. So, it breaks very many web page's rendering.

I has been asked same idea by Stuart at developing Fx3.0. At that time, I answered that we shouldn't do it with same reasons.
Ok, for non-japanese, the prospect of a japanese font that has more legible latin characters than Mincho/Gothics sounds very attractive. Well I hope this bug can serve as a documentation on why this would not be a good idea.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
I think we should reconsider doing this, because:
1. Meiryo looks better.
2. Chrome has been using Meiryo as their default Japanese font for quite a while.
3. Meiryo looks more consistent with our default Chinese font Microsoft YaHei, so visual effect would be improved for
  * Chinese content inside Japanese content
  * Chinese websites without lang specified on a Japanese OS

(I have to admit that the last point is actually the main motivation for me to reopen this bug :)
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Well, I asked Japanese twitter users about Firefox's default Japanese font <https://twitter.com/d_toybox/status/834775837048049664>. Then, the result is:

>                                                               Installed on non-Japanese Windows
>                   Bitmap glyph?  Sans-serif?  First availabe  Win10   Win8.1  Win7
> MS PGothic: 19%        Yes          Yes           ~Win7        No      Yes     Yes
> Meiryo:     42%        No           Yes           ~Win7        No      Yes     Yes
> Yu Gothic:  33%        No           Yes           Win8.1       Yes     Yes     N/A
> Yu Mincho:   6%        No           Yes           Win8.1       No      Yes     N/A

The number of people voted is 665 and it's not limited to Firefox users (due to impossible).

However, I think that we can trust this order at least between bitmap glyph font and vector fonts.


However, there are some problems if we'd use Meiryo as default font:

1. Meiryo doesn't have italic style.
2. Meiryo doesn't have a good partner of Serif style.
3. Meiryo doesn't have a good partner of Monospace style.

If we'd use Yu Gothic, the problem #1 and #2 were solved. But if we'd take Yu Gothic, it may be risky due to different from Chrome and Edge. (Chromium doesn't use Yu Gothic because it's not rendered properly with Windows's default font renderer <http://mandel59.hateblo.jp/entry/2016/11/11/012654>, but fortunately, our font renderer doesn't have this issue. So, we also could take Yu Gothic. (Using Yu Gothic might be a good difference from Chrome, but it may be risky if web site's layout depends on Meiryo's metrics.)

I think that we need to create new setting value "auto" or something similar for default value. If "auto" is selected, it should be computed from default font list like "font.auto.name-list.sans-serif.ja", which should be "Yu Gothic, Meiryo, MS PGthich" or "Meiryo, Yu Gothic, MS PGothic", and "font.auto.name-list.serif.ja", which should be "YuMincho, MS PMincho", and "font.auto.name-list.monospace.ja", which should be "MS Gothic".

Then, user can specify default font explicitly and it won't be reset by Firefox's default font setting changes. And everybody can use proper font without customizing the settings, especially when they're using non-Japanese Win10.
Assignee: smontagu → nobody
Status: REOPENED → NEW
OS: Windows Vista → Windows
Summary: Default Japanese font should be Meiryo for Windows XP/Vista → Default Japanese font should be Meiryo or Yu Gothic for modern Windows
Oops, "Yu Mincho" is not sans-serif, it's serif. If almost all users were using HiDPI display, it could be a choice.
is this bug about which font to use, and not about any other configuration for it (like, font size or internal parameter) ?
in other words, just changing the font name in about:preferences#content can simulate the result?
Font Metrics at 16px:

>                      MS PGothic   Meiryo   Yu Gothic
> tmHeight                16          24        21
> tmAscent                14          17        16
> tmDescent                2           7         5
> tmInternalLeading        0           8         5
> tmExternalLeading        0           0         5
> tmAveCharWidth           7          15        15
> tmMaxCharWidth          32          45        25
> tmWeight               400         400       400
> tmOverhang               0           0         0
> tmDigitizedAspectX      96          96        96
> tmDigitizedAspectY      96          96        96
> otmptSuscriptSize        8          10        12
> otmptSubscriptOffset     6           2         2
> otmptSuperscriptSize     8          10        12
> otmptSuperscriptOffset  14           7         0
> otmsStrikeoutSize        1           1         1
> otmsStrikeoutPosition    4           6         7
> otmsUnderscoreSize       1           1         1
> otmsUnderscorePosition  -1          -2        -2
> otmDescent              -2          -2        -2
> otmAscent               14          14        14
> otmMacDescent           -2          -7        -4
> otmMacAscent            14          17        14
(In reply to Tooru Fujisawa [:arai] from comment #7)
> is this bug about which font to use, and not about any other configuration
> for it (like, font size or internal parameter) ?

I assume so but it's open.

> in other words, just changing the font name in about:preferences#content can
> simulate the result?

Anyway, yes.
screenshot of the jsfiddle page, on Windows 10 non-hi-DPI, with Nightly 54a1 (2017-03-05) (32-bit)

surely Meiryo doesn't have italic/oblique
fwiw, the result on chrome
I think changing default font to Meiryo is Better than any other fonts from point of view of Design.

The Reason: 
1. Basically, changing font each Application causes lowering the readability. And, almost Windows Applications use Meiryo.
2. Meiryo has geometric typeface, and Yu Gothic has humanistic typefase. This difference is not small for user and designer.
3. Font rendering(font smoothing) of Yu Gothic is (maybe) better than before, but the rendering and shape of Yu Goghic have great defference. So I think changing Yu Gothic is too fast.
(In reply to Takashi Kita from comment #12)
> I think changing default font to Meiryo is Better than any other fonts from
> point of view of Design.
> 
> The Reason: 
> 1. Basically, changing font each Application causes lowering the
> readability. And, almost Windows Applications use Meiryo.

Which application? Applications which I usually use are only have just control widgets and menus. I think that those are rendered with system default UI font, not for documents.

> 2. Meiryo has geometric typeface, and Yu Gothic has humanistic typefase.
> This difference is not small for user and designer.

I don't think that it causes any trouble for designers because currently, major web browsers use MS PGothic (Firefox and Edge) and Meiryo (Chrome) and these font metrics are really different. So, when they need to lay out something in tight spaces, they need to specify font-family. However, Yu Gothic is more similar to MS PGothic's metrics (although, it's similar to Meiryo's), so, I don't think that Yu Gothic is better than Meiryo only from the view of this point.

On the other hand, the glyph is really different. However, as you said, Yu Gothic is easier to read (especially, we don't have the too lighter rendering issue of Win10). So, I don't think that we need to use Meiryo from the view of this point too. (Note that form control's default fonts are not changed, they're decided from system settings.)

> 3. Font rendering(font smoothing) of Yu Gothic is (maybe) better than
> before, but the rendering and shape of Yu Goghic have great defference. So I
> think changing Yu Gothic is too fast.

Do you mean that Yu Gothic's rendering result is really different from Meiryo's? But I don't understand what's the point you said here.


I think that the risk of taking Yu Gothic is, it may cause incompatibility with Chrome. But I'm still not sure that it's not better choice than taking advantage of Chrome. My current idea is, changing default fonts only in Nightly for a couple of cycles, then, riding the train.
There could be a problem if we'd take Yu Gothic, that is, Yu Gothic is lighter than other fonts. According to some developers who are familiar with a11y, lighter characters may not be easier to read for elder people and low vision users. Unfortunately, such Nightly testers must be few. So, perhaps, it's difficult to collect the results from such users before release.
Blocks: 1344750
(In reply to Masayuki Nakano [:masayuki] from comment #5)
> 1. Meiryo doesn't have italic style.

We can workaround the italic issue with the following CSS:
> @font-face {
>   font-family: "Meiryo";
>   src: local("Meiryo");
>   font-weight: normal;
> }
> @font-face {
>   font-family: "Meiryo";
>   src: local("Meiryo Bold");
>   font-weight: bold;
> }
although I'm not sure we should apply this style in UA-sheets.

By the way, it appears that Chrome has a bug where it does not select "bold italic" correctly with the above style.
(In reply to Masatoshi Kimura [:emk] from comment #15)
> (In reply to Masayuki Nakano [:masayuki] from comment #5)
> > 1. Meiryo doesn't have italic style.
> 
> We can workaround the italic issue with the following CSS:
> > @font-face {
> >   font-family: "Meiryo";
> >   src: local("Meiryo");
> >   font-weight: normal;
> > }
> > @font-face {
> >   font-family: "Meiryo";
> >   src: local("Meiryo Bold");
> >   font-weight: bold;
> > }

Thank you, that really work fine: <https://jsfiddle.net/d_toybox/Lr4hdrto/1/>

> although I'm not sure we should apply this style in UA-sheets.

Anyway, including this into our UA stylesheet may make web developers (and/or users) happy because web page may use <i> or <em> with default style. Then, if user specify Meiryo as default font, they cannot see oblique style glyph without this hack.
Brian and I discussed this briefly.

Perhaps, we should test "Yu Gothic" only in Nightly and Developer Edition for getting feedback from testers because Yu Gothic has some advantage but it's risky.

However, we're still not sure how should we decide this finally. Is it better to hold election by Mozilla hackers who are familiar with Japanese language?
From the viewpoint of traditional Japanese typographic style, I think that it is one of the options to use text emphasis marks for <i> and <em> on Meiryo font environment. (Of course, it's a significant change and highly risky... Additonally, the css-text-decor-3 spec is now CR, but it seems to me that the text-emphasis property is required more testing.)
See Also: → 1344999
(In reply to Masayuki Nakano [:masayuki] from comment #5)
> 3. Meiryo doesn't have a good partner of Monospace style.

Bug 1344999 will resolve this issue.
(In reply to Masatoshi Kimura [:emk] from comment #19)
> (In reply to Masayuki Nakano [:masayuki] from comment #5)
> > 3. Meiryo doesn't have a good partner of Monospace style.
> 
> Bug 1344999 will resolve this issue.

Great! Thank you!
I use Yu Gothic as default font of my default profile. Indeed, I don't see any problem about compatibility with major web sites yet, though, the glyph is too light even with Firefox's font renderer. So, I think that it may cause a11y problem for elder people.

On the other hand, if we can fix the lighter rendering issue of Yu Gothic, we may be able to take it as default font.

Jonathan, do you know if we can fix the Yu Gothic's rendering issue with our side?
(please check this article with translator: http://mandel59.hateblo.jp/entry/2016/11/11/012654)
Flags: needinfo?(jfkthame)
Yu Gothic is very nice, but it's Greek and Cyrillic letters are full width (1 em width) by default.
So the following text will be rendered very ugly.

イクラはロシア語の икра が日本語化したものです。
alphabet はギリシャ語の αλφα,βητα に由来します。

<span lang="ru">икра</span> makes same result.

font-feature-settings: "palt" makes proportional not only for Greek and Cyrillic, but also Japanese Kana.

I want proportional Greek and Cyrillic and full width Kana.

Sorry, I can not write well this in English and read your English discussion.
Well, thank you for the information. However, I feel odd about a point:

> <span lang="ru">икра</span> makes same result.

In this case, the span element should be rendered with the default font of Russian language on Gecko. If it's not so, there must be another bug.

Anyway, if lang attribute isn't specified properly (like comments in SNS), as you said, it should cause such problem.
(In reply to Masayuki Nakano [:masayuki] from comment #21)
> I use Yu Gothic as default font of my default profile. Indeed, I don't see
> any problem about compatibility with major web sites yet, though, the glyph
> is too light even with Firefox's font renderer. So, I think that it may
> cause a11y problem for elder people.
> 
> On the other hand, if we can fix the lighter rendering issue of Yu Gothic,
> we may be able to take it as default font.
> 
> Jonathan, do you know if we can fix the Yu Gothic's rendering issue with our
> side?
> (please check this article with translator:
> http://mandel59.hateblo.jp/entry/2016/11/11/012654)

We have "gfx.font_rendering.cleartype_params.gamma" pref, so it should be possible to use custom gamma.

Note: Recently I changed Firefox behavior to respect OS settings in bug 1345222. So the font rendering may have become lighter than the screenshot in the blog post.
Flags: needinfo?(jfkthame)
I'd be reluctant to make a change like this if it's going to require us to start using a custom gamma value to render a particular font.

In general, I don't think we should be using the cleartype_params.gamma pref to override system settings; that was implemented in the early days of DWrite support to allow users who really disliked the result of DWrite font rendering to tweak things, but the default should be to respect system values. And it's global, not a per-font setting; so if we set a custom value to make Yu Gothic look good, what will that do to the rest of the fonts?
If we use custom value for Yu Gothic at all, we should write a dedicated code, of course. I'm bringing "gfx.font_rendering.cleartype_params.gamma" only to show we can customize the gamma value.
Thank you for the reply. I created simple testcase:
https://jsfiddle.net/d_toybox/k1uuv3qa/

Looks like that only "Yu Gothic" and "Yu Mincho" have same problem. The screenshot is the latest Nightly's.
(In reply to Masatoshi Kimura [:emk] from comment #24)
> Note: Recently I changed Firefox behavior to respect OS settings in bug
> 1345222. So the font rendering may have become lighter than the screenshot
> in the blog post.

Hmm, I don't see lighter rendering on today's build. Oddly, looks like that it's bolder than Firefox 52 (Perhaps, I customized ClearType settings, though).

(In reply to Jonathan Kew (:jfkthame) from comment #25)
> In general, I don't think we should be using the cleartype_params.gamma pref
> to override system settings; that was implemented in the early days of
> DWrite support to allow users who really disliked the result of DWrite font
> rendering to tweak things, but the default should be to respect system
> values. And it's global, not a per-font setting; so if we set a custom value
> to make Yu Gothic look good, what will that do to the rest of the fonts?

If I specify 1000 to the pref, I got this result. The black text becomes easier to read but the white text becomes harder to read. So, this is not a simple gamma issue of specific fonts. My original question was, we can skip the wrong gamma applying code (I don't know what we use to render fonts in Gecko, though).
(In reply to Masatoshi Kimura [:emk] from comment #26)
> If we use custom value for Yu Gothic at all, we should write a dedicated
> code, of course. I'm bringing "gfx.font_rendering.cleartype_params.gamma"
> only to show we can customize the gamma value.

So, not with dedicated code, if we could get rid of only the wrong step to render text, it'd be great...
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
My plan is, Meiryo should be the default Japanese sans-serif font and Yu Mincho should be the default serif font (not to change monospace font). The reason of not to use Yu Gothic is, a11y issue of lighter rendering result of Yu Gothic mentioned above.

I'm thinking that we should change it 57 if no serious regressions are reported. Until then, we should change the default fonts in Aurora and Nightly channel.
Comment on attachment 8853940 [details]
Bug 548311 Change Japanese default fonts only on early Beta and Nightly

https://reviewboard.mozilla.org/r/125956/#review128494

Fine with me, but I think it should be for the Japanese developers (and users) to make the final call on font choices.
Attachment #8853940 - Flags: review?(jfkthame) → review+
Thank you very much! We should check the feedback (mainly at releasing 55 as Developer Edition).
Comment on attachment 8853940 [details]
Bug 548311 Change Japanese default fonts only on early Beta and Nightly

https://reviewboard.mozilla.org/r/125956/#review128508

::: modules/libpref/init/all.js:3447
(Diff revision 1)
> +#ifdef RELEASE_OR_BETA
>  pref("font.name-list.serif.ja", "MS PMincho, MS Mincho, MS PGothic, MS Gothic,Meiryo");
>  pref("font.name-list.sans-serif.ja", "MS PGothic, MS Gothic, MS PMincho, MS Mincho,Meiryo");
>  pref("font.name-list.monospace.ja", "MS Gothic, MS Mincho, MS PGothic, MS PMincho,Meiryo");
> +#else
> +pref("font.name-list.serif.ja", "Yu Mincho, MS PMincho, MS Mincho, Meiryo, Yu Gothic, MS PGothic, MS Gothic");

This patch does not change "font.name-list.*.ja".
Does it really have an effect?
Comment on attachment 8853940 [details]
Bug 548311 Change Japanese default fonts only on early Beta and Nightly

https://reviewboard.mozilla.org/r/125956/#review128510

::: modules/libpref/init/all.js:3447
(Diff revision 1)
> +#ifdef RELEASE_OR_BETA
>  pref("font.name-list.serif.ja", "MS PMincho, MS Mincho, MS PGothic, MS Gothic,Meiryo");
>  pref("font.name-list.sans-serif.ja", "MS PGothic, MS Gothic, MS PMincho, MS Mincho,Meiryo");
>  pref("font.name-list.monospace.ja", "MS Gothic, MS Mincho, MS PGothic, MS PMincho,Meiryo");
> +#else
> +pref("font.name-list.serif.ja", "Yu Mincho, MS PMincho, MS Mincho, Meiryo, Yu Gothic, MS PGothic, MS Gothic");

> "font.name-list.\*.ja"

Sorry, "font.name.\*.ja".
(In reply to Masatoshi Kimura [:emk] from comment #41)
> Comment on attachment 8853940 [details]
> Bug 548311 Change Japanese default fonts only on Aurora and Nightly
> 
> https://reviewboard.mozilla.org/r/125956/#review128510
> 
> ::: modules/libpref/init/all.js:3447
> (Diff revision 1)
> > +#ifdef RELEASE_OR_BETA
> >  pref("font.name-list.serif.ja", "MS PMincho, MS Mincho, MS PGothic, MS Gothic,Meiryo");
> >  pref("font.name-list.sans-serif.ja", "MS PGothic, MS Gothic, MS PMincho, MS Mincho,Meiryo");
> >  pref("font.name-list.monospace.ja", "MS Gothic, MS Mincho, MS PGothic, MS PMincho,Meiryo");
> > +#else
> > +pref("font.name-list.serif.ja", "Yu Mincho, MS PMincho, MS Mincho, Meiryo, Yu Gothic, MS PGothic, MS Gothic");
> 
> > "font.name-list.\*.ja"
> 
> Sorry, "font.name.\*.ja".

Yes, on all platforms, "font.name.*.*" will be empty string (meaning "Default" font) after landing bug 1344990. So, we don't need to change "font.name.*.*" anymore.
Comment on attachment 8853940 [details]
Bug 548311 Change Japanese default fonts only on early Beta and Nightly

https://reviewboard.mozilla.org/r/125956/#review128518

OK, thank you. Looks good to me.
Attachment #8853940 - Flags: review?(VYV03354) → review+
(In reply to Masayuki Nakano [:masayuki] from comment #39)
> Thank you very much! We should check the feedback (mainly at releasing 55 as
> Developer Edition).

nit: Firefox 54 will not become Developer Edition.
https://mail.mozilla.org/pipermail/mobile-firefox-dev/2017-March/002243.html
(In reply to Masatoshi Kimura [:emk] from comment #44)
> nit: Firefox 54 will not become Developer Edition.

Firefox 55... Sorry for the bugspam.
Ah... Hmm, should we enable it in Beta too? However, such big difference between Beta and Release may not be good thing for using Beta for checking their product...
We have EARLY_BETA_OR_EARLIER option. It will be defined only for first two weeks of beta builds (and Nightly).
(In reply to Masatoshi Kimura [:emk] from comment #47)
> We have EARLY_BETA_OR_EARLIER option. It will be defined only for first two
> weeks of beta builds (and Nightly).

Sounds better for this bug. Jonathan, how do you think?
Flags: needinfo?(jfkthame)
Yes, that sounds good to me. We don't want a highly visible change like this occurring between final-beta and release, but we do want to expose the change more widely than just Nightly users, so that if there are concerns, we're more likely to hear about them prior to release.
Flags: needinfo?(jfkthame)
Comment on attachment 8853940 [details]
Bug 548311 Change Japanese default fonts only on early Beta and Nightly

https://reviewboard.mozilla.org/r/125956/#review128780
Attachment #8853940 - Flags: review?(m_kato) → review+
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/b7a6ec5eb1e1
Change Japanese default fonts only on early Beta and Nightly r=emk,jfkthame,m_kato
https://hg.mozilla.org/mozilla-central/rev/b7a6ec5eb1e1
Status: ASSIGNED → RESOLVED
Closed: 14 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Release Note Request (optional, but appreciated)
[Why is this notable]: The default font for Japanese text on Windows is changing  
[Affects Firefox for Android]: no
[Suggested wording]: The default font for Japanese text is now Meiryo

Note to release managers: that should be included in nightly/beta release notes but not in final release notes since this is behind a EARLY_BETA_OR_EARLIER build switch
relnote-firefox: --- → ?
Depends on: 1353639
Depends on: 1354010
Oh, I realized that changing default Japanese font of Nightly (Firefox) means also changing default Japanese font of Daily (Thunderbird) too.  With this change, now, you see Meiryo in HTML mails, but still see MS Gothic in plaintext mails because of default Japanese monospace font.
Depends on: 1378065
Depends on: 1394708
Should this be noted for 57 release?   Kohei's post sounds like we removed the early beta switch and are changing the default font on release 57.
Flags: needinfo?(masayuki)
Oh, never mind, looks like the answer is yes, from bug 1354004. 
Ritu, here is one more 57 release note for you, in comment 55.
Flags: needinfo?(rkothari)
I'll include Bug 1354004 and Bug 1383654 in our Japanese translation of the 57 relnotes.
Is this also the case for Firefox for Android?
No, this was a change to the default prefs on Windows only.
Yes. And thank you!
Flags: needinfo?(masayuki)
This was added to 57 release notes
Flags: needinfo?(rkothari)
No longer blocks: 1344750
Regressions: 1881196
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: