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

Issue 853267 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocked on:
issue 894354



Sign in to add a comment

Unicode-range works unpredictably with local fonts

Reported by pixelamb...@gmail.com, Jun 15 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36 OPR/53.0.2907.68

Steps to reproduce the problem:
1. Write an @font-face rule using a local() font and a unicode range
2. The unicode range will be applied inconsistently

See attached file index.html. I only use the font Chalkboard for capital A-Z through a @font-face rule. This would only affect the letter H in the text "Hello there". But the entire first word is written in Chalkboard.

See attached file index2.html. I use two local fonts, Chalkboard for A-Z and Futura for a-z. In the text "Hello There" the H and the T would be written in Chalkboard, the small cap remainder of the text in Futura. But the entire text is written in Futura only.

Also see:

What is the expected behavior?
The local font should be applied to text in the specified unicode range only.

What went wrong?
The font is being applied to characters outside its unicode range, but only for the first word.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 66.0.3359.170  Channel: n/a
OS Version: OS X 10.13.3
Flash Version:
 
index.html
501 bytes View Download
index2.html
501 bytes View Download
"Also see:" should've included a link to a few tweets with screenshots: https://twitter.com/pixelambacht/status/1007669170044112906
Labels: Needs-Milestone
Cc: sindhu.chelamcherla@chromium.org
Labels: Triaged-ET M-69 Target-69 FoundIn-69 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on reported version 66.0.3359.170 and latest stable 67.0.3396.87 using Mac 10.13.3, Ubuntu 14.04 and Windows 10.

NOTE: In Mac firefox able to see difference, but in Linux and Windows seeing same behavior as in chrome.

This issue is seen from M-60. Hence considering this issue as Non-Regression and marking as Untriaged.

Thanks!

Comment 4 by e...@chromium.org, Jun 28 2018

Components: -Blink>Fonts Blink>WebFonts
Cc: drott@chromium.org
+drott@ who may have some insights

Comment 6 by drott@chromium.org, Jun 28 2018

Cc: -drott@chromium.org
Components: -Blink>WebFonts Blink>Fonts
Labels: OS-iOS
Owner: drott@chromium.org
Status: Available (was: Untriaged)

Comment 7 by drott@chromium.org, Jun 28 2018

Status: Assigned (was: Available)
Labels: -OS-iOS
iOS does not use Blink
Blockedon: 894354
Labels: -OS-Linux -OS-Windows
Thanks for this interesting reports. 

This will fail only for AAT fonts that pass through the hb-coretext shaping backend. Futura seems to be one of those fonts, as are ".SFNSText" (the mac ui font), "Helvetica", "Times". If you use "Arial" this issue does not occur, as Arial is not an AAT font, which is not shaped with hb-coretext. The hb-coretext backend does not call back into Blink to take unicode-range into account and proceeds to shape with priority. 

This is not reproducible on Windows and Linux, as Futura and Chalkboard are not available as local fonts there, and the whole run displays in Times.

This will be fixed by moving to HarfBuzz' own shaping algorithm, also for AAT fonts, which is tracked in  issue 894354 . 
Cc: behdad@chromium.org
Status: Fixed (was: Assigned)
Fixed by rolling to HarfBuzz AAT support, see issue 894353, available in Canary from 72.0.3622.0. 

See https://chromium-review.googlesource.com/c/chromium/src/+/1275945



canary_unicode_range_local_fonts.png
272 KB View Download

Sign in to add a comment