Swapping Google Fonts for Bunny Fonts

Recently, there have been a number of court cases in Europe suggesting that Google Fonts may not be GDPR compliant. The concern is that when you link to a Google Font using their CDN (Content Delivery Network), it could potentially transmit personally identifiable information, which allows Google to track users across the internet.

The actual practices of Google in this regard are not the main issue; rather, it is the mere possibility of privacy infringement that raises concerns. Consequently, WordPress has recommended that theme developers modify their themes and avoid using the Google Fonts CDN. Instead, they should self-host the fonts to ensure compliance with GDPR regulations (source: WordPress Themes Blog).

Another alternative is Bunny Fonts. Bunny is a privacy focused content delivery service (CDN) and they have their own Google Fonts proxy. They are a drop in replacement for Google Fonts, just change the url and you’re done.

While Bunny Fonts can be considered as an alternative solution, my personal recommendation would be to self-host the fonts. All Google Fonts are open source and can be distributed along with your themes or on your websites. However, I understand that not everyone possesses technical knowledge or has enough time available for such tasks. As a result, I have developed a simple WordPress plugin specifically designed to make this transition easier for you.

Please note that this plugin will only work with WordPress themes that enqueue fonts as styles using wp_enqueue_styles. Therefore, it may not be compatible for everyone. Nevertheless, if you embed fonts within your WordPress themes in a similar manner as I do, this plugin might prove useful for other theme users as well.

Below is the code snippet hosted on Github Gist:

To download the code, visit the Gist page and click on the download button located in the top right corner. Install it through the WordPress admin interface just like any other downloaded plugin.

Let me know what you think on Mastodon, or BlueSky (or Twitter X if you must).

Link to this page

Thanks for reading. I'd really appreciate it if you'd link to this page if you mention it in your newsletter or on your blog.

Related Posts

13 May 2010

6 Tips to Build Better WordPress Themes

If you want to make WordPress themes, for clients, to release for free or to sell, then there are a lot of factors you need to take into consideration. Below are some hints and tips that should help ease your...
27 May 2013

WordPress: 10 Years Young, What Does The Future Hold?

WordPress is now 10 years old. I started using wordpress 9 years ago – which means I joined the WordPress community early on. The reason I chose WordPress is simply because of the fabled 5 minute install process – I...
29 Mar 2009

The future of WordPress themes

A couple of weeks ago there was quite a lot of talk within the WordPress themes community about the future of WordPress. Ian Stewart started it, and then it spread around the blogosphere… so I thought I’d offer my rather...
17 Oct 2012

WordPress Social Network Aggregation

I really like the idea of a Tumblog – and even have one on Tumblr.com – but I don’t promote it anywhere. Conceptually it’s great – but I don’t like not having control over my content.What I would really like...