[Support request] Can I stop GenerateBlocks from loading Google Fonts?

Home Forums Support Can I stop GenerateBlocks from loading Google Fonts?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1496233
    Randy

    I would like to stop loading google fonts for GB, as it’s already being loaded. Is there a setting or some code to do this? Just trying to speed up my site. Thanks!

    <link rel=’stylesheet’ id=’generate-fonts-css’ href=’//fonts.googleapis.com/css?family=Lato:300,300italic,regular,italic,700,700italic’ media=’all’ />

    <link rel=’stylesheet’ id=’generateblocks-google-fonts-css’ href=’//fonts.googleapis.com/css?family=Lato:100,100italic,300,300italic,regular,italic,700,700italic,900,900italic&display=swap’ media=’all’ />
    Images

    #1496249
    Elvin
    Staff
    Customer Support

    Hi,

    You can check our documentation: https://docs.generateblocks.com/article/typography-overview/

    There’s a line here about that.

    “If you’re using a Google Font but hosting it locally, simply leave the “Google Font” toggle un-checked.”

    Or since it’s already being imported by the theme, you can just toggle un-checked.

    A wise man once said:
    "Have you cleared your cache?"

    #1496331
    Randy

    Hi, Thanks for the reply, I don’t think it really addresses my question.

    I am not locally hosting the google fonts. I am loading just Lato, and limited sizes, controlled in the customize section, typography. No issue there.

    What I’d like to avoid, is GenPress loading the fonts again for GenBlocks. See, it’s loaded twice:

    <link rel=’stylesheet’ id=’generate-fonts-css’ href=’//fonts.googleapis.com/css?family=Lato:300,300italic,regular,italic,700,700italic’ media=’all’ />

    <link rel=’stylesheet’ id=’generateblocks-google-fonts-css’ href=’//fonts.googleapis.com/css?family=Lato:100,100italic,300,300italic,regular,italic,700,700italic,900,900italic&display=swap’ media=’all’ />
    Images

    Loading the same font a second time and adding sizes I’m not using seems redundant and slows things down. Thanks.

    #1496336
    Elvin
    Staff
    Customer Support

    I am not locally hosting the google fonts. I am loading just Lato, and limited sizes, controlled in the customize section, typography. No issue there.

    It also applies to fonts hosted elsewhere. Not just the locally hosted ones.

    The point of toggling GenerateBlock’s google fonts was so it doesn’t load the fonts that are already loaded by GeneratePress, regardless if its locally added or taken from external source(Google).

    What I’d like to avoid, is GenPress loading the fonts again for GenerateBlocks. See, it’s loaded twice:

    Since you want to do the reverse: (unload GeneratePress’ google font rather than unload GenerateBlocks’)

    You can try this instead – https://docs.generatepress.com/article/remove-google-fonts/

    A wise man once said:
    "Have you cleared your cache?"

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