转自 http://hivelogic.com/articles/view/top-10-programming-fonts
Top 10 Programming Fonts
In the past, we’ve had to decide between tiny monospace fonts or jagged edges. But today, modern operating systems do a great job of anti-aliasing, making monospace fonts look great at any size.
Here’s a round-up of the top 10 readily-available monospace fonts for your coding enjoyment, with descriptions, visual examples and samples, and download links for each.
I’m a typeface geek, and when it comes to selecting a font I’ll stare at all day, I tend to be pretty picky. Recently, when I discovered that a friend was using a sub par typeface (too horrible to name here) for his Terminal and coding windows, my jaw dropped, my heart sank a little, and I knew it was due time for me to compose this article.
What follows is a round-up of the top 10 readily-available monospace fonts. Many of these fonts are bundled along with modern operating systems, but most are free for download on the web. A few, notably Consolas, are part of commercial software.
A note about anti-aliasing
In the past, we’ve had to decide between tiny monospace fonts or jagged edges. But today, modern operating systems do a great job of anti-aliasing, making monospace fonts look great at any size. It’s not 1990 anymore. Give your tired eyes a break and bump up that font size.
If you have any doubt that anti-aliased fonts are apropos for code, note that even the venerable BBEdit — which for years has shipped with un-aliased Monaco 9 set as the default — has made the jump. The app now ships with a specially licensed version of the Consolas font from Ascender, bumped up in size, and with anti-aliasing on by default. Panic includes a special anti-aliased font (Panic Sans, which is actually just a version of Deja Vu Sans Mono) with its popular Coda application.
Unless otherwise noted, I’ve used a larger size font, 15-point in fact, for the examples here to illustrate their legibility at larger sizes and with anti-aliasing turned on.
10. Courier
All systems ship with a version of Courier (sometimes Courier New), and unfortunately, many have it set as the default font for terminal and editor windows. It does the job, but it’s a bit dull and boring, lacking style and class. I don’t recommend this font if you have any other choice — and fortunately, you do. If you use this font, please bump the size and turn on anti-aliasing.
![Courier New](https://i-blog.csdnimg.cn/blog_migrate/3fd7be000e6a26de69286b8a3258159b.png)
9. Andale Mono
A bit better than the Courier family, Andale Mono is still relegated to the “default font” category as it ships with some systems, and you wouldn’t want to download or use it if it wasn’t already there. The character-spacing is a bit too clumsy and the letters are a bit too wide for my tastes.
![Andale Mono](https://i-blog.csdnimg.cn/blog_migrate/ef328924f9596cbe1bf5212aba228e44.png)
8. Monaco
Monaco is the default monospace font on the Mac and has been since its inclusion in System 6. It’s a solid, workhorse font that really shines at smaller font sizes with anti-aliasing turned off. I loved this typeface back when my eyes could tolerate staring at a 9-point font for hours, but those days are behind me. This font looks great at 9 or 10-points (Figure 4), and doesn’t look too shabby anti-aliased at higher sizes (Figure 3).
As far as I know, you can only get Monaco as a part of Mac OS, but there are alternatives, so keep reading.
![Monaco](https://i-blog.csdnimg.cn/blog_migrate/15eddcaa634e57e274cc5342d9975231.png)
![Monaco 9](https://i-blog.csdnimg.cn/blog_migrate/e65976450e9fcb0c64809012bfc68689.png)
7. Profont
Profont is a Monaco-like bitmap font available for Mac, Windows, and Linux (there’s also a modified version for Mac OS X called ProFontX by a different author). They’re best at smaller sizes, and make a great alternative to Monaco if you’re on a non-Mac platform and want really tiny fonts and the eyestrain that goes along with them.
Profont (and ProFontX) is intended for use at 9-points with anti-aliasing turned off.
![Profont](https://i-blog.csdnimg.cn/blog_migrate/64f58015803f5bbd40e77c7d5d1a917c.png)
6. Monofur
Monofur is a unique monospace font that looks great anti-aliased at all sizes. It’s a fun font with a distinct look that is vaguely reminiscent of Sun’s OPEN LOOKwindow manager, which ran Solaris (aka SunOS) systems back in the late 80’s. If you’re looking for something a bit different, try this font, but make sure you have anti-aliasing turned on, even at small sizes.
![Monofur](https://i-blog.csdnimg.cn/blog_migrate/93ece2339100ffbc6dd4ac52e05a470e.png)
5. Proggy
Proggy is a clean monospace font that seems to be favored by Windows users, although it works fine on a Mac. It’s a clean font intended to be used only at smaller points, and without anti-aliasing.
![Proggy Clean](https://i-blog.csdnimg.cn/blog_migrate/2c5e1c570072482dfd2205c9cfdfd79e.png)
4. Droid Sans Mono
The Droid font family (available for download here) is a nice font family designed for use on the small screens of mobile handsets, like Android, and licensed under the Apache license.
Droid Sans Mono makes for a great programming font. It’s got a bit of flair, and stands out among the other monospace fonts I’ve listed, and its only real flaw is the lack of a slashed zero.
![Droid Sans Mono](https://i-blog.csdnimg.cn/blog_migrate/3f117ac88929088f947b0983da67c627.png)
3. Deja Vu Sans Mono
The Deja Vu family of fonts are one of my favorite free font families, based on the excellent Vera Font family. The Deja Vu fonts have been updated with a wider range of characters while maintaining a similar look and feel to that of Vera.
This was my go-to font family for many years. It looks great at any size with anti-aliasing turned on.
Panic ships a font with it’s Coda application called “Panic Sans” which is based on this font. Gruber says via email that when he compared Panic Sans against Vera, he noted that “Panic had noticeably crisper punctuation chars” and that it seemed like they had improved the hinting on some characters as well.
![Deja Vu Sans Mono](https://i-blog.csdnimg.cn/blog_migrate/7e7b717b43f557f89b0cbe1a0df3ed98.png)
2. Consolas
Consolas suddenly appeared on my Mac after I installed Microsoft Office, along with a handful of other new fonts from Microsoft.
This font was designed by Luc(as) de Groot for Microsoft’s ClearType font family (there’s a nice write-up with samples of each of the new Microsoft fontshere). Consolas is a commercial font, but is bundled with many Microsoft products, so there’s a good chance you might already have it on your system.
You’ll absolutely want to have anti-aliasing turned on if you’re using Consolas, because it’ll look terrible without it.
Too bad it’s not free … if it was, it would be #1 on this list.
![Consolas](https://i-blog.csdnimg.cn/blog_migrate/52faf28aab48348532d45487d2446757.png)
1. Inconsolata
Inconsolata is my favorite monospaced font, and it’s free. Shortly after discovering it, it quickly supplanted Deja Vu Sans Mono as my go-to programming font. I use it everywhere, from Terminal windows to code editors. It has a certain sublime style that’s unique without being over the top, and it looks fantastic at both large and small sizes. I use this font when I show code samples in a presentation, and it’s the font we use in Terminal and TextMate windows when filming PeepCode screencasts.
Inconsolata is designed to be used with anti-aliasing enabled, but it’s surprisingly legible even at very small sizes. A big thanks to Raph Levien for creating this font, and for making it free.
![Inconsolata](https://i-blog.csdnimg.cn/blog_migrate/ba162e00543bd3d72a4a7c0afb37e284.png)
Thoughts?
Did I miss your favorite coding typeface? Think the list is out of order? Let me know. If there’s a typeface you think should be in this list, please let me know in the comments section below. If it meets my ridiculous standards, I’ll review it and include it in a follow-up article.