F Blog Home
February 21, 2011
For context, please read our earlier post about this syntax.
A potential looming problem with the new syntax we introduced earlier this month was raised by Microsoft. The soon-to-be-released IE9 comes with a feature that allows it to render in both IE7 and IE8 Modes. In these two modes, Microsoft 'fixed' the parser bug that affected the actual IE7 and IE8. This fix breaks the @font-face syntax for those compatibility modes.
Therefore, in the interest of forward compatibility, we're recommending a tweak to the syntax to address this issue.
@font-face { font-family: 'MyWebFont'; src: url('webfont.eot'); /* IE9 Compat Modes */ src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('webfont.woff') format('woff'), /* Modern Browsers */ url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */ url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */ }
This syntax is exactly the same as our previous iteration with the addition of a second 'src:' attribute that specifies the EOT again. We'll leave it up to you to decide if this is necessary.
It certainly mucks the code which we worked hard to clean, but you gotta do what you gotta do.
Safari, IE 6-9, IE 9 Compatibility Modes, Firefox, Chrome, iOS, Android, Opera
Ruana
February 21, 2011 at 06:21 PM
Jonatas Miguel
February 22, 2011 at 12:37 PM
Paul Irish
<meta http-equiv="X-UA-Compatible" content="IE=edge">
in your markup. Then you're safe from this and many other gotchas. February 22, 2011 at 02:09 PM
Seth Stahlman
February 24, 2011 at 02:50 AM
Ethan Dunham
February 24, 2011 at 02:34 PM
Seth Stahlman
February 24, 2011 at 06:07 PM
Brett
February 27, 2011 at 10:24 AM
Richard Fink
February 27, 2011 at 08:14 PM
Stephanie (Sullivan) Rewis
February 28, 2011 at 11:39 AM
iDGS
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Saying, e.g.,February 28, 2011 at 07:37 PM
Ethan Dunham
February 28, 2011 at 09:08 PM
iDGS
March 1, 2011 at 02:20 AM
Ahmad Alfy
March 2, 2011 at 07:51 AM
Ethan Dunham
March 2, 2011 at 09:39 AM
blowski
March 2, 2011 at 11:04 AM
Toby
March 2, 2011 at 12:04 PM
John
March 2, 2011 at 12:59 PM
Seth Meranda
March 7, 2011 at 01:59 PM
Ethan Dunham
March 7, 2011 at 03:13 PM
David
March 8, 2011 at 02:10 PM
Ethan Dunham
March 8, 2011 at 02:11 PM
David
March 8, 2011 at 02:57 PM
Gabby
March 19, 2011 at 08:49 AM
Charles Scott
March 22, 2011 at 06:19 AM
Ethan Dunham
March 22, 2011 at 10:49 AM
Charles Scott
March 22, 2011 at 11:31 AM
Evert
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
<FilesMatch "\.(html|htm|php)$">
BrowserMatch MSIE ie
Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
Header set imagetoolbar "no" env=ie
</FilesMatch>
Header append Vary User-Agent
</IfModule>
</IfModule>
March 24, 2011 at 09:27 AM
Stuart
March 25, 2011 at 07:52 AM
Andre Morgan
March 28, 2011 at 04:16 PM
Carmen Cardoza
March 29, 2011 at 01:24 PM
Luka Cosic
April 2, 2011 at 08:04 PM
Koen Maes
April 5, 2011 at 09:35 AM
Tonttu
April 5, 2011 at 09:48 AM
Marc
April 7, 2011 at 01:59 PM
Tonttu
April 8, 2011 at 12:25 PM
Christie
April 15, 2011 at 09:48 AM
Tonttu
April 17, 2011 at 09:07 AM
Raf
April 21, 2011 at 04:21 AM
Raf
April 21, 2011 at 04:48 AM
Ethan Dunham
April 21, 2011 at 09:38 AM
Scott Shumaker
April 28, 2011 at 01:14 AM
Jay
May 17, 2011 at 05:46 PM
Comments are closed.