2011-05-10 75 views
4

我的一個網站的font-squirell生成的@ font-face代碼有問題。字體不顯示在Internet Explorer 7中。與其他瀏覽器一起使用效果很好。 地址是:http://www.mrsherskin.com@ Internet Explorer 7中的font-face問題

@font-face { 
    font-family: 'PFRondaSeven'; 
    src: url('font/pf_ronda_seven-webfont.eot'); 
    src: url('font/pf_ronda_seven-webfont.eot?iefix') format('eot'), 
     url('font/pf_ronda_seven-webfont.woff') format('woff'), 
     url('font/pf_ronda_seven-webfont.ttf') format('truetype'), 
     url('font/pf_ronda_seven-webfont.svg#webfont7vFUbybx') format('svg'); 
    font-weight: normal; 
    font-style: normal; 
} 

@font-face { 
    font-family: 'PFRondaSeven'; 
    src: url('font/pf_ronda_seven_bold-webfont.eot'); 
    src: url('font/pf_ronda_seven_bold-webfont.eot?iefix') format('eot'), 
     url('font/pf_ronda_seven_bold-webfont.woff') format('woff'), 
     url('font/pf_ronda_seven_bold-webfont.ttf') format('truetype'), 
     url('font/pf_ronda_seven_bold-webfont.svg#webfont2zOjOL6G') format('svg'); 
    font-weight: bold; 
    font-style: normal; 
} 

/* basic font-set */ 

body { font-family: 'PFRondaSeven'; font-size-adjust: 0.62; } 

這很奇怪,因爲我還有一個網站,我用這種方法制成,它完美的作品。

請幫忙嗎?可能是什麼問題呢?

回答

4

試試這個:

@font-face { 
font-family: 'Avenir'; 
src: url('avenirl8-webfont.eot'); 
src: local('☺'), url('avenirl8-webfont.woff') format('woff'), url('avenirl8-webfont.ttf') format('truetype'), url('avenirl8-webfont.svg#webfontIFZXxqn6') format('svg'); 
font-weight: normal; 
font-style: normal; 
} 

用自己的課程更換字體和添加的字體爲粗體的聲明瞭。它應該工作;)

+1

謝謝,笑臉解決了問題:-)! 最好的問候,煤氣 – Gas 2011-05-10 18:10:43

+0

@煤氣沒問題;) – Krimo 2011-05-11 06:41:42

+0

笑臉規則!我花了這麼多時間:(。謝謝! – Arvid 2011-10-30 11:44:40

0

你確定eot文件有正確的mimetype?

我通常將它添加到我的.htaccess文件(或等同於不同的軟件)

AddType application/vnd.ms-fontobject eot 
AddType font/ttf      ttf 
AddType font/otf      otf 
AddType font/x-woff     woff 

AddType text/x-component .htc 
+0

當我將這個複製到我的.htaccess中時,它會破壞網站: - ((我不得不重做一些舊版本的 – Gas 2011-05-10 11:35:41

+0

這很奇怪 - 也許你的主機不允許這樣的指令。 – 2011-05-10 12:31:10

3

如果它的工作原理IE9但不是IE7/8,這個問題的一個可能是EOT的格式不正確。我用"Fontsquirrel, @font-face generator Expert Mode"修復了它。檢查「保護:WebOnly」

+0

這一個肯定爲我工作,謝謝。 – Rich 2013-07-08 06:46:45