- This topic has 7 replies, 2 voices, and was last updated 2 years, 7 months ago by
David.
-
AuthorPosts
-
August 17, 2022 at 4:21 am #2315414
Dominik
Hi. I have following problem on my website. Although I have disabled all Google fonts (from Google API), the Lato font is still loading from Google API. However, I cannot find out why.
But when I disable the GP Premium plugin, the Google Font is gone. I have checked everything in both the Customizer and Global Styles, but cannot find the error.
August 17, 2022 at 5:02 am #2315443David
StaffCustomer SupportHi there,
i can see a
preload
link in the<head>
of your site for the Lato font. GP doesn’t do that by default. Most optimization plugins do.
But… because disabling GP Premium would disable the Elements module, have a look in Appearance > Elements to see if you have anything in your Hooks that could be adding the font.August 17, 2022 at 5:33 am #2315470Dominik
Hi David,
we only preload the fonts from our server within Elements.
<link rel="preload" href="/wp-content/themes/brandwerk/fonts/cormorant-garamond-v15-latin-300.woff2" as="font" type="font/woff2" crossorigin> <link rel="preload" href="/wp-content/themes/brandwerk/fonts/cormorant-garamond-v15-latin-regular.woff2" as="font" type="font/woff2" crossorigin> <link rel="preload" href="/wp-content/themes/brandwerk/fonts/lato-v23-latin-300.woff2" as="font" type="font/woff2" crossorigin> <link rel="preload" href="/wp-content/themes/brandwerk/fonts/lato-v23-latin-300italic.woff2" as="font" type="font/woff2" crossorigin> <link rel="preload" href="/wp-content/themes/brandwerk/fonts/lato-v23-latin-700.woff2" as="font" type="font/woff2" crossorigin> <link rel="preload" href="/wp-content/themes/brandwerk/fonts/lato-v23-latin-italic.woff2" as="font" type="font/woff2" crossorigin> <link rel="preload" href="/wp-content/themes/brandwerk/fonts/lato-v23-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
When I deactivate that, nothing changes. But when I additionally deactivate WP-Rocket, there is only a stylesheet from Google API which is still loading:
<link rel="stylesheet" id="generateblocks-google-fonts-css" href="https://fonts.googleapis.com/css?family=Lato:100,100italic,300,300italic,regular,italic,700,700italic,900,900italic&display=swap" media="all">
August 17, 2022 at 5:43 am #2315474David
StaffCustomer SupportOK, so its being loaded by GenerateBlocks…. which means the google font was selected on a GB Block in the editor.
If i view your home page ( with WP Rocket disabled ) i can see the GB Stylesheet:/wp-content/uploads/generateblocks/style-29035.css
Searching there i find 3 x instances where Lato is selected.
This is coming from the Footer copyright text:
p.gb-headline-a6e1df1a { font-family: Lato, sans-serif; text-align: center; color: var(--grey); }
And these two look like Global Styles:
.gb-button-wrapper .gb-button-primaer, .gb-button-wrapper .gb-button-primaer:visited { color: var(--black); font-family: Lato, sans-serif; font-size: 14px; font-weight: normal; padding: 10px 20px; border-radius: 0; margin-right: 0; margin-left: 0; border-style: solid; border-width: 1.5px; border-color: var(--black); } .gb-headline-h2-klein { font-family: Lato, sans-serif; color: var(--black); font-size: 40px; font-weight: 700; padding-bottom: 10px; margin-bottom: 0; }
Edit those blocks and in the Typography settings make sure you uncheck Google font.
August 17, 2022 at 5:49 am #2315478Dominik
Great! That works well.
Is there a solution to disable Google fonts API global (in GP and GB?)In the EU some lawyers have began to lawsuit for damages when google font is loaded over the api.
August 17, 2022 at 5:58 am #2315484David
StaffCustomer SupportFor GB we’re working on a solution for that.
For GP, see here:
https://docs.generatepress.com/article/remove-google-fonts/August 17, 2022 at 6:13 am #2315495Dominik
Thanks David. Looking forward to the function in GenerateBlocks 🙂
August 17, 2022 at 6:46 am #2315512David
StaffCustomer SupportIts slated for GB 1.6 – so the next update it should be possible.
Glad to be of help
-
AuthorPosts
- You must be logged in to reply to this topic.