Putting Your Best Font Forward

No, the Horseman isn’t about to give you a lesson in typography (like traditional graphic design, it’s not exactly his forte). What the Horseman does intend to do however, is extol upon you the benefits of selecting the correct font for coding.

FlashDevelop is an incredible ActionScript IDE with very few things I feel left to be desired (linting, possibly… but Eclipse’s linting is just as bothersome as it is helpful so I’m on the fence here). The biggest problem I have with FlashDevelop is a flaw that is not unique to it but is shared by virtually every code editor I’ve used.

The default fonts are horrible.

In FlashDevelop and Eclipse both, the default font manages to break a cardinal rule of good programming typography. It’s difficult to distinguish at a glance the difference between 1, l, | and 0, O. Beyond that though, I just find the typefaces to be… clunkysuffocating, even.* I honestly never knew just how suboptimal the default fonts were for these editors until I stumbled across a discussion about a programmer’s font choice several years ago. That’s when the Horseman leapt upon his black stallion and sallied forth in search of a better font, to see just whether there was anything to this notion. After finding several worthy candidates, I finally settled on a font family known as Proggy. The creator wrote a short description of the thought process and design choices he made when designing Proggy, and I think he succeeded rather well.

Aside from the obvious benefits of total disambiguation of glyphs, the font has a “feel” and “flow” that work well to help me follow easily along with what’s on the screen. It bolds well, it italicises well, and the center-aligned operator symbols stand out clearly and distinctly. No dot operators being subsumed here! The font size works well for me too, hitting a sweet spot that the default fonts can’t quite manage to occupy in terms of letter spacing or line spacing.

The author is a C++ programmer, but Proggy certainly works wonders for ActionScript and thusfar as well for Java (and yeah, for XML as well).

So, one of the first thing I do these days when setting up a new IDE is to seek out Proggy and install my favorite of the variants (currently Proggy Clean). Maybe Proggy isn’t the font for you, but it’s almost certain that somewhere out there is a better font than the one your IDE uses by default. Taking some time to find it will pay dividends as you suddenly find your code easier to read. As I’m sure you know, code is frequently a “write once/read many” type of occupation, and anything that aids the reading aspect carries an unusually large boost to your productivity and peace of mind. Imagine all the hours you’ve spent on debugging that came down to stupid typos in a section of the code that can’t offer intellisense, and then imagine how many of them you’ll never lose again once your font is finally helping you.



* Not an exaggeration. While working with a default font-set, before actually realizing that the font was a default, I had this unshakable sense of tension that abated only upon seeing a friendlier typeface. I had no clue that I was barely breathing until I took a huge gasp of air after finally seeing my code look “right” again.



Tags: , , ,

  1. #1 written by vitaLee February 5th, 2011 at 04:23

    i’m happily using Andale Mono as my font of choice in flashdevelop. im using it with SOSmod v1.5 color scheme right here – http://www.flashdevelop.org/community/viewtopic.php?f=20&t=2860&sid=c0d78c928b30c800dbb8f405084d7815&start=15

  2. #2 written by The Horseman February 5th, 2011 at 22:41

    Nice job on that color scheme, and definitely an excellent font choice! Everything seems so very distinct and easy to sort out at a glance.

  3. #3 written by Elaine February 10th, 2011 at 09:43

    I’m a serif geek and typically set my code font to Courier.

    If Proggy had serifs, I’d definitely jump on it.

    Thanks for bringing this typeface code issue to my attention. I’m going to have to think about my options.

  4. #4 written by James June 13th, 2011 at 20:30

    What sealed the deal for me was how Proggy bolds the special characters. : and ; only differ by a pixel, and I’m embarrassed to admit how many times I still get hung up on that.