Local installation of Google fonts

Hi guys,

I might need some help on this topic. Due to german legal requirements (DSGVO) my clients website should not contact the google website - so I have to ensure google fonts get installed locally. Of course I can downlaod the required google fonts (https://google-webfonts-helper.herokuapp.com/fonts) but how do I tell Sydney Pro not to access any google website any more and use my downloaded (and now locally available) google fonts instead?

Thanks for your help.
Cheers, Timo

Hello Timo,

I asked our Developer to check your issue, let’s see what he says.

Kind Regards, Roman.

Thank you Roman, very much appreciated!

1 Like

Hi there,

First of all, can you help me find some info about the legal requirements you’re mentioning, preferably in English? It’s the first time I hear about it. It seems a bit odd that you are not permitted by law to serve fonts from Google. By that reasoning you would not be able to serve anything from any external site.

Second, the fonts should be on your server, not locally downloaded on your computer if that’s what you meant by local.

Here are the steps:

  1. You first need to stop Sydney from loading fonts from Google.
function sydney_dequeue_google_fonts() {
       wp_dequeue_style( 'sydney-fonts' );
}
add_action( 'wp_enqueue_scripts', 'sydney_dequeue_google_fonts' );

You would add this with a plugin like Code Snippets or, if you have one, in a child theme’s functions.php file.
2. You need to download the font files somewhere on your server.
3. You need to add the code from the site you linked (and modify the links to point to your files). You can add the code in Customize > Additional CSS or in a child theme if you have one.

Regards,
Vlad

1 Like

Hi Vlad,
thanks very much for your support.
With regards to the legal situation in germany (regretfully everything I could find was in german language) it is quite tricky. The problem is based on the DSGVO (Datenschutzgesetzverordnung) of the EU that defines that every visitor of your website needs to be informed what you do with his/her data. And again a major problem is that there’s a lot of insecurity in germany (unlike other european states). Many cases are not defined but may be due for legal actions. So people want to be on the safe side. When accessing the Google server technically Google will be able to track your IP. A visitor of your website needs to be informed about that because again theoretically Google could use your data for mor than just statistical purpose (even though Google claims not to do so). So by downloading fonts to your server (of course) you remain on the safe side. Same belongs to Google Maps and (even worse) Google Analytics.

The function is just what I was looking for - thanks.
I wonder if there is some kind of other mechanism to contact Google in any way (e.g. for Google Maps)??

Great support - again!
Cheers, Timo

Hey,

I’m not sure if there’s a way to grab Maps or anything else without them logging the IP.

Anyway, if you’re also using Elementor with Sydney, see here about also disabling Google Fonts, there’s some code in the last post: https://wordpress.org/support/topic/dsgvo-google-fonts-are-not-allowed-how-to-deactivate-it/

Vlad

Hi Vlad, thanks for the link. The discussion in the Elementor forum reflects quite nicely the current situation: It’s all driven by insecurity in the german law. Noone really knows what is legally the right thing to do - unless there are some official lawsuits and a court has decided.

I have no intention to use Google Maps any more (since they changed their legal conditions lately and you only get a free API code when handing over your CC details I switched over to open street maps). But SydneyPro has some inbuilt Google Maps features and I’m not sure if the theme is contacting Google anyhow - regardless if you use Google maps or not. Consequently I need to disable this behavior as well …

Cheers, Timo

1 Like