Search code examples
cssfirefoxfont-face

@font-face font stacks suddenly died in firefox


The following CSS has been working for a good week or so, I have skipped back through the GIT repo to see where it breaks and it seems to be broken in all of the commits (leading me to believe I haven't done anything wrong).

Still works in Chrome.

@font-face {
    font-family: 'Blackout2AM';
    src: url('../fonts/Blackout-fontfacekit/Blackout-2am-webfont.eot');
    src: url('../fonts/Blackout-fontfacekit/Blackout-2am-webfont.eot?iefix') format('eot'),
         url('../fonts/Blackout-fontfacekit/Blackout-2am-webfont.woff') format('woff'),
         url('../fonts/Blackout-fontfacekit/Blackout-2am-webfont.ttf') format('truetype'),
         url('../fonts/Blackout-fontfacekit/Blackout-2am-webfont.svg#webfontXyt5a0LX') format('svg');
    font-weight: normal;
    font-style: normal;

}

.sidebar h2, .sidebar h3 a, #footer .menu a, .switcher li a, .dateLinks a{
    font-family: 'Blackout2AM';

}

Solution

  • Place this in .htaccess

    <FilesMatch "\.(ttf|otf|eot)$">
        <IfModule mod_headers.c>
            Header set Access-Control-Allow-Origin "*"
        </IfModule>
    </FilesMatch>