【问题标题】:Open Sans rendering incorrectly on mobile device在移动设备上打开 Sans 渲染不正确
【发布时间】:2023-03-07 18:21:01
【问题描述】:

我在一个网站上使用来自 Google Fonts 的 Open Sans Light。一切看起来都不错,除了一个特殊字符“č”比移动设备上的其余文本更厚。在桌面上看起来还不错。请问您知道可能是什么原因造成的问题以及如何解决它吗?

Link to the website

【问题讨论】:

    标签: android html ios css fonts


    【解决方案1】:

    答案是包含拉丁子集支持

    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,800&amp;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;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-18
      • 1970-01-01
      • 2017-01-13
      • 2018-08-02
      相关资源
      最近更新 更多