2010年4月27日星期二

Progamming Fonts

Progamming Fonts




Mike Gunderloy's book Coder to Developer suggests, as part of configuring your IDE, that you explore programming specific fonts. I was intrigued, because I hadn't ever considered that. I've been using Courier New 9 for years. A little searching turned up a few links:



Lists of fonts are all well and good, but a picture is worth a thousand words. Here are code snippets in each font, without ClearType:



Andale Mono 9 point


font_programming_sample_andale_mono_9.png



Anonymous 9 point


font_programming_sample_anonymous_9.png



Courier New 9 point


font_programming_sample_courier_new_9.png



Lucida Console 9 point


font_programming_sample_lucida_console_9.png



Lucida Typewriter 9 point


font_programming_sample_lucida_typewriter_9.png



Monaco 9 point


font_programming_sample_monaco_9.png



Pragmata 9 point


font_programming_sample_pragmata_9.png



ProFont (fixed size bitmap)


font_programming_sample_profont.png



Proggy Clean (fixed size bitmap)


font_programming_sample_proggy_clean.png



Vera Sans Mono 9 point


font_programming_sample_vera_sans_mono_9.png



I'm sure I missed some, but these seem to be the most popular ones. I am not listing a few I tested here and found so heinously bad in these conditions (9pt sans ClearType) that they didn't deserve any consideration.


I learned a few things in this experiment:


  1. I definitely have to have monospace fonts in my IDE. All of the above fonts are monospace.
  2. I don't care for anti-aliasing of any kind on a programming font. That goes for ClearType and plain old AA. Note that some fonts decide to antialias themselves even at 9 point!
  3. Bitmap fonts, such as Proggy, are very precise but don't scale. At all. So if you're programming on a large 1600x1200 or higher screen, that may be a factor. And the scalable fonts can look quite different at larger sizes!
  4. Proggy is my top choice for programming font, but it's fixed size and thus doesn't always work if I'm coding on a 1920x1440 display. If I need a scalable font, I like Lucida Typewriter and Pragmata.
  5. I don't recommend using Comic Sans as your programming font. Nor do I recommend dreaming up all new programming characters.

没有评论:

发表评论