views:

76

answers:

3

Hi,

Google has launched Google font API but, CSS3 standard came with @fontface which enables us to have non web safe fonts on websites.

Can anyone suggest pros and cons of both over each other. Which one is preferred and why?

+2  A: 

Use the Google API unless there is a specific font you need that Google doesn't have. Otherwise, the Google API will make your life easier, in my opinion.

The new Google API is basically a free version of TypeKit.

musicfreak
A: 

Keep in mind that @fontface still isn't "100%" in IE, so it's fairly limiting. If it's between @fontface and Google, you've got nothing to lose with Google. Plus, Google's bandwidth is free, while you'd otherwise be hosting your font files.

Hope this helps :)

mattbasta
+4  A: 

As far as I'm aware, Google Font API uses @font-face to load the fonts. eg. http://fonts.googleapis.com/css?family=Tangerine. It also does browser detection to check for Internet Explorer, for whom it will serve up the IE-only .eot font files instead.

Now I'll take it that you're asking for a comparison between building you're own font files for use with @font-face and working with Google's solution.

Google Font API

Pro

  • Easy to use
  • Google's CDN ensures fast loading and high uptime
  • Browser detection built-in
  • Free!

Cons

  • Small choice of fonts

Google's licensing scheme, which requires the font to be not only freely available, but also Open Source, means that the amount of fonts that will be available for this service will naturally be small.

Build your own @font-face file

Pro

  • Huge selection of fonts

Cons

  • Legal and licensing problems
  • Buying embed license may cost extra
  • Rolling your own fonts for IE support may be troublesome

Of course commercial options like Typekit have the best of both worlds, but you'd have to pay for that. Other sources of free, embeddable fonts include Font Squirrel and The League of Moveable Type.

Yi Jiang
You could view the "legal and licensing problems" as equivalent to "small choice of fonts", because after you filter out all the fonts you cannot use due to licensing issues, the selection becomes fairly small. :)
musicfreak
There is a slight distinction - Google states that all their fonts are Open Source, which is quite a requirement when you talk about fonts. Websites like http://www.fontsquirrel.com/ on the other hand hosts free commercial fonts that are not necessarily Open Source that you can use yourself.
Yi Jiang