Site logo

[Support request] Google Fonts display:swap

Home Forums Support [Support request] Google Fonts display:swap

Home Forums Support Google Fonts display:swap

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2047742
    mogudasl

    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

    #2047981
    David
    Staff
    Customer Support

    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 ?

    #2048342
    mogudasl

    Ok,

    I have made the change.

    The issue is :

    “Make sure the text remains visible while the web font is loading”

    #2048421
    David
    Staff
    Customer Support

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

    #2048478
    mogudasl

    SVG ? Yes

    #2048489
    David
    Staff
    Customer Support

    Go to Customizer > Typography – does it still look like the screenshots here?

    https://docs.generatepress.com/article/typography-overview/

    #2048513
    mogudasl

    I send screenshot

    #2048516
    David
    Staff
    Customer Support

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

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

    #2048536
    mogudasl

    I only use wp rocket.

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

    #2048557
    David
    Staff
    Customer Support

    Have a chat with WP Rocket support as their plugin should automatically do that for you – see here:

    https://docs.wp-rocket.me/article/1312-optimize-google-fonts

    #2048971
    mogudasl

    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

    #2049034
    David
    Staff
    Customer Support

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

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.