Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox webfonts not loading

I'm having an issue with webfonts only in Firefox, all other browsers (including IE) work perfectly.

My issues is that the webfonts won't load at all.

I've looked at this possible solution, editing the htaccess file (http://www.fontsquirrel.com/blog/2010/11/troubleshooting-font-face-problems) but I've had no luck.

The only other thing that I can say is in Firefox's error console I get the following warning:

Error in parsing value for "src". Skipped to the next declaration.

Here's a sample of my font-face code:

@font-face {
    font-family:AngelinaRegular;
    src:url(../fonts/angelina-webfont.eot);
    src:url(../fonts/angelina-webfont.eot?iefix) format(eot), url(../fonts/angelina-webfont.woff) format(woff), url(../fonts/angelina-webfont.ttf) format(truetype), url(../fonts/angelina-webfont.svg#webfontOvuhCGpN) format(svg);
    font-weight:normal;
    font-style:normal;
}

Any ideas?

like image 807
user127181 Avatar asked Jun 30 '11 22:06

user127181


People also ask

Why are my fonts not working on Firefox?

This problem was solved by adjusting the Firefox config. --- If locally installed fonts aren't working then this is likely a sandbox security issue. You can set this pref to 2 or 1 on the about:config page to lower the sandbox security setting. close and restart Firefox to make the change effective.

Why is the font weird on Firefox?

Chosen solution You can check in the Rules tab in the right panel in the Inspector what font-family is used for selected text. You can check in the Font tab in the right panel in the Inspector what font is actually used because Firefox might be using a different font than specified by the website.


2 Answers

In my experience, Firefox is picky about expecting quotes in @font-face rules:

@font-face {
    font-family: AngelinaRegular;
    src: url('../fonts/angelina-webfont.eot');
    src: url('../fonts/angelina-webfont.eot?#iefix') format('embedded-opentype'),
        url('../fonts/angelina-webfont.woff') format('woff'),
        url('../fonts/angelina-webfont.ttf') format('truetype'),
        url('../fonts/angelina-webfont.svg#webfontOvuhCGpN') format('svg');
    font-weight: normal;
    font-style: normal;
}
like image 200
rjb Avatar answered Sep 23 '22 00:09

rjb


There can also be cross domain issues with fonts in Firefox. See: http://www.cssbakery.com/2010/07/fixing-firefox-font-face-cross-domain_25.html

like image 37
Ric Avatar answered Sep 22 '22 00:09

Ric