Mike Gunderloy's book Coder to Developer suggests, as part of configuring your IDE, that you explore programming specific fonts. I was intrigued, because I hadn't ever considered that. I've been using Courier New 9 for years. A little searching turned up a few links:
- this programming font geek thread
- a wiki entry on programming fonts
- A comprehensive ClearType-enabled monochrome programming font comparison
Lists of fonts are all well and good, but a picture is worth a thousand words. Here are code snippets in each font, without ClearType:
Andale Mono 9 point
Anonymous 9 point
Courier New 9 point
Lucida Console 9 point
Lucida Typewriter 9 point
Monaco 9 point
Pragmata 9 point
ProFont (fixed size bitmap)
Proggy Clean (fixed size bitmap)
Vera Sans Mono 9 point
I'm sure I missed some, but these seem to be the most popular ones. I am not listing a few I tested here and found so heinously bad in these conditions (9pt sans ClearType) that they didn't deserve any consideration.
I learned a few things in this experiment:
- I definitely have to have monospace fonts in my IDE. All of the above fonts are monospace.
- I don't care for anti-aliasing of any kind on a programming font. That goes for ClearType and plain old AA. Note that some fonts decide to antialias themselves even at 9 point!
- Bitmap fonts, such as Proggy, are very precise but don't scale. At all. So if you're programming on a large 1600x1200 or higher screen, that may be a factor. And the scalable fonts can look quite different at larger sizes!
- Proggy is my top choice for programming font, but it's fixed size and thus doesn't always work if I'm coding on a 1920x1440 display. If I need a scalable font, I like Lucida Typewriter and Pragmata.
- I don't recommend using Comic Sans as your programming font. Nor do I recommend dreaming up all new programming characters.