User.js: Font issue with .woff

Created on 11 Oct 2016  Â·  15Comments  Â·  Source: pyllyukko/user.js

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

question

Most helpful comment

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

All 15 comments

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_.

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

Imgur:

screenshot_20161012_123416

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

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

@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. :)

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.

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

user_pref("loop.logDomains", false);

Set to true?

user_pref("loop.logDomains", false);

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

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)

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

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

@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.

I guess we can close this then.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Thorin-Oakenpants picture Thorin-Oakenpants  Â·  4Comments

nodiscc picture nodiscc  Â·  8Comments

BananaMangoFestival picture BananaMangoFestival  Â·  10Comments

brakenow picture brakenow  Â·  7Comments

pyllyukko picture pyllyukko  Â·  6Comments