[Resolved] Assigning Font-Display to GP Premium Fonts

Home Forums Support Assigning Font-Display to GP Premium Fonts

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #939950

    In this topic, Tom said:

    The only fonts GeneratePress has that require font-display are Google Fonts…

    I was able to eliminate the Generatepress @font-face CSS from our Child stylesheet after turning the SVG icons on. I’ve also added the new generate_google_font_display filter, which seems to address Google fonts. So, thanks for that!

    Google Pagespeed, however, would still like to see font-display declared for GP Premium fonts. Insights still throws the warning: “Ensure text remains visible during webfont load”

    I’ve addressed this for fonts being loaded by other plugins, but can’t seem to get it right for GP Premium. I have added the following to our Child CSS:

    /* Plugin: GP Premium */
    @font-face {
        font-family:'GP Premium';
        src:url(https://tripawds.net/wp-content/plugins/gp-premium/general/icons/gp-premium.eot#iefix) format('embedded-opentype'),
        url(https://tripawds.net/wp-content/plugins/gp-premium/general/icons/gp-premium.ttf) format('truetype'),
        url(https://tripawds.net/wp-content/plugins/gp-premium/general/icons/gp-premium.woff) format('woff'),
        url(https://tripawds.net/wp-content/plugins/gp-premium/general/icons/gp-premium.svg#gp-premium) format('svg');

    It seems whatever was done for the GeneratePress font-family, also needs to be done for GP Premium. Or, I could use some help addressing the issue via Child CSS, or another function/filter…Thanks!

    Lead Developer
    Lead Developer

    The SVG option will be integrated into GP Premium 1.9. It was just released in 2.3, so GP Premium hasn’t quite caught up yet.

    When it comes to icons, using swap doesn’t make much sense, as there is nothing to swap the icons with (unlike text, which can fallback to your system font).

    Let me know if you have any other questions ๐Ÿ™‚


    Thanks for the heads up!

    Lead Developer
    Lead Developer

    Hi Jim! I’m having the same warning from Google Pagespeed Insights. What value did you end up using for the GP Premium font? Or did you leave it as it was?

    Customer Support

    Hi there,

    ‘fallback’ would be the simplest option. Another user provides his method here:



    David Said:
    Hi Jim! Iโ€™m having the same warning from Google Pagespeed Insights. What value did you end up using…

    I use Swap, so text is always visible upon page load.

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