New issue
Advanced search Search tips

Issue 807820 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Feature



Sign in to add a comment

Respect language list when rendering language-neutral CJK glyphs

Project Member Reported by spy...@google.com, Feb 1 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36

Example URL:
hangouts.google.com

Steps to reproduce the problem:
1. Run Linux
2. Install some fonts that are known to have proper Japanese glyphs (Google's Noto CJK fonts are a good example, see https://www.google.com/get/noto/help/cjk/ and https://www.google.com/get/noto/help/install/ for installation)
3. Set the languages (in chrome://settings/) to Japanese and English
4. Open a website like inbox.google.com that is not explicitly Japanese
5. Type some content like the word 進む into a text box

What is the expected behavior?
The character "進" should be rendered Japanese-style, with one small diagonal stroke in the top-left corner

What went wrong?
The character "進" was rendered Korean-style, with two small diagonal strokes in the top-left corner.  (Note I'm calling this 'Korean-style' based on https://zh.wiktionary.org/wiki/%E9%80%B2 which uses per-language hinting)

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 64.0.3282.119  Channel: stable
OS Version: Debian 4.9.65-3+deb9u2
Flash Version: 

Forcing the default display font to one with Japanese-style glyphs using a third-party extension ("Advanced Font Settings") is a workaround.
 

Comment 1 by spy...@google.com, Feb 1 2018

This might be a special case of 
  https://bugs.chromium.org/p/chromium/issues/detail?id=179331
As an extra data point, accept-languages has the value
  ja,en-US;q=0.9,en;q=0.8
on my browser.

Comment 2 by nona@chromium.org, Feb 1 2018

Cc: kojii@chromium.org

Comment 3 by nona@chromium.org, Feb 1 2018

Looks like Linux Chrome does not respect accept-language list for font fallback, right?

Comment 4 by kojii@chromium.org, Feb 1 2018

IIUC Blink does pass multiple bcp47locale to Skia matchFamilyStyleCharacter, both on Android and Linux. Maybe Linux Skia ignores them if it's not working?

FontCache::GetFamilyNameForCharacter
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp?type=cs&q=FontCache::GetFamilyNameForCharacter&l=90

It works if the content has lang="ja", correct?

Comment 5 by kochi@chromium.org, Feb 1 2018

Components: -Blink Blink>Fonts

Comment 6 by e...@chromium.org, Feb 4 2018

Status: Available (was: Unconfirmed)

Comment 7 by e...@chromium.org, Feb 4 2018

Labels: Needs-Feedback
NextAction: 2018-02-28

Comment 8 by spy...@google.com, Feb 5 2018

Thanks for looking into this.

The Wikipedia page I linked to in the description uses lang="" tags to control rendering of the characeters, and the lang="ja" glyphs look right.
The NextAction date has arrived: 2018-02-28

Comment 10 by kojii@chromium.org, Feb 28 2018

Labels: -Type-Bug -Pri-2 Pri-3 Type-Feature
NextAction: ----

Comment 11 by kojii@chromium.org, Feb 28 2018

Labels: -Needs-Feedback

Sign in to add a comment