未找到TTF和WOFF网络字体404

时间:2013-06-08 12:32:22

标签: css webfonts woff

在使用Firebug进行检查时,我收到了一个未在webfont文件中找到的404文件。

@font-face {
  font-family: "Grotesk";
  font-style: normal;
  font-weight: normal;
  src: url('../../themes/brian2013/css/fonts/grotesk/altehaasgroteskbold-webfont.eot');
  src: local(Grotesk), url('../../themes/brian2013/css/fonts/grotesk/altehaasgroteskbold-webfont.eot?#iefix') format("embedded-opentype"), url('../../themes/brian2013/css/fonts/grotesk/altehaasgroteskbold-webfont.woff') format("woff"), url('../../themes/brian2013/css/fonts/grotesk/altehaasgroteskbold-webfont.ttf') format("truetype"), url('../../themes/brian2013/css/fonts/grotesk/altehaasgroteskbold-webfont.svg#Grotesk') format("svg");
}

我在这个网站上有其他字体可以很好地工作。 EOT和SVG文件工作正常,我已经检查了另外两个的路径并且它们对应。

1 个答案:

答案 0 :(得分:3)

检查您的htaccess文件以确保您拥有正确的文件MIME类型。

示例

取自HTML5 Boilerplate

# Webfonts
AddType application/vnd.ms-fontobject  eot
AddType application/x-font-ttf         ttf ttc
AddType font/opentype                  otf
AddType application/x-font-woff        woff
相关问题