Chromium Code Reviews
DescriptionFix 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)
|