火狐@ font-face失败与fontawesome [英] firefox @font-face fail with fontawesome

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

问题描述

我正在运行的OSS应用程序上使用FontAwesome字体,而且似乎无法通过Firefox的字体清理程序。

这些文件都是在同一个域中提供的,路径是正确的,而且我使用的是官方的FontAwesome中的css,通过他们的网站当地的文档。

所以我必须缺少一些简单的。



活网址: https://bmark.us

  [ 11:39:02.945]可下载的字体:无效的版本标签(font-family:FontAwesome样式:正常体重:正常拉伸:正常src索引:0)
来源:http://127.0.0.1:6543/ static / font / fontawesome-webfont.eot @ http://127.0.0.1:6543/static/css/responsive.css
[11:39:02.945]可下载字体:被sanitizer拒绝(font-family: FontAwesome样式:正常体重:正常拉伸:正常src索引:0)
来源:http://127.0.0.1:6543/static/font/fontawesome-webfont.eot @ http://127.0.0.1: 6543 / static / css / responsive.css

是Firefox错误的示例,当我尝试纠正他通过开发。我已经尝试完整的根路径/静态/字体和相对于CSS ../font/它总是失败,这些错误对我来说。

一切正常在Chrome等。这似乎只是Firefox讨厌我。我已经搜索了其他的答案,我已经得到了整个系列的字体。



https: //github.com/mitechie/Bookie/tree/develop/bookie/static/font



感谢您的任何提示。

解决方案

谢谢,这是一个两部分问题。

第二部分是第一部分。来自fontawesome.scss的示例css在各种字体格式的路径周围使用单引号。当我把我的scss builder(pyscss)放在它们上面的时候,就把它剥掉了。他们需要双引号。

由于没有引号,FF未能解析src:url(...)位。由于它失败了,它只有src:..eot这是意味着IE浏览器,并没有在FF工作。



将引号改为双引号使得所有的事情都变得愉快。

所以这是我使用pyscss的错,它是解析器最终打破了Firefox的语法。



谢谢马特帮助我仔细看看这个。

I'm using the FontAwesome font on an OSS app I'm running and I can't seem to get past Firefox's font sanitizer.

The files are all served out the same domain, the paths are correct, and I'm using the official css from FontAwesome which works in Firefox when served via their site and the local docs.

So I must be missing something simple.

live url: https://bmark.us

[11:39:02.945] downloadable font: invalid version tag (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:0)
source: http://127.0.0.1:6543/static/font/fontawesome-webfont.eot @ http://127.0.0.1:6543/static/css/responsive.css
[11:39:02.945] downloadable font: rejected by sanitizer (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:0)
source: http://127.0.0.1:6543/static/font/fontawesome-webfont.eot @ http://127.0.0.1:6543/static/css/responsive.css

Are examples of Firefox's errors when I try to correct this via dev. I've tried to do full root paths /static/font and relative to the css ../font/ and it always fails with these errors for me.

Everything works in Chrome and such. It only seems Firefox hates me. I've searched through the other answers and I've got the whole series of font faces.

https://github.com/mitechie/Bookie/tree/develop/bookie/static/font

Thanks for any hints.

解决方案

Thanks, this was a two part problem.

The second part comes first. The sample css from the fontawesome.scss uses single quotes around the paths of the various font formats. When I ran my scss builder (pyscss) on them, it stripped them. They needed to be double quotes.

Since there were no quotes, FF failed to parse the src: url(...) bit. Since it failed that it only had the src: ..eot that's meant for IE to have and it didn't work in FF.

Changing the quotes to double quotes made everything happy.

So this is my fault using pyscss and it's parser that ended up breaking the syntax for Firefox.

Thanks Matt for helping me look closer at this.

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

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