字体不适用于IE8?得到@ font-face遇到未知错误。 [英] font face not working for IE8 ?? getting @font-face encountered unknown error.?

查看:3004
本文介绍了字体不适用于IE8?得到@ font-face遇到未知错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用字体来包含一个名为razing的自定义字体。该字体在IE8中不起作用,但在IE9 +和其他浏览器上运行良好。我在IE8浏览器中查看了控制台,发现 @ font-face遇到了未知错误。我尝试使用svg并修复了像?#iefix ,但它不起作用。请提供一个健康的解决方案来解决这个问题,谢谢!!

 < style> 
@ font-face {
font-family:Razing;
src:url(Fonts / Razing / razing.eot);
src:url(Fonts / Razing / razing.eot?#iefix),
url(Fonts / Razing / razing.ttf),
url(Fonts / Razing / razing.woff),
url(Fonts / Razing / razing.svg)格式('svg');

}
.ABC {font-family:Razing; font-size:20px; }
< / style>

< p class =ABC>< / p>


解决方案

编辑您的字体文件,为Fontname定义相同的名称,姓氏和名称,并导出您的TTF。您可以使用 FontForge 应用程序。 / b>

然后再将它转换为web(EOT,WOFF)。

阅读



通过下载TTF字体的版本使其工作,并将其转换为网页。

CSS

  @ font-face {
字体家庭:放纵;
src:url('fonts / Razing.eot');
src:url('fonts / Razing.eot?iefix')format('opentype'),
url('fonts / Razing.woff')format('woff'),
url('fonts / Razing.ttf')格式('truetype');
font-weight:normal;
font-style:normal;
}


I am using font face to include a customised font named razing. The font is not working in IE8 but works well on IE9+ and other browsers. I checked the console in IE8 browser and i found " @font-face encountered unknown error." I tried using svg and fixes like ?#iefix but it ain't working. Please can u provide a healthy solution to overcome this, Thanks !!

 <style>
  @font-face {
  font-family: Razing;
  src: url(Fonts/Razing/razing.eot);
  src: url(Fonts/Razing/razing.eot?#iefix) ,
 url(Fonts/Razing/razing.ttf),
 url(Fonts/Razing/razing.woff),
 url(Fonts/Razing/razing.svg) format('svg');

  }
.ABC{ font-family:Razing;font-size:20px;  }
</style>

 <p class="ABC"></p>

解决方案

Edit your font file, define identical names for Fontname, Family name and Name and export your TTF. You can use the FontForge application.

And then again convert it for web (EOT, WOFF).

Read

Make it work by downloading version of the TTF font and converted it for web.

CSS

@font-face {
    font-family: 'Razing';
    src: url('fonts/Razing.eot');
    src: url('fonts/Razing.eot?iefix') format('opentype'),
         url('fonts/Razing.woff') format('woff'),
         url('fonts/Razing.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

这篇关于字体不适用于IE8?得到@ font-face遇到未知错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆