2012-11-01 30 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