2

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';

}
Mild Fuzz
  • 29,463
  • 31
  • 100
  • 148

2 Answers2

1

Place this in .htaccess

<FilesMatch "\.(ttf|otf|eot)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
</FilesMatch>
Mild Fuzz
  • 29,463
  • 31
  • 100
  • 148
0

I downloaded the font you are using and can (sort of) reproduce the problem.

If you define the @font-face twice, one with broken URLs and one with correct URLs, Firefox4 and Safari5 do not show the font at all but Chrome12 and Firefox3 are fine.

The order of the correct verses broken @font-face rules is also important as Firefox4 and Opera11 will only display the font if the correct rule is the last one. Safari5 will not display the font at all if there is a broken URL, regardless of the order.

Edit: Ah, if it's broken in Firefox 3 also, it might be Firefox Bug 567573

andyb
  • 43,435
  • 12
  • 121
  • 150
  • an .htaccess hack from another question fixed it -> see comments. – Mild Fuzz Apr 20 '11 at 15:51
  • 1
    Oh **that** problem! Was an interesting investigation for me nonetheless, if only to highlight that browsers are handling the invalid URLs very differently. – andyb Apr 20 '11 at 15:54