Nathan
Nathan

Reputation: 979

@font-face, firefox and wordpress

I've built a custom wordpress theme that uses font-face for typography. All works fine when running in localhost, but after uploading the theme to a live site, font-face fails in FF. Still works fine in IE9

I've tried hardcoding the CSS link in header.php, moving the font files out of the theme to the site root, using a separate stylesheet for the @font-face declaration, but nothing wants to work.

Any ideas?

Cheers Nathan

Upvotes: 0

Views: 377

Answers (1)

Matt
Matt

Reputation: 3132

Did you include all the font files necessary? Different browsers support different types. For example, here's one I used on a site recently:

font-face {
font-family: 'GentiumBookBasicRegular';
src: url('_/fonts/GenBkBasR-webfont.eot');
src: url('_/fonts/GenBkBasR-webfont.eot?#iefix') format('embedded-opentype'),
     url('_/fonts/GenBkBasR-webfont.woff') format('woff'),
     url('_/fonts/GenBkBasR-webfont.ttf') format('truetype'),
     url('_/fonts/GenBkBasR-webfont.svg#GentiumBookBasicRegular') format('svg');
font-weight: normal;
font-style: normal;
}

A fantastic resource for this is http://fontsquirrel.com - they'll even let you upload fonts that they don't have and they'll create the package and the css for you.

Upvotes: 2

Related Questions