2011-05-11 80 views

回答

3

试试这个CSS格式来代替:

@font-face { 
    font-family: 'fontName'; 
    src: url('/path/to/font.eot?') format('eot'), 
     url('/path/to/font.otf') format('otf'), 
     url('/path/to/font.ttf') format('truetype'); 
} 

这是我使用(没有的OTF,WOFF & SVG代替)。我从来没有任何的IE浏览器不呈现字体。

+0

我需要@adedoy的答案IE9部分为了这个工作。 – 8bitjunkie 2013-07-03 20:46:38

0

您需要发送日e EOT文件的正确MIME类型。在Apache中,将此添加到您的.htaccess文件应该工作。

AddType application/vnd.ms-fontobject eot 
AddType font/ttf      ttf 
AddType font/otf      otf 
AddType font/x-woff     woff 
2
@font-face { 
    font-family: Graublauweb; /*any name for your font*/ 
    src: url('Graublauweb.eot'); /* IE9 Compatibility Modes */ 
    src: url('Graublauweb.eot?') format('eot'), /* IE6-IE8 */ 
    url('Graublauweb.woff') format('woff'), /* Modern Browsers */ 
    url('Graublauweb.ttf') format('truetype'), /* Safari, Android, iOS */ 
    url('Graublauweb.svg#svgGraublauweb') format('svg'); /* Legacy iOS */ 
    }