Fontello Glyph Font odd behaviour on Firefox, shows unicode codes instead of icons

孤街浪徒 提交于 2019-12-04 09:37:45

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/15636949/fontello-glyph-font-odd-behaviour-on-firefox-shows-unicode-codes-instead-of-ico

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!