Using Google Font directory and its API

I have been playing around with the Google Font Directory and the Google Font API. This is a new offering from Google which allows for the use of their open source fonts on any website. It is extremely easy to use, all that needs to be done is to add a link to the font, and then specify it in the stylesheet. In the case of this blog, I am using Droid Sans font. To use this font I added this to my WordPress theme’s header.php file:

<link href=’http://fonts.googleapis.com/css?family=Droid+Sans’ rel=’stylesheet’ type=’text/css’ />

And this to the style.css file:

body{ font-size:14px; font-family: ‘Droid Sans’, arial, serif;;line-height:14px;}

and Voila!

There is a Getting started guide that details what fonts are currently available and how to use them.

Leave a Reply

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