Free Google Webfonts plugin for WordPress

Google Fonts are a tremendous addition to any designer’s arsenal, providing a basic library of typefaces that cover most requirements. But if you’ve ever tried to add them to a WordPress theme you’ll know what kind of hacking is involved.

Fortunately, web designer Eric Alli has recognized the issue and released a great plugin for WordPress that will allow anyone to utilize Google’s font library.

Google Typography is a free solution, and the best thing about it is that it’s incredibly simple to use. Once you’ve installed, just navigate to the Appearance > Typography settings page, click Add New to add a new type style and customize your text via the live preview. Once you’ve set up your font, all you have to do is enter the CSS selector to apply it to and click Save; that’s it, your font choice is now being used live on your site.

What’s more Alli has included a register_typography function to enable theme developers to quickly add Google fonts to themes. It makes adding a font as simple as this:

if(function_exists('register_typography')) { 
  register_typography(array(
    'page_titles' => array(
      'preview_text' => 'Page Titles',
      'preview_color' => 'light',
      'font_family' => 'Lato',
      'font_variant' => '300',
      'font_size' => '45px',
      'font_color' => '#252525',
      'css_selectors' => '.page_title'
    )
  }
}

There are obvious omissions: there are no line-height, or tracking settings for example, which are vital for body text and display text respectively; however, the plugin is only at version 1.0 and hopefully more will be added over time.

I’d encourage anyone to download the Google Typography plugin and give it a try, it’s a simple, intuitive way of adding Google fonts to WordPress sites; easy to use but fantastically flexible.

What I love about the web design community is that for everyone who rehashes someone else’s product to make a quick buck, there’s someone else who releases something really useful, free of charge. Eric Alli’s Google Typography is a case in point, and it makes the web just a little bit better.

Have you used Google Typography yet? What options do you wish were included? Let us know in the comments.

0 shares
  • http://www.designerist.ch/ Monika Zwiefelhofer

    This is awesome !!!!!! Thanks so much for sharing :-)

  • blokche

    I actually handle fonts through a child theme and the css @font-face declaration. I already have enough plugins to deal with spam or the SEO aspects! :)

  • http://www.inverselogix.com/ Hemanth Malli

    Very quick way to add Google fonts to WordPress themes. Amazing Thanks for the share !! http://www.inverselogix.com

  • http://bolica.net Ahmed Bolica

    Awesome !!

  • Henry Instadesign Roberts

    This looks great, however I’ve been adding webfonts to WP sites very easily by pasting in one line of code at the top of my child theme and using Sublime Text’s rather marvellous cmd+ctrl+G multiple selection function to replace the fonts I want. To me it seems it’s going from easy to incredibly easy!

  • http://machoarts.com/ Suraj Vibhute

    I think above code related to register_typography have few errors, extra closing curly brace [ } ] and few closing braces are missing.

  • Daniel Heywood

    Cool, I’ve had WordPress themes with only 10 Google fonts available and adding other fonts was not my favourite pass time. Thanks for taking the time to share this – hats off!

  • Alexander Samokhin

    Thanks! Great plugin. And how about russian language? PT Sans have a cyrillic version, but the font doesn’t look correctly in russian.

  • Sara Taylor

    Amazing Thanks for the share

    http://www.digitalpoin8.com

  • http://www.cianografia.com/ Cianografia

    great article

  • http://bobbysony.com/ Robert

    Mmm.. google seems to be touching all parts of web dev now nowadays. thanks for the info.

  • http://www.abinashmohanty.com/ Abinash Mohanty

    Thanks for the tips! Will it slow down my wordpress? Any such experiences by anyone out here!

  • http://www.digitalpoin8.com/ irfan khan

    This is pretty cool !!! thanks for spending time on it

  • CBA

    It’s Great

  • MK

    How do I download my own font to google fonts plugin on wordpress?