@font-face downloads all external fonts of same name, regardless of weight
https://bugs.webkit.org/show_bug.cgi?id=113715
Summary @font-face downloads all external fonts of same name, regardless of weight
Tom Genoni
Reported 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.
Attachments
Shows webkit downloading all external fonts (49.40 KB, image/png)
2013-04-01 12:19 PDT, Tom Genoni
no flags
HTML example. (34.37 KB, application/zip)
2013-04-01 12:23 PDT, Tom Genoni
no flags
Tom Genoni
Comment 1 2013-04-01 12:23:43 PDT
Created attachment 196005 [details] HTML example.
Glenn Adams
Comment 2 2013-04-01 13:00:50 PDT
Could you point out the spec text the defines the "correct" behavior?
Tom Genoni
Comment 3 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."
Brad Vogel
Comment 4 2013-04-04 16:39:57 PDT
Radar WebKit Bug Importer
Comment 5 2015-09-08 10:55:29 PDT
Myles C. Maxfield
Comment 6 2015-09-08 11:05:12 PDT
Ahmad Saleem
Comment 7 2022-07-24 11:10:07 PDT
All browsers differ - I look into Chrome Bug mentioned in Comment 04, which got fixed in the past and then took the tests and changed them into following JSFiddles: Link - https://jsfiddle.net/t9qrmnhs/show Link - https://jsfiddle.net/o1hnL89a/show Link - https://jsfiddle.net/8gp0h1d4/show I am getting different behaviour across all browsers and not sure, which is aligned with web-spec but just wanted to share updated results. Thanks!
Note You need to log in before you can comment on or make changes to this bug.