Favorite Programming Font

There are two types of programmers in the world: those who care about programming font, and those who don’t concern themselves with typography. As a code producing entity, why would you even need to care about such things as fonts? Fonts are what designers agonize about – and they are probably more qualified to do it than we are. Especially those of us who are back-end hackers, producing most of our code in Vim or Emacs. Why should we care?

Well, it is a matter of convenience. The font your text editor uses to render your code has great impact on it’s readability. Understanding source code, unlike poetry or prose, hinges on exactness and clarity. Code can be cryptic, and tends to use symbols, numbers and letters in strange non-word combinations. Your eyes have to be able to recognize characters at a glance, without a pause.

Have you ever found yourself squinting at your screen and wondering whether a character is a “zero” or an upper case “O”? If yes, then you are using the wrong font for programming. This post is for you.

A good programming font requires a number of features. The most important feature is of course crisp clarity of the characters and monospaced layout. Funky serifs, or too aggressive kearning can lead to readability issues down the road. Fonts that look great on pages of a book won’t usually be good for programming.

Here is a list of things I would like to see in a “perfect” font:

  1. Dashed zeros – I need a big honking crossbar through my zeros. Fuck the tiny dots in the middle. I want a big dash.
  2. No base serifs on one’s. The font should have very sloping upper serif, and nothing on the bottom.
  3. Rounded lower case L’s – I don’t want to see any serifs on top, and the bottom should loop for clarity
  4. Big fucking top and bottom serifs on upper-case I so there is no way you could confuse it with vertical pipe
  5. Comma’s that look nothing like periods. There is nothing worse than missing the crucial difference between “1,001” and “1.001” or “foo(bar.baz)” and “foo(bar,baz)”. I want the commas to have distinct shapes.
  6. Distinct quotes and backticks. Backticks should be very loopy so they are instantly recognizable.

Recently I polled people on Twitter, and in /code forum asking them what was their favorite programming font. I got bunch of good suggestions, and this post is an overview of all of these.

Consolas

If you are a windows user, you are in luck. Despite a popular belief, there are some decent folks toiling away at Microsoft, and some of them have designed a really nice font that is damn near perfect for programming. Chances are you already have it installed on your system. If not, you can grab it from here.

Consolas

Consolas

Consolas looks great on the page. The zeros have the crossbars as they should, the colons are nicely rounded. The lower case “j” is nicely looped making it quite distinct from a lower case i and the lower case “g” is of the stacked variety (which has nothing to do with readability, but I personally like it). The ones and l’s are still not as distinct as I would like. The sloping upper serif on “1” looks flat on smaller font sizes. But all in all it is a great font.

It’s main flaw? It’s windows only.

Monaco

Speaking of system exclusive fonts, Apple has something even better than Consolas – a font called Monaco.

Monaco

Monaco

It has all of the good features I mentioned liking in Consolas – a crossbar through the zero, nicely rounded semicolons, good spacing on quotations, looping j and etc… It also does a much better job at distinguishing l’s and one’s. Note how the serrifs on the letter “l” follow a zigzag pattern – upper serif only on the left, lower serif only on the right. Compare it to the sloping upper serif and flat base on 1. The two are still fairly close, but much easier to distinguish at smaller sizes.

Personally, I really like the look of the font. It is more rounded, and has that sort of whimsical, soft feel to it. It looks very pretty and stylish. Alas, that font is Mac only.

Droid Sans Mono

Quite a few people told me they like Droid Sans Mono, so lets check it out:

Droid Sans Mono

Droid Sans Mono

This is a font that does the L’s correctly. Note that the 1 has no base serif, removing almost all confusion in this area. Sadly, the upper case I is almost indistinguishable from the L. Also, there is no crossbar on the zero, introducing confusion elsewhere. In addition, the commas are a bit to straight for my taste. At smaller sizes they can be easily mistaken for periods. Not my favorite font, but a lot of people swear by it.

Terminus

If you want a decent, open source font, Terminus is a viable choice:

Terminus

Terminus

One of the fatal flaws of Terminus is that it is a bitmap font. It does not scale well, so it only works at sizes less than 12-14. Any higher and you start to see ugly pixelation. The 1’s and l’s and I’s are handled rather poorly looking painfully similar. Commas and periods are tiny, and too samey. I’m also not a big fan of the blocky appearance of the font – though that’s just a matter of aesthetics.

Pro Font

Pro Font is a bitmap font, but it does a lot of things exactly right:

Pro Font

Pro Font

The number one, has a very large bottom base serif, whereas l has a tiny one. The large top and bottom serifs on upper case I make it distinct from both of these. Zeros are properly crossed as well. The best feature of this font are the commas and semicolons. Check out the huge dot of the comma versus the visibly smaller period. This is something that would probably drive a designer nuts, but as a programmer this is exactly what I want.

Anonymous Pro

Anonymous Pro is actually quite similar to Pro Font, though in many ways it is prettier.

Anonymous Pro

Anonymous Pro

I really like the numbers in this font. The aggressive serifs give it character and personality, whereas most other monospaced fonts tend to be rather bland. In that it reminds me of Monaco which also has great aesthetic look, but Anonymous Pro is sharper and more edgy.

The one is very distinct due to the large top serif. The lowercase L and I are a bit to close for comfort. I do like the pointy, sloping commas that jag out quite a bit.

Inconsolata

Inconsolata is one of my favorite fonts on this list, but it is nowhere near close to being perfect:

Inconsolata

Inconsolata

The one’s are quite distinct with the lack of the bottom bar, but I’s and l’s are still very, very close. Commas are definitely too small. The font does look nice though. It is close to Consolas (I think by design) and aims to create similar aesthetic feel, while being a little better at distinguishing certain fonts.

Monfour

Monfour is a bizarre monstrosity. It is a monospaced font with the whimsy and subversive carelessness of comic sans. It is too loopy and radical for most people, but it does have some interesting qualities, which is why I included it here:

monfour

monfour

Note the rounded L’s that cannot be possibly mistaken for an upper case I, a vertical pipe or number one. The dotted zeros are not as distinct as ones with a cross bar, but they are there suggesting that this could be used as a programming font. The commas are small, but quite distinct from the tiny periods. All in all, it is not a bad font, especially if you feel like doing something different and you don’t mind the tilted e’s.

Conclusion

Unsurprisingly, there is no winner here. No font on this list has met all of my requirements. Many come close, but miss some very crucial details. Before I started this list, I was torn between Consolas, Inconsolata and Monaco all of which have their own pros and cons. Now I added Anonymous Pro to the list of fonts I’m on the fence about.

How about you? What is your favorite? Does a perfect font that would meet all my needs even exist? Let me know in the comments.

This entry was posted in programming and tagged . Bookmark the permalink.



19 Responses to Favorite Programming Font

  1. road UNITED STATES Google Chrome Windows says:

    My favorite is Bitstream Vera Sans Mono — I think it’s the default terminal font in Gnome, but I liked it so much that I downloaded it to use for PuTTY on my Winodws box. It looks great at pretty small sizes (I use it at 8) which means I can cram lots of code on the screen at once. Nice article on it here.

    Reply  |  Quote
  2. road UNITED STATES Google Chrome Windows says:

    Also, you can get the Bitstream fonts here, and see a preview here

    Reply  |  Quote
  3. astine UNITED STATES Mozilla Firefox Windows says:

    Like road here, I almost always just use Bitstream Vera Sans Mono. It’s available on every Linux system I’ve used, looks just fine, and I’ve never confused a pipe for a l or had any other issue recognition issue with it. Some of the fonts you list might be nicer in some ways, but I’d have to get used to them and they might not be as available.

    I’ve also used terminus in places where XFT or similar technology wasn’t available. It’s actually not bad.

    Also, wrt monospacing, apparently more and more coders are switching to variable spaced fonts for coding. Apparently you’re using python, you can get used to columns not always lining up. I’ve tried it and didn’t care for it, but, YMMV.

    Reply  |  Quote
  4. Garrick UNITED STATES Mozilla Firefox Windows says:

    I see my suggestion of Comic Sans 36 pt did not make the list.

    Reply  |  Quote
  5. Joshua Kehn UNITED STATES Google Chrome Mac OS says:

    I really like Nitti (link) for my coding. iTerm is still set to Consolas, and I might switch Sublime back at some point, but the font looks so damn good it’s hard to pass up.

    Reply  |  Quote
  6. Marius Retegan GERMANY Google Chrome Mac OS says:

    Today I changed the font from Inconsolata to Menlo. It’s a nice font with “true” italics and bold glyphs, so the comments are clearly distinguishable from the code itself in Vim.

    Reply  |  Quote
  7. Pollux Gluten Mozilla Firefox Ubuntu Linux says:

    I tried pretty much all the programming fonts I could find. I strongly dislike anti-aliased fonts (or, as I call them, “blurry fonts”) for screen use, so my preference goes to high quality bitmapped fonts.

    Call me old fashioned, but my favorite programming font (and terminal font in general) remains Fixedsys from old versions of Windows. I like its wide strokes, massive punctuation (a la ProFont) and general familiarity. There is a free, Unicode-aware version called Fixedsys Excelsior and that’s what I use currently.

    If you cannot use Fixedsys Excelsior, Terminus 12 Bold makes a usable substitute.

    Reply  |  Quote
  8. David UNITED STATES Mozilla Firefox Windows says:

    I prefer to use “Proggy Clean (Slashed Zero) (link). I find it to be very easy to read as a console font and for all of my development in vim.

    Reply  |  Quote
  9. Jens GERMANY Netscape Navigator Mac OS says:

    With snowleopard Apple switch the standard-system-monospaced-terminal font from monaco to menlo.
    :-(

    But monaco is still there :-)

    Reply  |  Quote
  10. STop DENMARK Google Chrome Linux Terminalist says:

    I usually default Consolas on Windows and I like Droid on Linux… but they both have a flaw in a danish context (and so have many others, like Terminus): The crossed 0 looks too much like the danish capital Ø (& Oslash;), so I usually end up using the Bitstream font which has a dotted 0…

    FYI: the danish alphabet looks like this (caps):
    ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ

    Our Norse fellows might have the same issue!

    Reply  |  Quote
  11. Luke Maciak UNITED STATES Google Chrome Linux Terminalist says:

    @ road:

    Nice. I like that one.@ astine:

    Yeah, but var-width coding is weird. I like when things line up.

    @ Garrick:

    LOL, yeah, I dropped it from the list. It did make me laugh though.

    @ Joshua Kehn:

    Nitri is actually kinda nice. Kinda like Monfour – it has a funky feeling to it.

    @ Pollux Gluten:

    You know, most of the time don’t notice blurriness. Maybe it’s just me though.

    @ David:

    Interesting… Proggy was on mu list for this post, and then I ended up skipping it for some reason. :P

    @ STop:

    Interesting. Do you guys always put the special chars at the end? Or is that just for convenience?

    The Polish alphabet goes like this:

    AĄBCĆDEĘFGHIJKLŁMNŃOÓPRSŚTUWYZŹŻ

    Reply  |  Quote
  12. STop DENMARK Google Chrome Linux Terminalist says:

    Luke wrote:

    Interesting. Do you guys always put the special chars at the end? Or is that just for convenience?

    Well, we don’t see them as “special” characters :)
    This is the official order – don’t really know why. Convenience might be the reason. Actually, the modern danish alphabet is relatively new (late fourties). Before that, it has been (not necessarily at the same time):
    AA = Å (still used in [place] names), Ä or [AE] = Æ, and Ö or [OE] = Ø.
    Letters like C, Q, W, X and Z are mostly used in loanwords. Northmen and Swedes mostly bannished them altogether. Scandinavian languages usually prefer S, K, V and EKS instead (e.g. Ekspert = Expert).

    Reply  |  Quote
  13. STop DENMARK Google Chrome Linux Terminalist says:

    I meant KS = X.

    By the way, I like the look of the polish alphabet. Somehow reminiscent of runic scripts…

    Reply  |  Quote
  14. Luke Maciak UNITED STATES Google Chrome Linux Terminalist says:

    @ STop:

    Interesting. We Poles do the same. X, Q and V are not traditional parts of the alphabet, though they are becoming included more often these days because of western brand names.

    What we usually do with generic loan words is we Polonize them:

    – If there is a V in it, we swap it to W
    – If it has X we change it to KS
    – If it has Q in it we change it to KU
    – If it has a C we switch it to K
    – If it has a CH we swap it to CZ
    – If it has SH we change it to SZ
    – If it’s a noun we run it through our case system
    – Etc..

    If it’s a brand, or a propper name we just tend to run it through out case system leaving the spelling intact but we do use the cases: Microsoft, Microsoftu, Microsofcie, Microsoftem, Xerox, Xeroxem, Xeroxu, Xeroxsie, etc..

    Reply  |  Quote
  15. Madhur INDIA Google Chrome Windows says:

    Consolas is not windows only. You can install on linux as well.

    Reply  |  Quote
  16. Smith REPUBLIC OF KOREA Google Chrome Windows says:

    I’ve used just Dejavu Sans mono..but I found new coding font- and It’s Ecocoding…I found this font from the website, myfonts. :)
    This is not free:( but its really gooooooood!!
    you cans see a prwview HERE I think Ecocoding can meet all your needs..just try it. :)

    Reply  |  Quote
  17. Jim UNITED KINGDOM Mozilla Firefox Windows says:

    With the clear type technology on Windows I have to agree on Consolas, as much as I don’t like proprietary stuff. But at work I use one HD monitor and a non-HD monitor (turned portrait) and so I stick with Liberation Mono sized at 11. Consolas just doesn’t seem to work as well on that monitor.

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>