【问题标题】:Roboto Condensed Font not rendering properly in mozilla firefoxRoboto Condensed Font 在 mozilla firefox 中无法正确渲染
【发布时间】:2014-03-12 17:01:24
【问题描述】:

我正在使用从 google Web Fonts 下载的 RobotoCondensed。我正在使用我服务器上的字体。我已经创建了如下的 CSS。

@font-face {
    font-family: 'Roboto Condensed';
    src: url('../fonts/RobotoCondensed-Light.eot');
    src: url('../fonts/RobotoCondensed-Light.eot?#iefix') format('embedded-opentype'), 
         url('../fonts/RobotoCondensed-Light.woff') format('woff'), 
         url('../fonts/RobotoCondensed-Light.ttf')  format('truetype'), 
         url('../fonts/RobotoCondensed-Light.svg#svgFontName') format('svg'); 
    }

所有指定的字体类型都存在于我在 url 中指定的文件夹中。

我正在使用这样的字体系列

font-family: 'Roboto Condensed', sans-serif;

在 IE9 和 Chrome 方面进展顺利。但对于 Mozilla Firefox,情况并非如此。

有什么解决办法吗?

【问题讨论】:

  • 考虑发布 URL。这将让我们看到对字体文件的实际请求和服务器对它们的响应。
  • @JukkaK.Korpela :我没有为该网站创建任何 URL。该网站仅适用于本地网络。
  • 感谢大家的帮助。当我在 IIS 中托管时,该站点工作正常。 link

标签: css firefox webfonts


【解决方案1】:

我正在使用 Google Fonts Api 中的那个,它可以在 Firefox 中运行:

@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 400;
  src: local('Roboto Condensed Regular'), local('RobotoCondensed-Regular'), url(http://themes.googleusercontent.com/static/fonts/robotocondensed/v7/Zd2E9abXLFGSr9G3YK2MsNxB8OB85xaNTJvVSB9YUjQ.woff) format('woff');
}

也许可以尝试指定样式和重量。

【讨论】:

  • 或许可以通过stackoverflow.com/questions/2856502/…查看此链接
  • 感谢您的努力。我得到了解决方案。目前它在服务器中托管时工作正常。其实这是个问题。
  • 我遇到了同样的问题,但是从 S3 提供服务,并且必须使用 Access-Control-Allow-Origin = mydomain 在字体上设置我的标题。如果您从您的服务器提供服务,那么就会有一堆服务器 sn-ps,就像上面发布的链接一样。
【解决方案2】:

只需删除 : font-weight: 300;来自woff

【讨论】:

    猜你喜欢
    • 2016-03-21
    • 2017-05-26
    • 1970-01-01
    • 2012-05-26
    • 1970-01-01
    • 2019-10-30
    • 1970-01-01
    • 2011-02-19
    • 2012-08-17
    相关资源
    最近更新 更多