How to install website-specific font file into Firefox?

4

1

Some websites, notably Github, started using special downloadable fonts and various little pictures are broken when font downloading is disabled.

How to statically install just GitHub's font into Firefox without enabling font downloading from web?

Vi.

Posted 2012-08-13T12:21:57.400

Reputation: 13 705

I know you can install a custom CSS in firefox. I don't know how to call it on a per website basis. – Everett – 2012-08-13T13:22:33.607

It's not about CSS. It's about fonts that those CSS referring. – Vi. – 2012-08-13T14:01:08.417

1And if you install a local CSS you can point to their (github's) font (after you d/l it and install it on your system), or any font you want. I know this because I've done it. Configurations in the local CSS will override the CSS that comes from the website. This would work if you could make it website specific. My local CSS overrides ALL sites I connect to. – Everett – 2012-08-13T14:08:58.527

+1 for @Everett – I’ve tried it too, but without a local override CSS, and (because of the method Github uses) it doesn’t work, so you really need that. – mirabilos – 2013-12-06T11:54:01.163

For per-site CSS overrides: @-moz-document domain("github.com") { * {font-family: 'Open Sans' !important;} } – Mica – 2014-01-10T15:36:02.557

Answers

1

Browsers may cache font resources (.woff etc.), but usually don’t support a permanent install. If the font license allows it, you could fetch the file (fontinfo addon may help), convert it to a format your OS supports (usually .ttf/.otf, several tools and services available) and install it locally, but you may have to add rules to your user stylesheet if the site authors didn’t anticipate anyone would have the font installed on their system (local() in src descriptor of @font-face rule). For many FOSS fonts, you’ll be able to find an up-to-date copy in several font formats on the respective homepage/repository, e.g. Octicons for Github, so no need for converting the WOFF yourself.

Crissov

Posted 2012-08-13T12:21:57.400

Reputation: 150

0

It is possible that the following will work:

Then again, it might not work. If it doesn't, try renaming it to octicons.woff. I haven't tried this: it might do all sorts of disastrous things. I personally can't understand why you block CSS fonts.

(This is installing to Windows, not Firefox.)

GKFX

Posted 2012-08-13T12:21:57.400

Reputation: 149

1I personally can't understand why you block CSS fonts. -> http://hackademix.net/2010/03/24/why-noscript-blocks-web-fonts/ – Vi. – 2014-02-12T17:29:01.580

Fair enough. Did this fix do the trick? – GKFX – 2014-02-15T11:53:48.723

Not tried yet... – Vi. – 2014-02-15T14:59:50.050