DEV Community

Ryan Tao Spencer
Ryan Tao Spencer

Posted on

Is there a way to fade a Google Fonts web font on load instead of flashing once it's downloaded?

I'm using a Google Font on my site with the following tag in my index.html page:

<link href="https://fonts.googleapis.com/css?family=Oswald:300,400,500&display=block" rel="stylesheet">

No matter what I do, the first load of the page results in a flash of changing/appearing text.

I have experimented with changing display to block, swap, etc. But…

Top comments (0)