【问题标题】:fonts not rendering in ie 10 or 11字体未在 ie 10 或 11 中呈现
【发布时间】:2014-05-05 19:32:12
【问题描述】:

我的网站:http://arethebaronsplaying.com/

在 IE 10 或 IE 11 中无法正确呈现字体。这是我的 css:

@font-face {
font-family: 'Mono Social Icons Font';
src: asset_url('fonts/MonoSocialIconsFont-1.10.eot');
src: asset_url('fonts/MonoSocialIconsFont-1.10.eot?#iefix') format('embedded-opentype'),
     asset_url('fonts/MonoSocialIconsFont-1.10.woff') format('woff'),
     asset_url('fonts/MonoSocialIconsFont-1.10.ttf') format('truetype'),
     asset_url('fonts/MonoSocialIconsFont-1.10.svg#MonoSocialIconsFont') format('svg');
src: asset_url('fonts/MonoSocialIconsFont-1.10.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}

@font-face {
  font-family: 'hamilton18';
  src: asset_url('fonts/hamilton_wood_type_foundry_-_hwtunitgothic-718-webfont.eot');
  src: asset_url('fonts/hamilton_wood_type_foundry_-_hwtunitgothic-718-webfont.eot?#iefix') format('embedded-opentype'),
   asset_url('fonts/hamilton_wood_type_foundry_-_hwtunitgothic-718-webfont.woff') format('woff'),
   asset_url('fonts/hamilton_wood_type_foundry_-_hwtunitgothic-718-webfont.ttf') format('truetype'),
   asset_url('fonts/hamilton_wood_type_foundry_-_hwtunitgothic-718-webfont.svg#MonoSocialIconsFont') format('svg');
  src: asset_url('fonts/hamilton_wood_type_foundry_-_hwtunitgothic-718-webfont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

在 chrome/safari/firefox 中一切看起来都很棒。有什么想法吗?

【问题讨论】:

  • 你用的是哪个版本的IE
  • 我在 IE 10 和 IE 11 中测试过,看起来都很糟糕。
  • 我建议只使用fontsquirrel.com/tools/webfont-generator之类的工具。
  • 在 IE 中检查控制台,确保所有内容都正确加载并且没有 404。
  • 还有什么理论吗,我已经在字体设置里有eot?#iefix了?

标签: css internet-explorer font-face


【解决方案1】:

要解决这个问题,只需将 -ms-font-feature-settings:"liga" 1; 添加到您的 css 中

例如:

.social .icon {
  -ms-font-feature-settings:"liga" 1;
  font-family:'Mono Social Icons Font';
  -webkit-text-rendering:optimizeLegibility;
  -moz-text-rendering:optimizeLegibility;
  -ms-text-rendering:optimizeLegibility;
  -o-text-rendering:optimizeLegibility;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-font-smoothing:antialiased;
  -ms-font-smoothing:antialiased;
  -o-font-smoothing:antialiased;
  font-smoothing:antialiased;
}

【讨论】:

  • 这对我有用。在我的情况下,字体正在加载,但实际图标没有被渲染。
【解决方案2】:

在你网站的IE中查看控制台,出现如下错误-

“CSS3114:@font-face 未能通过 OpenType 嵌入权限检查。权限必须是可安装的。”

在网络上,这些是讨论此问题和常见解决方案的两个链接: https://github.com/tapquo/lungo.icon/issues/1http://codecanyon.net/forums/thread/css3114-fontface-failed-opentype-embedding-permission-check-permission-must-be-installable/78963

常用解决方案链接: http://carnage-melon.tom7.org/embed/

但是,所讨论的工具似乎仅适用于旧版本的 windows,而不适用于最新版本的 windows。

【讨论】:

  • 这看起来很有希望,非常感谢。无论如何要在mac上解决这个问题?
  • 欢迎您 :),如果此答案对您的问题有所帮助,请根据您的考虑点赞或接受。
  • 最后一个问题...你知道我该如何在 Mac 上解决这个问题吗?
猜你喜欢
  • 2013-09-29
  • 2018-05-01
  • 1970-01-01
  • 1970-01-01
  • 2020-03-02
  • 2015-03-08
  • 1970-01-01
  • 2020-04-20
  • 2014-05-08
相关资源
最近更新 更多