字体不在10或11中呈现

时间:2014-03-27 02:37:36

标签: css internet-explorer font-face

我的网站: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中的一切看起来都很棒。有什么想法吗?

2 个答案:

答案 0 :(得分:3)

要解决此问题,只需将-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;
}

答案 1 :(得分:1)

查看您网站的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。

相关问题