Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font issue with .woff #189

Closed
tophat01 opened this issue Oct 11, 2016 · 15 comments
Closed

Font issue with .woff #189

tophat01 opened this issue Oct 11, 2016 · 15 comments
Labels

Comments

@tophat01
Copy link

Hi,
I've come across an interesting issue when using the user.js, with one particular website: http://blog.us.playstation.com/

I checked the site's source and it appears it uses custom .woff and .woff2 font files but always displays in the default font (Times New Roman) even when I have gfx.font_rendering.opentype_svg.enabled set to true and browser.display.use_document_fonts set to 1. My gfx.downloadable_fonts.enabled setting is set to true, by default.

Is there another setting that affects how custom fonts are displayed? This is the only site that I've come across so far that has this issue. A default install of Firefox displays the site properly.

I apologize in advance if this is an easy question, I'm still a complete newbie to most of this.

Thanks

@Atavic
Copy link

Atavic commented Oct 11, 2016

Web Open Font Format (WOFF 2.0) fonts is a new format that reduces the size of a font file by more than 30%, helping web pages load faster.

I suggest to set your preferred fonts in the browser and ignore such new and improved features for the sake of privacy. In my browser prefs I untick:

  • Allow documents to use other fonts.

@ivan-kolmychek
Copy link

@Atavic to be fair, icons on some sites break with that checkbox unticked. Like, imgur.com or circleci.com.

@ivan-kolmychek
Copy link

@ivan-kolmychek
Copy link

Imgur:

screenshot_20161012_123416

@ghost
Copy link

ghost commented Oct 12, 2016

uBlock Origin have a nice feature to enable/disable "gfx.downloadable_fonts.enabled" per site: https://github.com/gorhill/uBlock/wiki/Per-site-switches#no-remote-fonts

@Atavic
Copy link

Atavic commented Oct 12, 2016

@ivan-kolmychek Ok, that's a bad choice by the builders of those sites IMHO.

@ivan-kolmychek
Copy link

@Atavic of course, but I thought that is a drawback that may be worth mentioning if you're suggesting that, so if someone does uncheck that box they'll be ready for this. :)

@tophat01
Copy link
Author

tophat01 commented Oct 12, 2016

Thanks for the feedback everyone.

What I am the most confused about is how a default Firefox 49 install doesn't have this issue, but only the user.js install even with with the checkbox ticked. I understand the privacy implications of allowing custom fonts, but at this point I'm stumped on why the user.js does this.

@Atavic
Copy link

Atavic commented Oct 13, 2016

The page has a wordpress theme and google-analytics. Maybe should:

user_pref("loop.logDomains", false);

Set to true?

@fmarier
Copy link
Contributor

fmarier commented Oct 13, 2016

user_pref("loop.logDomains", false);

That has nothing to do with fonts. It controls the optional data collection in Firefox Hello.

@pyllyukko
Copy link
Owner

I modified browser.display.use_document_fonts & gfx.font_rendering.opentype_svg.enabled and from looking at the console, there seems to be a whole bunch of CORS related errors:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://blog.us.playstation.com/wp-content/themes/kratos/fonts/sststd-roman.woff. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).(unknown)
downloadable font: download failed (font-family: "SST" style:normal weight:normal stretch:normal src index:0): bad URI or cross-site access not allowed source: http://blog.us.playstation.com/wp-content/themes/kratos/fonts/sststd-roman.woffblog.us.playstation.com:21:14
GET 
https://secure.cdn.us.playstation.com/pscomauth/groups/public/documents/webasset/oo_tab.png [HTTP/1.1 304 Not Modified 31ms]
GET 
https://secure.cdn.us.playstation.com/pscomauth/groups/public/documents/webasset/oo_tab_icon.gif [HTTP/1.1 304 Not Modified 43ms]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://blog.us.playstation.com/wp-content/themes/kratos/fonts/sststd-bold.woff. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).(unknown)
downloadable font: download failed (font-family: "SST Bold" style:normal weight:normal stretch:normal src index:0): bad URI or cross-site access not allowed source: http://blog.us.playstation.com/wp-content/themes/kratos/fonts/sststd-bold.woffblog.us.playstation.com:25:14
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://blog.us.playstation.com/wp-content/themes/kratos/fonts/bebasneue-webfont.woff2. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).(unknown)
downloadable font: download failed (font-family: "Bebas Neue" style:normal weight:normal stretch:normal src index:0): bad URI or cross-site access not allowed source: http://blog.us.playstation.com/wp-content/themes/kratos/fonts/bebasneue-webfont.woff2blog.us.playstation.com:29:14
GET 
https://blog.us.playstation.com/wp-content/themes/kratos/fonts/sststd-roman.ttf [HTTP/1.1 200 OK 163ms]
GET 
https://blog.us.playstation.com/wp-content/themes/kratos/fonts/sststd-bold.ttf [HTTP/1.1 200 OK 279ms]
GET 
https://blog.us.playstation.com/wp-content/themes/kratos/fonts/bebasneue-webfont.woff [HTTP/1.1 200 OK 261ms]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://blog.us.playstation.com/wp-content/themes/kratos/fonts/sststd-roman.ttf. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).(unknown)
downloadable font: download failed (font-family: "SST" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed source: http://blog.us.playstation.com/wp-content/themes/kratos/fonts/sststd-roman.ttfblog.us.playstation.com:21:14
downloadable font: no supported format found (font-family: "SST" style:normal weight:normal stretch:normal src index:3) source: (end of source list)blog.us.playstation.com:21:14
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://blog.us.playstation.com/wp-content/themes/kratos/fonts/sststd-bold.ttf. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).(unknown)
downloadable font: download failed (font-family: "SST Bold" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed source: http://blog.us.playstation.com/wp-content/themes/kratos/fonts/sststd-bold.ttfblog.us.playstation.com:25:14
downloadable font: no supported format found (font-family: "SST Bold" style:normal weight:normal stretch:normal src index:3) source: (end of source list)blog.us.playstation.com:25:14
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://blog.us.playstation.com/wp-content/themes/kratos/fonts/bebasneue-webfont.woff. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).(unknown)
downloadable font: download failed (font-family: "Bebas Neue" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed source: http://blog.us.playstation.com/wp-content/themes/kratos/fonts/bebasneue-webfont.woffblog.us.playstation.com:29:14
GET 
https://blog.us.playstation.com/wp-content/themes/kratos/fonts/bebasneue-webfont.ttf [HTTP/1.1 200 OK 228ms]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://blog.us.playstation.com/wp-content/themes/kratos/fonts/bebasneue-webfont.ttf. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).(unknown)
downloadable font: download failed (font-family: "Bebas Neue" style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed source: http://blog.us.playstation.com/wp-content/themes/kratos/fonts/bebasneue-webfont.ttfblog.us.playstation.com:29:14
downloadable font: no supported format found (font-family: "Bebas Neue" style:normal weight:normal stretch:normal src index:4) source: (end of source list)blog.us.playstation.com:29:14
NetworkError: A network error occurred.(unknown)

@pyllyukko
Copy link
Owner

@tophat01: Which add-ons you have in use?

@pyllyukko
Copy link
Owner

pyllyukko commented Oct 13, 2016

Ok. I got it working by setting browser.display.use_document_fonts to 1 and disabling HTTPS Everywhere on playstation.com. Blame Sony! :)

@tophat01
Copy link
Author

@pyllyukko Ah, it must of been HTTPS Everywhere! Thanks for your response, I was able to replicate your results by doing the same thing. I had a hunch it was the website's fault.

@pyllyukko
Copy link
Owner

I guess we can close this then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants