Programming Fonts

hsoi blog, talk Leave a Comment

When you write code for a living, you stare at a screen for endless hours in a day.

And you stare at text on the screen.

The text happens to frequently use characters/letters/numbers that might look similar, like a capital letter “O” vs. a zero 0, or a lowercase “l” vs. a number “1” and things like that. Depending upon the font you use, these might look precisely the same, or barely different that it’s difficult to differentiate. After late night coding session and your eyes are blurring, every little thing you can do to enhance your ability to clearly identify what you’re looking at? the better.

Over the years I’ve used various fonts. Monoco is probably the one most people started with, because it’s monospaced and fairly clean. Allows code to line up in nice columns, visually works out. But… it has enough shortcomings that it wasn’t ideal. Some people maybe used Courier, but a font with serifs really doesn’t work well for coding (too much unnecessary visual noise). Long long ago one of the first “made for programmers” font to address these shortcomings was ProFont and it served me well for many many years.

But time marches on.

About a year ago I stumbled into a font called Source Code Pro, which was created and released for free by Adobe. I’ve found it to be an excellent font for the purpose.

Slant just published an article trying to collect and determine what the best source code font is. It has voting, and at least as I write this, Source Code Pro happens to be tied for the lead. The other leading font is Consolas, and I just don’t find it as good. You can see it in the article’s screenshots, because they made some special screens that display how that font hits the most notorious font offenders.

Consolas does make their lowercase-l and number-1 look different, but just barely. Poor eyes? Poor visuals? hard to distinguish. Source Code Pro’s l vs. 1 is much clearer.

Still, everyone will have their issues, and the Slant article does a great job of collecting all the major and minor players. Take a look and find the font that works for you. Your eyes will thank you.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.