Closed Bug 723482 Opened 12 years ago Closed 12 years ago

[@font-face] ttf fonts not loading under Windows XP and Linux

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: alice.lieutier, Unassigned)

Details

Attachments

(2 files)

Attached file minimal test case
On some sites, the ttf fonts do not load properly under windows XP and linux, using Firefox 10 and Aurora 11.

Steps :
- Using Windows XP (or Linux), go to http://www.jeunes-ecologistes.org/
- The menu bar displays a font that is not the defined 'veteran typewriter' font.

This font is defined using the CSS3 @font-face property and is hosted on the same domain.

Same site using Chrome displays the font correctly
Same site on mac or windows seven using firefox displays the font correctly

Attached is a minimal HTML test case.


I am getting the same problem on this site :
http://evajoly2012.fr/ with the aside menu (je m'informe, je m'engage, je donne)
Attachment #593799 - Attachment mime type: text/plain → text/html
On my Linux laptop, both the example and the URL given work correctly with Chromium and Opera but doesn't work with Firefox.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Summary: [@font-face] ttf fonts not loading under windows XP → [@font-face] ttf fonts not loading under Windows XP and Linux
I'd expect the attached testcase to fail, because it tries to load the font from www.jeunes-ecologistes.org, but cross-origin access is not permitted. (I don't think Chromium implements that restriction on @font-face yet, which explains the testcase working there.)

The http://www.jeunes-ecologistes.org/ page itself seems to be broken at the moment (reports a WordPress/PHP version problem).

Alice, could you please post a screenshot showing the problem you see on the http://evajoly2012.fr/ site? Also, check in the Web Console window (Tools menu) for any error messages that may be appearing while the page loads.
This is the screenshot showing the problem on the evajoly2012 website.
The http://www.jeunes-ecologistes.org/ page is up again.

This is the error I get on the web console while loading :

Error: downloadable font: download not allowed (font-family: "veteran typewriter" style:normal weight:normal stretch:normal src index:0): content blocked
source: http://www.jeunes-ecologistes.org/img/veterantypewriter.ttf
Source File: http://www.jeunes-ecologistes.org/wp-content/themes/Magnificent/style.css
Line: 0
Source Code:
@font-face { font-family: "veteran typewriter"; src: url("http://www.jeunes-ecologistes.org/img/veterantypewriter.ttf"); }


Why would the download not be allowed ? Has it to do with licencing ?
I don't think so. Is your computer accessing the internet through some kind of proxy/firewall/corporate network/etc that might be affecting the connection? Do you have any add-ons installed, particularly anything security- or privacy-related? Does the problem occur with a fresh, default user profile?
Oh, I should have think about that. I think it's because of noscript for me (on Linux).
I did test with a fresh profile. However, I did access those pages through corporate network with a proxy.

Indeed, when I test now from home on a WindowsXP virtual machine with Firefox 10, the font do display properly.
Aha - if that's an authenticating proxy on your corporate network, it sounds like you may be experiencing bug 627616.

You may be able to work around the problem if it's possible to configure your system so that authentication is not needed (see bug 627616 comment #0), but clearly this is an issue we need to get fixed.
URL in comment 0 is OK on my XP system (Firefox 10.x).

As per comment 7 this seems a dupe of bug 627616.

Feel free to REOPEN if it's not.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
I am still experiencing problems displaying the fonts through corporate network on the site http://www.jeunes-ecologistes.org/

I am using Nightly 13.0a1 (2012-03-06) with a fresh profile so for me this problem was not solved by 2012-02-17 fix of bug 627616.

The web-console now reads :

[10:18:47.130] downloadable font: not usable by platform (font-family: "veteran typewriter" style:normal weight:normal stretch:normal src index:0)
source: http://www.jeunes-ecologistes.org/img/veterantypewriter.ttf @ http://www.jeunes-ecologistes.org/wp-content/themes/Magnificent/style.css
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Strange. The "veteran typewriter" font WFM on http://www.jeunes-ecologistes.org/ on OSX, Win7 and WinXP machines, using current Nightly (2012-03-07) or other recent builds.

Does the problem _only_ occur when accessing the site through your corporate network?

If you open the Web Console and then load the page, you should be able to find and inspect the network request (GET) for the font file. On my XP machine, it looks like this:

  Request URL:  http://www.jeunes-ecologistes.org/img/veterantypewriter.ttf

  Request Method:  GET

  Status Code:  HTTP/1.1 200 OK

  Request Headers    15:57:46.806
    Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding:gzip, deflate
    Accept-Language:en-us,en;q=0.5
    Cache-Control:no-cache
    Connection:keep-alive
    Host:www.jeunes-ecologistes.org
    Pragma:no-cache
    Referer:http://www.jeunes-ecologistes.org/wp-content/themes/Magnificent/style.css
    User-Agent:Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120307 Firefox/13.0a1

  Sent Cookie
    __utma:86450819.507515311.1331135476.1331135476.1331135476.1
    __utmb:86450819.4.10.1331135476
    __utmc:86450819
    __utmz:86450819.1331135476.1.1.utmcsr
    mediaplan:R2045132393

  Response Headers    Δ511ms
    Accept-Ranges:bytes
    Connection:Keep-Alive
    Content-Length:45808
    Content-Type:text/plain
    Date:Wed, 07 Mar 2012 15:57:47 GMT
    Etag:"8ae89e-b2f0-49ade48a25266"
    Keep-Alive:timeout=5, max=99
    Last-Modified:Fri, 28 Jan 2011 01:49:58 GMT
    Server:Apache/2.2.X (OVH)

Can you confirm that you're receiving the same response to the font request? In particular, does the response Content-Length match, or could your corporate proxy be interfering with the content in some way?
> Does the problem _only_ occur when accessing the site through your corporate 
> network?

Yes. The fonts display correctly on my XP virtual machine at home.

> If you open the Web Console and then load the page, you should be able to find
> and inspect the network request (GET) for the font file.

I do not have any GET request for fonts.. It seems as though the browser don't even try to download it.
(In reply to Alice Lieutier from comment #12)
> > If you open the Web Console and then load the page, you should be able to find
> > and inspect the network request (GET) for the font file.
> 
> I do not have any GET request for fonts.. It seems as though the browser
> don't even try to download it.

This seems odd, as the error message in comment #10 indicates that the font file was downloaded, but then couldn't be activated within Windows.

Note that you have to have the web console open _before_ loading the page, and check that "Net" messages are enabled (the leftmost of the buttons in the toolbar across the top of the console). You could also disable the CSS and JS messages to reduce clutter, but Logging should be left on.

Then try Shift-Reload to force the page and its resources to be re-read from the network. You should see the initial GET for the main page, followed by a couple of fonts from Google, lots of CSS and JS files, etc., and eventually (after very many wp-content/themes/Magnificent png images, in my test), you'll find the GET for the veterantypewriter.ttf font.
Ok. So I tried shift-reload and sure enough there was a GET request for the font. As a matter of fact, there are two GET requests for http://www.jeunes-ecologistes.org/img/veterantypewriter.ttf each time I reload the page, one that does not have any Status Code or Response, which I guess does not succeed, and one that succeeds.
This is the second request I get with a fresh profile, after I empty the cache :

Request URL:  http://www.jeunes-ecologistes.org/img/veterantypewriter.ttf 
Request Method:  GET 
Status Code: HTTP/1.0 200 OK

Request Headers 10:36:18.568 
  Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Encoding:gzip, deflate
  Accept-Language:en-us,en;q=0.5
  Host:www.jeunes-ecologistes.org
  Proxy-Connection:keep-alive
  Referer:http://www.jeunes-ecologistes.org/wp-content/themes/Magnificent/style.css
  User-Agent:Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120307 Firefox/13.0a1
  
Sent Cookie
   mediaplan:R3058920501
 
Response Headers   ?31ms 
  Accept-Ranges:bytes
  Age:1762
  Connection:keep-alive
  Content-Length:45808
  Content-Type:text/plain
  Date:Thu, 08 Mar 2012 09:06:56 GMT
  Etag:"8ae89e-b2f0-49ade48a25266"
  Last-Modified:Fri, 28 Jan 2011 01:49:58 GMT
  Proxy-Connection:keep-alive
  Server:Apache/2.2.X (OVH)
  Via:1.1 odprox01s.priv.atos.fr:3128 (squid/2.7.STABLE3)
  X-Cache:HIT from odprox01s.priv.atos.fr
  X-Cache-Lookup:HIT from odprox01s.priv.atos.fr:3128

The Content length is the same as your request.
OK, thanks for checking. It sure looks like you're getting the same file. The one possibly-significant difference is that in your case, it's coming via the squid caching proxy, rather than directly from the original server.

I notice that the font is being served with a Content-Type of "text/plain", which perhaps isn't a good choice given that it's a binary file. One (perhaps far-fetched) idea is that perhaps squid is touching the content of the file in some way - in the belief that it's plain text (so, for example, "regularizing" line endings might appear to be safe) - and this is damaging the font data.

If you download the font file to your computer (still via the corporate proxy) and try installing it in Windows, does it work?

Do the Google webfonts used on the site work OK - i.e., it's just this veterantypewriter that fails?
(In reply to Jonathan Kew (:jfkthame) from comment #15)
> If you download the font file to your computer (still via the corporate
> proxy) and try installing it in Windows, does it work?

It does work. I can install and use the font.

> Do the Google webfonts used on the site work OK - i.e., it's just this
> veterantypewriter that fails?

Actually, the google webfonts do not work either. I thought that was because of the cross-origin restriction. I get the same CSS error for them :

[15:01:29.452] downloadable font: not usable by platform (font-family: "OFL Sorts Mill Goudy TT" style:normal weight:normal stretch:normal src index:2)
source: http://themes.googleusercontent.com/static/fonts/oflsortsmillgoudytt/v4/9ZZVVBRCceNnPBXqWLH8INC5-FYgMOm9n-SazquSTDY.woff @ http://fonts.googleapis.com/css?family=OFL+Sorts+Mill+Goudy+TT:regular,italic&subset=latin

[15:01:29.473] downloadable font: not usable by platform (font-family: "Droid Sans" style:normal weight:bold stretch:normal src index:2)
source: http://themes.googleusercontent.com/static/fonts/droidsans/v3/EFpQQyG9GqCrobXxL-KRMQFhaRv2pGgT5Kf0An0s4MM.woff @ http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold
(In reply to Alice Lieutier from comment #16)
> (In reply to Jonathan Kew (:jfkthame) from comment #15)
> > If you download the font file to your computer (still via the corporate
> > proxy) and try installing it in Windows, does it work?
> 
> It does work. I can install and use the font.

OK. It looks to me like the font file is reaching your computer safely, then.

> > Do the Google webfonts used on the site work OK - i.e., it's just this
> > veterantypewriter that fails?
> 
> Actually, the google webfonts do not work either. I thought that was because
> of the cross-origin restriction.

I believe the google fonts are served with an access control header that allows cross-origin use.

> I get the same CSS error for them :
> 
> [15:01:29.452] downloadable font: not usable by platform (font-family: "OFL
> Sorts Mill Goudy TT" style:normal weight:normal stretch:normal src index:2)
> source:
> http://themes.googleusercontent.com/static/fonts/oflsortsmillgoudytt/v4/
> 9ZZVVBRCceNnPBXqWLH8INC5-FYgMOm9n-SazquSTDY.woff @
> http://fonts.googleapis.com/css?family=OFL+Sorts+Mill+Goudy+TT:regular,
> italic&subset=latin
> 
> [15:01:29.473] downloadable font: not usable by platform (font-family:
> "Droid Sans" style:normal weight:bold stretch:normal src index:2)
> source:
> http://themes.googleusercontent.com/static/fonts/droidsans/v3/
> EFpQQyG9GqCrobXxL-KRMQFhaRv2pGgT5Kf0An0s4MM.woff @
> http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold

I'm running out of ideas here, I'm afraid. It looks like access to the font resources is working OK, but the Windows API functions (TTLoadEmbeddedFont or AddFontMemResourceEx) that we use to "activate" the fonts are failing on your system (although they work for me here, and on your system at home).

Do these downloadable fonts work in Google Chrome (on that same system)?
(In reply to Jonathan Kew (:jfkthame) from comment #17)
> Do these downloadable fonts work in Google Chrome (on that same system)?

According to comment 0, yes.
Have you ever disabled t2embed.dll to workaround security vulnerabilities?
t2embed.dll is not disabled.

However, since March 12th, I don't experience the bug anymore.
I now works for me on either Nightly or Firefox 10, so it does not seem to be linked with Nightly updates. I guess something changed in my proxy configuration, but I do not (and cannot) know what. The http requests haven't changed..

I guess I'll leave it to you to close this bug or not, since I can't reproduce it anymore.
Resolving this as "worksforme" - it's not clear exactly what made the problem go away, but I don't think there's anything useful we can do here.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: