skip to Main Content

I am using a font from google fonts and for some reason its coming out blurry compared to a default font. I am not sure if it is just my computer. Is there any way I can fix the blurriness?

side-by-side comparison of the two fonts

h1 {
  font-family: 'Zilla Slab', serif;
  font-size: 88px;
  line-height: 90px;
  color: #262421;
}

.joe {
  font-family: serif;
}
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="main.css">
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Arimo&family=Zilla+Slab:wght@500&display=swap" rel="stylesheet">
  <title>Document</title>
</head>

<body>
  <h1>Hello</h1>
  <h1 class="joe">Hello</h1>
</body>

I tried using a font from Google Fonts, but it is coming out blurry. I expected it to come out at a good resolution.

2

Answers


  1. You can try with CSS text-shadow property like this:

    h1{
        font-family: 'Zilla Slab', serif;
        font-size: 88px;
        line-height: 90px;
        color: #262421;
      }
    
      h1.test{
        background: #28ff86;
      }
    
      .joe {
        font-family: serif;
      }
      
    <!DOCTYPE html>
    <html lang="en">
    
    <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      <title>Title</title>
      <link rel="stylesheet" href="style.css">
      <link rel="preconnect" href="https://fonts.googleapis.com">
      <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
      <link href="https://fonts.googleapis.com/css2?family=Arimo&family=Zilla+Slab:wght@500&display=swap" rel="stylesheet">
    
    </head>
    
    <body>
      <h1 class="test" style="text-shadow: 0 0 0 #262421;">Hello</h1>
      <h1>Hello</h1>
      <h1 class="joe">Hello</h1>
    
    </body>
    
    </html>
    Login or Signup to reply.
  2. I carried out tests and comparisons between the font used in the HTML page and the rendering of Google Fonts. I also installed the font locally for further comparison. The font always shows a slight blurring in all cases.

    Tests carried out on MacOS using Firefox, Safari and Chrome.

    <!doctype html>
    <html lang="en">
        <head>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1">
            <title>Test</title>
            <link rel="preconnect" href="https://fonts.googleapis.com">
            <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
            <link href="https://fonts.googleapis.com/css2?family=Arimo&family=Zilla+Slab:wght@500&display=swap" rel="stylesheet">
            
            <style>
                h1 {
                    color: black;
                    font-family: 'Zilla Slab', serif;
                    font-size: 100px;
                    font-weight: 700;
                }
            </style>
        </head>
        
        <body>
            <h1>Hello</h1>
        </body>
    </html>
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search