【问题标题】:font-weight for custom fonts自定义字体的字体粗细
【发布时间】:2019-05-02 14:27:50
【问题描述】:

我正在使用这样定义的自定义字体:

@font-face {
  font-family    : 'LatoWeb';
  src            : url('../resources/fonts/Lato-Regular.woff') format('woff');
  font-style     : normal;
  font-weight    : normal;
  text-rendering : optimizeLegibility;
}

有趣的是我没有这种字体的字体粗细变化。但是,从font-weight: 600 开始字体变粗了,怎么可能?如果没有加载字体,它会把字体放在哪里?

【问题讨论】:

标签: css fonts


【解决方案1】:
@font-face {
  font-family    : 'LatoWeb';
  src            : url('../resources/fonts/Lato-Regular.woff') format('woff');
  font-weight    : normal;
  font-style     : normal;
  text-rendering : optimizeLegibility;
}

你也可以使用:

for example :
font-weight:normal
font-weight:bold

100    Extra Light or Ultra Light
200    Light or Thin
300    Book or Demi
400    Normal or Regular
500    Medium
600    Semibold, Demibold
700    Bold
800    Black, Extra Bold or Heavy
900    Extra Black, Fat, Poster or Ultra Black

【讨论】:

  • 这是标准字体,不是自定义的
  • 我看到你使用font-weight: bold 而不是Bold...然后你会使用font-weight: black 吗? font-weight: extra black呢?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-07-06
  • 2021-08-06
  • 2017-01-20
  • 1970-01-01
  • 2014-10-04
  • 2017-04-05
相关资源
最近更新 更多