Closed Bug 1164279 Opened 9 years ago Closed 7 years ago

Some characters of ruby text size is small in certain font

Categories

(Core :: Layout, defect)

38 Branch
Unspecified
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox38 --- wontfix
firefox39 --- wontfix
firefox40 --- wontfix
firefox41 --- wontfix
firefox42 --- fixed
firefox43 --- fixed

People

(Reporter: alice0775, Assigned: xidorn)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [parity-chrome][parity-IE])

Attachments

(7 files, 2 obsolete files)

Attached file index.html (obsolete) —
Ruby text か,け,カ,ケ is small if font is Meiryo.

Steps To Reproduce:
1. Open attached
   or http://www3.nhk.or.jp/news/easy/k10010076251000/k10010076251000.html

Actual Results
Ruby text か,け,カ,ケ is small

Expected Results:
Ruby text か,け,カ,ケ should be same size as the other characters.
OS: Unspecified → Windows
Whiteboard: [parity-chrome][parity-IE]
This seems to be a bug of the font. We apply "font-variant-east-asian: ruby" property to ruby text conforming with the CSS Ruby spec. However, Meiryo has incorrect mapping for the characters you pointed out.

The attachment is the related glyphs I extracted from Meiryo. You can compare the glyph ids, and see how they map the glyphs reversely between normal kana and small kana.

I have no idea what should we do for this. The font authors ought to fix their font.
So, in this case, workaround is rt { font-variant-east-asian: normal; } .


This affect to Windows Vista, Windows7, Windows8.1, Windows10IP.
And I do not think that MS fixes the font....
Yes, but that rule works fine for other fonts, and IIRC, Meiryo is not our default font. Hence we probably shouldn't remove that rule. Not sure, anyway.

jfkthame, do you think there is anything we should do here?
Flags: needinfo?(jfkthame)
We probably could have a quick hack on the specific fonts and version which swaps those substitution if we really care about that font. Not sure whether we should and how we could do that.
Blocks: 1016792
This is clearly a font bug. I'd be pretty reluctant to add custom code to recognize the specific font/version and work around it -- there are probably multiple versions of Meiryo shipped with different Windows releases, so besides the ugliness and overhead of adding such a hack in the first place, it'd be a maintenance headache every time there's an update from MS.

I've reported the problem to some contacts at MS, but obviously we're not going to see an immediate fix; these things tend to grind pretty slowly.

For now, my inclination is to do nothing, and blame it on the font in case of complaints. Authors who are affected by it can explicitly set rt { font-variant-east-asian: normal; } on their content, and the result will be no worse than other browsers that don't apply the feature at all.
Flags: needinfo?(jfkthame)
Note that the same problem shows up in Chrome, for example, if you apply the ruby feature by adding

  rt { -webkit-font-feature-settings: "ruby"; }

to the testcase.
Just FTR, the current "owner" of the Meiryo fonts at MS has responded saying "I’ll get it on the list of fixes", so I believe we can hope to see a corrected font shipping at some future date.

To avoid the bug in the meantime, authors should say

  rtc, rt { font-variant-east-asian: normal; }

if they're intending to use these characters in the Meiryo font.
Since Meiryo is widely used on Japanese websites, this seems to affect a wide range of people, who think this is a bug of Firefox, because it doesn't exist on other browsers.

We should just disable that feature on Windows, and re-enable it when Microsoft fixes the font and most people get the update.
Attachment #8659097 - Flags: review?(jfkthame)
Keywords: leave-open
I suppose this may be the best thing to do for now, but it makes me sad.... it'll mean that any fonts with a proper 'ruby' feature will behave differently by default in FF/Win than on other platforms.

Now that Win10 is released, is there any news here -- an updated version of Meiryo for Japanese Win10, possibly? (The font doesn't seem to be present at all on a default en-US install.)

:jdaggett, wdyt? Others in moz-japan?
Flags: needinfo?(jdaggett)
Actually, not only the four kanas mentioned in comment 0, some others are also weird with 'ruby' feature, noticeably チ, ナ, and ホ.

:jfkthame, could you also ask the owner of the font to fix them as well? Also could you ask them for a timetable when they are going to release the fixed version?
Flags: needinfo?(jfkthame)
Would it make more sense to disable the feature (in C++ code) for fonts named Meiryo, rather than disabling it for all ruby text on Windows?
(In reply to David Baron [:dbaron] ⌚UTC-7 from comment #15)
> Would it make more sense to disable the feature (in C++ code) for fonts
> named Meiryo, rather than disabling it for all ruby text on Windows?

I mentioned that in comment 6.

It adds cost in some common pathes. Also if we decide to workaround this issue, I hope to uplift the patch up to beta so that Firefox seems to "fix" this issue in the next release. But adding C++ code to disable it adds more risks which woule make me afraid to uplift it.
(In reply to Jonathan Kew (:jfkthame) from comment #11)
> I suppose this may be the best thing to do for now, but it makes me sad....
> it'll mean that any fonts with a proper 'ruby' feature will behave
> differently by default in FF/Win than on other platforms.
> 
> Now that Win10 is released, is there any news here -- an updated version of
> Meiryo for Japanese Win10, possibly? (The font doesn't seem to be present at
> all on a default en-US install.)
> 
> :jdaggett, wdyt? Others in moz-japan?

This is truly sad, indeed. The shipping version of Win 10 JA includes Meiryo with the problematic ruby variants. I think disabling this on Windows is the best choice. We should probably add an author suggestion on an MDN page somewhere to use font-variant: ruby when not using Meiryo.

Note that there is a difference between the normal hiragana/katakana か and け and the small variants, which appear only in certain situations:

  2ヶ月
  2ヵ月
Flags: needinfo?(jdaggett)
Comment on attachment 8659097 [details] [diff] [review]
patch to disable "ruby" feature on Windows

Review of attachment 8659097 [details] [diff] [review]:
-----------------------------------------------------------------

OK, r=me (sigh). I've also sent a brief nag-mail to the Meiryo owner at MS.
Attachment #8659097 - Flags: review?(jfkthame) → review+
Flags: needinfo?(jfkthame)
https://hg.mozilla.org/integration/mozilla-inbound/rev/cd4f5bb41dd73ba0eebb6b597364b77358441d0f
Bug 1164279 - Disable font-variant-east-asian: ruby for <rt> on Windows. r=jfkthame
Comment on attachment 8659097 [details] [diff] [review]
patch to disable "ruby" feature on Windows

Approval Request Comment
[Feature/regressing bug #]: bug 1039006
[User impact if declined]: see different font size on some specific characters on ruby when Meiryo is used. Meiryo is a widely-used Japanese font on Windows. Although it is not the default font on Firefox, many websites use this font on Windows.
[Describe test coverage new/current, TreeHerder]: n/a
[Risks and why]: very low risk, as it simply removes one cosmetic rule on Windows
[String/UUID change made/needed]: n/a
Attachment #8659097 - Flags: approval-mozilla-beta?
Attachment #8659097 - Flags: approval-mozilla-aurora?
Comment on attachment 8659097 [details] [diff] [review]
patch to disable "ruby" feature on Windows

At this point in the 41 cycle (RC week), only bugs which are sec-crit + easy to exploit, severe crash/hangs and major regressions that make the release unusable will be considered. Given that, this is a wontfix for 41.
Attachment #8659097 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Comment on attachment 8659097 [details] [diff] [review]
patch to disable "ruby" feature on Windows

OK, still time with 42 to find potential regressions.
Attachment #8659097 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(In reply to Sylvestre Ledru [:sylvestre] from comment #25)
> Comment on attachment 8659097 [details] [diff] [review]
> patch to disable "ruby" feature on Windows
> 
> OK, still time with 42 to find potential regressions.

does this need to beta now ?
Flags: needinfo?(sledru)
Comment on attachment 8659097 [details] [diff] [review]
patch to disable "ruby" feature on Windows

Yes, let's take it.
Flags: needinfo?(sledru)
Attachment #8659097 - Flags: approval-mozilla-beta-
Attachment #8659097 - Flags: approval-mozilla-beta+
Attachment #8659097 - Flags: approval-mozilla-aurora+
Assignee: nobody → quanxunzhen
It looks like in the latest version of Meiryo (version 6.26) shipped with Windows 10 Anniversary Update, this issue has been fixed.

The issue in comment 14 still presents, but given that the majority of furigana is written in hiragana, I guess it is fine to re-enable "ruby" font feature now.
Attachment #8604950 - Attachment is obsolete: true
Keywords: leave-open
jfkthame, could you inform me who is the owner of Meiryo in Microsoft? I'd like to send an email about the issues in ruby katakana mentioned in comment 14 as well. Although it is not as serious as the size issue, it would still make Firefox's rendering look worse than other browsers in some cases.
Flags: needinfo?(jfkthame)
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #30)
> It looks like in the latest version of Meiryo (version 6.26) shipped with
> Windows 10 Anniversary Update, this issue has been fixed.
> 
> The issue in comment 14 still presents, but given that the majority of
> furigana is written in hiragana, I guess it is fine to re-enable "ruby" font
> feature now.

Do we have any stats for the number of Windows users who are on the Win10AU release at this point compared to those on older versions (where the bad font will still be present), or what the adoption curve is looking like for the new update?
Flags: needinfo?(jfkthame)
(In reply to Jonathan Kew (:jfkthame) from comment #33)
> Do we have any stats for the number of Windows users who are on the Win10AU
> release at this point compared to those on older versions (where the bad
> font will still be present), or what the adoption curve is looking like for
> the new update?

I don't know how to measure that, but I believe Telemetry has that data... Given that Microsoft's upgrading strategy is pretty progressive nowadays, I expect most of normal users should have upgraded.

I'll try to analyse that later.
Note that according to the July 2016 chart currently at https://en.wikipedia.org/wiki/Usage_share_of_operating_systems#Desktop_and_laptop_computers, for example, Win10 is still substantially behind Win7. Even assuming all Win10 users get the update quickly, there are something like twice as many users on pre-Win10 versions (primarily 7, some 8.1) who will still be affected.
Comment on attachment 8786997 [details]
Bug 1164279 - Re-enable ruby variant on Windows.

Hmmm... okay, so it looks like yeah, Windows 7 is still the majority [1], and the majority of Windows 10 users haven't upgraded to the Anniversary Update [2]...

I guess we don't want to land this patch at the moment, then.

[1] https://sql.telemetry.mozilla.org/queries/380#635
[2] https://sql.telemetry.mozilla.org/dashboard/windows-10-user-strata
Attachment #8786997 - Flags: review?(jfkthame)
I guess we should consider this fixed as of comment 21. We may still want to re-enable ruby feature on Windows at some point, but that can go to a different bug.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43

Bug 1758952 was filed to update the CSS condition for Windows11.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: