Monday, 3 May 2010

10 Alternative Monospace Fonts for Programmers

Recently I started to look for an alternative programming font after spending far too many hours staring at Courier New. I needed to find a free fixed-width font that's easy on the eye and clearly distinguishes between similar characters, e.g. O01Il.

Here's a quick round up of the best alternatives I found. Which programming font are you using? Did I miss your favourite?

Default Monospace Fonts


First let's take a look at the default fonts. The examples show the font at 12 point with subpixel rendering switched off:

Consolas



Consolas is a monospace programming font created for Microsoft by Lucas de Groot and ships with Windows Vista / Windows 7. Has a slashed zero and designed to look best with ClearType enabled.

Courier New



Courier New is perhaps the most familiar monospace font having been introduced in 1992 with Windows 3.1. Courier New is a serifed font designed by Adrian Frutiger and lacks a slashed zero.

Lucida Console



Lucida Console designed by Charles Bigelow and Kris Holmes is the default font for Windows Notepad and also lacks a slashed zero.

Monaco



Monaco is a sans-serif monospace font designed by Susan Kare and Kris Holmes and ships with Mac OS X. Includes a slashed zero.

Alternative Monospace Fonts


While some of the default fonts aren't too bad, we can do much better. Here are some great alternatives mostly designed with programmers in mind:

Anonymous Pro



Anonymous Pro is a programming font designed by Mark Simonson. The serifed font was influenced by Susan Lesch and David Lamkins' Anonymous 9. Very clear with plenty of white space and a slashed zero.

Bitstream Vera Sans Mono



Bitstream Vera Sans Mono is a sans-serif coding font designed by Jim Lyles from Bitstream. The zero is dotted and the bottom of the lower case l curls to the right.

DejaVu Sans Mono



DejaVu Sans Mono is extended from Bitstream Vera Sans Mono and supports a wider selection of characters. The clean sans-serif font ships with a number of Linux distributions.

Dina



Dina is a sans-serif programming font created by Jørgen Ibsen and is available in 8, 9 or 10 point. Has a slashed zero.

Droid Sans Mono



Droid Sans Mono was designed by Steve Matteson of Ascender Corporation. The sans-serif font is clear but lacking a slashed or dotted zero.

Envy Code R



Envy Code R is a clean sans-serif programming font designed by Damien Guard and includes a slashed zero.

Inconsolata



Inconsolata is a monospace programming font created by Raph Levien and inspired in part by Consolas. Has a slashed zero.

Monofur



Monofur is a quirky monospace font created by Tobias Benjamin Köhler. Includes a dotted zero and a curl on the lower case l.

Proggy Clean



Proggy Clean was designed by Tristan Grimmer and is available with either a dotted or slashed zero. Several variants of the Proggy font are available.

Triskweline



Triskweline is a clear monospace font created by Henning Koch. Lacks a slashed zero and only available in 10 point.

21 comments:

  1. O'Reilly uses LucasFonts' TheSansMonoCd for printing code. That's a gorgeous, compact font, and is the best and most efficient thing i've seen so far for typesetting. I haven't tried it for programming (since I don't actually own the font, as it's payware), but I'm curious to know whether it works as a programming font.

    ReplyDelete
  2. I just use whatever font comes with emacs ;)

    Didn't know I had such a big number of fonts to choose for...

    Ruben

    ReplyDelete
  3. Might want to check out http://www.cosmix.org/software/ for variations on Droid Sans Mono with dotted and slashed zeros

    ReplyDelete
  4. I was looking for a new monospace font just last weekend, and I quite liked the ANSI commisionned OCR-A font.

    https://secure.wikimedia.org/wikipedia/en/wiki/OCR-A

    It is fixed width and ttf, and can be found in most GNU/Linux distributions' repositories.

    ReplyDelete
  5. You must be from Linux. You've made nice fonts look ugly.

    ReplyDelete
    Replies
    1. I'm on a Linux based operating system, and these fonts don't look like this for me. Therefore he can't be on a Linux based operating system.

      See how that works? no? I didn't think so.

      Billion dollar question, if your from MacOsX then what is the desktop environment called? (protip: it's not macosx or mac)

      or if you're from windows, then what is the desktop environment called there?

      Delete
  6. Andale Mono is the best. Trust me.

    ReplyDelete
  7. Is there a reason your samples contain no lowercase? Adding this would make for better comparison. Otherwise, interesting article.

    ReplyDelete
  8. Slashed zeros are not the only thing to compare.
    A good fot for text editor should be:
    - monotyped
    - extremely readable
    - reader should easily distnguish 0 (zero) and O (uppercase o)
    - reader should easily distnguish 1 (one), l (lowercase L) and I (uppercase i) can be distiguished.

    ReplyDelete
  9. You might find this interesting, it's a comparison of different monospaced and proportional fonts for programming:

    http://nickgravgaard.com/elastictabstops/news/programming-fonts/

    ReplyDelete
  10. I've become fond of Liberation Mono by Steve Matteson of Ascender (like the Droid Mono font). - http://www.dafont.com/liberation-mono.font

    ReplyDelete
  11. I typically use Consolas, Deja Vu Sans Mono, Crisp or Courier New.

    I especially like fonts with big differences between l/1 and O/0

    ReplyDelete
  12. Have used them all. Hard to unseat Dina, Consolas, and Lib. however current champion is M+ 1m, also referred to as Mplus mono.

    ReplyDelete
  13. Here are the results of the poll:

    Anonymous Pro
    1 (1%)

    Bitstream Vera Sans Mono
    3 (4%)

    Consolas
    13 (20%)

    Courier New
    5 (7%)

    DejaVu Sans Mono
    6 (9%)

    Droid Sans Mono
    2 (3%)

    Envy Code R
    2 (3%)

    Inconsolata
    11 (17%)

    Lucida Console
    3 (4%)

    Monaco
    4 (6%)

    Monofur
    1 (1%)

    Proggy
    3 (4%)

    Triskweline
    3 (4%)

    Other (please comment)
    6 (9%)

    ReplyDelete
  14. Because of searching for a better font for txt-editor and text-mails i found this article - and after 4h intensive search i found the BEST monospace font of the world: Share-TechMono!

    Try yourself, especially in little font sizes (8-12) is has the best and clearest type face AND it is condensed, though a few more letters are in the same line. :)

    http://www.dafont.com/share-techmono.font

    My 2nd best mono-font is "Liberation Mono", because it is much smaller in line-spacing than the DejaVu-Fonts!

    https://fedorahosted.org/liberation-fonts/

    --> Hope that helps other people who also find this site by searching for a better font than Times New Courier in Windows.

    :) Thomas from Germany

    P.S.: Envy Code R is also a very, very good font. And if you like it "a bit lighter", than try "Andale Mono" - the only negative thing - in my eyes - is the "komma" which cannot be seen very good; is looks like a point at a bigger screen resolution of >1024 pixel width. :(

    http://web.nickshanks.com/fonts/microsoft-core-web-fonts

    ReplyDelete
  15. Lucida console is the best for me, as it packs more lines for the same point size. If someone creates a dotted zero version, it would be perfect.

    ReplyDelete
  16. fonts not only for monitor or prints but also for LCD projector.
    Years i use Lucida Console because its bold, 1 and l is different, best brackets : () and {} looks great on LCD (old) projectors. But the cons of Lucida is O and 0, also the less height of its capital letters. Now I'm looking for font better than Lucida.

    ReplyDelete
  17. Well i just tried Anonymous Pro and it seems the best fur me

    ReplyDelete
  18. Robert Pelloni's worse proportional web font (bobsgame.ttf) is downloadable from game.bobsgame.com and file size is 25.7 KB. Lacks Macintosh Roman naming data.

    Anonymous Pro contains most of the necessary diacritics for Indo-Tibetan studies.

    Consolas might have a zero with no dot, accessible as OpenType features.

    The font bobsgame is made by Robert Pelloni. Has a single-story a and a slashed zero. Available in proportional only.

    ReplyDelete
  19. Folks should also take a look at Source Code Pro: http://blogs.adobe.com/typblography/2012/09/source-code-pro.html

    ReplyDelete