1

@font-face not working in Firefox 3.6.14 - WOFF or TTF

@font-face {
    font-family: "A-B";
    src: url("fonts/AlexandriaFLF-Bold.woff") format("woff"),
         url("fonts/AlexandriaFLF-Bold.ttf") format("truetype"),
         url("fonts/AlexandriaFLF-Bold.svg#webfontm3eq21Q4") format("svg");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'A-BI';
    src: url("fonts/AlexandriaFLF-BoldItalic.woff") format("woff"),
         url("fonts/AlexandriaFLF-BoldItalic.ttf") format("truetype"),
         url("fonts/AlexandriaFLF-Bold.svg#webfontszsn4DPI") format("svg");
    font-weight: normal;
    font-style: normal;
}

Can Anyone enlighten me?

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
jhui
  • 77
  • 2
  • 12

2 Answers2

4

FIX:

I was using a .htaccess file for a mod re-write and it effected @font-face...

The workaround is to place this in the .htaccess file:

<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
jhui
  • 77
  • 2
  • 12
  • The reason you needed this has nothing to do with fonts. It's because you were trying to serve content from a different origin. – ide Mar 04 '11 at 00:07
  • +1 See also http://stackoverflow.com/questions/2892691/font-face-fonts-only-work-on-their-own-domain/2892697#2892697 – BoltClock Mar 04 '11 at 00:20
-3

I'd also like to chime in. I just had a similar issue due to referencing the site as www.domain.com instead of domain.com.

This was in my main stylesheet as an import for the font css file

@import url('http://www.domain.com/font.css'); - not working


@import url('http://www.domain.com/font.css'); - working