Posted By

fatihturan on 02/04/11


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Fontsprings New Bulletproof @font-face Syntax — Tweaked by CSSNinja

 / Published in: CSS


Fontspring introduced an improved syntax for the bulletproof syntax. The genius was in a parser bug in IE>9 that would stop reading a font-face at-rule if it came to a hash (#), it would think it was a url fragment and stop parsing from there. I wasn't happy with the fact that IE9 still downloaded the EOT font when it happily supports the WOFF format. So a little hacking and we have a slightly modified version that will download the WOFF font in IE9.

  1. @font-face {
  2. font-family:InYourFace;
  3. src: url('Ubuntu-B.eot#') format('☺'),
  4. url('Ubuntu-B.woff') format('woff'),
  5. url('Ubuntu-B.ttf') format('truetype'),
  6. url('Ubuntu-B.svg#webfontssbCkuz5') format('svg');
  7. }

Report this snippet  

You need to login to post a comment.