[Webkit-unassigned] [Bug 100446] New: local(Helvetica) in src descriptor prevent fallback
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 25 19:49:47 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=100446
Summary: local(Helvetica) in src descriptor prevent fallback
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Text
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: bashi at chromium.org
Created an attachment (id=170791)
--> (https://bugs.webkit.org/attachment.cgi?id=170791&action=review)
test case
Test case attached.
WebKit doesn't fallback src descriptor of @font-face when the src descriptor contain "local(Helvetica)" even if a machine doesn't have Helvetica font. Instead, WebKit uses Arial font to render text.
The following code causes the issue (in FontCache.cpp):
static const AtomicString& alternateFamilyName(const AtomicString& familyName)
{
...
// Alias Arial and Helvetica
DEFINE_STATIC_LOCAL(AtomicString, arial, ("Arial"));
DEFINE_STATIC_LOCAL(AtomicString, helvetica, ("Helvetica"));
if (equalIgnoringCase(familyName, arial))
return helvetica;
if (equalIgnoringCase(familyName, helvetica))
return arial;
...
}
Helvetica is replaced with Arial when Helvetica isn't on the machine. Since most machines have Arial, the text will be rendered with Arial. This behavior prevents page authors to use their Helvetica fonts as webfonts.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list