Walkthrough guide request: locally-hosted webfonts

Hi all,

As you’re probably aware, the theme team at wordpress.org is recommending theme authors to switch to locally-hosted webfonts. The decision is based on a court case in Germany that fined a site owner for GDPR violation for using Google fonts on their site (since enqueuing Google Fonts from the Google CDN exposes visitors’ IP addresses).

We’ve got a bunch of clients who are either based in the EU, or are targeting customers based in the EU, who want to host their Google webfonts locally.

Currently, we’ve been recommending clients use the Local Google Fonts plugin, but it would be great if you guys could make a quick YouTube video that we could point them to instead.

Thoughts?

3 Likes

I think there should be an option built into the Font Manager to download and locally host webfonts. It would make sense since this is where fonts are managed in sites built with Cornerstone and no extra third party plugin would be necessary.

I requested this earlier today here: Feature request: host webfonts locally

4 Likes

Also for me locally hosted webfonts are essential, as my business is located in germany and we have (almost) no chance than to host fonts locally. I guess it’s possible right now by downloading fonts and then using Pro’s fontmanager.
But as soon as you use any prefab elements, there is a chance they use a google webfont and it can be quite boring, to look for them and change them manually.
So it would be great to have the possibility to switch off google fonts in the general settings of pro – so you can be shure, Pro / Cornerstone is not using them. I don’t think, it’s cornerstones job to switch off google fonts generally, also for other plugins using them - that should be done manually or by plugins like Local Google Fonts.

2 Likes

Indeed, I think that Cornerstone should focus only on its own use of webfonts. It can’t take into account what other plugins are doing.

This topic is exploding right now!

It’s not just about cornerstone using Google Fonts. Other plugins like Slider Revolution and Gallery plugins are also massively using these services. And it also goes for example from font Awesome (use.fontawesome.com) API to payment services like FundraisingBox. All services from America and to be used in Europe only with prior consent of the user.

We have some funny lawyers in Austria right now who are already sending lawsuits to companies (No joke)!

The effort to cover all this is currently hard to estimate!

For the Google Fonts part I can currently recommend this site, because all font file types can be loaded to host it on your own server.
https://google-webfonts-helper.herokuapp.com/fonts

And add this filter to prevent at least cornerstone to use the google fonts api.
add_filter( 'cs_load_google_fonts', '__return_false' );

3 Likes

I already have some clients here in Austria who have received the letter from the lawyer… 190€ for nothing…

you can also use the plugin OMGF (https://de.wordpress.org/plugins/host-webfonts-local/)

in a lot of plugins (e.g. slider revolution you can turn off gfonts or load the fonts locally)

cheers
Harry

1 Like

And now this: https://wptavern.com/wordpress-theme-authors-are-moving-to-host-fonts-locally

2 Likes

Hey @kory, I’d love to hear your opinion on this whole Google Fonts and GDPR privacy issue. I’m seeing some of my other software vendors switching to Bunny Fonts (drop-in replacement for Google Fonts), which I think is even better than locally hosted fonts since the fonts are still served from a global CDN, just without the Google tracking.

I know it’s not related to the beta but it’s important enough :smile:

2 Likes

@JvP, if there are drop-in replacements you can use for Google Fonts, for now I would potentially recommend taking a look at the following file:

/cornerstone/includes/classes/Services/GlobalFonts.php

If you go to line 531 you will find a function called load_fonts_google(). Inside that function, there are numerous filters you can potentially employ to swap out the Google Fonts URI for another service. Check out the cs_google_fonts_uri and cs_google_fonts_href filters to see how you might be able to leverage those to utilize a service like Bunny Fonts in lieu of Google Fonts.

As of right now, that’s the most I can offer on this subject at present during this beta cycle while we work to get thing stable and released. Hopefully that helps!

1 Like