Closed Bug 1493418 Opened Last year Closed Last year

[regression] Garbled name for Simplified Chinese in Font Settings

Categories

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

64 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla64
Tracking Status
firefox-esr60 --- unaffected
firefox62 --- unaffected
firefox63 --- unaffected
firefox64 --- fixed

People

(Reporter: yfdyh000, Assigned: jfkthame)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached image Screenshot
STR:
1. Open about:preferences, click the Font & Color - Advanced button.
2. Select the "Simplified Chinese" for "Fonts for".


Actual results:
Fonts names (in Chinese) are garbled.


Expected results:
Regular Chinese name.


Regression range:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=643ffcb9063dfb9395c76d81665ed4cd03c0dff3&tochange=588fe70e5905480ebc60225b4b093ff276df72d2
Ugh! Thanks for reporting, will look into it. Clearly we're missing a utf8/16 conversion somewhere.
Assignee: nobody → jfkthame
Keywords: regression
Priority: -- → P3
Which platform(s) are you seeing the bug on?
Flags: needinfo?(yfdyh000)
(In reply to Jonathan Kew (:jfkthame) from comment #2)
> Which platform(s) are you seeing the bug on?

Windows 10 (1803) x64.
Flags: needinfo?(yfdyh000)
The 8-bit font names we're now using in thebes are utf-8; but unfortunately nsThebesFontEnumerator was applying ToNewUnicode to get a 16-bit string, and the 8-bit version of that function treats the input as Latin-1. So we need to use UTF8ToNewUnicode instead here.
Attachment #9011245 - Flags: review?(lsalzman)
Attachment #9011245 - Flags: review?(lsalzman) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ed4b9b12e32a
nsThebesFontEnumerator needs to convert font names from UTF-8 (not Latin-1) to UTF-16. r=lsalzman
https://hg.mozilla.org/mozilla-central/rev/ed4b9b12e32a
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Fixed in 64.0a1 20180924220042.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.