Although CSS3 @font-face is supported by most major browsers (IE, Firefox, Chrome, and Safari), but not all. When it doesn't, your custom fonts might break the layout or come out with undesired results. In this article, I will explain the common issues with using custom fonts, picking the matching fallback web safe fonts, and how to create a perfect fallback font style with Modernizr.
Common Mistake
One common mistake that most people make when implementing custom fonts is not specifying the fallback fonts or picking the wrong fallback fonts.

Web Safe Fallback Fonts
When using custom fonts, it is important to include the web safe fonts as fallback. The fallback font helps to keep your design looking consistent when @font-face is not supported or available. The key point for selecting fallback fonts is to pick the web safe fonts that best match the custom font. For example, if the custom font is Clarendon, then the best web safe fallback font is Georgia because they both are in serif classification and they have similar font width.

Layout Issues
Because every font face has its own width, height, weight, kerning (letter-spacing), etc., some fonts are not substitutable with the web safe fonts. Take a look at the example below. It is a comparison between Wire One (custom font) and Arial (web safe font) at 36pt uppercase. As you can see, the Arial text takes more than double the space compare to Wire One text because Arial has a wider width and kerning.

This might causes layout issues as shown in the image below where the fallback font extends off the boundary.

Modernizr
Fortunately, there is a Javascript called Modernizr that can help to fix the issue as mentioned above. Modernizr is a Javascript that detects what CSS3 features are supported by the browser. It will then add a CSS class in the <html> element to indicate whether the features are supported. For example, if @font-face is not supported, it will add no-fontface class in the <html> element (eg. <html class="no-fontface">). These CSS classes are added with Javascript and they are not visible in the source code. In order to see them, you need to inspect the page element or view the generated source.

Fallback Font Styles With Modernizr (demo)
So we can use Modernizr to detect if @font-face is supported and then provide matching fallback font styles. For instance, you can adjust the styles for the fallback font (size, letter-space, weight, text-transform, etc.) to best match the custom font.

Including Modernizr
To implement Modernizr, you need to download a copy of Modernizr and include it in the html document.
<script src="js/modernizr.js"></script>
.no-fontface CSS
Then you will need an additional rule for specifying the .no-fontface. Check out this demo to see the final result.
/* wire one font */
h1 {
font-family: 'Wire One', arial, serif;
font-weight: bold;
font-size: 48px;
letter-spacing: 1px;
text-transform: uppercase;
}
/* no-faceface fallback */
.no-fontface h1 {
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
font-size: 30px;
letter-spacing: 0;
text-transform: none;
}
You bring up some good points out about styling breaking if correct fonts aren’t used.
There is a Modernizr plugin for WordPress (http://wordpress.org/extend/plugins/modernizr/)
Do you know it? What is your opinion about it?
Thanks, this was really useful checklist of some of the common font problems, I’ll definitely have a go with Modernizr, it sounds pretty useful
Ty, i was searching for font importing in css for a long time)
Thanks this is very helpful.I am facing the same probelm but now it solved.
Thanks for this. I will look into using Modernizr. Great post
Good stuff.. I must experiment with some nicer looking fonts for my sites.
Very nice tutorial, thanks :)
I’m currently working on a website and this is very helpful. Thank you!
wanted to use this in an older project, problem was that I couldn’t check if it worked! Couldn’t find a browser that didn’t support fontface (older ie versions worked perfect, ipad didn’t had any troubles with fontface, even with the free atomic browser..). if someone could tell me a browser that doesn’t support this pls tell me :)
i use this in my site its nice
Great use of modernizr for this., but wouldn’t the last css-example still give layout issues, i.e: a browser supporting @font-face but lacking font ‘Wire One’ would fallback to arial font-size:48px NOT arial font-size: 30px.
Great useful article.Thank you for sharing.
great usefull post thanks for sharing it…
maybe… /* no-faceface fallback */ is should be /* no-fontface fallback */ ?
nice tutorial, thank you.
I love your blog and i love your ideas.i was having trouble with font selection and spending too much time to select the right one. Now i think this article may help me. Thanks a lot. I will surely use these tips in my blog Blogger Tricks.
Just used this tutorial to add the bank gothic font to my site. Useful post, thanks a lot
Amazing tuts thanks for sharing it at one place..
So nice information, I really wanted to know about it’s solution… Great help
many thanks. :)
In your demo example the Google font “wire one” is used. Is it possible to use a font like for ex. Helvetica. You don’t have to include the Modernizr js when using the Google fonts I think?