CSS Font stacks are one of those things that elude a lot of designers. Many stick to the basic stacks Dreamweaver auto-recommends or go even more basic by just specifying a single web-safe font.

But doing either of those things means you’re missing out on some great typography options. Font stacks can make it possible to show at least some of your visitors your site’s typography exactly the way you intend without showing everyone else a default font. Read on for more information on using and creating effective font stacks with CSS.

Creating Your Own Font Stacks

There are a huge variety of font stacks recommended. It seems every designer has their own favorites, what they consider to be the “ultimate” font stack. While there is no definitive font stack out there, there are a few things to keep in mind when using or creating your own stacks.

First of all, make sure you always include a generic font family at the end of your font stacks. This way, if for some strange reason the person visiting your site has virtually no fonts installed, at least they won’t end up looking at everything in Courier New. Second, there’s a basic formula to creating a good font stack: ‘Preferred Font’, ‘Next best thing’, ‘Something common and sorta close’, ‘Similar Web-safe’, ‘Generic font’. There’s nothing wrong with having more than one font for any of those, but try to keep your font stack reasonably short (six to ten fonts is a pretty good maximum number).

Third, make sure you pay attention to the scale of the fonts in your stack. One common thing I see in font stacks is the inclusion of Verdana and Arial or Helvetica in the same stack. Verdana is a very wide font; Arial is relatively narrow. In effect, this can make your site’s typography appear very differently to different visitors. The same goes for Times New Roman (narrow) and Georgia (wide). Considering both Arial/Helvetica and Verdana are considered web-safe (same goes for Times/Times New Roman and Georgia), it doesn’t make much sense to include both.

Common Font Stacks

A lot of designers out there have taken a crack at creating ideal font stacks. While I have yet to see an “ultimate” font stack, there are plenty of really great ones out there to choose from if you don’t want to take the time create your own custom stacks. Here are some of the good ones we’ve seen.

Better CSS Font Stacks

Unit Interactive published an article last summer with a collection of “better” CSS font stacks1. The list is extensive, with font stacks that should satisfy just about anyone. Fonts are listed out according to whether they’re appropriate for headlines or body content.

8 Definitive Web Font Stacks

This article from Sitepoint5 written by Michael Tuck lists eight font stacks that are supposed to be the ultimate stacks for any application. It’s based on a basic formula of: ‘exact font’, ‘nearest alternative’, ‘platform-wide alternative(s)’, ‘universal (cross-platform) choice(s)’, generic. My biggest issues with some of these font stacks is their length; is it really necessary to include 17 different fonts in a single font stack? I don’t think so…

The Myth of ‘Web-Safe’ Fonts

The Myth of ‘Web-Safe’ Fonts7 from Safalra.com offers up five simple, straightforward font stacks for web typography. These stacks are pretty bare-bones as far as most recommended font stacks go, but they’re perfectly adequate for many applications, as well as being a good starting point for building your own stacks.

Tools

Font Matrix

Font Matrix9 is a font comparison tool that lists fonts bundled with Windows XP, Windows Vista, Mac OS X Tiger, Mac OS X Leopard, Microsoft Office (2003, 2007 and 2004 for Mac) and the Adobe Creative Suite. The chart shows which software bundles and operating systems come with which fonts, so you can get a good idea of how common a particular font might be. This is an incredibly valuable tool for those looking to create their own custom font stacks.

Typechart

Typechart13 shows you web-safe and common fonts and suggests different sizes and styles for headings, paragraphs, and other typographic elements. There are a ton of different browsing options, and you can preview the way fonts will look on both Windows and Mac machines before downloading the CSS. The only drawback to Typechart is that it only includes a handful of fonts: Arial/Helvetica, Cambria, Georgia, Lucida Grande, Lucida Sans Unicode, Trebuchet MS, and Verdana.

Typetester

Typetester15 lets you try out up to three fonts side-by-side. This can be a great way to test font stacks to see what the differences will be as the stacks degrade. You can use any font on your system, though it does categorize fonts by web safe, Windows default, and Mac default, making it easier to create stacks without other reference materials.

Font Stack Builder

Code Style offers the Font Stack Builder17 for creating font stacks based on font family, and whether the fonts are generally installed on Windows, Mac or Linux machines. You can add as many fonts as you want and it will show you a grid with how common those fonts are on different kinds of machines.

Articles

There are hundreds of articles out there about font stacks. Some have been mentioned above, but there are plenty of others that deserve some recognition. Here are a few:

Striking Web Sites with Font Stacks that Inspire19
This article covers twenty different websites with excellent font stacks. Basic web-safe and common fonts are covered along with more creative font stacks. It’s a great resource for getting some inspiration before creating your own stacks.

The New Typography23
This article gives a great overview of creating font stacks and good web typography. There are plenty of tips mentioned, including which fonts to avoid using in the same font stacks and why.

Roundup: CSS Font Stacks25
This article is a great introduction to CSS font stacks and how to use them effectively. It includes some tools, tips, and other information about creating your own font stacks or choosing which ones to use.

Related Articles

Matthew Nuzum

What would be awesome is a tool, maybe a plugin for firebug, that shows you what font you’re seeing *right now* in a selected element on the page. Inspecting the css shows you the font stack but sometimes it’s hard to tell which font is actually being shown. Even harder if you’re working with a stake holder and they’re expressing discontent over a look, very possibly because they don’t have the font from the stack.

1

2

Dave

Dean

I must admit that I’ve not been one to try out new fonts. I generally stick with the safe fonts and adjust the size / line height / letter spacing as im designing software for the masses! But after reading this im going to branch out and see what stacks the majority of users can see.

Thanks!

0

4

Helen

I am really afraid of using …
(1) professional fonts for designers that come with Adobe Suites, like Adobe Caslon Pro
(2) using css3-webfonts
(3) fonts like Gill or Frutiger that exist in a wide range of qualities and editions

All of these can look brilliant on the visitor’s screen but even though turn into a disaster. Webfonts are rendered, anti-aliased, clear-typed and hinted completely different on different browsers on one system. If you are keen on using them, you really should check the font on PCs and Macs right at the beginning.

If you’re on a PC, Safari does not indicate how a font looks like on a Mac. if you are on a Mac, using Adobe Caslon Pro can make PC-users blind when watching your headlines.

I think that different clear-type technologies are the biggest problem. There is truely a conflict between clear-type and inner-font hinting.

Using things like Gill: If you have a Gill which comes with the system as a true-type oder open-type, you should consider that many people have a type1-Gill without any screen-hinting.

Nick

Pete

Great article, I tend to use SiFR for headlines but it seems to be breaking a lot in IE8.

@Andre – I’d be careful when using Helvetica for body copy. The smaller it gets, the harder it is to scan through on a screen. Best practice would be to probably swap it out for Verdana if you’re going under 12px.

Chris Spada

secondred

nice css topic, but what all font stack topics are missing are font counterparts for linux systems. I checked my pages on win an linux (ubuntu) and the font rendering turned out to be the biggest problem. Linux standard webbrowser fonts turned out to be larger than win fonts, sometimes destroying the layout.

Andrew

Kristian J.

When including more “esoteric” fonts such as Futura, Helvetica Neue and other fonts that aren’t designed for screen use, you should be aware that some windows users have cleartype turned off. Without antialiasing these fonts become a garbled mess.

Anrkist

xirclebox

Very good post! informative and inspiring. CSS 3 is going to make working with specialty fonts much easier. I’m looking forward to that day but until then, I see some room for improvement in my current stacks. Thanks for the tips.

Marie

Chris Adams

not too impressed that you cut down the site point article “My biggest issues with some of these font stacks is their length; is it really necessary to include 17 different fonts in a single font stack? I don’t think so…”
Like many web design articles, take from it what you want.

Jeff

@chris – its ok to have more than one blog article written on the same topic. With articles coming out almost everyday, there’s gonna be some overlap. And its ok that they disagree with other articles written on the same topic. Should everyone always agree? isnt it nice to hear a different point of view?

Damien

Dennis

Simon Day

As with many postings on smashing mag; I read them, get all excited and then see all the comments below negating or warning against most of what has been said. I don’t have a mac and linux is awkward for me to test on.

How many others out there think they have learnt something new or interesting only to see the comments below and get all confused again?

:-(

0

30

Erwin Heiser

To all those whining about using “Helvetica Neue”: that’s a little treat for Mac users as that’s a default Mac Font. You DO understand the concept of a “font-stack” do you?
Nice article, bookmarked for future reference :)

Darren Azzopardi

font-stacks, font-stacks…….first understand type, I mean really get to grips with it..Immerse yourself in it, become a fan!
Having a better understanding of this will help you when creating your fon-stacks…

Basics first!

0

34

Han Solo

The main question than remains:
The new, fresh Vista-/Office-Fonts like Calibri, Cambria, Consolas … are much smaller than their websafe equivalent. How can we deal with that case? It’s not only about these Vista-Fonts but also with any other font. Does anyone has a elegant solution for that?

Michael Tuck

I’m Michael Tuck, the author of the Sitepoint article cited above. Cameron, thank you for mentioning the article, I really appreciate it. A few notes:

1) The original title was “8 ‘Definitive’ Font Stacks,” with the interior quotes surrounding the word “definitive” to show that the idea of a “definitive” stack is not possible. The editors changed the title, and thusly the meaning. In fact, the original version was at least 5 times as long as the final, published form. :(
2) The font stacks are overly inclusive and sometimes way too long, as you noted. 17 fonts in a single stack is just unnecessary overkill. I proposed some streamlined alternatives in the comments to the article.
3) The original article went into some depth about the Vista fonts, and noted that because of issues with Microsoft’s ClearType (a requirement for the Vista fonts) and their smaller relative size, some people will choose not to use the Vista fonts. Most of that material was edited out.

Also:

Nice job in citing the Inspiration Bit article. That entire site is excellent.

@Helen and others: There’s no problem in using “exotic” or less widespread fonts, as long as you “backstop” them with more universal fonts. The issue of font display on different systems and browsers is a persistent one. The only way to address this is to test your font choices on as many different ones as possible.

@secondred: My article specifically included Linux fonts, and the stacks I created all have Linux fonts in them. Sometimes Linux fonts (specifically DejaVu and Bitstream Vera) are a good bit bigger than their Mac or Windows counterparts. The Liberation fonts seem to be virtually the same size as their counterparts.

@Matthew Nuzum: Firefox has the FontFinder plugin that does what you’re asking.

@Darren Taylor: Putting Arial in front of Helvetica/Helvetica Neue defeats the entire purpose of the stack. While most Windows users don’t have both fonts, most Mac users do, and therefore most everyone gets Arial instead of allowing the Helvetica owners to see the site in that font. @Erwin Heiser, LOL at your response.

@Chris Adams: I don’t think the author “ripped off” my article at all. I will say that almost all of the source sites used are paralleled in my article, but that doesn’t mean she cribbed my work. @Jeff: You got it right in your response.

@Kartlos Tchavelachvili: Andale Mono is a cross-platform font. It’s a Microsoft core font that is common on many Macs.

@Simon Day: Don’t get discouraged, just try some of the stacks and techniques, and see what works for you.

@Ant: Licensing can be ascertained by Googling the font, finding its source, and reading up on it. You’re correct that most Vista fonts, aside from Segoe UI, are quite a bit smaller than their counterparts, as is Han Solo.

@Alessandro Mingione: Georgia is a gorgeous font, and Web safe, but it isn’t for everyone or every situation. There is no near-universal “best option.”

Deborah Jordan

Putting Arial ahead of anything means that most of the time, nothing else will show up as all computers have Arial, including Macs. Unless you really love Arial, always put it right before sans-serif. Don’t worry that those machines that don’t have Helvetica Nue – you can still put it first; if not there, then Arial will be served. As we all know that’s the way a stack works, computers pick up the first available font in the stack. A side note, I concur with those that say Helvetica is not a great font for body text, especially if the size is smaller. Even the font legend, Erik Spiekermann, decries the use of Helvetica for text. But, without cleartype, Helvetica Nue degrades to a point of complete illegibility. Simply a disaster.

Bouraoui

Gavin R. Putland

Tahoma is unsuitable for a general-purpose font stack because it doesn’t have italic glyphs: a faux italic version is synthesized by the browser, usually with far too much slope. Tahoma departs from Helvetica/Arial by having serifs on the capital ‘I’. If you don’t want Arial except as a last resort, you need to put a web font in front of Arial and also in front of “Helvetica”, which is often replaced with Arial by the OS or the browser, in defiance of the font stack. Accordingly, my current Helvetica-like font stack, which incorporates the Google font “Arimo”, is

SmashingConf isn't the eighth wonder of the world, but we are pretty close. Join us at SmashingConf Oxford on March 16–19 or meet us at the shores of Santa Monica for SmashingConf LA on April 27–30. You won't be disappointed.