【问题标题】:Google web font Montserrat issue on Firefox - BoldFirefox 上的 Google 网络字体 Montserrat 问题 - 粗体
【发布时间】:2018-06-22 04:04:29
【问题描述】:

我有一个 joomla 网站,我尝试在某些课程中使用来自 google 的字体“Montserrat”。

字体在 chrome 和 I.E. 上看起来不错,但在 Firefox 上看起来更粗或更粗。

我尝试过的css

p
{
     font-weight: normal;
}

p
{
     font-weight: 400;
}

我在网上找到了一千个主题,没有解决方案。

【问题讨论】:

标签: css firefox fonts google-webfonts


【解决方案1】:

试试这个也许有帮助:

html {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  font-smoothing: antialiased;
}
body {
  font-weight: 500;
}


/* and browser specific rule at the bottom */
@-moz-document url-prefix() {
  body {
    font-weight: lighter !important;
  }
}

【讨论】:

    【解决方案2】:

    我一直在努力解决这个问题:

    CSS 预处理器正在删除引号

    ...然后我发现:
    我们的 React 应用程序中的 CSS 处理器 (cssnano) 正在删除引号

    所以我的字体是从我的计算机本地加载的,而不是从 Google 的服务器加载的。 这会导致 Firefox 中的字体文件与 Chrome 中的不同。

    看看这个:https://github.com/cssnano/cssnano/issues/177

    【讨论】:

      猜你喜欢
      • 2021-12-10
      • 1970-01-01
      • 1970-01-01
      • 2016-02-20
      • 1970-01-01
      • 2015-05-02
      • 2012-04-01
      • 2018-08-21
      • 2014-08-31
      相关资源
      最近更新 更多