[Resolved] Unrequired Google Fonts downloading

Home Forums Support [Resolved] Unrequired Google Fonts downloading

Home Forums Support Unrequired Google Fonts downloading

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #985125
    Matt

    I’ve spent ages trying to figure out where a load of unused Google fonts and variants are being called from.

    Disabled all plugins and changed themes and it appears to be the GP theme.

    Looking in the console I’ve discovered the following…

    <link rel=’stylesheet’ id=’generate-fonts-css’ href=’//fonts.googleapis.com/css?family=Lato:regular,700|Droid+Serif:regular,italic,700,700italic|Lato:300,regular,500,600,700|Nunito:200,200italic,300,300italic,regular,italic,600,600italic,700,700italic,800,800italic,900,900italic|Montserrat:300,regular,500,600,700′ type=’text/css’ media=’all’ />

    I’ve defined a small number of fonts & variations in the customiser, and also checked all my pages to make sure no others have crept in. I’ve even defined H4 & H5 in CSS as these were calling Montserrat.

    I’ve searched all the CSS files but can’t find anything. It’s holding up the launch of my website.

    Any ideas what’s going on and how to get rid of this mess of fonts?

    Cheers

    #985280
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That request is generated by the Typography controls in the Customizer. Have you checked every single font family control in there to make sure those fonts/variants aren’t set? If the options in the Customizer aren’t set to Google Fonts, that request shouldn’t exist.

    Let me know πŸ™‚

    #985350
    Matt

    Hi Tom, Definitely 100% have updated the Typography controls to just use Lato Regular and 700.
    Just to be safe I’ve activated the parent theme and done the same – but I still have the same problem.

    #985926
    Matt

    I’ve just created a post that included every type of formatting (H1-H5, paragraph, pre-formated, Quote) and then double checked using Chrome. There’s only one font and two or three variants.

    Bit miffed.

    #985941
    Tom
    Lead Developer
    Lead Developer

    Strange, any chance you can send me temporary admin login details so I can take a quick look? If so, shoot me an email here: https://generatepress.com/contact

    If I can’t find the issue, we can always just unhook that function so GP doesn’t make any calls to Google.

    #985961
    Matt

    I’ve added a user and emailed it to pre-sales. I hope this is the one you meant.

    #986114
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Your Typography module in GP Premium isn’t active. If you activate it, are you using those other fonts/variants in the premium typography fields?

    #986127
    Matt

    When I logged the issue – I’d disabled and removed the Premium plugin as I wasn’t using the features. I guess it was a hang-up that remained after the uninstall.

    I’ve now reinstalled and enabled the plugin and worked my way through all typography.

    https://fonts.googleapis.com/css?family=Lato:regular|Droid+Serif:regular,italic,700,700italic

    I’m still seeing Droid+Serif but can’t find it anywhere. Any Idea?

    Also, what do I need to do if I disable or uninstall Premium in future?

    #986137
    Tom
    Lead Developer
    Lead Developer

    It could be from another module. For example, Secondary Navigation and Menu Plus both have typography settings.

    These particular options in premium use filters that exist in the free theme, so once the option exists in the db, you can actually deactivate the premium features and the options will still exist. In this case, you’ll want to manually unset these options before deactivating GPP.

    Let me know πŸ™‚

    #986144
    Matt
    #986147
    Tom
    Lead Developer
    Lead Developer

    That’s likely coming from a plugin you’re using.

    There’s also a hard-coded request in the header.php file in your child theme.

    #986160
    Matt

    So… Now GP is no longer calling tons of fonts – Elementor is doing its own mass call of fonts.

    It looks like GP is still calling Droid+Serif:regular,italic,700,700italic even after disabling all plugins. I’ve tried the parent theme and the font download shows there too. It doesn’t show when using Storefront theme.

    I’ve enabled all GP premium features and been through Typography to make sure everything’s set to Lato Regular or 700/bold.

    Do I need to check anywhere else other than the Typography section?

    p.s
    I added the header item for fonts I’d intended to use (Lato & Roboto – each in 2 weights).

    #986164
    Tom
    Lead Developer
    Lead Developer

    That’s strange, I’m not seeing where the Droid Serif font is coming from. Caching plugin maybe? Server caching?

    Also, you can set it so the Body uses Lato, and everything else can be set to “inherit”. This will use Lato everywhere and makes it so you don’t need to check every single typography element.

    If you’re going to load the fonts in the header.php anyways, you can just tell GP not to make the request:

    add_action( 'wp_enqueue_scripts', function() {
        wp_dequeue_style( 'generate-fonts' );
    }, 100 );
    #986173
    Matt

    Cleared the WP cache and server side is disabled at the mo.

    I’ve used the functions.php snippet – that’s done the job nicely πŸ™‚

    Now to figure out why Elementor isn’t playing ball <sigh>!

    Thanks for your help.

    #986175
    Tom
    Lead Developer
    Lead Developer

    No problem πŸ™‚

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