Benefits of Monospaced Fonts Most software developers prefer to use a monospaced font. Courier New is a classic, simply because it ships with all versions of Windows since 1995. As every programmer knows, the benefit of a monospaced font is that you can use spaces to indent logical blocks in source code. As spaces and all characters have the same width, all your columns will line up nicely. If you use a proportionally spaced font, you can still use spaces at the start of each line for indentation. But after the first non-space on a line, columns won't line up any more, because characters like "i" and "m" have rather different widths. Requirements for Programming Fonts There are countless proportionally spaced fonts available everywhere. These have a broad appeal because they look nice. Monospaced fonts put text in a fixed grid. Programmers love that, but most other people don't. So monospaced fonts are in limited supply. Great monospaced fonts are even rarer. The biggest problem is that many monospaced fonts are not monospaced when you mix the plain and bold variants. Lucida Console and Andale Mono use wider characters for their bold variants. The three fonts below have plain and bold characters of equal width. Syntax highlighting text editors often use bold to highlight keywords. If the bold variant is wider, the text editor has three choices. EditPad will display the font accurately, resulting in columns that don't line up perfectly at the pixel level. EditPad will still allow rectangular selections in this case. Other editors will force the font to be monospaced, usually causing the bold characters to be squished together. Alternatively, plain characters can be spaced more widely to match the bold characters. Future versions of EditPad will provide you the option to choose the latter two display modes. Many freely available fonts are bitmap fonts. These fonts come in fixed sizes, like 10 and 12 point. Other sizes are not available. If the font provides the size you want, that's great. But if it's too small or too large, you're out of luck. Printouts will look very pixelated, as the fonts are designed for screen resolution rather than printer resolution. Though you may find a great bitmapped font that meets all my criteria, I prefer to recommend only TrueType fonts. TrueType fonts look great at all sizes, and print at full resolution. An issue with TrueType fonts is ClearType. ClearType smooths the edges of fonts to make them appear more nicely on LCD screens. ClearType can be turned on in Windows via Control Panel, Display applet, Appearance tab, Effects button, Smooth edges checkbox. If you have an LCD screen (or two), I recommend you activate ClearType if you haven't already. While most fonts look much better with ClearType, the staple of monospaced fonts, Courier New, becomes almost unreadable. Courier New's letters are too thin to begin with. After smoothing, there's nothing left. The fonts I recommend are designed to be used with ClearType. In fact, they'll look ugly and blocky without ClearType. The ability to easily distinguish similar characters is important. In source code, a zero is not the same as an oh, and a one is not an ell. These characters are often very similar in fonts designed to produce appealing typography. They may even be identical in fonts simulating typewriters. The mechanical typewriter I inherited from my parents didn't have separate keys for zero and one. Typing an upper case O and a lower case l was the only way. My programming fonts of choice all have a dot or slash inside the zero. The characters "1" and "l" are also easy to distinguish, at least within the same font. Finally, the font needs a repertoire of characters suitable for your language. Not all monospaced fonts can display all the accented characters used in Eastern Europe, or the Greek and Cyrillic alphabets. Asian scripts are generally not supported, because most of them are hard to fit into a rectangular grid. |