自定义字体,eot,不工作

时间:2011-05-11 12:24:03

标签: html5 fonts css3 embedded-fonts

我无法让自定义字体在IE7和IE8中运行:

http://i-creative.dk/iJob/

它在IE9,Firefox和Chrome中运行良好......

对于Firefox和Chrome,字体采用TTF格式 而对于IE,它在EOT

但是,它只适用于IE9 :(

3 个答案:

答案 0 :(得分:4)

请尝试使用此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没有渲染字体。

答案 1 :(得分: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 */
    }

答案 2 :(得分:0)

您需要为EOT文件发送正确的mime类型。在apache中,将此文件添加到.htaccess文件中应该可以正常工作。

AddType application/vnd.ms-fontobject eot
AddType font/ttf                      ttf
AddType font/otf                      otf
AddType font/x-woff                   woff
相关问题