Bug 17085 - REGRESSION (r29839): All remote fonts are treated as SVG fonts (Acid3 Ahem test font no longer loads)
Summary: REGRESSION (r29839): All remote fonts are treated as SVG fonts (Acid3 Ahem te...
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: Nobody
URL: http://www.hixie.ch/tests/evil/acid/003/
Keywords: InRadar, Regression
Depends on:
Blocks: 17086
  Show dependency treegraph
Reported: 2008-01-29 16:25 PST by Eric Seidel (no email)
Modified: 2008-01-29 19:52 PST (History)
1 user (show)

See Also:

Patch (31.03 KB, patch)
2008-01-29 19:31 PST, mitz
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2008-01-29 16:25:47 PST
Acid3 Ahem test font no longer loads

the @font-face in acid3 used to work.  But now I just see lots of logs to the console (possibly related to other failed @font-face loads for SVG font testing):

This is the CSS:
  @font-face { font-family: "AcidAhemTest"; src: url(font.ttf); }
  map::after { position: absolute; top: 20px; left: 640px; content: "X"; background: fuchsia; color: white; font: 20px/1 AcidAhemTest; }
Comment 1 Eric Seidel (no email) 2008-01-29 16:26:49 PST
These are the logs:

ERROR: unable to initialize with font (null) at not known
(/Stuff/Projects/WebKit/WebCore/platform/graphics/mac/SimpleFontDataMac.mm:147 void WebCore::SimpleFontData::platformInit())
ERROR: Corrupt font detected, using (null) in place of (null) located at "not known".
(/Stuff/Projects/WebKit/WebCore/platform/graphics/mac/SimpleFontDataMac.mm:154 void WebCore::SimpleFontData::platformInit())
ERROR: failed to set up font, using system font ?kx?
(/Stuff/Projects/WebKit/WebCore/platform/graphics/mac/SimpleFontDataMac.mm:161 void WebCore::SimpleFontData::platformInit())

Comment 2 Eric Seidel (no email) 2008-01-29 16:47:28 PST
I'm not certain if WebKit changed or if Acid3 changed.  Either way, I don't think we've shipped a version of WebKit which supported this @font-face, so I'm not going to mark this a regression.
Comment 3 mitz 2008-01-29 18:12:32 PST
All font data is parsed as SVG.
Comment 4 mitz 2008-01-29 18:13:48 PST
Comment 5 mitz 2008-01-29 18:17:33 PST
The problem is CSSFontFaceSource::getFontData() always going the SVG path first (thus creating an SVG document with garbage data, that ends up not containing any fonts). It should only take that path for SVG data.
Comment 6 mitz 2008-01-29 19:31:33 PST
Created attachment 18787 [details]
Comment 7 Dave Hyatt 2008-01-29 19:42:59 PST
Comment on attachment 18787 [details]


How was this not caught by regression tests?
Comment 8 mitz 2008-01-29 19:49:40 PST
(In reply to comment #7)
> (From update of attachment 18787 [details] [edit])
> r=me
> How was this not caught by regression tests?

Whoever implemented @font-face did not check in regression tests for remote (or any) fonts :-)
Comment 9 mitz 2008-01-29 19:52:25 PST
Fixed in <http://trac.webkit.org/projects/webkit/changeset/29864>.