Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Issue 2721613002: Fix matching Roboto Bold for src: local("Roboto Regular") (Closed)

Created:
3 years, 9 months ago by drott
Modified:
3 years, 9 months ago
Reviewers:
kojii, eae
CC:
ajuma+watch_chromium.org, darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, fmalita+watch_chromium.org, jbroman, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix matching Roboto Bold for src: local("Roboto Regular") Our @font-face { src: local() } matching is incorrectly going down the same code path that is used for matching CSS font-family. On Windows, this family match code path takes extra steps to ensure something like "Roboto Regular" is matched against Roboto, or "Roboto Bold" is matched against Roboto, in a bold variant. However, this type of matching is too wide for local(), where the CSS fonts module specification expects a unique match against full font name or postscript name. On Windows, it was incorrectly matching local("Roboto Regular") against "Roboto Bold" if that was the only available Roboto font on the system. This CL is a temporary fix for the case of "Roboto Regular" matching against Roboto Bold. However, matching local("Roboto Bold") against the actual Roboto Bold does still not work, also local("Roboto") still matches against Roboto Bold if that is the only available Roboto on the system. A full fix requires access to the OpenType name table and reading the full font name or postscript name. TEST=Manual, using src: local("Roboto"), local("Roboto Regular"), local("Roboto Bold") with only Roboto Bold installed on the system BUG=690334 Review-Url: https://codereview.chromium.org/2721613002 Cr-Commit-Position: refs/heads/master@{#453600} Committed: https://chromium.googlesource.com/chromium/src/+/d31bcba110520454ced012b05695f9c471446a52

Patch Set 1 #

Patch Set 2 : Tailor condition for new enum value, hopefully fixes windows tests #

Patch Set 3 : Fix test cases relying on generous matching for local() #

Patch Set 4 : Fix test case for Mac #

Messages

Total messages: 26 (19 generated)
drott
3 years, 9 months ago (2017-02-27 15:26:01 UTC) #4
eae
LGTM, thank you
3 years, 9 months ago (2017-02-27 21:49:11 UTC) #8
drott
Fix test cases relying on generous matching for local()
3 years, 9 months ago (2017-02-28 11:41:46 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2721613002/40001
3 years, 9 months ago (2017-02-28 11:42:14 UTC) #19
drott
Fix test case for Mac
3 years, 9 months ago (2017-02-28 12:53:05 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2721613002/60001
3 years, 9 months ago (2017-02-28 12:53:23 UTC) #23
commit-bot: I haz the power
3 years, 9 months ago (2017-02-28 14:58:12 UTC) #26
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/d31bcba110520454ced012b05695...

Powered by Google App Engine
This is Rietveld 408576698