当那些是 OS 字体时,字体如何对字体粗细做出反应?
How do fonts react to font-weight when those are OS fonts?
system UI fonts 是否对字体粗细采取相同的方式?
我试过了:
font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif
还有这个
@import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400,500');
font-family: Roboto
在我的 ubuntu OS 上。字体粗细对两个字体系列的影响不同。当 font-weight: 500
与来自 google.fonts
的 Roboto 一起使用时,文本为粗体。当 font-weight: 500
与 system ui fonts
一起使用时,我没有加粗。
所以我想知道发生了什么事?
font-weight
的数值是 100-900
。
通常 400
与 normal
相同,700
与 bold
相同,尽管这是特定于字体的。
在您的情况下,500
的 font-weight
对于 Roboto
被定义为比 正常 更厚 ,因此有所不同。
附带说明,并非所有字体都有 bold
版本。
system UI fonts 是否对字体粗细采取相同的方式?
我试过了:
font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif
还有这个
@import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400,500');
font-family: Roboto
在我的 ubuntu OS 上。字体粗细对两个字体系列的影响不同。当 font-weight: 500
与来自 google.fonts
的 Roboto 一起使用时,文本为粗体。当 font-weight: 500
与 system ui fonts
一起使用时,我没有加粗。
所以我想知道发生了什么事?
font-weight
的数值是 100-900
。
通常 400
与 normal
相同,700
与 bold
相同,尽管这是特定于字体的。
在您的情况下,500
的 font-weight
对于 Roboto
被定义为比 正常 更厚 ,因此有所不同。
附带说明,并非所有字体都有 bold
版本。