【发布时间】:2023-03-07 18:21:01
【问题描述】:
我在一个网站上使用来自 Google Fonts 的 Open Sans Light。一切看起来都不错,除了一个特殊字符“č”比移动设备上的其余文本更厚。在桌面上看起来还不错。请问您知道可能是什么原因造成的问题以及如何解决它吗?
【问题讨论】:
标签: android html ios css fonts
我在一个网站上使用来自 Google Fonts 的 Open Sans Light。一切看起来都不错,除了一个特殊字符“č”比移动设备上的其余文本更厚。在桌面上看起来还不错。请问您知道可能是什么原因造成的问题以及如何解决它吗?
【问题讨论】:
标签: android html ios css fonts
答案是包含拉丁子集支持
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,800&subset=latin-ext,latin" rel="stylesheet">
另外,如果我是你,我会添加正确的 font-weight 你有:
p, .tg {
padding: 30px;
color: #00afec;
font-weight: 100;
font-size: 28px;
}
改为:
p, .tg {
padding: 30px;
color: #00afec;
font-weight: 300;
font-size: 28px;
}
作为补充,我会添加一些字体平滑:
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
【讨论】: