Proportional programming fonts
March 17, 2005 11:38 PM   Subscribe

Following Bjarne Stroustrup's lead in The C++ Programming Language, 3rd edition I've for several years programmed in a proportionally spaced, not a fixed-width, font. What's a good font for this?

Most importantly, parenthesis and curly braces, zeros and the capital 'O", the numeral one, the lowercase "l" and the vertical bar ("|"), single and double quotes, all must be easily distinguished from one another.


Punctuation marks in general should be somewhat more prominent than in a "standard" font: colons (and paired colons), periods, commas --and especially semi-colons -- are all meaningful, and should be easily visibly distinguished.

Ideally, the mathematical symbols ("+ - * /") should be approximately the same width, and numerals should also be of approximately equal width.

Leading should not be cramped, but not too generous either.

I'll generally be programming in C-based imperative languages (C, C++, Java, Javascript, PHP), and in SQL. Less often I'll be reading or writing shell scripts or perl or just plain text.

Currently, I use 10 point Verdana, with all punctuation symbols except the various quotes in bold-face. "Promoting" punctuation to bold-face in a replacement font is possible as well, if need be.

But Verdana's lowercase "l"s, in particular, are too small, to the point that I no longer use identifiers stating with lowercase "l".

Any suggestions, from coders or non-coders? But please understand, in general, using a proportionally spaced font is much much easier on the eyes than a fixed-width font, so I have no interest in fixed-width solutions.
posted by orthogonality to Writing & Language (8 answers total) 1 user marked this as a favorite
 
Not a coder, but have you thought about serif fonts?

Readability guru Bill Hill, in his The Magic of Reading (Microsoft Reader ebook) argues - pretty convincingly, I think - that serif fonts are easier on the eyes.

And Georgia is Verdana's serif-font cousin; it fulfills all of your stated requirements. Check it out?
posted by joshuaconner at 1:09 AM on March 18, 2005


What about Bitstream Vera Sans? I use Bitstream Vera Sans Mono for my coding, which is the monospaced (fixed-width) version. I don't have it on this computer so i can't test out the width of the math symbols or anything. It has the good qualities of the lowercase L easily distinguished from an uppercase i, the zero is easily distinguished from a capital O, etc.

<offtopic>
Honestly, i can't stand coding in a proportional font, but to each his own. I'm not sure how easier proportional fonts are on the eyes with respect to coding. Except for comments, you aren't reading large chunks of text, but i digress.
</offtopic>
posted by escher at 1:55 AM on March 18, 2005


I read an article on this very subject a month or two ago. I'll see if I can find it.

Ah, yes. Sorry, it only deals with fixed-width fonts. I know this is specifically excluded by your question but since I've just gone to the trouble of hunting it down I'm going to post it anyway:
Finding the Best Programmer's Font

There are some arguments in the comments about monospace vs. proportional.

And what escher said. I use Bitstream Vera Sans Mono too.
posted by blag at 2:26 AM on March 18, 2005


How about Trebuchet MS? I did a quick look for what you asked, and it seems to fit pretty well. Everything is quite distinguishable, especially [pipe one ell], [zero ohh], and [braces brackets parens]. The only thing that may be a little off is the spacing of the operators, but I'm not sure about that.
posted by true at 5:30 AM on March 18, 2005


Not a coder, but have you thought about serif fonts?

Not a coder either, but that doesn't sound right. Serif fonts are more readable on the page but sans-serifs are much more readable on screen, especially at small sizes. A computer monitor doesn't have enough detail for the serifs to be anything but a distraction. (Hence the popularity of sans-serif fonts on blogs — like this one here.)
posted by nebulawindphone at 9:41 AM on March 18, 2005


I'm quite fond of Tahoma on my IRC, it lacks serif and is easy to read. 1li| are all clearly distinguishable.

Having said that, there's no way in hell you'd get me using proportional fonts when coding.
posted by furtive at 2:35 PM on March 18, 2005


Serif fonts are more readable on the page but sans-serifs are much more readable on screen

Definitely usually true, but Georgia -- designed to be robust enough for low-rez use -- is lovely on-screen. I've viewed MeFi with Georgia ever since I registered....
posted by Utilitaritron at 3:40 PM on March 18, 2005


Response by poster: I do like Georgia, a lot, so I tried it. But Georgia's zeros are exactly the same as its lowercase "o"s. This quickly made my head explode.
posted by orthogonality at 6:36 PM on March 19, 2005


« Older Does anyone experience weak hands after laughing...   |   Help us raise $10,001 for Relay for Life! Newer »
This thread is closed to new comments.