Any guesses as to how much time you spend reading existing code versus actually pounding on the keyboard? If you’re anything like me, and I know I’m not alone, then it’s a fairly significant proportion of your time. Therefore it makes sense to spend some time optimising the programming fonts that we use in order to increase legibility and reduce eyestrain.

In Visual Studio select Tools->Options… and then Environment->Fonts and Colors from the menu. Make sure you only select the fonts that are highlighted in bold, as they are the monospaced ones. Otherwise you’ll end up reducing your productivity by at least 90% like I did ;-)

I spent some time experimenting with the different fonts available to me (on a fairly standard Vista machine). I have to agree with Jeff Atwood and say that Consolas is my choice for the award of “Best Windows Programming Font”.

This is not surprising at all, since Consolas was specifically designed for programming environments. Microsoft commissioned a well-respected dutch type designer, Luc(as) de Groot, to design this font as a ClearType-optimised replacement for Courier New.

Consolas is included by default with Vista and Office 2007. Also just to hammer home the point that it is the ideal programming font, it is available to download for licensed users of Visual Studio 2005 as an MSI install that will change the default text face in Visual Studio to the Consolas family.

Given the above, one would wonder why the default font for Visual Studio 2008 (Beta 2) is still Courier New. Perhaps this will change before it is shipped.

Here’s a comparison of Courier New and Consolas.

Courier New:
Courier New

Consolas:
Consolas

One final point to note – I mentioned earlier that it has been optimised for ClearType. Make sure make sure that ClearType is enabled, as Consolas looks terrible without it.