Post from February 12, 2009 (↻ May 31, 2022), filed under Web Development.
This and many other posts are also available as a pretty, well-behaved ebook: On Web Development.
An extension of my post on Arial and Helvetica: For those who want or have to use Arial as their standard font, there is no point in mentioning Helvetica anywhere in the code, as in
arial, helvetica, sans-serif.
Arial is so popular that Helvetica’s almost never used. There isn’t a single test case to indicate else.
arial, sans-serif is enough. No need for ten additional characters. There never has been when Arial came first in a font list.
As many people know, Arial is not only available on almost any Windows system, it ships with Mac OS since at least 10.3, if not 10.0, and it ships with several Linux distributions, too, at least do numbers suggest so. In that respect Arial, the “scourge,” has won, years ago. We gotta give it that, in our font declarations.
I’m Jens, and I’m an engineering lead—currently manager for Developer Experience at LivePerson—and author. I’ve worked as a technical lead for Google, I’m close to W3C and WHATWG, and I write and review books for O’Reilly. I love trying things, sometimes including philosophy, art, and adventure. Here on meiert.com I share some of my views and experiences.
If you have a question or suggestion about what I write, please leave a comment (if available) or a message. Thank you!
You got it backwards. It should be:
Helvetica, Arial, sans-serif;
Isn’t it better to use Helvetica when it is available, and Arial when it isn’t?
Only if it’s for headings. Never use Helvetica for body copy, cos for us PC users it looks terrible 😔
On the subject of Helvetica, I’d add to what Adrei said with:
“Helvetica Neue”, Helvetica, sans-serif
Helvetica Neue is a version of Helvetica on OS X designed for screen reading and gives much crisper text in small sizes. No need to use it for titles or stuff.
Also, another handy tip:
Don’t specify “Courier New” directly for code samples. It’s thin and gangly in OS X, and Courier is better. The problem though is that Courier on Windows is a bitmap font and looks very bad. So how do you specify Courier for OS X, but Courier New for Windows in one declaration?
(or just ‘monospace’ in your font: attribute). OS X uses Courier, and Windows uses Courier New. Crisp fonts for all.
Ditto what Kroc Camen said.
‘Helvetica Neue’, Arial, sans-serif.
Arial looks very poor on OS X, worse at those mouse-type sizes some designers seem to love. And both fonts have very similar aspect-ratio.
BTW, my pretty much stock install of Ubuntu 810 doesn’t have Arial. I know I can add it, but I’m uninterested.
But I see your point about shaving a few bytes in your stylesheet.
It’s such a pity that Helvetica looks so bad on some PCs. Ruins it for everyone.
On February 19, 2009, 15:42 CET, gareth hunt said:
The “Helvetica Neue”, […] declaration looks terrible on PCs. A lot of “big names” use it, and it must look great on Mac OS, but I have to get firebug out and remove reference to Helvetica Neue if I want to have a readable experience on their sites.
Maybe this is interesting to you, too:
- Next: Performance and RFC 2396
- Previous: The Two Great Things About Validation
- More under Web Development, or from 2009
- Most popular posts
Looking for a way to comment? Comments have been disabled, unfortunately.
Get a good look at web development? Try The Web Development Glossary (2020). With explanations and definitions for literally thousands of terms from Web Development and related fields, building on Wikipedia as well as the MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, and Leanpub.