K
K
kopocov_v2020-08-21 01:20:22
css
kopocov_v, 2020-08-21 01:20:22

Why does the font not match in html?

In general, I download fonts from Google, I connect fonts through gulp, everything is as it should be. The font was connected all right, and when I connect it in css , it doesn’t display on the site page like that ...
5f3ef67c2cd13232766029.png
This is how it should be
5f3ef6acb7223456311834.png
...

@font-face {
  font-family: "Merriweather";
  font-display: swap;
  src: url("../fonts/Merriweather-Bold.woff") format("woff"), url("../fonts/Merriweather-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Merriweather";
  font-display: swap;
  src: url("../fonts/Merriweather-Regular.woff") format("woff"), url("../fonts/Merriweather-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Spartak (Web-StyleStudio), 2020-08-21
@kopocov_v

Refresh the cache in the browser Ctrl + F5

M
MeMoJlor, 2020-08-21
@MeMoJlor

Why not try .ttf?

@font-face 
   {font-family: "Exo2";
   src: url("font/Exo2.ttf") format("truetype");
   font-style: normal;
   font-weight: normal;}

Always abbreviate names.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question