Firefox网络字体未加载 [英] Firefox webfonts not loading

查看:175
本文介绍了Firefox网络字体未加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只有在Firefox中的网络字体有问题,所有其他浏览器(包括IE)都能正常工作。

I'm having an issue with webfonts only in Firefox, all other browsers (including IE) work perfectly.

我的问题是网络字体不会加载

My issues is that the webfonts won't load at all.

我已经看过这个可能的解决方案,编辑htaccess文件(http://www.fontsquirrel.com/blog/2010/11/troubleshooting-font-face-problems ),但我没有运气。

I've looked at this possible solution, editing the htaccess file (http://www.fontsquirrel.com/blog/2010/11/troubleshooting-font-face-problems) but I've had no luck.

我可以说的唯一其他事情是在Firefox的错误控制台中,我收到以下警告:

The only other thing that I can say is in Firefox's error console I get the following warning:


解析src的值时出错。跳过到下一个声明

Error in parsing value for "src". Skipped to the next declaration.

下面是我的 font-face 代码:

@font-face {
    font-family:AngelinaRegular;
    src:url(../fonts/angelina-webfont.eot);
    src:url(../fonts/angelina-webfont.eot?iefix) format(eot), url(../fonts/angelina-webfont.woff) format(woff), url(../fonts/angelina-webfont.ttf) format(truetype), url(../fonts/angelina-webfont.svg#webfontOvuhCGpN) format(svg);
    font-weight:normal;
    font-style:normal;
}

任何想法?

推荐答案

根据我的经验,Firefox很擅长预期 @ font-face 规则中的引号:

In my experience, Firefox is picky about expecting quotes in @font-face rules:

@font-face {
    font-family: AngelinaRegular;
    src: url('../fonts/angelina-webfont.eot');
    src: url('../fonts/angelina-webfont.eot?#iefix') format('embedded-opentype'),
        url('../fonts/angelina-webfont.woff') format('woff'),
        url('../fonts/angelina-webfont.ttf') format('truetype'),
        url('../fonts/angelina-webfont.svg#webfontOvuhCGpN') format('svg');
    font-weight: normal;
    font-style: normal;
}

这篇关于Firefox网络字体未加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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