Closed Bug 1606744 Opened 5 years ago Closed 5 years ago

Japanese fonts name MOJIBAKE and indicates English font name in preferences and Thunderbird Compose window.

Categories

(Core :: Internationalization, defect)

72 Branch
Desktop
Windows 10
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla73
Tracking Status
firefox-esr68 --- unaffected
firefox71 --- unaffected
firefox72 + verified
firefox73 + verified

People

(Reporter: alice0775, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(5 files)

Attached image screebshot

Reproducible: always

Steps To Reproduce:

  1. Make sure that Windows display language is Japanese on Windows 10
  2. about:preferences > Font & Color dropdown
    or about:preferences > Advanced dropdown

Actual Results:
MOJIBAKE Font name

Regressed by: 1593414
Summary: MOJIBAKE Font name in preferences → MOJIBAKE Font name of japanese font in preferences
Has Regression Range: --- → yes

Thunderbird is also affected.

[Tracking Requested - why for this release]: Some Japanese font name MOJIBAKE in preferences and Thunderbird Compose window

Component: Preferences → Internationalization
Product: Firefox → Core

FYI, if you have EPSON Printer, you can download and install it from https://www.epson.jp/dl_soft/readme/9296.htm

Summary: MOJIBAKE Font name of japanese font in preferences → MOJIBAKE Font name of japanese font in preferences, and indicates English font name

[Tracking Requested - why for this release]:Some Japanese font name MOJIBAKE and English name in preferences and Thunderbird Compose window

Summary: MOJIBAKE Font name of japanese font in preferences, and indicates English font name → Japanese fonts name MOJIBAKE and indicates English font name in preferences and Thunderbird Compose window.
Flags: needinfo?(jfkthame)

Weird. Yes, I can reproduce this after installing the Epson fonts (with their Japanese names).... will investigate what may be happening.

Flags: needinfo?(jfkthame)

The problem seems to be that the GlobalizationPreferences API is giving us a plain "ja" as the first language code, but this fails when it is used in gfxDWriteFontFamily::LocalizedName to get the font's localized name.

To work around the issue, we can use the Locale class to find the appropriate default region subtag to go with such a language code. This then matches the locale code we used to get via GetUserPreferredUILanguages, and works properly with DirectWrite to access font names.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

This fixes the problem in my local build; I've also started a tryserver build at https://treeherder.mozilla.org/#/jobs?repo=try&revision=89e49f4b7ed2a5ed2419b5bb832f3fbef6776add. When this is ready, if you could confirm it resolves the issue that would be really helpful.

It's late in the beta cycle, but we should probably try to uplift this to 72 once the fix is confirmed.

Flags: needinfo?(alice0775)

I can keep this on the radar for a possible dot release but for 72.0 I'm afraid it's too late.

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/410d6845491d
Add a default region subtag to the system locale code if GlobalizationPreferences returns a bare language code, to avoid problems with DirectWrite localized font-name API. r=emk

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

This fixes the problem in my local build; I've also started a tryserver build at https://treeherder.mozilla.org/#/jobs?repo=try&revision=89e49f4b7ed2a5ed2419b5bb832f3fbef6776add. When this is ready, if you could confirm it resolves the issue that would be really helpful.

I confirmed that the try build(https://hg.mozilla.org/try/rev/89e49f4b7ed2a5ed2419b5bb832f3fbef6776add) fixed this issue on Windows10.

Flags: needinfo?(alice0775)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Flags: qe-verify+

Jonathan do you think this is worth taking in a dot release for 72 (in which case please request uplift to release), or can it ride the trains to 73 (which ships in a month)?

Flags: needinfo?(jfkthame)

I think that given the minimal risk here, and the ugly/illegible result of the bug for the affected font names on Japanese systems, it'd be worth taking this in a dot release.

Flags: needinfo?(jfkthame)

Comment on attachment 9118547 [details]
Bug 1606744 - Add a default region subtag to the system locale code if GlobalizationPreferences returns a bare language code, to avoid problems with DirectWrite localized font-name API. r=emk

Beta/Release Uplift Approval Request

  • User impact if declined: Japanese fonts with localized names show illegible garbage in the Preferences menu
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The only change is to append a default region code to a locale name on Windows; no possible impact on other platforms, or on any locale where Windows already includes a region. This better matches what the previous APIs were returning, so there is no significant risk to consumers of the locale code.
  • String changes made/needed:
Attachment #9118547 - Flags: approval-mozilla-release?
QA Whiteboard: [qa-triaged]

Reproduced the issue on Firefox 72.0 under Windows 10. The issue is fixed on 73.0b4. Will verify it on 72 too when the fix is approved.

Comment on attachment 9118547 [details]
Bug 1606744 - Add a default region subtag to the system locale code if GlobalizationPreferences returns a bare language code, to avoid problems with DirectWrite localized font-name API. r=emk

fixing a regression with font names in preferences, approved for 72.0.2

Attachment #9118547 - Flags: approval-mozilla-release? → approval-mozilla-release+

This is fixed on 72.0.2 as well.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Regressions: 1667777
No longer regressions: 1667777
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: