Cleaning Code Needs Good Fixed Width Screen Fonts

  • strict warning: Non-static method view::load() should not be called statically in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/sites/all/modules/views/views.module on line 906.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/sites/all/modules/views/handlers/views_handler_argument.inc on line 744.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /hermes/walnaweb12a/b57/moo.greydragoncom/nodsw/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 159.
Leeland's picture

Programming requires the use of a fixed width (monospaced or fixed-proportional font) screen font so that all characters occupy the same width when displayed on screen. This is because some languages (Python, Scala, Java, C, etc.) depend on indention to block code together or to align up rectangular columnar blocks for code clarity. Basically a monospaced font is an essential requirement (and yes I know there are a few code jockeys who use who use proportional fonts, but lets be honest they are not the majority of coders by a long shot). Most operating systems come with several fixed width fonts in their standard installation. Courier New and Terminal are the most common examples. However, I find courier on a screen after a couple of hours to make my eyes twitch. So I prefer something different.

I have tried many different fonts over the years. Most I don't even remember the name of. I have also read a lot of articles on research that make various claims about what is best for reading. In short it all comes down to use what works for you. A great article on all the font research silliness is at Which Are More Legible: Serif or Sans Serif Typefaces? feel free to go read all about the research and do follow the citations until fully convinced of whichever side of the debate feels best.

I am not a fan of microscopic sized text so I can get hundreds of lines of code on a small window. However, I do want a font that will scale clearly from micro to macro sizes.

Being a practical janitorial type person I focus on usability. So an important point is the font needs to be a clean crisp font, which does not tire my eyes from hours of reading it. The font must look good and have enough weight so it doesn't blur when color highlighting mixes two colors that should never be side by side together.

Of course the font I am using MUST pass the standard ambiguous character test:

"""
|!1lIi
0Oo
Z2Z
mnwMNW
,.;:_-=+`'"
(){}[]
"""
def silly0Op_():
    `'collect Underwear'`
    Op011(["next"])="''q2Z''"
    print('"Profit $$"')

For reference, you might want to look at the

CodeProject list of best programming fonts.

Favorite Fonts

Dina

Dina is my favorite monospace font developed by Jørgen Ibsen. Dina is a free font and for clarity it is hard to beat. It supports 8, 9 and 109-point text sizes and can be from this link: (download Dina).

Anonymous Pro

Anonymous Pro is my second favorite font. It was designed specifically for coding. All characters are designed to be uniquely different preventing a lot of reading errors. I use it when I need to do international coding as it has support for international, Unicode-based character set, with support for most Western and European Latin-based languages, Greek, and even Cyrillic. Free download from Anonymous Pro it uses the Open Font License (OFL).

Other Worth Mentioning Fonts

DejaVu

Is a very good alternative and comes in BOTH a Serif and Sans Serif style. It is based on Bitstream Vera but offers a wider range of characters (download DejaVu).

Consolas

Consolas is a relatively new Microsoft font that is installed in Vista or available for download. It is a very clear and compact monospace font and is being used by more developers. Note it is specifically designed to have true type font smoothing turned on, otherwise it is very blocky.

Proggy fonts

The Proggy collection contains small monospace bitmap fonts that maximize the amount of code you can view on-screen (download Proggy). It has been designed for programmers so it does not exhibit the character problems of other fonts. For Notepad fans, there is also a version that provides bold punctuation and brackets within the font itself.

Bitstream Vera Sans Mono

This is a monospaced version of Bitstream Vera Sans which many programmers will prefer. I find it a little wide, but characters are certainly easier to identify. It is available from download Bitstream Vera.

Thread Slivers eBook at Amazon