Sans-serif fonts for coding

After reading a post about colour schemes and font choices for use in an IDE, it seems I’m one of the only people on the planet that uses non-monospace fonts for coding. So, in the spirit of equal access, I’ve decided to try a couple of different fonts in MonoDevelop. While it doesn’t have the greatest highlighting support at the moment, or any code folding (although I suspect these shortcomings are due to libgtksourceview), it’s still good enough for my purposes. My colour coding is based upon the default, but with blue keywords instead of green, and the comments changed to a light grey colour to make them more ignorable (the default is a bright blue which is quite startling).

First up is DejaVu Sans, which is my default sans-serif font on my system. It is quite plain looking which is possibly a good thing as it doesn’t distract from the task at hand. The ’0′ and ‘O’ characters are different enough, but you may have problems with ‘I’ and ‘l’.

DejaVu font test

Next I tried Candara, which is a new font that is bundled with Windows Vista. It has a bit of character, but the text figures are a bit distracting, and the punctuation really doesn’t fit in nicely with the rest of the font.

Candara font test

Finally I picked URW Gothic. While this was just a test to see how extreme the fonts could be before they were completely unsuitable for coding, it turned out to work surprisingly well. The large open geometric shapes make for easy reading and the punctuation goes well with the other glyphs. The only problem I could identify is the square brackets looking too much like the rounded ones, but if you can get over that it looks like a very nice font to program with. In fact, I’ve just changed it to be the default in MonoDevelop.

Gothic font test

Of course, there are many other sans-serif fonts out there, but I picked these three as representative of several classes of styles. If anyone knows of sans-serif (or even serif!) non-monospace fonts that have been specifically designed for programming, I’d be glad to hear about them.

Comments 3

  1. J. Daniel Smith wrote:

    I also use a sans-serif non-monospaced font for coding; Verdana in VS2003 and Tahoma in VS2005.

    The reason? It makes my code read more like text, rather than code; and the various text fonts tend to be more readable than Courier.

    As for lining things up: TABs (instead of spaces) work fine.

    Posted 21 Sep 2006 at 3:56 am
  2. beza1e1 wrote:

    I use DejaVu sans when coding in DrScheme. Since scheme has fewer syntax chars than most programming languages, it reads quite nicely.

    Posted 22 Sep 2006 at 2:48 am
  3. Fird wrote:

    DejaVu Sans does the job for me

    Posted 12 Dec 2006 at 8:20 pm

Post a Comment

Your email is never published nor shared. Required fields are marked *