In the last post I talked about the design aspect of using CSS3 @font-face, today I would like to extend this topic to the technical side on implementing custom web fonts. So what are the options for implementing web fonts? I'm going to review the three main methods of incorporating @font-face and explain the pros and cons of each method.
1) CSS3 @font-face
Standard @font-face
First, let's talk about the native way of implementing custom web fonts — @font-face. The CSS syntax for declaring a custom @font-face is very simple. Basically you just need to specify the font name and font file source. Once the font is specified, you can apply it to any element.
@font-face {
font-family: "Custom Font Name";
src: url('font.ttf');
}
body {
font-family: "Custom Font Name";
}
Bulletproof @font-face Syntax
Because every browser supports different font formats (IE supports EOT only, Firefox supports EOT & TTF, and Safari supports OTF, TTF, and SVG), additional font formats are required to be cross-browse. Below is the bulletproof way of implementing @font-face from Font Spring.
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
@font-Face Generator
If you need to export the fonts in different formats, there is a generator which allows you to generate various font formats from an existing font. Note: most fonts are not allowed to embed or distribute on the web. Check the licensing information before implementing any fonts.

Premium @font-Faces
Because most fonts do not allow publishing on the internet, Font Spring offers professional fonts with @font-face support. You can buy licensed fonts individually and use freely on your sites.
Pros & Cons
- PROS: Full control because the fonts are hosted on your server.
- CONS: The process is a bit complicated because it requires various font formats.
2) Font Service Providers
Another way of using fonts without worrying about licensing issues is by using the fonts from service providers such as Typekit and Fontdeck. With font service providers, the fonts are hosted on their servers and you have to pay a subscription/licensing fee to use the fonts. The process of implementing host fonts is a lot simpler compared to the native way of implementing web fonts because they handle all the font formats and browser compatibility.
Installing Typekit
To install Typekit, it requires two lines of Javascript.
<script type="text/javascript" src="http://use.typekit.com/are7wnq.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
Pros & Cons
- PROS: Easier to implement because you don't have to generate the different font formats.
- CONS: It requires subscriptions. Since the fonts are hosted on the service providers, if their servers go down, the fonts will not be available.
3) Google Web Fonts
Google Web Fonts is also consider host font providers, but Google Web Fonts are free. Google fonts are light weight (they load very fast) and they are easy to use.
Implementing Google Web Fonts
To implement Google Web Fonts, just add the line of code below.
<link href='http://fonts.googleapis.com/css?family=Arvo' rel='stylesheet' type='text/css'>
Pros & Cons
- PROS: Free, lightweight, and loads fast.
- CONS: Not enough selections and most fonts don't come with different weights and styles.
Conclusion
@font-face is good if you need to use your own custom fonts. Typekit & Fontdeck offer professional fonts in complete sets (styles & weights), but require subscriptions. Personally, I like Google Web Fonts because it is simple to implement and it loads very fast.
CUFON is great for large scale headline fonts, but its just not feasible for smaller font sizes, since it changes the text to PNG on the fly. I like @font best, but tend to use online font services more so I dont have to worry about breaking EULA on the fonts we use here.
Thanks, Intersting, Nice post.
With Google Webfonts, there are many more options than there used to be. Google just updated the Google Webfont interface, and added many, many new fonts. Many don’t have multiple weights, but most body copy fonts have regular, bold, and italic.
I still use Google Webfonts as my first stop for selecting fonts. If I can’t find any there, I will use FontSquirrel fonts. I hate all those paid webfont subscriptions, and try to avoid them. There are enough decent free webfonts. Why pay a subscription when clients don’t like extra charges?
Not working in mac
CUFON give me trouble in explorer 9
Just get latest Cufon JS files, should fix this in IE9
Google sounds like the best option…to have to install the fonts on your own server for every website seems like it could be time consuming. I’m sure, as CSS continues to evolve, we’ll see more solutions to this web design challenge.
Hi there!
This solved a big issue on my site.
I was using cufon and transform (skew) effect, but its not working in IE8 and IE9. I searched a lot for another solution, and this helped me!!!!!! :)
BTW, is there any solution to using cufon and transform effect together [e.g. I am using: skew(0deg, -10deg)] ??
Please reply back if any solution is there.
Thanks a ton!!!!!!!!
FONTS are cool for web design, but more so for print… I will wait until a more accepted, universal solution to web fonts is available.
I’ve always been weiting for something like google web fonts. Your single con is obselete: Google got already 238 fonts online, and it’s growing fast and constantly.
http://www.freesickwallpapers.com/
Check this out everyone Featured Wallpapers
Especially to suit your Mobile Phone!!
We used font squirrel quite a bit until we realized we had some inconsistencies with the way IE fonts were created, example they would have padding on the top of them.
Cufon is great for main headlines, but it’s really nice seeing body text in a decent google webfont, I tend to use different methods for different websites.
Interesting summary. I’ve never used Google fonts, I’ll have to check it out
Thanks for it :)
Is the following code wrong..??
@font-face {
font-family: “myfont”;
src: url(“../myfont.ttf”);
*src: url(“../myfont.eot”);
src: url(“../myfont.eot”)\9;
}
where “*” is the working for IE7 and “/9″ for IE8. I haven’t worked for IE9 but the above code is working on all browser in my case.
Thanks for your suggestions
Thanks for this cool post. It is very useful when we have to use own styling fonts.
I guess it’s time for me to try css3. Thanks.
Autson is an outstanding name in the field of web design, web development, and experts in Internet marketing. We are providing innovative and creative web development and designing solutions which ensure your strong online business presence as well as gave you a way to expand your business.
Thanks for your suggestions