Bug 113715 - @font-face downloads all external fonts of same name, regardless of weight
Summary: @font-face downloads all external fonts of same name, regardless of weight
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.8
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-04-01 12:19 PDT by Tom Genoni
Modified: 2015-09-08 11:05 PDT (History)
7 users (show)

See Also:


Attachments
Shows webkit downloading all external fonts (49.40 KB, image/png)
2013-04-01 12:19 PDT, Tom Genoni
no flags Details
HTML example. (34.37 KB, application/zip)
2013-04-01 12:23 PDT, Tom Genoni
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Genoni 2013-04-01 12:19:12 PDT
Created attachment 196003 [details]
Shows webkit downloading all external fonts

Given the following CSS:

body {
  font-family: "Source Sans Pro";
  font-weight: 200;
}

@font-face {
  font-family: 'Source Sans Pro';
  src: url("SourceSansPro-ExtraLight.woff") format("woff");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: 'Source Sans Pro';
  src: url("SourceSansPro-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
}

...the expected behavior is that the browser only downloads "SourceSansPro-ExtraLight.woff" but both "SourceSansPro-ExtraLight.woff" and "SourceSansPro-Light.woff" are downloaded. Mozilla only downloads the "SourceSansPro-ExtraLight.woff" font.
Comment 1 Tom Genoni 2013-04-01 12:23:43 PDT
Created attachment 196005 [details]
HTML example.
Comment 2 Glenn Adams 2013-04-01 13:00:50 PDT
Could you point out the spec text the defines the "correct" behavior?
Comment 3 Tom Genoni 2013-04-01 14:18:17 PDT
(In reply to comment #2)
> Could you point out the spec text the defines the "correct" behavior?

http://www.w3.org/TR/css3-fonts/#font-face-loading
"User agents that download all fonts defined in @font-face rules without considering whether those fonts are in fact used within a page are considered non-conformant."
Comment 4 Brad Vogel 2013-04-04 16:39:57 PDT
Cross-filed for blink - https://code.google.com/p/chromium/issues/detail?id=226849
Comment 5 Radar WebKit Bug Importer 2015-09-08 10:55:29 PDT
<rdar://problem/22612942>
Comment 6 Myles C. Maxfield 2015-09-08 11:05:12 PDT
See also: https://bugs.webkit.org/show_bug.cgi?id=42154