本文介绍了字体真棒不正确显示在Firefox上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在安装在客户网站上的小部件中使用字体超棒的图标。在Safari和Chrome中字体超棒的图标显示正确,但不在Firefox中。但是,在我们的网站上预览时,它仍然可以正确显示在Firefox中。这与Firefox如何跨域显示第三方字体有关吗?



任何想法将不胜感激。感谢。

注意:这是使用Firefox V9及以上版本进行测试的结果。 Firefox只允许字体所在的服务器发送正确的CORS头文件,才允许跨域连接字体。它这样做是因为规范非常清楚地说要做到这一点,在


I am trying to use a font awesome icon in a widget that is installed on a customers website. The font awesome icons displays correctly in Safari and Chrome but doesnt in Firefox. However, it still displays correctly in Firefox when previewing it on our site. Does this have something to do with how Firefox displays third party fonts across domains?

Any ideas would be greatly appreciated. Thanks.

Note: This was tested using Firefox V9 and above.

解决方案

Firefox only allows cross-domain linking of fonts if the server the font is on sends the right CORS headers. And it does this because the spec very clearly says to do it, at http://dev.w3.org/csswg/css3-fonts/#default-same-origin-restriction

这篇关于字体真棒不正确显示在Firefox上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 05:59