@font-face IE9 中缺少字符/字形

发布于 2024-12-20 05:16:24 字数 931 浏览 4 评论 0原文

我在 IE9 上使用 @font-face 时遇到一个奇怪的问题。 将我们想要的字体的 TTF 转换为 WOFF、EOT 和 SVG

我使用 font-squirrel 看起来效果很好,我能够使用 Paul Irish 的 @font-face CSS 使该类型在 Chrome/Safari 和 Firefox 上运行。问题是IE9。

在 IE9 中查看时,使用该字体的文本缺少字符。例如

The quick brown fox jumps over the lazy dog

,当

 h   uick bro n fox ju p  o  r th  lazy do

我将每种字体设置为单独的 @font-face 声明以进一步调查时,会出现短语。 Chrome(例如)使用 WOFF、TTF 和 SVG 可以很好地呈现上述短语。奇怪的是,IE9 用相同的缺失字符渲染 WOFF 和 TTF。但它不会加载 EOT。

有谁知道可能是什么原因?任何帮助将不胜感激。

以视觉方式显示上述内容的比较图像

编辑 2011.19.12: 谢谢大家的回答,我'我们仍然没有找到解决这个问题的方法。碰巧,我们的一位设计师找到了他们想要使用的另一种字体,使问题变得不那么重要,但我仍然想弄清楚这一点。

I'm having a strange problem while using @font-face on IE9. I converted a TTF of the typeface we want to WOFF, EOT and SVG using font-squirrel

This worked seemingly well and I was able to use Paul Irish's @font-face CSS to get the type working on Chrome/Safari and Firefox. The problem is IE9.

When viewing in IE9, text using the font is missing characters. For example the phrase

The quick brown fox jumps over the lazy dog

Appears as

 h   uick bro n fox ju p  o  r th  lazy do

I set up each font as a separate @font-face declaration to investigate further. Chrome (for example) renders the above phrase fine using WOFF, TTF and SVG. Bizarrely, IE9 renders WOFF and the TTF with the same missing characters. It does not however load the EOT.

Does anyone have any idea what the cause might be? Any help would be appreciated.

Comparison image showing the above visually

Edit 2011.19.12: Thanks all for your answers, I've still not found a solution to this problem. As it happens, one of our designers has found another font that they want to use, rendering the question less critical, however I'd still like to get to the bottom of this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

森林散布 2024-12-27 05:16:24

对我来说,这听起来像是 IE9 正确呈现格式的方式有问题,但其他浏览器是...要么 (a) 字体类型的兼容性问题,要么 (b) IE 无法处理的转换损坏?我无法重现该症状,因此这可能不是真正的答案。

我会使用 squirrel 进行新的转换,也许会使用脚本来检测浏览器代理并在必要时加载与 IE 最兼容的字体,然后加载适用于 Chrome/FF 和其他 webkit 浏览器的漂亮字体。

让我知道这是否有帮助。

To me it sounds like something is wrong with the way IE9 is rendering the format right but other browsers are... either (a) a compatibility issue with the font type, or (b) corruption in the conversion that IE can't handle? I could not reproduce the symptom so this may not be the true answer.

I would do fresh conversions with squirrel, and perhaps use script to detect browser agent and load the most IE compatible font-faces when necessary, and then the nice ones for Chrome/FF and other webkit browsers.

let me know if this helps.

远山浅 2024-12-27 05:16:24

尝试使用 条件标签来显示可在 IE 中使用的字体。

我会就这个问题联系微软,他们可能会提供修复程序或在 Windows 更新或其他东西上推出一些修补程序。

Try using <!--[if IE9]><[endif]--> conditional tags to display a font that works in IE.

I would contact Microsoft about the issue, they might give a fix or roll out some hotfix on Windows Update or something.

吃不饱 2024-12-27 05:16:24

我遇到了这个确切的问题 - 通过 fontsquirrel.com 创建的两个网络字体在 IE9 中缺少字母,但在其他浏览器中没有。似乎 v9 是唯一一个为 webfonts 拾取 .woff 文件的 IE 版本,尽管其他浏览器可以很好地使用我的浏览器,但 IE 却不能。奇怪的是,我通过使用命令行工具 sfnt2woff 解决了这个问题,该工具转换 .oft & ; .ttf 文件信息 .woff 文件。我保留了 fontsquirrel 生成的所有其他 webfont 文件,但用 sfnt2woff 中的文件替换了两个损坏字体上的 .woffs,并且在 IE9 中一切正常。

I had this exact problem - two webfonts created via fontsquirrel.com had missing letters in IE9 but no other browser. It seems v9 is the only IE version picking up the .woff file for webfonts, and although other browsers used mine just fine, IE did not. Bizarrely, I solved this problem by using the command-line tool sfnt2woff which converts .oft & .ttf files info .woff files. I kept all the other webfont files that fontsquirrel generated, but replaced the .woffs on both broken fonts with those from sfnt2woff, and everything worked fine in IE9.

自在安然 2024-12-27 05:16:24

尝试尝试字母间距,这可能会有所帮助。

http://forums.mozillazine.org/viewtopic.php?f=9& ;t=2326571

Try to experiment with the letter-spacing, this might help.

http://forums.mozillazine.org/viewtopic.php?f=9&t=2326571

非要怀念 2024-12-27 05:16:24

我昨天刚刚在 IE9 上使用 fonts.com 的 webfont 时遇到了这个问题。我们花了几个小时,但我们使用的 .eof 字体在 fonts.com 上不知何故被损坏了。就我而言,我们自行托管字体,而不是通过 JS。因此请仔细检查字体。希望有帮助。

I just ran into this exact problem yesterday with fonts.com's webfont on IE9 only. Took us hours, but the .eof fonts we were using were somehow corrupted on fonts.com. In my case, we were self hosting the fonts, not via JS. So double check the fonts. Hope that helps.

洒一地阳光 2024-12-27 05:16:24

今天使用 MyFonts 的 Cantoni 时遇到了这个问题。在除 IE9 之外的所有浏览器中都显示良好。我在一些地方使用它作为标题。每个标题上的前一个或两个字符都会消失。

我唯一能可靠地修复它的就是在每个缺失字母的标题前添加一个   。不是很干净,也不太清楚为什么它有效,但它对我有用。不幸的是,它要求我使用负文本缩进将标题向后移动以使其正确对齐。

Had this issue today using Cantoni from MyFonts. Displays fine in everything but IE9. I'm using it for headers in a few places. The first one or two characters disappear on every header.

The only thing I did the managed to reliably fix it was adding a   before the header for each missing letter. Not very clean and not too sure why it is working, but it does for me. Unfortunately, it then requires me to use a negative text indent to shift the header back over for it to properly align.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文