我有一个网站,我已经实现了自定义字体。在谷歌浏览器和Internet Explorer中,字体显示正常。当我检查firefox时,甚至都没有应用新的字体系列。这就是我所拥有的:
@font-face{
font-family: Bebas Neue;
src: url('fonts/BebasNeue.otf');
}
我尝试在它之后添加格式但是没有修复它。有关.otf无法显示以及.ttf和.eot为何在各自的浏览器中工作的任何建议?
答案 0 :(得分:0)
您是否尝试过使用TTF格式代替OTF for Firefox?有时,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