Themes will be loading fonts locally

In the scope of the changes regarding privacy on the internet, the Themes team on WordPress decided to release a new tool called Web Font Loader. This new tool will make all Google Fonts (and other fonts) hosted locally instead of loading them from the CDN.

What it is all about?

This tool will fetch the fonts you are using on your WordPress website and download them onto your website. Then the fonts will be server locally or from your own website instead of being loaded from the CDN.

The themes team was not allowing theme authors to hotlink or host any other assets like images, CSS, and JS files on the CDN. Now, this rule also applies to the fonts as well. The aim of the themes team is to force the Google fonts to be used locally instead of loading from Google network.

As some of you might recall, the GDPR was prohibiting the usage of Google Fonts that are not served locally because of the tracking practices that are implemented in this way. Now, once the fonts are loaded locally, this tracking practice will cease and the theme will be 100% privacy compliant.

Why now?

“The exception was made because there was no practical way to not have the exception at the time,” said Aria Stathopoulos, a Themes Team representative, and developer behind the Webfonts Loader project.

“The exception of Google Fonts was made out of necessity. Now that there is another way and the exception will not be necessary.”

Why we need WebFonts loader?

Google Fonts has become embedded into the themes and plugins over the years and there was no easy way to simply pull the plug and prohibit the use of the CDN overnight.

Therefore, the Themes team decided to build a tool that will automate the font usage and skip all the needed changes on themes and plugin directly.

As for now, there is no deadline on when the fonts serving over the CDN will be banned as it’s the process that will continue over time.

Webfont loader Tool

The Webfonts Loader will be simple to use for themes authors.
It introduces a new function wptt_get_webfont_styles() that developers can plug in a stylesheet URL. When the function executes, it will download the fonts locally to a /fonts folder in the user’s /wp-content directory. In this way, fonts will always be served from the user’s site.

Why is this all necessary

This is a part of the core WordPress initiative on overall user privacy. WordPress aims to address privacy concerns by any third-party resources, particularly with tech giants like Google.

Share this post if you like it.
Davor Veselinović
Davor Veselinović

I'm Davor aka. Worda, founder of Worda Themes. Working as a Full Stack Developer with more than a decade of experience with WordPress. I build themes and plugins and enjoy writing useful blog posts and sharing my ideas with others.

Leave a Reply

Your email address will not be published. Required fields are marked *