Ensure text remains visible during webfont load?


Hello there,
I wish you a happy and healthy new year, I hope to find help here … here I am using Wix for years for my website … and the I am immersed to optimize the display speed … the score is so poor …

To start with, it’s so easy to add custom fonts from google on wix … ok well … but when I test my site, the speed of the text loading is slow
( see image above ! )

The easiest way to avoid showing invisible text while custom fonts load is to temporarily show a system font. By including font-display: swap in your @font-face style, you can avoid FOIT in most modern browsers:

So, How i can integrate this code to my website ?
Thx for reply.

@font-face {
  font-family: 'Pacifico';
  font-style: normal;
  font-weight: 400;
  src: local('Pacifico Regular'), local('Pacifico-Regular'),
    url(https://fonts.gstatic.com/s/pacifico/v12/FwZY7-Qmy14u9lezJ-6H6MmBp0u-.woff2)
      format('woff2');
  font-display: swap;
}
1 Like

Is it CSS what you want to add?

I think you can add it in a CUSTOM-ELEMENT.

Thanx for reply dude, you can say more please … how i can do this for all my pages wix ?

Yeah, I’d like to know this myself. My web safe fonts not swapping and images not lazy loading is hurting me in google. I can go all text and still get a 3 FCP.

Have you found anything out? I’ve been searching for 2 hrs so far and can’t figure out how to add font-display: swap to text in Wix or what code to add. Much thanks.

Trying to figure this out… did you have any luck? Thanks

any luck with this? I’ve tried everything I can think of. It’s a few of these critical page load issues that are reporting, but seem to be on the hosting end.

So saddddd. @Wix, please address this critical issue!