2012-04-30 44 views
0

我正在嘗試使用typefront.com中的字體。它適用於所有其他瀏覽器,但Firefox中的安全限制不允許使用來自其他域的字體。@ font-face不適用於跨域的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

+0

你能提供網址到頁面嗎? – breezy

+1

'Access-Control-Allow-Origin'標頭需要在'typefront.com'服務器上添加,而不是在你的。你可以問他們這些。如果他們不添加標題,那麼唯一的解決方案就是將字體託管在您自己的服務器上。 –

+0

只是在那裏添加鏈接!謝謝回覆! – Ashmore11

回答