Site logo

Archived topic

Google Fonts display:swap

11 replies · Started by mogudasl on December 13, 2021

Viewing posts 1–12 of 12

Hello,

I have added the code

add_filter( ‘generate_google_font_display’, function() {
return ‘swap’;
} );

on the child theme

and I still get the problem in pagespeed

…fonts/generatepress.woff2. (“web”). 10 ms

…v36/4UaGrENHs….woff2(fonts.gstatic.com). 0 ms

…v18/KFOmCnqEu….woff2(fonts.gstatic.com). 0 ms

…v36/4UaGrENHs….woff2(fonts.gstatic.com). 0 ms

…v36/4UabrENHs….woff2(fonts.gstatic.com). 10 ms

Hi there,

you can remove the generatepress.woff2 by going to Customizer > General and changing the Icon Type to SVG

And what is the issue being reported in Page Speed ?

Ok,

I have made the change.

The issue is :

"Make sure the text remains visible while the web font is loading"

Have you updated to the new typography settings in Customizer > General ?

SVG ? Yes

I send screenshot

Hmmm....I cannot see the GeneratePress request for the Fonts.

Are you using any Optimization plugins that manage the font loading ?

I only use wp rocket.

Could you tell me what should appear " the GeneratePress request for the Fonts "?

Hello,

I have read the article,

the solution to the problem is to upload the plugin Change Google fonts display attribute ?.

In the latest version of wp rocket it does not appear to optimize fonts

Yep - looks like they changed it to a separate helper plugin you will need to install.

This archived topic is closed to new replies.