4

I have a problem with @font-face fonts not loading in IE9. IE8 and below works perfect, as do every other browser I've tried. This is my CSS (font squirrel syntax):

@font-face {
 font-family: 'ssmicon';
 src: url('ssmfont3.eot');
 src: url('ssmfont3.eot?#iefix') format('embedded-opentype'),
  url('ssmfont3.woff') format('woff'),
  url('ssmfont.ttf') format('truetype'),
  url('ssmfont.svg#svgssmfont') format('svg');
 font-weight: normal;
 font-style: normal;
}

All glyphs are in the basic latin range (I read somewhere that IE could have an issue otherwise) and at the same server (so no cross domain issue). I have set Access-Control-Allow-Origin to * just in case. Still no success (at least not according to http://netrenderer.com/. Unfortunately, I don't have access to an IE browser at the moment). Here is a page affected: http://xn--ssongsmat-v2a.nu/ssm/Test3

Any other ideas what specific requirements IE9/10 might have when it comes to web fonts?

leo
  • 8,106
  • 7
  • 48
  • 80
  • I have had a similar problem before, I think maybe re downloading the kit might have been the fix. – Rchristiani Nov 07 '12 at 16:46
  • 1
    I can confirm that the problem exists on IE 9 in Standards Mode (on Windows 7). Not in Quirks Mode. There are cryptic error messages in the console log. The CSS code for the page is bulky, so I suggest that you try to isolate the issue, starting from a simple page that only sets the downloadable font. – Jukka K. Korpela Nov 07 '12 at 17:01
  • 1
    compass produces such a line and works in ie: src: url('../fonts/.eot?#iefix') format('eot'); – philipp Nov 07 '12 at 17:55
  • 1
    My current best guess is that it might be css minification that causes trouble. Still investigating, though. – leo Nov 08 '12 at 10:47

1 Answers1

5

This was a minification issue after all. Seems like IE9 and IE10 are very picky about line breaks being kept in some places, so font-face declarations have to be kept away from all minification.

leo
  • 8,106
  • 7
  • 48
  • 80
  • 2
    I've been working on this issue for months now and have gone through all sorts of 'fixes' from people and through my own experimentation. To find that the real answer is just not to minify the font-face code for IE just blows me away. Perhaps it shouldn't as IE has been the biggest pain in the ass for years so why not something silly like this too. Damn MS... – FlyboyArt Mar 13 '13 at 07:56
  • @FlyboyArt I feel your pain. I'll never accept another job when I have to make sure IE looks passable. – Mauricio Pasquier Juan May 26 '14 at 23:48