【问题标题】:Google font looks different in Chrome and Firefox谷歌字体在 Chrome 和 Firefox 中看起来不同
【发布时间】:2018-03-11 13:02:02
【问题描述】:

我使用的是来自 Google 的 Maven Pro font,但我注意到某些字母在 Chrome 和 Firefox 中看起来不同,例如字母 a:

Google 字体网站不会出现此问题。我试图把它放在我的 css 样式表上:

@import url('https://fonts.googleapis.com/css?family=Maven+Pro:400,500,700,900');
body{font-family:'Maven Pro', sans-serif;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}

但这仍然是同样的问题,我还需要修改什么才能在两个浏览器中获得相同的外观?

【问题讨论】:

  • 您使用的是 Windows 7 吗?
  • @AGrammerPro 是的,这也发生在 macOS 中。
  • 尝试将 font-weight: normal 应用于文本,前段时间我也遇到过这个问题,也许你也有同样的问题。
  • 我知道 Windows 7 字体/字体大小显示不同存在一个已知问题,但如果它发生在 Mac 上,那么我的解决方案将不起作用。祝你好运!
  • @Maharkus 我做到了,但还是一样

标签: html css google-chrome firefox fonts


【解决方案1】:

不确定,但我想这可能会有所帮助:

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

或者也试试这个:

body {
    font-size: 100%;
    background-color: #FFF;
    font-family: 'Source Sans Pro', sans-serif;
    margin: 0;
    font-weight: lighter;
    -webkit-text-stroke: 0.7px;

如果没有达到预期的结果,请继续更改 0.7。

【讨论】:

    【解决方案2】:

    这是为了修复 Windows 7 上的字体问题

    • 打开开始菜单并输入regedit
    • 找到钥匙 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
    • 查找值 MS Sans Serif 8,10,12,14,18,24
    • SSERIFF.FON 更改为 SSERIFE.FON
    • 查找快递10、12、15
    • COURF.FON 更改为 COURF.FON
    • 重启系统

    【讨论】:

      猜你喜欢
      • 2013-10-14
      • 2012-05-30
      • 2014-05-16
      • 2021-04-18
      • 2017-10-20
      • 1970-01-01
      • 2015-08-30
      • 2012-05-08
      • 1970-01-01
      相关资源
      最近更新 更多