Webhosting | Hosting - My Hosting PartnerWebhosting | Hosting - My Hosting PartnerWebhosting | Hosting - My Hosting PartnerWebhosting | Hosting - My Hosting Partner

WordPress themes embed fonts locally

WordPress themes embed fonts locally
MijnHostingPartner

WordPress themes embed fonts locally

A website's fonts in WordPress, but also in many other content management systems, are in most cases not a local source. They are generally hosted by a number of parties, including of course the largest provider, Google Fonts. These are commonly used by websites to ensure that the site's font looks nice and that smileys and emoticons can be used, for example. However, there has been a recent upheaval that we want to cover in this blog post. And why this development will be picked up by many topics in the near future.

German lawsuit against a website operator

In February 2022, a German website operator hit the headlines after he was fined 100 euros by a user of his website. He received this fine because the user's IP address was transmitted to Google without permission. With all other default settings, this is indeed the case. Google Fonts is then hosted externally and receives the user's IP address. Why Google does not mention this explicitly, but only to optimize the user experience.

These kinds of things are very interesting to read if you own a website yourself, and can also serve as a wake-up call. You may not have thought of these kinds of things as a prospective website owner. For example, exactly what font to use. You can deepen your knowledge on this topic.

Why fonts are hosted externally

Fonts are hosted externally and centrally by parties like Google to avoid the need to publish new updates and font changes to 50 million websites and update them locally. Another argument is the load times and overall file sizes that can result from hosting a font locally. However, this argument can also be made for local hosting, as fewer external resources need to be loaded. In most cases, this is slower than local hosting.

Fonts will therefore be hosted locally in future updates of many themes

Many theme developers will therefore host this locally in future updates and pack it into the theme. Rather than just loading them externally via Google Fonts. To find out exactly if your theme is using this, you can check your theme's changelogs when an update is released. The easiest way to find out is to do a Google search. Just search for: WordPress "theme name" changelog.

How do you check this if you host fonts locally?

If you decide to host fonts locally, you can download them from Google and load them that way. You can also ask the makers of your theme, because every theme is different, and it could be that the appropriate tools are already there. Or that you need to select a specific option in your theme's configuration for it.

So consult your documentation or check your theme to see if this is possible.

Finally, you can also check this directly using a website speed test. Here you will also see the external sources. If you see Google Fonts API or any other URLs or sources. Then you can be pretty sure that you are using them.

Autoptimized users - blocks from Google Fonts.

You also have the option to force this with a plugin. Many website owners already have a caching plugin installed for WordPress. And many of them will use Autoptimize for this, as it is one of the most popular free options. Autoptimize gives you the option to completely remove Google Fonts from the code. And it will default to a locally available font. This can sometimes cause your content to look a little strange. So if you are forcing this, you should always check some of your posts or pages to make sure they are working.

The setting is specifically within Autoptimize under the Tools in the plugin's menu, here you can select the second option in the list to remove Google Fonts from the site.

WordPress themes embed fonts locally

Are you already prepared for the AVG law within the European Union? And have you already made an inventory of what exactly will be captured on your website? Do it now and schedule it to find out what exactly is happening. This can save you a lot of headaches when the chips are down. Also, always try to work things out with an attorney and invest in that for your business website. Prevention is better than cure.