:::: MENU ::::

Google Font Directory & API

Google Font Directory -Font APIIn the Google I/O conference, Google has announced a collection of high quality open source web fonts that they have put inside Google Font Directory and made them available for use by everyone using Google Font API.

The Google Font API gives a webmaster the ability to use a simple, cross-browser supported font from the Google Font Directory on any web page. The fonts have all the advantages of normal text: in addition to being richer visually, text styled in web fonts are still searchable, and doesn’t get distorted like images when they are zoomed, and is accessible to users using screen readers.

“Google has been working with a number of talented font designers to produce a varied collection of high quality open source fonts for the Google Font Directory. With the Google Font API, using these fonts on your web page is almost as easy as using the standard set of so-called “web-safe” fonts that come installed on most computers.”

How to use Fonts from Google Font Directory?

All the fonts under the Google Font directory are hosted in the cloud. You don’t need to download or install anything on your side. In fact your visitor doesn’t need to have that font installed on his computer to view your site.

As a webmaster all you need to do is to add a simple line of code on your website to call the particular CSS file for the font. For example, if you want to use Droid Sans, add this code in the HEAD element:

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

Then you can use Droid Sans in any CSS rule inside your stylesheet:

h1 { font-family: ‘Droid Sans’, arial, sans-serif; }

And you are all set! Due to the operations being performed behind the scenes, these custom fonts will even be recognized back to Internet Explorer 6! Isn’t that amazing?

Nettuts+ has a great video showing exactly how to implement this. I have embedded the video below:

Example of Google Font:

google font

The only few possible downside of this whole thing:

  • Google font server may go down! However, like any style-sheet, if the first font doesn’t load I’m sure it will point to an alternative. So your users will always see the text on your page.
  • If you are using a very uncommon font, that the user is loading on his browser for the first time, he may experience a bit of slowness. But as he browses more and more pages, all these fonts are going to be cached locally on his browser/computer. Thus things will be really speedy on his future visits

So why do you think Google is doing this? Apart from the fact that this will make the whole web much ‘nicer’, do you think google has any other underlying interest for doing this whole thing? Share your speculations in the comments!


3 Comments

  • Reply Max |

    This is very exciting. But the Google Font Directory is still just a handful of fonts at the moment.

    I wonder when will they add to it to make it useful?

So, what do you think ?