【问题标题】:Firefox font-face embed does not workFirefox 字体嵌入不起作用
【发布时间】:2012-10-21 13:43:11
【问题描述】:

我有一个网站,我在其中实现了自定义字体。在 google chrome 和 Internet Explorer 中,字体正确显示。当我检查 firefox 时,甚至没有应用新的字体系列。这就是我所拥有的:

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

我尝试在它之后添加格式,但这并没有解决它。有什么建议为什么 .otf 不会显示以及为什么 .ttf 和 .eot 在各自的浏览器中工作?

【问题讨论】:

  • 错误控制台中是否有任何错误?

标签: firefox embed font-face


【解决方案1】:

您是否尝试过在 Firefox 中使用 TTF 格式而不是 OTF?有时,Firefox 还需要 WOFF 字体格式来显示字体,具体取决于您使用它们的方式。我假设您拥有 Firefox 3.6 或更高版本,但这也可能是问题所在。下面代码的 sn-p 是 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

【讨论】:

    猜你喜欢
    • 2015-06-21
    • 2015-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-25
    • 2012-06-18
    • 1970-01-01
    相关资源
    最近更新 更多