为什么这些字体之一在 IE8 中呈现,而其他字体却没有? [英] Why does one of these font-face render in IE8, but the others don't?

查看:15
本文介绍了为什么这些字体之一在 IE8 中呈现,而其他字体却没有?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么这个字体在 IE8 中呈现:

@font-face {字体系列:'Aller';src: url('aller_rg-webfont.eot');src: url('aller_rg-webfont.eot?#iefix') 格式('embedded-opentype'),url('aller_rg-webfont.woff') 格式('woff'),url('aller_rg-webfont.ttf') 格式('truetype'),url('aller_rg-webfont.svg#AllerRegular') 格式('svg');字体粗细:正常;字体样式:正常;}

这不会:

@font-face {字体系列:'香槟';src: url('champreg-webfont.eot');src: url('champreg-webfont.eot?#iefix') 格式('embedded-opentype'),url('champreg-webfont.woff') 格式('woff'),url('champreg-webfont.ttf') 格式('truetype'),url('champreg-webfont.svg#Champagne&LimousinesRegular') 格式('svg');字体粗细:正常;字体样式:正常;}

我实在想不通.显然,所有其他浏览器都可以正常工作.

解决方案

尝试使用在线 woff/ttf/svg 到 eot 转换器与其他文件之一创建一个新的 .eot 文件.

如果这个新文件不起作用,那么可能是字体本身有问题.如果字体名称和系列名称在实际字体文件中不同,有时 IE6-8 会很合适.修复它:

  • 您需要下载FontForge
  • 打开字体
  • 从菜单中选择Element > Font Info
  • 确保字体名称、姓氏和人类名称都相同
  • 将字体另存为 TTF 或 OTF,然后使用在线转换器导出 EOT 文件.

我在 font-face 遇到的每个问题 - 如果 CSS 是正确的 - 使用上述两种解决方案之一,祝你好运:-) 甚至可以尝试在 FontForge 中不做任何更改的情况下保存字体并在线转换在你摆弄名称属性之前.

Why does this fontface render in IE8:

@font-face {
  font-family: 'Aller';
  src: url('aller_rg-webfont.eot');
  src: url('aller_rg-webfont.eot?#iefix') format('embedded-opentype'),
       url('aller_rg-webfont.woff') format('woff'),
       url('aller_rg-webfont.ttf') format('truetype'),
       url('aller_rg-webfont.svg#AllerRegular') format('svg');
  font-weight: normal;
  font-style: normal;
}

And this does not:

@font-face {
  font-family: 'Champagne';
  src: url('champreg-webfont.eot');
  src: url('champreg-webfont.eot?#iefix') format('embedded-opentype'),
       url('champreg-webfont.woff') format('woff'),
       url('champreg-webfont.ttf') format('truetype'),
       url('champreg-webfont.svg#Champagne&LimousinesRegular') format('svg');
  font-weight: normal;
  font-style: normal;
}

I really can't figure it out. All other browsers work fine, obviously.

解决方案

Try creating a new .eot file with one of the others using an online woff/ttf/svg to eot convertor.

If this new file doesn't work, then it might be a problem with the font itself. Sometimes IE6-8 has a fit if the Fontname and Family Name are not the same within the actual font file. To fix it:

  • You'll need to download FontForge
  • Open up the font
  • From the menu, choose Element > Font Info
  • Ensure the Fontname, Family Name and Name for Humans are all the same
  • Save the font as a TTF or OTF and use an online convertor to spit out an EOT file.

Every issue I've had with font-face - if the CSS was correct - worked with one of the above two solutions, so good luck :-) Maybe even try saving the font without any changes in FontForge and converting that online before you fiddle with the name properties.

这篇关于为什么这些字体之一在 IE8 中呈现,而其他字体却没有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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