IE9 officially supports the new
WOFF format for embedding webfonts. And there was much rejoicing. But, the question that’s been nagging away at me has been: how do we as web developers account for IE’s legacy
EOT format while giving preferential treatment to the emerging
The short answer is: keep using Paul Irish’s bulletproof smiley syntax.
WOFF will be loaded by browsers that understand it, and legacy IE versions (8 and under) will load
The long answer: every
src declaration within the
@font-face block effectively resets the CSS parser’s attempt to find the appropriate font file. The rendering engine will use the first viable font source in the last
src declaration inside each @font-face block. Paul Irish’s smiley syntax works perfectly here, since the first
src declaration is only understood by IE < 9 (due to the
EOT format), while the second
src declaration is understood by >= IE9 and all other good browsers.
This produces a win-win situation. Good browsers that aren’t IE ignore the first
src declaration because
EOT is not viable to them. IE9 prefers the second
src declaration because it understands