Fonts for Code

In: .NET|Eclipse|Java|Linux|Software

8 Nov 2007

I did never really bother about what fonts to use for programming. The default of the the IDE was fine for me. Then I came across this article of Coding Horror about a month ago. One sentence in the conclusion of it made me think:

Please don’t use the default Courier New typeface. Be kind to your eyes.

So I took a closer look on what ClearType really means. This wikipedia article and the Microsoft page about ClearType helped a lot. I had ClearType activated on my Windows XP a very long time but I never cared if a font is designed for ClearType or not. There is a tool from Microsoft (the ClearType Tuner in PowerToys) that allows to configure ClearType exactly for your display – it improved my screen a lot.

After knowing the “plus” of ClearType I downloaded and installed the special fonts pack from Microsoft. It changes the default font in Visual Studio 2005 do Consolas which is special ClearType font. As you can see in the screenshots below it looks really bad when used without ClearType activated:

Consolas

When ClearType is activated it looks like that:

Consolas clear

I changed the font settings in my favorite IDE Eclipse to Consolas too and I am very happy with it. It is a subjective impression but I thinks it is better to my eyes ;-)

Compare it to Courier (which is the default font in Eclipse) with ClearType activated:

Courier clear

or Courier without ClearType:

Courier

There is a difference.

Fortunately there is a font called Inconsolata that is free and is very similar to Consolas which is perfect for programming under Linux.

3 Responses to Fonts for Code

Avatar

martinus

November 9th, 2007 at 12:24 pm

Another great font I have been using for quite a while now:
http://www.ank.com.ar/fonts/
I use MiscFixedSC613, size 9. (second download link), which is the default linux console font. Its compact, and very readable.

Avatar

tompson

November 11th, 2007 at 7:34 pm

Thanks for that link martinus … looks like a nice fixed-width font for linux, I’ll give it a try.

Avatar

Martin

December 3rd, 2007 at 10:18 pm

In the past I had also used Bitstream Vera which is a free font from the Gnome project (http://www.gnome.org/fonts/). Characters are a bit narrow but still better than Courier.
I came across this font when I was looking for a better font for cmd.exe on my XP Notebook!

Comment Form

Follow Me!

Photostream

    P1010008 (2)P1010026P1010028P1010021P1010009 (2)P1010033 (2)

RSStOMPSON's tweets