Progamming Fonts

December 16, 2004

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:

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

font_programming_sample_andale_mono_9.png

Anonymous 9 point

font_programming_sample_anonymous_9.png

Courier New 9 point

font_programming_sample_courier_new_9.png

Lucida Console 9 point

font_programming_sample_lucida_console_9.png

Lucida Typewriter 9 point

font_programming_sample_lucida_typewriter_9.png

Monaco 9 point

font_programming_sample_monaco_9.png

Pragmata 9 point

font_programming_sample_pragmata_9.png

ProFont (fixed size bitmap)

font_programming_sample_profont.png

Proggy Clean (fixed size bitmap)

font_programming_sample_proggy_clean.png

Vera Sans Mono 9 point

font_programming_sample_vera_sans_mono_9.png

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:

  1. I definitely have to have monospace fonts in my IDE. All of the above fonts are monospace.
  2. 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!
  3. 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!
  4. 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.
  5. I don't recommend using Comic Sans as your programming font. Nor do I recommend dreaming up all new programming characters.
Posted by Jeff Atwood
51 Comments

One tip: I like the built in Microsoft font TERMINAL for the command and output windows. It scales down to 6pt extremely well and fits tons of text in there.

Jeff Atwood on December 16, 2004 1:20 AM

I prefer the Proggy Square variant of Proggy myself, perfect 8pt font.

Funnily enough I also only started investigating something other than Courier after reading Coder to Developer. :-)

Ian on December 16, 2004 1:48 AM

I also stick with Courier New. On a CRT, I was ok without anti-aliasing, but LCD's have such high contrast that I need ClearType to read comfortably. (I hope this makes sense to people who prefer the opposite.)

Chris Lundie on December 16, 2004 5:37 AM

Lucida Console and Courier New remain my top choices for programming fonts

I agree with you. I've tried more than a few other fonts myself, but I still haven't found anything that was better for my eyes than CourierNew or Lucida.

Radi on December 17, 2004 5:06 AM

Thanks for that!

It prompted me to go find Andale Mono, which I like - it reminds me of the font I used to use on the Macs back in school. 'Course, it might have actually been the same one...

TristanK on December 17, 2004 9:30 AM

ther is a ultimate monospace font before consolas:
"lucida sans typewriter" -- a font distributed with java (located in \program files\java\jre1.x.x\lib\fonts)

it has higher x-heights than lucida console, a feature that significantly increases readability.

Veselin Ostojin on August 23, 2005 6:28 AM

Thanks Veselin--

I like Lucida Typewriter a lot. I added it to the list.

Consolas is great but useless unless you have ClearType on (which I never do):

http://www.codinghorror.com/blog/archives/000356.html

I would love to get a copy of Pragmata for evaluation. I'm not against dropping $100 on a font if it's REALLY good and becomes my permanent default.. but I can't tell that without trying it first, and all the font websites have a "no returns" policy.

If anyone reading this has a copy of Pragmata they will loan me for trial, please email me. I swear on scout's honor I'll buy it if it becomes my new default, and delete it if it doesn't.

Jeff Atwood on October 9, 2005 4:34 AM

One feature Courier New has which most "fixed width" or mono fonts don't is that ALL of its variants are the same width as the regular font. Many fonts, like Lucida Console, while monospace, aren't constrained in this way.

I do dislike Courier New and would like to find a mono font that has this property, preferably a sans serif one.

Jan Theodore Galkowski on October 10, 2005 9:15 AM

OK, never mind. I broke down and bought a copy of Pragmata. The jury is still out on this font, but that's definitely $108 I'll never get back :P

Jeff Atwood on October 13, 2005 3:50 AM

Yeah, I'm with those that prefer a serif font.

Haacked on October 15, 2005 2:14 AM

Dude, you are missing one of the best fonts ever. Bitstream Vera Sans Mono.

Christian Romney on October 17, 2005 10:14 AM

I'm an ID10T. Next time, read don't CTRL+F for Bitstream Vera Sans Mono, Christian.

Christian Romney on October 17, 2005 10:16 AM

What about Raize Font?

a href="http://www.raize.com/DevTools/Tools/RzFont.asp"http://www.raize.com/DevTools/Tools/RzFont.asp/a

The Raize Font is a clean, crisp, fixed-pitched sans serif screen font that is much easier to read than the fixed pitched fonts that come with Windows. Ideally suited for programming, scripting, html writing, etc., the Raize Font can be used in any IDE or text editor.

The Raize Font supports the following sizes: 10, 12, and 14 points and is available for free.

Jim McKeeth on October 18, 2005 2:50 AM

Hmm. I definitely like that Raize comes in 10, 12, and 14 point. But to my eye it's vastly inferior to Proggy.

Jeff Atwood on October 18, 2005 4:05 AM

a href="http://dp.rastko.net/faq/font_sample.php"http://dp.rastko.net/faq/font_sample.php/a

for when you really need to track down '`" 0oO iIl1 problems

simon on October 19, 2005 6:11 AM

Jibz has a very nice hand-edited variant of Proggy he calls "Dina":

http://www.donationcoder.com/Software/Jibz/Dina/index.html

This is definitely an improvement on an already great font. Very highly recommended; there's no reason to use Proggy when Dina is available. And he added 8, 9 and 10 point versions PLUS the bolded () [] versions.

Great job guys.

Jeff Atwood on October 20, 2005 4:40 AM

I like Pragmata a heck of a lot at 9 point, but it doesn't scale all that well to larger resolutions. It's a really tall font.

Jeff Atwood on January 24, 2006 3:41 AM

I've recently switched to consolas. I find it works well. Needs cleartype though, which I know alot of people don't like. It's a bugger to get hold of too.

[ICR] on March 18, 2006 2:01 AM

I've just purchased a 20" 1600x1280 TFT display. On my old CRT I used Andale Mono at 9pt for years and was very happy, however I've probably wasted more than 4 hours trying to find a font that will work with this new screen!

Ideally I would like a font that:

* Looks good at sizes 10pt - 12pt, anything else makes very small text at this DPI.

* Has a stroke width of more than 1 pixel at the 10-12pt size. The higher resolution of this screen makes single-pixel-width-strokes look very thin and spidery, especially against a white background.

* Looks good without Clear Type or Antialiasing enabled. I don't mind seeing pixels (they are so tiny now anyway!) because my eyes become fatigued less quickly when the characters are sharp.

I hope someone has a suggestion or two for high-res fonts, but if anyone else is in the same boat, the best thing I've found so far is probably Triskweline 10pt. It still has a 1-pixel strole width, so it's not perfect, but it is quite good.

Rick on March 18, 2006 9:35 AM

I've now had a few weeks to get used to this 1600x1200 resolution. Fonts that render to an adequate height (10 or 11pt) with 1-pixel width strokes still look a bit spidery to my taste, but 2-pixel-width strokes look far too fat and heavy so I've eventually settled on thinner fonts.

Triskweline 10pt is still good but I've found some others I prefer.

Bitmapped: Dina, Ti92Plus, PixelCarnage (a wee bit too much whitespace in this one though).

TTF: Lucida Sans Typewriter, Andale Mono. These are the only two I've found that are scaleable and look OK without antialiasing / ClearType.

I'd love to see how Pragmata looks without antialiasing but there's no way I'm paying that much to try it out!

Rick on April 16, 2006 9:13 AM

Email me directly if you want to try Pragmata.

Jeff Atwood on April 17, 2006 2:10 AM

DejaVu mono for IDEs :)
dejavu.sf.net

Dentharg on August 2, 2006 12:50 PM

Who the heck uses non-anti-aliased fonts these days? sheesh! =)

sak on August 13, 2006 6:21 AM

Another vote for Bitstream Vera Sans Mono. Awesome font with Cleartype enabled, not so great without, but i work with cleartype all the time now. Consolas is number 2 in my books.

Mal on September 20, 2006 5:43 AM

That "dreaming up all new programming characters" font is hilarious. it is like the ultimate joke font.

Travis on November 15, 2006 7:18 AM

What's the type of font you see in those Ruby on Rails videos?

Richie on February 8, 2007 6:13 AM

I second the "DejaVu Sans Mono" vote. It's essentially the same as Bitstream Vera Sans Mono, but new and improved.

JMC on February 24, 2007 5:23 AM

I use http://fractal.csie.org/~eric/wiki/Terminus_font

Marshall on March 2, 2007 9:36 AM

I use proggy clean (TrueType, 12pt). C# looks alien in any other font

SealedSun on April 14, 2007 4:29 AM

Any chance of getting Envy Code R @ 10pt ClearType added to your samples?

http://www.damieng.com/blog/archive/2006/12/26/Envy-Code-R-programming-font--preview-available-for-download.aspx

[)amien

Damien Guard on April 26, 2007 7:28 AM

Hmm - Aaron, to be honest I am not that keen on Pragmata, from the demo page. Yes, the high x-height probably makes it more legible in smaller sizes, but it also means it has to have something of the appearance of a compressed font. Look at the lowercase "g" for example - not very pretty. But each to his own!
Although the conventional wisdom is that screen reading is the reverse of paper reading - making sans fonts better for body copy and serifs for headings - I am not so sure. Ol' Courier New may be boring but for me it works...!

John Bonavia on August 5, 2007 10:12 AM

I just use Emacs (and xterm, and Firefox) with a default black on white. My colleagues think I'm crazy for using the tiniest fonts I can get out of my X server on a dual 1920x1600 or some such. That's usually Courier inside Emacs (because it has a tolerable bold) and the very basic 5x9 or 6x10 in the xterms.

I'm kind of divided regarding serifs or not. The serifs in Courier tend to make the text look cluttered (maybe I should artificially add some more space between lines somehow?) but I also do email and documentation in Emacs, and there I vastly prefer legible word gestalts over those skimpy and but crisp individual letter renderings you get with a good sans-serif font.

Thanks for the tip to tweak down the white background to off-white; I did that once upon a time but I've been too lazy to do it across server upgrades etc. Actually in the xterms I start them up with a script which selects a light pastel background color which identifies which server it's running on. ... Time passes ... For Emacs I found (set-face-background 'default "seashell"), the greyish light colors are too close to the window decorations and the other lights are too strong for my taste, but this one is kind of nice.

Speaking of Emacs. Some of the syntax coloring packages I use want to use boldface for some things, so seeing font samples with a mixture of bold and plain would be nice. (Italics / oblique, too, I guess, although I've zapped those oblique styles where I have come across them, notwithstanding that I had basically decided to stop tweaking my settings.)

era on September 19, 2007 12:07 PM

I use Fixedsys. Classic.

http://en.wikipedia.org/wiki/Fixedsys

Zack on September 21, 2007 1:26 PM

Terminus ++

Also check out artwiz' smoothansi. Not so standard of a look, but I like it for some reason while programming and general terminal usage.

codemac on October 4, 2007 6:56 AM

i can't believe nobody has mentioned triskweline.

a href="http://www.netalive.org/tinkering/triskweline/"http://www.netalive.org/tinkering/triskweline//a

i switched my environment (gray-on-black, mild syntax highlighting, vim) to it and never looked back.

it's a bit larger than the usual suspects which makes just right it for my 1920x1200 dell. might be too small for larger resolution but there's still the ttf version...

moe on October 4, 2007 8:23 AM

Font: Monaco, Consolas or Bitstream Vera Sans Mono.
Colorscheme: http://www.vim.org/scripts/script.php?script_id=1732

Radu on October 18, 2007 2:52 AM

Have a look at Terminus
There are .fon versions of it (or at least you can make them from the package) but each variant is a seperate file...

It is available in 6x12, 8x14, 8x16, 10x20, 12x24, 14x28 and 16x32.


The guy who made it:
http://www.is-vn.bg/hamster/jimmy-en.html
True Type versions:
(really bitmap, but inside a TrueType font, note not pseudo bitmap, there's no vectors)
http://chlamydia.fs.ei.tum.de/~corecode/unsorted/Terminus.ttf
http://chlamydia.fs.ei.tum.de/~corecode/unsorted/TerminusBold.ttf

Spudd86 on November 22, 2007 9:39 AM

fgrererewqwqewqewewqew

VINAY on June 21, 2008 1:42 PM

Comic Sans.. lol.

It's funny, my first programming course's instructor favored Comic Sans - gawd was it awful.

I just wanted to add that I found it ironic that another programmer liked Courier New. I came across it when I first learned to program as an alternative to the ghastly Comic Sans my instructor was teaching with. I should be clear, he wrote in English prose with Comic Sans, but for his programming examples, they were wide ranging from Times New Roman to Monospaced... any day they could be a different font. I don't think he really knew his way around word processors... it was either that or he didn't have time for solid preparation. Anyways, while learning to program in Emacs I found Courier New to just fit what code should look like. After some searching around, I find that we're not the only programmers to like this font.

With time comes change and I'm looking for a pleasant and easy on the eyes style. I think it's time for a change when I find myself staring at code and getting lost in its appearance rather than its true meaning. 1's being mistaken for l's and I've found that I want strikethrough's of some sort for my 0's. Thanks for the pointers... I'm going to be giving these a try. Specifically, I'm liking Vera Sans and Bitstream Vera Sans.

Patrick on August 8, 2008 9:05 AM

Any updates for new interesting fonts?

Koen on August 17, 2008 1:21 PM

I personally like Consolas for visual studio, http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3displaylang=en.

Whomever on October 1, 2008 12:15 PM

I use Terminus in Eclipse and in Putty, the only problem with it is that it is not vector,
12pt is to small, and 18pt is to large for my taste.

Kris on February 3, 2009 4:36 AM

Urgh, __all__ your fonts look soooo ugly. Unbearable.

billy gates on March 6, 2009 6:38 AM

Another vote for Bitstream Vera Sans Mono. Awesome font with Cleartype enabled, not so great without, but i work with cleartype all the time now. Consolas is number 2 in my books.
http://biznespromo.ru

Gabra on May 14, 2009 1:36 PM

Thanks for the tip to tweak down the white background to off-white; I did that once upon a time but I've been too lazy to do it across server upgrades etc. Actually in the xterms I start them up with a script which selects a light pastel background color which identifies which server it's running on. ... Time passes ... For Emacs I found (set-face-background 'default seashell), the greyish light colors are too close to the window decorations and the other lights are too strong for my taste, but this one is kind of nice.
http://www.spielautomaten-casino.de

Spielautomatencasino on May 15, 2009 5:23 AM

Brought up in the world of UNIX, I've always been a big fan of the original misc-fixed fonts from The X Window System. While I adore Dina, I never really liked how wide it was. I want more code to fit on the screen. Hence, the 6x13 version is perfect.

http://www.ank.com.ar/fonts/

Paul Braman on August 11, 2009 8:44 AM

I've tried Lucida Console and some others, but keep returning to Courier New 9. I think it's (partly, at least) the fact that it's a serif font - all the others seem to be sans-serif and they just don't feel right!

Stuart Dootson on February 6, 2010 9:30 PM

Jeff, what's the verdict on Pragmata?

Bill Tomlinson on February 6, 2010 9:30 PM

Pragmata is a great font - I bought Pragmata from the official Fabrizio Schiavi Design website: www.fsd.it for 90 Euro's, which came to about 63. I am glad I spent the money on it as it looks great and has instantly become my new programming font of choice.

I took 5 minutes creating a small Wordpad document showing what Pragmata looks like when it's not anti-aliased at various sizes, please take a look at the following image:

http://i14.photobucket.com/albums/a324/azcn2503/pragmata_example.jpg

I hope this helps you.

Aaron Cunnington on February 6, 2010 9:30 PM

After Courier New, Consolas, Deja Vu Sans Mono etc. I discovered Cumberland. Please take a look at it:

http://img155.imageshack.us/img155/6569/cumberland.png

Mesomeric on September 12, 2010 9:49 AM

The comments to this entry are closed.