New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 642889 link

Starred by 31 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Feature



Sign in to add a comment

STHeiti shall not be fallback fonts anymore under macOS

Reported by shikis...@outlook.com, Aug 31 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Safari/602.1.50

Steps to reproduce the problem:
Simply run the application on macOS El Capitan or macOS Sierra.

What is the expected behavior?
On macOS since El Capitan: PingFang TC / SC / HK shall be shown on any UI place of the application prior to any other previously deprecated system Chinese fonts.

On macOS Mavericks & Yosemite: Hiragino Sans GB is far more acceptable comparing to STHeiti (Heiti TC, Heiti SC) regarding readability, legibility and Chinese-Japanese mixed typography.

What went wrong?
STHeiti shall not be shown on any UI place of the application. The current default system font is PingFang SC / TC / HK. Also, even though under macOS Yosemite, Hiragino Sans GB is far more acceptable comparing to STHeiti (Heiti TC, Heiti SC).

Did this work before? No 

Chrome version: 53.0.2785.89  Channel: stable
OS Version: OS X 10.12
Flash Version: 

I attached those XTB files I fixed to not only coop with this issue but guarantee Japanese Kanji font fallback under macOS (Hiragino Sans, Hiragino Kaku Gothic ProN and Hiragino Sans GB are actually belong to one font family). Also, I optimized the Chinese & Japanese font fallback under Windows.
 
Change towards "Steps to reproduce the problem":

Simply run the application on macOS El Capitan or macOS Sierra under Simplified or Traditional Chinese interface.
One more thing: The "Noto Sans CJK HK" written among my fixed xtb files are just placeholders to cope with incoming Source Han Sans HK.
Also, STHeiti has been removed from iOS since iOS 9.
Components: -UI UI>Internationalization
Status: Untriaged (was: Unconfirmed)
Update regarding "Did this work before?":

If it is asking whether this bug exists before, it is always.
I updated this attachment to replace what I initially uploaded at the 1st post, fixing a mistake I made regarding its "app_locale_settings_ja.xtb" file. The orginal attachment has been removed.
FontFallback_xtb_Files_fixed_September2016.zip
3.8 KB Download
Hello, come to support
Labels: Needs-Feedback
[mac triage] I'm trying to reproduce this issue, but with not much luck. Can you please attach a screencast of the issue? Thanks!
Reply to Comment 8 >

Please use macOS Sierra (factory official installation, recent developer preview will be fine) and set its user interface language as either traditional or simplified Chinese. After that, install the most-recent Chrome, run it, go to its preferences window, you could see its contents are not rendered by system default Chinese font (which is PingFang SC / TC / HK).
The only way solving this is to use my modified xtb files in lieu of your current release. Note that probably only some lines of each of my files are useful in this case after your consideration.
Additional Reply to Comment 8 >

I currently couldn't reproduce this issue since I force-removed all STHeiti files from my system. Only if probably next developer beta of macOS Sierra or its golden master release I could make a screencast on this issue.
If only dealing with the mac triage, only these files shall be modified as following:
(Note that "Noto Sans CJK" are placeholders in case people having Noto Sans CJK installed in their current system)

[1.] https://chromium.googlesource.com/chromium/src/+/master/ui/strings/translations/app_locale_settings_zh-CN.xtb

Use the following line in lieu of what being used in <if expr="is_macosx or is_ios">:
--------
  <translation id="IDS_WEB_FONT_FAMILY">Helvetica, BlinkMacSystemFont, PingFang SC, Noto Sans CJK SC, 'Hiragino Sans GB', sans-serif</translation>
--------

[2.] https://chromium.googlesource.com/chromium/src/+/master/ui/strings/translations/app_locale_settings_zh-TW.xtb

Use the following line in lieu of what being used in <if expr="is_macosx or is_ios">:
--------
  <translation id="IDS_WEB_FONT_FAMILY">Helvetica, BlinkMacSystemFont, PingFang TC, Noto Sans CJK TC, 'Hiragino Sans GB', sans-serif</translation>
--------

[3.] Add one more file (based on "app_locale_settings_zh-TW.xtb"):
/src/+/master/ui/strings/translations/app_locale_settings_zh-HK.xtb

Use the following line in lieu of what being used in <if expr="is_macosx or is_ios">:
--------
  <translation id="IDS_WEB_FONT_FAMILY">Helvetica, BlinkMacSystemFont, PingFang HK, Noto Sans CJK HK, Noto Sans CJK TC, 'Hiragino Sans GB', sans-serif</translation>
--------

[4.] Optional: Make Hiragino Sans GB as secondary kanji fallback font under Japanese interface:

https://chromium.googlesource.com/chromium/src/+/master/ui/strings/translations/app_locale_settings_ja.xtb

Use the following line in lieu of what being used in <if expr="is_macosx or is_ios">:
--------
  <translation id="IDS_WEB_FONT_FAMILY">Helvetica, BlinkMacSystemFont, Noto Sans CJK JP, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans GB', sans-serif</translation>
--------

# EOF.
Reply to Comment 8 >

Screenshot now available, taken under macOS Sierra Golden Master.
Screencast.png
494 KB View Download
Components: Blink>Fonts UI>Browser>WebUI
Settings is WebUI, so I think this might be a blink fonts issue. Over to Blink>Fonts for triage.
Wondering whether this issue really needs such a long time for triage.
As Chrome still supports OS X 10.9, I suggests aligning with system-ui font.

`Lucida Grande,STHeiti` is the system-ui font of OS X 10.9 and below, 

`Helvetica,STHeiti` is the system-ui font of OS X 10.10, 

`BlinkMacSystemFont,Pingfang SC` is the system-ui font of OS X 10.11 and above.

`BlinkMacSystemFont` will resolve to suitable SF font on OS X 10.11, and return `nil` for OS X 10.10 and below. 

So we can use `BlinkMacSystemFont,Pingfang SC,Helvetica,STHeiti` so that it should match system font family on both OS X 10.10 and 10.11 above. `Helvetica` is not the system font of OS X 10.9, but I guess Chrome might drop support for OS X 10.9 next year so we don't have to introduce extra complexity.

As for OP's proposal, personally I agree that `Hiragino Sans` is legible than `STHeiti` but it's better to align with system ui font to for general and consistent UE.

In short, I suggest update blink fonts to match system-ui better, STHeiti is no more system-ui font on OS X 10.11 above so updating to BlinkMacSystemFont is in need.

This issue is related to https://bugs.chromium.org/p/chromium/issues/detail?id=581310
Do not forget using PingFang TC in lieu of "Heiti TC (STHeiti TC)" under Traditional Chinese interface.

Comment 18 by e...@chromium.org, Oct 30 2016

Labels: -Needs-Feedback
Owner: spqc...@chromium.org
Status: Assigned (was: Untriaged)
Assigning back to spqchan now that feedback has been provided.

Comment 19 Deleted

Just wondering when will this issue get solved.
Owner: asvitk...@chromium.org
[mac triage] Assigning this to asvitkine for fonts.
Owner: spqc...@chromium.org
Sorry, I don't work on fonts anymore.
Cc: shrike@chromium.org
Owner: ----
Status: Untriaged (was: Assigned)
[mac triage] Throwing this back to the untriage queue. CC'ing shrike to see how this can get triaged

Comment 24 by e...@chromium.org, Jan 27 2017

Cc: drott@chromium.org
Status: Available (was: Untriaged)
Cc: -drott@chromium.org
Owner: drott@chromium.org
Status: Untriaged (was: Available)
Assigning to drott@ for Mac/Blink triage - what will it take to fix this issue? Is c#16 the answer?

The C#16 + C#17 is the answer if only you guys don't want Chrome to use independent settings between metal macOS (since El Capitan w/ PingFang available) and non-metal macOS (10.10.x and earlier).

I suggest using independent settings for metal macOS without any reference towards STHeiti. My uploaded file at C#06 is the answer.
P.S.: Everytime I reinstalled my macOS I have to nuke the STHeiti family from my system to avoid seeing them through most non-Apple applications like Chrome, forcing them to fallback the fonts to system default (as specified by CoreText: PingFang in macOS since El Capitan). However this is just a workaround.
I suggest switch to `system-ui` as https://bugs.chromium.org/p/chromium/issues/detail?id=654679 is fixed, BlinkMacSystemFont will be deprecated according to https://www.chromestatus.com/features/5640395337760768

I can work on a patch to align IDS_WEB_FONT_FAMILY to system-ui.

As supporting OS-defined cascading list on Mac is still left, neither is BlinkMacSystemFont, Pingfang SC/TC is still in need.
Here is a patch as a proposal:

1. split is_ios and is_macosx on CJK locale since the macosx version uses system UI font while ios version is targeted to use Roboto
2. use system-ui when is_macosx (Set as default)
3. use system-ui as well as the fallback font family on CJK locale
4. fix: zh-TW use wrong family when desktop_linux and not chromeos, it was Noto Sans CJK SC and it should be Noto Sans CJK TC

The OP proposed to add an extra app_locale_settings_zh-HK.xtb. Precisely speaking there should be a zh-HK locale which has some difference with zh-TW on ui_strings as well as app_locale_settings. However there is not any ui_strings translation on zh-HK so I don't think it is the correct time window to add zh-HK locale.

The system-ui can be used on other platforms (is_win and desktop_linux), however I don't have test environments on these platforms so I leave is_win and linux intact.
use-system-ui-in-ids-web-font-family.patch
5.2 KB Download

Comment 30 Deleted

Asking C#29 a question (I removed my previous comment due to something mistyped):

So, for each time an application or a webpage refers the "system-ui" placeholder, it is the operating system's responsibility to refer to the current system fonts, right? Just for confirmation.
Reply to C#31

As stated on https://bugs.chromium.org/p/chromium/issues/detail?id=654679#c9, Blink relies on OS API when is_win, is_macosx, is_ios and is_chromeos. On Android and Linux it uses heuristics to determine system font. As system-ui will take care the system font, we can leverage that to keep translations simple and less platform-dependent.

Comment 33 by e...@chromium.org, Feb 2 2017

Labels: -Type-Bug Type-Feature
Status: Available (was: Untriaged)
Project Member

Comment 34 by bugdroid1@chromium.org, Mar 16 2017

to @BugDroid1>

Looks like the issue for macOS is now fixed. I am just wondering the reason why Noto Sans CJK JP is not considered in app_locale_settings_ja.xtb.
Sorry I forgot to say that my Comment 35 is talking about the font for Linux.
Please file a new bug for that - this one is only about macOS.

Comment 38 by e...@chromium.org, Mar 17 2017

Owner: e...@chromium.org
Status: Fixed (was: Available)
Thank you eae.

Comment 29 Bullet 4 is filed in https://bugs.chromium.org/p/chromium/issues/detail?id=702458
Still the Hiragino Sans GB needs its presence in JP and zh-CN xtb files for all macOS versions prior to El Capitan. Reason:

1. Hiragino Sans GB and Hiragino Kaku Gothic ProN are actually different language versions of the same font family. The latter one does have lack of some kanji glyphs which could fall back to Hiragino Sans GB.

2. Hiragino Sans GB, regarding the screen render quality, is much better (rendered neatly) than STHeiti family.

FYI.

Comment 41 by e...@chromium.org, Mar 17 2017

Thanks shikisuen!

Your welcome.
By the way, how could I know whether the applied solution is now available in the current Chrome Canary or beta or stable build?

Sign in to add a comment