Ensure text remains visible during webfont load

Google Pagespeed warns me
“Ensure text remains visible during webfont load”

Apparantly I need to add font-display setting.
I added the following to my global css settings but it didnt work
@font-face {
font-family: “Raleway”;
font-display: swap;
}

Can you please help

Hello Martin,

Thanks for posting in!

Please have your code updated and use this:

@import url('https://fonts.googleapis.com/css?family=Raleway');

@font-face {
  font-family: "Raleway", Arial, serif;
  font-display: swap;
}

Arial and serif is the default font family which would display the text while the font is loading.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.