We are a web design and development agency based in Manila and this is our blog. We build web applications that help companies run their businesses and help people find their voice on the web.

Google Web Fonts

Posted by Kevin Bett over 1 year ago

Recently i have been getting into the new Google Fonts API, which is a collection of free, open source fonts anyone can use in their site designs for free. The Google Font API allows you to embed any of the new Google fonts on your website using CSS.A selection of fonts:

alt text

You just need to add a link to Google’s stylesheet in the head element of your page and then apply that font to your text element. The syntax looks like this:

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Font+Name">

So let's say that we want our h1 element to be styled with the "Irish Growler" font. First we get the link to the font and put it in our head element:

<link href='http://fonts.googleapis.com/css?family=Irish+Growler' rel='stylesheet' type='text/css'>

Then add the style:

h1 { font-family: 'Irish Growler', arial, serif; }

For the full range of fonts and all the documentation checkout the Google Fonts API