Bug 57766 - REGRESSION(r74107): Including svg format in @font-face rules makes Web Fonts fail to load
Summary: REGRESSION(r74107): Including svg format in @font-face rules makes Web Fonts ...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 420+
Hardware: All All
: P1 Major
Assignee: Nobody
URL: http://www.extensis.com/en/WebINK/web...
Keywords: InRadar, Regression
Depends on:
Reported: 2011-04-04 10:54 PDT by Andy Nelsen
Modified: 2011-04-14 14:49 PDT (History)
4 users (show)

See Also:

patch (10.00 KB, patch)
2011-04-14 14:22 PDT, Antti Koivisto
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Nelsen 2011-04-04 10:54:17 PDT
Before getting into detail, please note:
-This issue first appears at r74228 of the WebKit nightly builds: Version 5.0.4 (6533.20.27, r74228)
-The behavior only makes it to market in Chrome 10. Safari releases do not display the behavior.

When specifying SVG as one of the available formats for a web font, WebKit and Chrome 10 fail to display the web font, even if there is another compatible font format specified in the css stack.

Using Chrome 10 or latest WebKit, see:
1. http://www.extensis.com/en/WebINK/webkit-nosvg.html (Uses CSS without SVG option)
2. http://www.extensis.com/en/WebINK/webkit-svg.html (Uses CSS with SVG option)

Note that the first link shows the web font properly in Chrome 10 and WebKit but the second does not, even though the font resource does appear to download. As long as there is no reference to SVG, the font displays properly. This is not limited to WebINK fonts. We have also noticed some difficulty with FontDeck fonts and odd behavior on the TypeKit Web site related to @font-face feature detection. Again this is all happening in Chrome 10 and appears to be rooted in WebKit sometime after r73886 and before r74228. 

SVG is not typically included in the fallback stack as the preferred font even though WebKit will display SVG fonts. The issue is that the mere presence of the svg format call causes WebKit to bail on all formats and the Web font is never applied to the page (even though it does get downloaded as a resource). A few interesting points related to this:

-WebKit WILL display an SVG font called locally using FontSquirrel kits
-WebKit WILL NOT display an SVG font called remotely using WebINK (and it seems other services like Font Deck as well)
-WebKit WILL display a TTF font called both locally and remotely using any approach
-WebKit WILL NOT display a TTF font called from anywhere if the SVG format is also on the list of sources (excepting Font Squirrel kits, which do seem to work)

...and again none of this makes it to Safari. Only Chrome inherits the bug...
Comment 1 Alexey Proskuryakov 2011-04-04 15:24:12 PDT
Comment 2 mitz 2011-04-04 19:12:14 PDT
Caused by r74107. <http://trac.webkit.org/changeset/74107/>
Comment 3 Antti Koivisto 2011-04-14 14:22:56 PDT
Created attachment 89645 [details]
Comment 4 Antti Koivisto 2011-04-14 14:49:41 PDT