Google Font API

Google Font API

When I was taking a college HTML/CSS class way back in 2003, I remember one thing. I was writing code for a site I was ‘designing’ in class (and I use that term loosely). I really, REALLY wanted to have a pretty font. That’s all I was asking for. But due to web safe fonts, it was a bitch to do that. So what did I do? I put my font in as an image and wrote the image into my code. Simple solution at the time right? Teacher was amazed, ended up getting asked to tutor… all for one stupid revelation that we weren’t taught in class.

Google has now officially fixed (or at least helped) that pain in the ass situation. What they have been working on is a Google Font Directory, where developers and designers can submit their fonts for us to use, so that developers, designers and coders can use the Google Font API to enhance their websites with more web-safe fonts.

Google Font

With each font, there’s the html code that you’ll insert into your site so that it can read, accept and display it. The html will look something to this effect to link it to the external style sheet:

<link href=’‘ rel=’stylesheet’ type=’text/css’>

and the CSS will look like:

h1 { font-family: ‘Cantarell‘, arial, serif; }

…doesn’t seem too complicated at all.It said it works in “most browsers”, so I’m assuming Chrome for sure, but I’m questioning Firefox (because it’s touchy about a lot of things) as well as IE. Safari will most likely easily support it.