【问题标题】:Font Lato, bolded some Czech characters字体 Lato,加粗一些捷克字符
【发布时间】:2019-04-19 19:40:51
【问题描述】:

我在网站上使用“Lato”字体。波兰语和英语中的字符显示正确,而一些捷克语字符显示为粗体。下面你可以看到这 3 个字符是加粗的。这个问题的原因是什么?这是字体问题还是浏览器问题?

<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="https://fonts.googleapis.com/css?family=Lato:300,300i,400,400i,700,700i,900&amp;subset=latin,latin-ext" rel="stylesheet">
      
        <style>


            body {
                font: normal 15px 'Lato';
                color: #000000;
                font-weight: 300;
            }
        </style>

    </head>
    <body>
        <div style="font-size: 30px;">Pověřenec pro ochranu osobních údajů</div>
    </body>
</html>

Additonal printscreen

【问题讨论】:

  • 拉托语是否包含这些字符的字形?
  • 嗯我不确定,但在此页面latofonts.com/lato-free-fonts 上,有信息表明支持字形。但这与捷克粗体字有何关系?

标签: html css fonts google-fonts


【解决方案1】:

这些字形在 Lato 1.0 中不可用,Google 字体仍在使用该字形。

使用 Adob​​e Typekit,或下载字体并将其包含在您的网站上以修复丢失的(粗体)字符。

Font can be found here

【讨论】:

    【解决方案2】:

    从正文 css 中删除字体大小可以正常工作:

    <html>
        <head>
            <title>TODO supply a title</title>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <link href="https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i&amp;subset=latin-ext" rel="stylesheet">
          
            <style>
    
    
                body {
                    font: normal 'Lato';
                    color: #000000;
                    font-weight: 300;
                }
            </style>
    
        </head>
        <body>
            <div style="font-size: 30px;">Pověřenec pro ochranu osobních údajů</div>
        </body>
    </html>

    【讨论】:

    • 不行,还是有问题。看这里pasteboard.co/HxUKNdQ.png
    • 在屏幕截图中,违规字符使用了不同的字体。所以最好使用另一种包含捷克语的字体。
    • 字体不同是什么意思?这是一直以来的“Lato”字体,它支持捷克语,因为如您所见,捷克语字符是正确的,只是它们是粗体。不幸的是,无法更改字体。问题在于“字体粗细”。当我删除“font-weight: 300”时,所有字符看起来都一样,但它们对我来说太粗了。
    • 如果你仔细看截图,重音字符有衬线,而普通字符没有。这意味着浏览器从不同的字体中获取这些字符。这样做的原因是 Lato 显然不包括重量为 300 的那些字符。
    猜你喜欢
    • 1970-01-01
    • 2016-06-23
    • 2017-09-27
    • 2019-03-20
    • 2018-08-02
    • 2017-01-20
    • 1970-01-01
    • 2016-01-31
    • 1970-01-01
    相关资源
    最近更新 更多