@ font-face在Firefox中不跨域工作

时间:2012-04-30 12:02:20

标签: css .htaccess firefox css3 permissions

我正在尝试使用typefront.com中的字体。它适用于所有其他浏览器,但Firefox中的安全限制不允许使用来自不同域的字体。

我尝试创建.htaccess文件并添加以下代码片段但是当我尝试加载网站时,我收到了内部服务器错误页面!

<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "http://mydomain.com"
</IfModule>
</FilesMatch>

这是我的CSS代码:

@font-face {
  font-family: "Gravur-CondensedBold";
  src: url("http://typefront.com/fonts/825589026.eot");
  src: local("☺"),
       url("http://typefront.com/fonts/825589026.woff") format("woff"),
       url("http://typefront.com/fonts/825589026.ttf") format("truetype"),
       url("http://typefront.com/fonts/825589026.svg") format("svg");
}

@font-face {
  font-family: "Gravur-CondensedLight";
  src: url("http://typefront.com/fonts/825589027.eot");
  src: local("☺"),
       url("http://typefront.com/fonts/825589027.woff") format("woff"),
       url("http://typefront.com/fonts/825589027.ttf") format("truetype"),
       url("http://typefront.com/fonts/825589027.svg") format("svg");
}

有人可以帮我吗?

这是网址:http://www.enjoythisyeah.com