最近在使用Awesome字体的时候遇到了Firefox下字体乱码的问题,经过很多尝试确认是字体不允许跨域共享导致的,随后更改了Nginx服务器跨域共享的设置,解决了问题
在Nginx配置文件里, Server里加入如下即可:
location ~* \.(eot|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}
<FilesMatch “\.(ttf|otf|eot|woff)$”>
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin “*”
</IfModule>
</FilesMatch>