- This topic has 3 replies, 2 voices, and was last updated 4 months, 2 weeks ago by
Elvin.
-
AuthorPosts
-
October 19, 2020 at 2:24 pm #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’ />
ImagesOctober 19, 2020 at 2:38 pm #1496249Elvin
StaffCustomer SupportHi,
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?"October 19, 2020 at 5:30 pm #1496331Randy
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’ />
ImagesLoading the same font a second time and adding sizes I’m not using seems redundant and slows things down. Thanks.
October 19, 2020 at 5:39 pm #1496336Elvin
StaffCustomer SupportI 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?" -
AuthorPosts
- You must be logged in to reply to this topic.