173 comments

[ 2.6 ms ] story [ 246 ms ] thread
I love Inconsolata, but there's just one thing about it: the curly quotation marks.

If you have that same quibble, good news: Inconsolata-dz[1]. Inconsolata with straight quotes.

[1] http://nodnod.net/2009/feb/12/adding-straight-single-and-dou...

You're right, that is annoying. Thanks for the link.
Awesome link, I've been using Inconsolata for years and had the exact same issue.
I love the straight quotes, but I'm experiencing increased vertical space between lines in the terminal as well. Seems like the author has the same "problem" judged by the screenshots posted.
This is why Inconsolata beats every font. Because there's a 'mistake' in it, and it can be fixed because of the licensing. This stuff gets me very excited.
it's also got pretty poor unicode support, which bugs me just a little
I find Droid Sans Mono really good, although it could use better distinction between Zero and Oh.
Agreed. I use this font in vim at work because (believe or not) it seems to be the sharpest on my crappy LCD monitor at work. I was using Bitstream Vera Sans Mono before though which I love.
+1 for DSM.

I use the solarized vim/terminal color scheme so from syntax highlighting I can tell the difference between the O and 0 but I can see why it would be a problem.

He forgot my favorite programming font, Terminus. It's pretty popular in Linux development.

http://en.wikipedia.org/wiki/Terminus_%28typeface%29

Terminus is awesome, it's a shame so many "top programming fonts" forget it.
I switched over to antialiased fonts a while ago, but every so often I feel the urge to go retro and switch back to Terminus for a few weeks.
You could use the TTF version of Terminus with anti-aliasing.
I tried that, but it didn't look good. I used to use antialiased fonts, but switched to Terminus to get a lot more info on the screen. I tried making all of the antialiased fonts in the article smaller, but then they lost their good looks. Same with antialiased terminus.
Looking at the fonts he did select, it's clear why Terminus gets no mention: it's significantly different aesthetically, with squarer edges and more straight lines, etc., from his preferred fonts.
But his number 10 is Courier, which he basically says he doesn't like; surely it ranks higher than that. I'd say it's not entirely dissimilar to Proggy as well.
I used Terminus for many years. About 18 months ago I switched to gohufont -- http://font.gohu.eu/

A person can't fit quite as much on the screen but I find the extra spacing makes it much easier to read (eg emails).

I've been happy with Mensch: http://robey.lag.net/2010/06/21/mensch-font.html , A font based of Apple's Menlo.
Very nice font. Just replaced Vera Sans Mono with it on my VIM configuration. Great tip.
I use Mensch too, but let's not credit Apple too much considering Menlo in turn was a fairly minor tweak of the Bitstream Vera Sans Mono. To do so would be almost as annoying as people claiming Apple created Webkit out of the blue rather than starting from an open source project, or that they created their kernel out of the blue, or their OS tools, or windowing operating systems in general were created by them, or the personal computer or the smart phone or the tablet. Apple is very good at polishing things, at integration, supply chains and marketing; extremely good, and they even have a very good record on fonts - but don't listen to Jobs' story on this or you will think we would still be using the command line for everything - however they get orders of magnitude too much credit when it comes to innovation.
I used to use Menlo, now trying Consolas.
I tried Consolas on a Mac but it wasn't aligning right. :(
I say this every time this discussion comes up but I do feel it bears repeating: I switched away from monospaced a while ago and I am never going back.

I encourage you to try something like Verdana for a week just to see how it feels.

Well I've just tried it for 10 minutes, and I have to say it seems to work better that i initially expected/feared. So you might not be as crazy as you sound :)

I might actually give it a few days and see what happens.

This will affect you differently depending on what language you use and whether you like to align things in columns. Think of how some people format C functions, with each parameter on a new line aligned at the open paren.

Personally I find that kind of alignment unnecessary and creates too much busywork. Proportional fonts prevent you from even trying. (Unless your editor supports elastic tabstops, but since very few do this is moot.)

FWIW, I program in Georgia, until I find a serif font I like better. EVERYONE comments on it.

I have tab and column alignment OCD. I can't even read other people's code without getting a terrible itch to realign things. I think a proportional font would either drive me crazy or, on the other hand, might be kind of good for me.
It's the dirty little secret of the "we hate tabs crowd" - they have to keep everybody in monospaced fonts otherwise their conspiracy to force programmers to repeatedly bash their space bars falls apart.

All joking aside, the choice of font should reflect what it is that you are trying to do with the text.

In theory a serifed font is more readable if you are reading the entire text, whereas a sans serif font is supposedly better for skimming through looking for something in particular.

(so on a web page with an article, the article text should be serifed, and the sidebar menu should be sans serif)

An application of this might be that if you are printing out a codebase in order to read it in entirety for the first time, you should use a font with serifs.

whereas if the codebase is relatively familiar to you, but you are printing it out and going bug hunting or reviewing the code, use a sans serif font.

The first few days feel a little weird, but I tried it almost a year ago and now I'm stick in Times New Roman.

I actually mix a bit of monospaced in... I have Xcode make comments monospaced. Which is nice, because it makes them fade to the background a bit.

I've been using Verdana for coding for years, with some modifications. I've changed the parentheses, braces, operators etc. to be more prominent - that makes it just perfect for me.

Edit: screenshot here: http://i.imgur.com/xv5oz.png

Oh, nice job making the encapsulating characters extra bold.
Would you be willing to share your modified font?

Also, what color scheme is that?

I'm not sure about the legality of sharing a Microsoft font... the color scheme is my own.
Then could you post a diff of the OpenType file (e.g. to a pastebin)? Only those who already have the font would be able to produce your modified version. Alternatively, if creating a diff would take too much time, could you please tell me the names of the tools you used to create your own version of the font?
(comment deleted)
Also interested, standard Verdana in my terminal is unusable. Your screenshot looks awesome.
Would you be willing to share your colorscheme?
I'd be happy to, what editor do you use?
MacVim most often, TextMate every so often.

Thanks a lot!

My IDE is misconfigured, and for html/css code uses Arial, or some other proportional font.

It's just painful to watch!

The non grid alignment, randomness, just makes it more distracting to me. Perhaps if I was exposed to it for a long er period of time, a week as you suggested, this uneasiness will slowly fade.

But, let me ask you: What's that you find so good about it? More content in less space? Why won't you go back?

I'm with OP on the issue --- proportional font for code. I find it easier to read. It goes out if its way to go out of my way.

Why would proportional font be easier to read? No idea, honestly. May be related to fact I read a lot of non-code (documents and fiction) as well, and those almost always come in proportional fonts.

Indentation. Monospaced fonts allow much easier scanning of indentation levels. For Python this is crucial; for brace-delimited languages it's merely important for many of us.
I don't follow you -- `easier scanning of indentation levels'?

With proportional font, the left-hand whitespace used for indentation of your code looks exactly as with monospaced font. Only the text itself changes somewhat.

The width of tab/positions of tabstops has nothing to do with font itself; it's property (often settable) of the editor (or in rare case of the underlying terminal). May be expressed as `times the space width', but that's it.

Perhaps you mean aligning of function argument and/or parameters one below another, or indentation of parts of expressions one below another? That indeed can't work with proportional font IF the peers in your project use different font (size or shape) or tab-stop setting. Can't work with monospaced font either -- again, IF the peers on your project use different tab-stop settings. Which is prevalent, AFAIK. Some use 12'' netbooks, other use 23'' desktops. I've even known a guy who used a T221 [1]. One size does not fit all.

Nb., you may want to read up on http://nickgravgaard.com/elastictabstops/ if you like to align stuff that way. I don't like that idea though.

----

[1] http://en.wikipedia.org/wiki/T221

This is probably the best advice. If you're doing all your own code, then non-fixed may work.

If you're on projects with other devs where there is an in-grained fixed-width coding practice, it may be very hard to suddenly go non-fixed.

Aesthetics -- nothing else.

As for the grid alignment, I never make block-style comments and normal indentation works just the same. I am not sure what you mean with "randomness".

You'll be freed from worrying about structure so much. Why is it painful to see HTML in a proportional font? Your indentation levels will remain the same; are you relying on mono-spaced fonts to lay out tables by hand?

That said, I'm not against using a nice mono font like Anonymous Pro; I used that font in Acme to write the code and thesis for my Master's.

The problem is that you can't align things in the middle of a line. I do that all the time to make repetitive code easier to read (when repetition can't be avoided entirely).
(comment deleted)
How's indenting/tabbing handled? "x spaces" or a tab? I'm wondering if you have any funny indenting/tabbing behaviour.
There's a few things that i think you're reacting to (i think, because i've had similar feelings, but i could totally be wrong).

The first is that Verdana is really nicely hinted, which means that, unlike most other fonts out there, Verdana has the advantage of always technically looking sharp.

The second is that Verdana is mostly monolinear, like Courier or Andale or any of traditional monospaces, there's only the slightest bit of stroke variation (most of it optical), so you get style but you don't get the distraction (onscreen) of stroke modulation

The third is that most proportional fonts have a comparatively larger pitch, so you get more characters in each line, which is also what you start seeing in 'next gen monospaces' that seem to make better use of their allotted horizontal space (and seem less wonky in general).

The last, and arguably most important, is that almost all proportional fonts (verdana included) have got style. It's hard to emphasize enough that most of the arguments for Consolas or Inconsolata or Liberation or ____ are largely due to the fact that those fonts have an overt aesthetic agenda, which is sometimes not apparent in first-gen monospaces (although, to be fair, they and their brethren are stylized, it's just that we've grow numb to it)

I'm personally a monospace sorta person (i like fedra mono)--there are some really nice (alas, non-free) monos out there to choose between that are more fun to use than the more stoic traditional monospaces. Part of why proportional fonts are appealing is that we rarely need monospace fonts anymore: their use is largely vestigial (and aesthetic-driven) and also that many programming languages (python et al) often have highly literate code that benefits from typefaces designed with legibility in mind.

So i'm just sayin, i respect where you're coming from, but don't dismiss monos out of hand. There are nice ones which are coincidentally monospace, but aren't as frumpy or harsh as the monospace fonts that are typically advertised as 'best programming fonts.'

I don't know. Verdana and style? Verdana?

Letter Gothic, for example, has tons more style than most other fonts, proportional or not. Verdana, in that context, is to me just as to quite a bit more boring than nearly all the fonts mentioned in the article. (Courier excluded.)

Courier has tons style (i [heart] ny!) and see also [Courier Sans](http://lineto.com/The+Fonts/Font+Categories/Text+Fonts/Couri...), and so does verdana.

I know, i know, it's verdana, the scourge of late 90s web design but it still has style (doesn't everything?), it's just that verdana has come to encompass 'corporate' and 'default' and 'websafe' in much the same way that the verizon logo encompasses 'design by committee.' Verdana's got some serious baggage, but i would hardly say it's soulless.

And in any case, it's pointless to argue this issue, but, i dunno, ten or twenty years from now, maybe we'll look back and feel differently about Verdana (in much the same way that people are warming up to Optima (the inspiration for letter gothic) again after what appears to have been a 20 year hiatus).

You did argue the issue, claiming that some fonts do have style and some don’t. I didn’t start.

It’s at least nice to see that you agree that your argument is rubbish ;-)

I bought The C++ Programming Language by Bjarne Stroustrup which had program code written in a proportional font. It is absolutely a nightmare to read. When using a proportional font, I have "jitter" issues as the cursor scrolls down and keeps switching places on the screen. I have to navigate vertically then make the horizontal adjustments.
I do all my programming in Source Insight and it lets you switch between monospaced and proportional fonts with a keystroke. I find it easier to read code in proportional mode but find editing is best done in monospace mode.

I don't want to start an editor war but Source Insight is the best editor I've ever used and that includes Emacs and Vim. Yes I said it :-)

Agreed. I find Lucida Grande a good programming font too.

Would love to see a list of top 10 proportional programming fonts.

    -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
I use Pragmata as my programming font. It isn't free, but I've used it every day for years, so it certainly has justified its cost. Visiting his site, I see there's now a pro version, so I'll have to upgrade.

http://www.fsd.it/fonts/pragmatapro.htm

That's a really impressive font actually. I don't suppose there's any kind of trial version you're aware of? I don't want to splash out that kind of money unless I'm sure I'll keep using it.
No I don't think so. There is the basic set that you could get as a trial. I really love it, but as these comments show font choice is very much a personal thing.
Inconsolata looks like it is nice for Mac users, but on Windows 7 with Cleartype enabled (the default) it is the blurriest font I've ever seen, regardless of what size I used.

Consolas, on the other hand, is exceedingly crisp.

Thanks for confirming this, I installed some of those and oh my they were ugly. I'll stick with Verdana for now :(
I don't wish to troll, but I see this a lot and I can't for the life of me figure out how anyone needs to give this any more thought than 'monospace, next question?', despite many explanations each time.

Can someone shed some light on any advantages they feel are of a reasonably significant importance, and why? I mean, I can see plenty of advantages, but they're all so negligible they're not worth even the time it takes to change font, IMHO.

...and do please note the IMHO - I'm asking, not telling :)

I only use monospace fonts with well differentiated Ls and 1s. This is a pretty important issue to me as I was constantly making dumb mistakes, and in general it improves readability.

On another note, you probably change the default font when writing a major document in a word processor (unless your using LaTex in which case Computer Modern is often the way to go). Changing your coding font is exactly like that. People like to customize and give their system a personal flavor. Changing fonts and syntax colors is just one part of customizing a system.

This was my main reason for finding the right monospace font for me too, and to easier differentiate O and 0—I prefer a bar across the zero instead of a dot.

But now that I’ve been using Inconsolata for years, it has become my final choice* so I won’t need to waste my time hunting and comparing for a better font. Done deal.

* http://patrickrhone.com/2010/11/05/final-choices/

90% of it is really just how purdy it is. Picking the 'right' font will make you feel better when you stare at it all day. It's like how functionally, you could compose a 6000 word essay in comic sans, but really rather not.

But in other cases, depending on your display size/setup, I guess there will be advantages to certain fonts. Now, mind you, the 10 on this list are all 'good' so you won't really see it between them, but certain monospaced fonts have letters/symbols that are more easily confused with each other... like single quote, versus the thing under the tilde (whatever its called >.<)

Agreed. I care about aesthetics, and using fonts that I think are ugly just make me feel wrong when I'm working. The aesthetics of code is pleasing to me, and the font is part of that.
I find it funny how so many developers I talk to online have this aversion to... well prettiness.

As if form and function is a zero-sum game. Or there's something inefficient about caring about aesthetics. What's wrong with wanting something to be aesthetically pleasing?

I believe it's called the back-tick.
For me, it wasn't about a particular feature -- it was just about the feel of the two.

A couple years ago, I was doing a lot of work on both my Windows box and my Mac. I noticed that I started to regard my Mac as "soft" and "friendly", and my Windows machine (with large external monitors) was "harsh". I felt mildly stressed out working on the Windows machine, even though I would frequently switch between them sitting at the same desk.

So, on a whim, I looked up the font on the Mac (Monaco), and set it up on Putty, and (surprisingly) it made a big difference. I felt like the code I had was easier to read, and I just generally worked better.

I've since decided I like Bitstream Vera Sans Mono, but at this point it's just something I set up on new computers, with no thought. It's not a rational thing, but who ever says I have to feel rationally about my tools? :)

Generally speaking - most of the monospace fonts I see are totally fine and I really don't care about the differences between the 10 he mentioned as being good. But when I go to windows and run cmd.exe I'm blown away by just how ugly the font they use there is.
I'm blown away that you can change the font for cmd.exe, but you only get one other option: Lucida Console. Still, it beats "Raster Fonts".
On Windows 7, you get Consolas as well -- and you can always edit the registry, as skermes pointed out.
There's only a few things I look for in a programming font:

Monospacing And being able to see these as different glyphs easily: O0I1l

Other than that, I don't put too much though into it.

Brightens up otherwise dull days. I think that's all it is. People work better when they occasionally give their computer a makeover, and everything feels fresh.
Super fair question. Frankly, it's unlikely to ever be a big deal. Font design and choice is always a game of small details and your desire to spend time and effort on it depends on how much you care about small details.

For an art director doing print or web design, each and every single detail is vital. They are attempting to ship something as close to perfection as possible. From this grows a fantastic font market where artistic craftsmen have learned to honestly, subtly insert comfort, exoticism, 70s appeal, honesty, clarity, or any of many other subjective emotions into just a few pixels difference in the shape of letters we see all day every day.

But yeah, honestly, when coding, that stuff isn't going to kill you.

At the same time, there's a huge market of experts who have often released free monospaced fonts using the accumulated knowledge of the craft described above. It's easy to find fonts which solve the obvious problems (li1, oO0, mn) and possible to find ones that solve less obvious problems (textual color which can reduce reading stress, condensed fonts which can pack more into a line without feeling cluttered, larger x-height which can appear more inviting).

'Monospace, next question?' is really 60% of what these fonts can give you. 'Modern monospace, next question?' is probably 95%. The last 5 is just there if you care about it. Like usual, the last 5% is 500x the effort of 'Modern monospace, next question', though.

If you're staring at it for 10 hours a day, I think it's fine to want to like it.
I have a different answer than all the other replies: for me it's just about fitting as much of my code on the screen as possible. The standard xterm font is nice and compact. For every other font I've tried, if you adjust it so that it matches or beats the xterm font in terms of number of lines of code that fit on your screen and number of editor windows you can fit side by side, they are not readable. Like pretty much literally not readable. (I'm eager to be corrected if I'm wrong -- I may not have tried every font out there, but I've tried a lot of them.)

Therefore the xterm font (FixedMedium6x13) wins. But getting exactly that font in other editors like it is in xterms is not so simple:

For linux, see this comment in the current discussion:

http://news.ycombinator.com/item?id=2584147

For osx, see my question, also in that thread:

http://news.ycombinator.com/item?id=2586300

I've tried many monospaced fonts.

For a long time I was a ProFont guy. But I recently switched to Liberation Mono, and I just LOVE it.

EDIT: pic or didn't happen > http://i.imgur.com/UAag3.png

I'm still using 7pt Dina, a monospace bitmap font, in all console windows and my IDEs - all except Visual Studio 2010, that is, which doesn't properly support bitmap fonts (leading me to avoid using it whenever possible).
> ... all except Visual Studio 2010 ...

I'm also a fan of Dina and it's been the first change I make to any IDE or programming text editor I use since I found it years ago. I recently came across this when I started using IntelliJ IDEA and needed a TTF font: http://chrisrickard.blogspot.com/2010/03/dina-font-for-visua... . Quote from the page:

    *bonus* I found that this font can also be used with any .NET application
    (WPF or Windows Forms) that normally can't handle raster fonts.
Screenshot: http://2.bp.blogspot.com/_n07tuwMNUu8/S603jWw9ZVI/AAAAAAAAAK...

And for anyone else curious here's the original font:

http://www.donationcoder.com/Software/Jibz/Dina/

I too use Dina (based of Proggy). I tried a lot of different fonts and there's a few on this top 10 list that wouldn't work for me but since I found Dina, I haven't searched for another font or made another change.
Why out of nowhere is this old article brought up ?
Just to annoy you... that's the reason. It worked! I can't be1ieve it!
I tried comparing several of the example screenshots next to each other and apart from them being different sizes and some are a bit more bold than others, I just can not tell any (significant) difference and cannot see any benefit one might have over the other.

Can someone enlighten me what the buzz is about here and why should I switch to Verdana or some monospaced font?

It's got to be 6x13, every single time.

There really is no other choice.

http://mirtchovski.com/p9/fonts/6x13.png

I'm a committed 6x10 user. 6x13 wouldn't give me enough lines on the screen.
Glad I'm not the only one who actually likes blocky bitmap monospace fonts for programming.

I wish I could say why though. It just feels nice and computer-y. Maybe the pixels remind me of bits.

I keep trying others and always end up going back to 6x13. It's the perfect font when working on a notebook.

At work I have a larger display that sits farther away, and am running windows. Consolas is easier on the eyes there with two Emacs buffers side-by-side (at "108" Emacs font height).

I came across the 5x13 font (https://github.com/chneukirchen/5x13) and wanted to try it on my netbook. For some reason spaces come out as hatched boxes for me. The font itself looks promising but needs many changes (some of which I've figured enough out to make; but I don't know what to do with the space).

(comment deleted)
I'm in love with Meslo https://github.com/andreberg/Meslo-Font works great both on my iTerm as well as in TextMate. What makes this font special is the L/M/S variations in the leading (line height). Give it a try, you won't regret!
I'm trying this out at the moment (14 pt S DZ) but the current line marking in VIM for example looks weird because there is more whitespace on the bottom of the characters than at the top.

Other than that it is a welcome improvement to Menlo regular.

This is perfect!

Eclipse has its lines of text set-solid which is seven brands of evil, so the "M" version of Meslo is a godsend.

It looks slightly more airy than menlo. I'll try it on for a week. One day is not enough to decide.