Internet Explorer @font-face 失败 [英] Internet Explorer @font-face is failing

查看:24
本文介绍了Internet Explorer @font-face 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让 Internet Explorer 呈现我漂亮的字体.它不工作.它们在 Firefox 中运行良好,我可以在我的 Apache 访问日志中看到 IE 已提取字体.所以它正在解析 font-face CSS 标签,只是不渲染它们.

I'm trying to get Internet Explorer to render my pretty fonts. It's not working. They work fine in Firefox and I can see in my Apache access logs that IE has pulled the fonts. So it's parsing the font-face CSS tag, just not rendering them.

我用来转换字体的网站是:http://www.kirsle.net/向导/ttf2eot.cgi.我试过微软的 WEFT 工具,但它不能正常工作.安装打开后,提示第一次运行,做这个……"然后就一直挂了.

The site I used to convert the fonts was: http://www.kirsle.net/wizards/ttf2eot.cgi. I tried that WEFT tool by Microsoft but it wouldn't work properly. After installing and opening it, it said 'First time running it, do this...' then it continually hanged.

这是我的 CSS:

@font-face
{
   font-family: 'HelveticaLTCN';
   src: url('HelveticaNeueLTCom-LtCn_0.eot');
   src: local('HelveticaNeuel TCom LtCn'), url('HelveticaNeueLTCom-LtCn_0.ttf') format('TrueType');
}

关于为什么 IE 不呈现字体的任何想法?

Any ideas as to why IE isn't rendering the fonts?

还应该提到,我用以下方式调用字体:

Should also mention, I'm calling the font with:

p .mytext
{
   font-family: HelveticaLTCN;
}

推荐答案

如果您已经认输或仍在为此苦苦挣扎,我强烈推荐字体松鼠.它比任何其他在线 .eot 生成器更好地替代了 WEFT.作为一个巨大的奖励,它在一个 zip 文件中提供了所有需要的跨浏览器格式以及一个有效的 CSS+HTML 示例页面.这是迄今为止最接近@fontface 必杀技的东西.

If you've thrown in the towel or you're still struggling with this I strongly recommend font squirrel. It replaces WEFT far better than any of the other online .eot generators. As a huge bonus, it supplies all needed cross-browser formats in one zip file along with a working CSS+HTML sample page. It's the closest thing yet to @fontface nirvana.

这篇关于Internet Explorer @font-face 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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