Most people prefer monospaced fonts for programming. A monospaced font is a font in which all characters have the same width. Such characters make it easy to vertically align variables, data, and other syntax structures for easier reading and comprehension.
Here are three of my favorite monospaced fonts which have been released under free licenses:
DejaVu Sans Mono
If you need support for a wide variety of scripts (Latin, Greek, Cyrillic, Armenian, Georgian, and line drawing characters), this font is a great place to start.
The DejaVu fonts are based on the GNOME Bitstream Vera Fonts. Their purpose is to “provide a wider range of characters while maintaining the original look and feel.” They are maintained and developed by the DejaVu fonts team, and have been released into the public domain.
As you can see below, they are a little on the wide side, yet still easy to read—even when bold!
Inconsolata is the first “serious original font release” from Raph Levien (creator of Advogato, an online community dedicated to free software development). He writes that he was “particularly struck by the beauty of Luc(as) de Groot’s Consolas,” which clearly demonstrated to him that “monospaced fonts do not have to suck.”
Although I really enjoy this one for ASCII text, Inconsolata covers a fairly limited number of glyphs. Don’t be surprised if there are missing characters in line drawings or non-ASCII texts.
Envy Code R
Envy Code R is a work-in-progress monospaced font by Damien Guard.
It contains “over 550 glyphs providing full complements for DOS, Windows and Mac versions of the US, Western, Central Europe, Turkish, Baltic, Icelandic and Nordic code-pages. This hits several Unicode ranges including Basic Latin, Latin-1 Supplement, Latin Extended A & B, Box Drawing, Block Elements, Letterlike Symbols, Number Forms, Arrows…”
If you need support for non-ASCII glyphs, and you prefer fonts that are a little less wide, Envy Code R is a great choice.
I would like to conclude this post with a simple thank you to Mr. Guard, Mr. Levien, and the whole DejaVu fonts team.