Fontello字形在Firefox上字体奇怪的行为,显示unicode代码而不是图标 [英] Fontello Glyph Font odd behaviour on Firefox, shows unicode codes instead of icons
问题描述
在右上角有一些社交图标。它显示在Chrome浏览器(本地和网络服务器),它显示在本地的FF 好,但在在线页我看到里面的Unicode代码的方形占位符。
奇怪的是,如果我通过 Source Edit 打开Firebug并更正fontello.css,图标就会奇迹般地出现看来,这甚至与微不足道的更正,如添加,然后删除空白。
这真是令我费解。任何建议吗?
我已经设法解决这个奇怪的问题。原来这是一个Apache问题,得到了解决方案: http: //www.fontsquirrel.com/blog/2010/11/troubleshooting-font-face-problems
我已经添加到我的 .htaccess
如下行:
如果你是从Apache提供的,你可以将它添加到中。 htaccess
文件允许您的站点访问字体:
$ p $ < FilesMatch\。( TTF | OTF | WOFF)$>
< IfModule mod_headers.c>
Header set Access-Control-Allow-Origin*
< / FilesMatch>
现在字体可以。
I have a webpage. In its upper right corner I have some social icons. It shows okay in Chrome (both local and on the webserver), it shows ok in local FF, but on the online page I see the square placeholders with the Unicode codes inside.
Oddly enough, if i open Firebug and correct the fontello.css on the fly via Source Edit, the icons appear magically, or so it seems, and this even with trivial corrections like adding and then removing a whitespace.
This is really puzzling me. Any suggestions?
I've managed to solve this strange issue. Turned out it was an Apache problem, got the solution from: http://www.fontsquirrel.com/blog/2010/11/troubleshooting-font-face-problems
I've added to my .htaccess
the following lines:
If you are serving from Apache, you can add this to your .htaccess
file to allow your site access to the fonts:
<FilesMatch "\.(ttf|otf|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
and the font now is ok.
这篇关于Fontello字形在Firefox上字体奇怪的行为,显示unicode代码而不是图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!