Google Fonts for WordPress by Danny Cooper

Google Fonts for WordPress

Google Fonts for WordPress is exactly what it says on the tin. Danny Cooper, from Olympus Themes, has built this plugin to let WordPress users change the appearance of text on their site through an easy to use interface based on the Customizer. The plugin gives users access to almost 900 fonts, all provided by the Google Fonts program, no matter what style or theme their site has.

Danny took some time to answer my questions about how he built Google Fonts for WordPress, details on how the plugin works with the Customizer, and some thoughts on testing and Gutenberg.


Can you start by telling me a bit about yourself and how you got started using WordPress?

My name is Danny Cooper, I’m a WordPress theme and plugin developer from England (UK). I also contribute to WordPress by reviewing themes before they enter the WordPress.org Theme Directory. I first found WordPress around 10 years ago when it was in version 2. The dashboard has progressed, but it was still quite intuitive and user friendly back then. Each year I’ve learnt a bit more and now I’m at the point of being able to confidently release themes, plugins and now Gutenberg Blocks.

The usefulness of Google Fonts for WordPress is obvious (just from the name) but what made you decide to start building the plugin in the first place?

In my opinion, one of the problems with WordPress themes is that they try to include everything: font options, SEO settings, custom post types, etc. This means that often they are reinventing the wheel, when a better solution may already exist. I wanted to create a Google Fonts solution good enough that theme authors would be able to recommend the plugin rather than having to build the options into their theme.

The benefit of a plugin is that it’s treated as a first-class citizen and continually optimized and updated.

Google Fonts for WordPress Screenshot

One of my favorite parts of your plugin is that it integrates with the Customizer. Was that always the plan and how technically challenging was developing that?

Using the Customizer was always the plan, to me it would be useless without a live preview of the fonts you are choosing.

When you make a change in the Customizer it can happen in two ways, a ‘refresh’ or a ‘postMessage’.

‘Refresh’ is the default and it’s what many people use, each time you change a setting the previewer refreshes and then your changes can be seen. The refresh takes around 1-2 seconds to complete.

A ‘postMessage’ on the other hand is instant. You make a change and the results are shown immediately, without the previewer refreshing.

From the beginning I knew the ‘postMessage’ method was a better user experience, but I simply didn’t have the knowledge to dynamically load the fonts with Javascript. So to start I used the refresh method.

When I realised a lot more people were using the plugin than I ever thought would have, I knew I needed to implement the instant preview. So I did some research and reached out to Weston Ruter for help and eventually figured it out.

Your plugin has a large active installation base and an incredibly impressive set of reviews. At the time of this writing all 43 reviews are 5 stars. What do you think has made Google Fonts for WordPress so popular and well received?

Compared to many plugins, it’s actually very simple. I’ve also focused on making it as easy to use as possible, even if you have no technical knowledge. I think people appreciate that the plugin allows them to do exactly what they want (use Google Fonts) without jumping through technical hoops.

Google Fonts for WordPress Screenshot

The plugin seems like it has the potential to draw a lot of support requests if everything isn’t just right before each release. What is your testing routine like to make sure you aren’t totally blowing up someone’s site design?

I try to ensure that each update is only a small incremental change and that backwards-compatibility is always maintained. That way if the latest version works on my testing sites (which use various PHP versions) then there’s no reason it shouldn’t continue to work perfectly for the 10,000+ websites it’s currently active on.

What are your future plans for Google Fonts for WordPress? New features, a premium version or something else?

One of the great things about Google Fonts for WordPress is that for 99% of user it does everything they need without any addons or upsells. I have considered creating a premium version for professional users that offers selective font-weight loading (to increase page speed) and the ability to define your own CSS selectors.

[Update: Danny has since gone ahead with his plan for a premium version. You can learn more about it at FontsPlugin.com.]

Is there anything else WordPress-related you are involved with that you’d like to bring attention to?

Right now I’m focusing on themes and plugins for Gutenberg. It looks to be set it stone that it’s going to be the default editor in WordPress 5.0 so I’d like to be one of the first to create beautiful designs and useful plugins. I’ve already begun by releasing my first ten blocks for free (Editor Blocks) and I have a lot more planned!

Thank you for taking the time to interview me, Brian!

%d bloggers like this: