Issue metadata
Sign in to add a comment
|
"Rendered Fonts" appears as mojibake for Chinese font names
Reported by
arthur20...@gmail.com,
Nov 21 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2922.1 Safari/537.36 Steps to reproduce the problem: 1. Go to https://www.ubuntu-tw.org/. This site uses "微軟正黑體" in its CSS. 2. Pick an arbitrary element (I am using that "最新討論話題" <h3>), and inspect it. 3. Navigate to "Computed" -> "Rendered Fonts". On my en_US build of MS Windows, I got "å¾®è»æ£é»é«—Local file(6 glyphs)". What is the expected behavior? The correct font name should be displayed. What went wrong? "å¾®è»æ£é»é«" seems to result from a latin-1 decode attempt at a UTF-8 encoded version of "微軟正黑體" (yes, I occationally use Python for recovering these mojibake). Did this work before? N/A Chrome version: 56.0.2922.1 Channel: dev OS Version: 10.0 Flash Version: Shockwave Flash 24.0 r0
,
Nov 21 2016
lushnikov@, would you be up for taking a look? I've seen fonts that had weirdly "double UTF-8 encoded" font names. https://github.com/fonttools/fonttools might help debugging this.
,
Dec 2 2016
Friendly ping to get an update on this.
,
Dec 2 2016
,
Jun 19 2017
Still happening.
,
Dec 4 2017
,
Dec 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5c23fe6e90705997009f51b354eb7611b2e5e4ba commit 5c23fe6e90705997009f51b354eb7611b2e5e4ba Author: Emil A Eklund <eae@chromium.org> Date: Tue Dec 05 02:04:12 2017 Parse font family names as UTF-8 instead of latin-1 Change FontPlatformData::FontFamilyName to parse the font family name as UTF-8 instead of latin-1 as that is the encoding of the localized family name provided by the API. Verified on Linux, Windows 7/10, and Mac OS X. No test as I was unable to find a font with a localized non-latin family name under a suitable license. Bug: 667154 Change-Id: Iddb7932b68681824062cc2a7bf163459fc356cbb Reviewed-on: https://chromium-review.googlesource.com/807527 Reviewed-by: Stefan Zager <szager@chromium.org> Commit-Queue: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#521588} [modify] https://crrev.com/5c23fe6e90705997009f51b354eb7611b2e5e4ba/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
,
Dec 5 2017
Source Han Sans (Adobe's Noto CJK release) comes with localized names and is released under SIL OFL. But given its size it's really best to strip most of the glyph data from it and make a dummy version for testing.
,
Dec 5 2017
Thanks for the report and for the suggested font for a test! Sorry about taking this long to fix the bug.
,
Dec 6 2017
Tested this issue on Windows 7 using the latest Canary 65.0.3286.0 by followin the below steps. 1. Launched Chrome and navigated to https://www.ubuntu-tw.org/ 2. Opened Devtools and navigated to Elements -> Computed and in that can see the Font-Family as 'Times New Roman". Attached is the screen cast for reference. eae@ Can you please check the screen cast and verify if the fix is working as intended or please update the thread if we have missed anything from our end while testing. Thanks...
,
Dec 6 2017
susanjuniab: You're looking in the wrong place I'm afraid, check the "Rendered Fonts" section at the very bottom of the computed style tab. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by ajha@chromium.org
, Nov 21 2016Components: Blink>Fonts
Labels: -Type-Bug -Pri-2 M-57 hasbisect Pri-1 Type-Bug-Regression
Owner: e...@chromium.org
Status: Assigned (was: Unconfirmed)