2012-11-01 31 views
2

我有一個網站,我已經實現了自定義字體。在谷歌瀏覽器和Internet Explorer中,字體正確顯示。當我檢查Firefox時,新的字體系列甚至沒有被應用。這是我有:Firefox的字體嵌入不起作用

@font-face{ 
font-family: Bebas Neue; 
src: url('fonts/BebasNeue.otf'); 
} 

我試着在它後面添加格式,但沒有解決它。爲什麼.otf不會顯示以及爲什麼.ttf和.eot會在各自的瀏覽器中運行?

+0

錯誤控制檯中的任何錯誤? –

回答

0

您是否嘗試過使用TTF格式代替Firefox的OTF?有時,Firefox也需要WOFF字體格式才能顯示字體,具體取決於您如何爲它們提供服務。我會假設你有Firefox 3.6或更高版本,但這也可能是問題所在。下面的代碼片段是Font Squirrel的@ font-face標準,可能對您有用。

@font-face { 
    font-family: 'Bebas Neue'; 
    src: url('fonts/BebasNeue.eot'); 
    src: url('fonts/BebasNeue.eot?#iefix') format('embedded-opentype'), 
     url('fonts/BebasNeue.svg') format('svg'), 
     url('fonts/BebasNeue.svg#Bebas Neue') format('svg'), 
     url('fonts/BebasNeue.woff') format('woff'), 
     url('fonts/BebasNeue.ttf') format('truetype'); 
    font-weight: normal; 
    font-style: normal; 
} 

我希望這個信息可以幫助你。祝你好運!如果你需要更多信息,請告訴我或查看本文中的Firefox標題:http://www.fontsquirrel.com/blog/2010/11/troubleshooting-font-face-problems