October 3, 2007
I've experimented with programming fonts and IDE color schemes plenty in the past. But now that I've given in to the inevitability of ClearType on large LCDs, I've basically settled on Consolas. It's hard to beat Consolas. It's darn close to the ultimate monospace programming font in my estimation. That's why I was so intrigued when I read about Inconsolata, a non-denominational OpenType relative of Consolas, which unlike Consolas, works equally well with ClearType enabled or disabled.
Once I tried out Inconsolata, I figured I might as well revisit all the common, popular programming fonts under the same conditions. So here goes. These are rendered under Windows Vista, with ClearType enabled, using my standard programming font comparison code sample.
Consolas, 11 point.
Inconsolata, 11 point.
Monaco, 11 point.
Envy R, 11 point.
Vera Sans Mono, 11 point.
Pragmata, 11 point.
Courier New, 11 point.
Lucida Typewriter, 11 point.
The Font of the Gods, 11 point.
Andale Mono, 11 point.
Choice of programming font is as much a personal preference as anything else. Decide for yourself what works for you. I'll limit my comments to a few observations:
- Please don't use the default Courier New typeface. Be kind to your eyes.
- Personally, I still don't think anything beats Consolas; it's an outstanding monospace typeface design, highly optimized for ClearType display on LCDs.
- I'll never understand the appeal of Monaco amongst the Mac crowd. It's an unreadable mess to my eye.
Posted by Jeff Atwood
So does anyone at MS read this blog?
Why the F#* does SQL Enterprise Manager (and even some parts of SQL Server Management Studio) have PROPORTIONAL fonts in their query editors (ever tried to edit SQL in DTS?)
Urge to kill.... Rising....
I tried monoco and inconsolata for a while but innevitably went back to consolas. ms won me over with that font.
vera sans mono. Best across applications and across platforms.
I've stuck with Monaco 10pt, with black background. It's been my environment of choice for more than a year now, no complaints.
And it's been a success: my colleagues copied my scheme, setting by setting!
I'm a big Consolas fan myself, but of the screenshots above I think I like Courier New second best. I'm not sure why so many people hate it so much.
Lucida Typewriter is an old fave, too.
You can change the font in most of those places (editing SPs and DTS) by right-clicking and selecting "Font..." from the contextual menu. The choices have persisted for me.
I gave it a try, it is definitely nice looking but there is too much space between the lines for my taste. I use 9pt and it still looks good but moving to 8pt to try to get more to fit on the screen makes it hard to read.
I still have to stick with ProFontWindows 9pt. Easy to read and compared to Consolas 9pt you gain about 10 rows and 25 columns on a Dell 24" monitor. Plus it has the slash through the zero which I love!
I love Monaco and use it all the time... but I find it ugly in your photo. Looks a lot nicer on the Mac.
Also a lot smaller at 12pt -- what resolution screen are you using?
Consolas looks promising. Let's see how this works out in Notepad++ and dev-c++.
I've been using "crisp" from proggyfonts for over a year now. That, combined with a black background have made everything much easier on the eyes. It kills me to go to someone elses desk to look over something with them.
Consolas is nice, but I still prefer ProFontWindows.
Monaco looks like hell with crazy windows font rendering, agreed. You wouldn't even recognize it on the Mac. I use Monaco at 13pt and it's far shorter than your posted shot. I'll second the question, what screen resolution is that!?
Vera Sans Mono on anything but OSX for me.
Maybe I'm simply too young to get it (having missed most of the years of 80-column displays), but I really don't understand why so many developers seem to prefer fixed-width fonts, anyway. Numerous studies have shown that proportional fonts are easier on the eye and easier to read; once you get used to it, this applies to code as well.
If you've never tried it before, I highly recommend that you try a proportional font for a couple of weeks. Most of the guys at my office use Verdana, while I prefer Calibri.
That, combined with a black background have made everything much easier on the eyes
Light vs dark is a preference, but it's the *reduction in contrast* that specifically helps readability and reduces eyestrain (a href="http://www.codinghorror.com/blog/archives/000340.html"http://www.codinghorror.com/blog/archives/000340.html/a). Never use pure black or white backgrounds if you can help it.
Monaco looks like hell with crazy windows font rendering, agreed. You wouldn't even recognize it on the Mac
It's true that OS X and Windows have very different font rendering strategies, so screenshots cannot be directly compared (a href="http://www.codinghorror.com/blog/archives/000884.html"http://www.codinghorror.com/blog/archives/000884.html/a).
I agree with Pete. The Monaco font on Windows looks different (at least the version I have does). It's too big and skinny. On the mac it's way smoother and natural.
Still, my Windows code editors are all on Consolas. I love the fact that Consolas bold has the same width as the normal style. Try that with Courier New :)
Courier New for the win!
@David: I'll have to try a proportional font sometime in the future, see what difference it makes.
I have one problem with proportional fonts - my tabs look squashed (I like having lots of whitespace).
I used to use a TrueType font called Hell's Programmer, but I can't seem to find it on any of my old archives. Very good distinction between all the similar-looking shapes (1, l, I, etc)
OS X and Windows have very different font rendering strategies.
Duh? That was my point, that windows font rendering totally screws up Monaco.
Envy Code R is optimised for 10 point rather than the 11 illustrated but thanks for the inclusion :)
that windows font rendering totally screws up Monaco.
This obviously gets into the area of pure opinion, but I think Monaco is so inherently screwed up as a typeface that no mere rendering strategy can possibly save it.
Is this on a Mac? Doesn't look one damn bit better to me, although it is WAY more bold ..
Those angled "a"s and "q"s are like nails on a chalkboard. Ugh.
White on black is much easier to read than black on white. I can' think of any better color combination.
@extrarice: I was looking for it on Google, but instead I found a font called Anonymous, which seems pretty good. Apparently it's designed as a more legible version of Monaco: http://www.ms-studio.com/FontSales/anonymous.html. It's free, too.
I still love my Lucida Console, ~8pt. - Lots of lines of code at anything with a vertical of 1024px or more.
Of more concern to me personally is reducing the contrast of the default keyword coloring. I just can't read the default red-white blue mash.
I like to eyeball blocks of text at a distance and know what they're for as the scroll past.
C#/VB gets shades of gray, comments get purple on pink, help doc comments get green on light green. The background colors are very subtle, hardly noticable when typing, but very noticable when scrolling. Nothing says "disabled" like a big pink block. It's great on code reviews too because uncommented undocumented code lacks the rhythm of well-styled code. Bad intern. Bad...
Is this on a Mac?
Yea it's definitely personal opinion. I think it's unarguable that the way Monaco is rendered by the Mac looks nicer though. After looking at that screenshot you must excuse me to go and change my pants :)
I'd say it looks even nicer not in a terminal (TextMate FTW!).
I definitely use Vera Sans Mono a lot on all OS' too, so don't think I'm a fanboy or something :P
Consolas is an outstanding font Jeff, thanks for bringing it to my attention.
Your test code is missing the line:
Those angled "a"s and "q"s are like nails on a chalkboard to me.
Not just that, but the  in Monaco looks way too much like a square box. Is that a missing Unicode character, or an array? Take a guess...
I use Consolas for all my .NET development and like it very much.
At home, I strictly use a Mac and like Monaco.
But this is all personal stuff. Half the fonts shown above look OK to me, honestly.
Give me Vera Sans or give me Arial!
Why all monospace? :)
I know I'm vastly in the minority here, but I do my coding with a proportional font. Indents still work fine since they're all spaces, and I've found that besides indents, lining up characters is almost entirely unimportant in my code. Proportional is easier to read in general - so why not use it?
I would love to use a font other than Courier New, but unfortunately all font designers stick with pretty much ASCII / ISO-8859-x only fonts. Since I program in a Japanese environment (with Japanese comments), using a font other than MS Gothic (Japanese version) tends to screw up editors that don't do automatic font swapping. It's frustrating when I see nicer fonts that other people can use...
tried 'em all... profont, truetype version, is the winner for me.
I spent a few hours several months ago trying to find the perfect programming font for me and I settled on Dina - I love it. I just installed Consolas to check it out and didn't like it as much (not really sure why as it looked nice on the screenshots) at 9pt (which is where I run Dina) - however, I changed it to 10pt and it looked better. I will give it a shot tomorrow to see how much my eyes like (or don't like) it.
I like a proportional font, Trebuchet MS. For two years I've used proportional fonts, and now that I am used to it I think that non-proportional fonts are a little bit ugly :-)
Just my opinion :-P
Does anyone else find the Incolsolata example way too blurry to read? All of the other examples are sharp and crisp, while that one seems to blur (laptop LCD, cleartype enabled).
I'm with David; a proportional font really does work for programming--but you need to give yourself a week or two to get used to it (and perhaps use tabs instead of spaces). I've been doing it for years; first Verdana and now Tahoma.
Anyone know if the truetype version of profont is scalable and/or aliasing? (Sorry Damian, couldn't resist)
Folks who like ProFont might like MonteCarlo. It's somewhat similar, but includes a good-looking bold weight.
Be Cool...Im realy...
I've been doing it for years; first Verdana and now Tahoma.
Certain types of data are easier to parse (with your eyes and brain) in monospace. Some types of data are even impossible to read without it (i.e. tablature for string instruments).
Other than that, I'm just anal about lining up things in my code (parens, brackets, etc.), and it never fails that someone not using monospace used too many tabs to line up something in their editor (or worse yet used spaces and/or had an unusual number of spaces set up for their tabs) because they had too many characters on a line that take up less space than the characters on the previous line.
I just generally prefer to use fonts that are both monospace and make it easy to tell the difference between l and 1, or 0 and O without having to double check it. I take the time to write them differently by hand, why shouldn't the person that made the font do the same?
ClearType is specifically designed to blur the image at the precision of the output device - standard anti-aliasing is essentially the the same technique applied at the frame-buffer which may not match the device.
ie. The necessity of ClearType is proof that your display does not have the precision you desire.
I still use CRTs at home for the simple reason that no LCD can match the mighty Trinitron's dotpitch. At work, I recently got a new LCD (SyncMaster 225BW) which has finally matched the clarity of the Trinitrons but only if I use it's native resolution (1680x1050). The Trinitrons limiting resolution is *far* higher.
So, I hereby coin my conclusion thusly;
If ClearType makes any font look better on your display; your display is rubbish.
What about larger monospace fonts? My laptop's natural resolution is 1680x1050, so in order to be able to see anything at all (!), I jack up my fonts to a minimum of 14pt, maybe 16pt.
I was looking around and couldn't find ANYTHING that looked decent at 16pt; all the specialized programmer's fonts (yes, that means you ProFont) are designed to look good at 8pt. Gross!
The question is: which one scales up better? Consolas is the obvious option, but are there others?
I alternate between Consolas and Vera Sans Mono. Both have details I like a lot. The half-serif lowercase L in Vera Sans Mono is brilliant; Consolas’ looptail lowercase G is gorgeous; the dotted zero in Vera Sans Mono is much less objectionable than the standard slashed zero; the curly quotes in Consolas are really, really obviously curled; and on and on.
Unfortunately, Consolas has no box drawing characters, which means I can’t use it as a terminal font.
Damn Aristotle, you said just what I was going to say!
Have a look at this screenshot (taken with Jing - recommended!). Consolas is missing the box drawing characters around the dialog box, but also the "scroll bar" along the bottom right, and even the right arrow at the top right.
LCDs are ONLY clear at their native resolutions. Anyway, I couldn't use my 21" Trinitron at higher than 1280x960. I really can't accept that any electron-gun device can be more precise than a reasonable quality LCD. In my view, LCDs are too crisp without ClearType. I find ClearType makes the text look more "robust", more like printed text than without, LCD or CRT.
My choice of font is Monospace 821 BT. I've tried Consolas, but I find that the 10pt size, which should be the size I want, is no larger than the 9pt. 11pt is too big. Anyone else feel like they left out 10pt?
courier fits fine, don't need another font.
I'm pleased that you included Pragmata. I seriously thought nobody knew about that one. It's the only font I ever actually paid money for, and it's been an absolute pleasure to code in since way before Consolas ever came out.
As for Consolas, it is extremely readable and a fitting standard programming font, albeit clearly lacking in personality. :)
Yeah, I also see that Inconsolata image all blurred up; surely the font can't be that bad.
Courier New all the new.
I don't like any of the other fonts, but I guess that's mostly because I'm really used to Courier New.
I listened to advise and set Consolas as my programming font. Nowadays I prefer Comics, it creates a warm fuzzy feeling inside and I get a lot of attention from coworkers. Try it - you might love it.
You should try to Lucida Console font which comes with windows.
It looks great with ClearType.
I also use lucida console, 9pt. It allows me to have more code on the screen than with consolas. I also think that cleartype and consolas on lower point sizes is pretty bad (but that's personal preference I think). (I use 20.1" monitors, 1600x1200 TFT)
The only thing better than Comic Sans in your code is Arial. ;)
Seriously, I don't know if I'll ever give up Andale Mono, but I'll admit that at this point it's just 7 years of familiarity. Although it really looks quite similar to Inconsolata, with Verdana's x-height. Speaking of, I've become accustomed to mixing Verdana and Andale Mono these days, sans-serif doesn't pain me like it did before cleartype.
I just noticed that my IDE is set to use Comic Sans for comments. SWEET.
Just shows how little coders are valued.
Engineering reduces coders to cheap components and eye sight damage does not matter much in the great scheme.
Am I the only one who uses Lucida Console? Admittedly it's been a few years since I did my font search, but LC was the only typeface I found to be clear at small point sizes.
Nice one, I've been using monaco so far but I disliked a couple of things about it. Thanks for recommending Consolas (I guess I missed the previous posts you made about it). I just tried it and looks like it fits my needs/tastes.
I like Consolas and Profont.
Bitstream Vera Sans Mono from Gnome is also very cool because of its copyright. You can copy it, redistribute it, and even modify it given that you use another name for the result.
These were my conclusions in a comparative of programming fonts I did a while ago: http://mundogeek.net/archivos/2006/11/18/fuentes-para-programacion/
Jeff: using Mac font rendering, Consolas looks just terrible at any size below about 16 (much more of a mess than any of the screenshots you posted here). And I'm no giant fan of anti-aliased Monaco either; the glory of Monaco is that it's the first widely-used good-looking monospace pixel font, and Susan Kare managed to make it look good, and stylistically consistent, at 9, 10, and 12 sizes. But 9-point bitmap Monaco is amazing (especially since they tweaked 1, i, l, I to be more distinguishable sometime in the Mid-90's).
But with antialiasing turned on on the Mac, and at sizes #8805; 12, particularly for light-on-dark schemes, there are many monospace fonts that look much better than either Consolas or Monaco.
I've been using Proggy for some time now and warmly recommend it, especially because of it's crispness, but I think I'll give Consolas a quick go.
You can find the Proggy fonts here:
You should take a look at "Crisp"(TrueType) and "Proggy Clean(slashed zero, bold punctuation)"(bitmap).
I use an ageing version CodeWright that allows a different fonts for screen display and printing. Fonts good for screen display are seldom good for printing also.
What would you recommend for paper output?
Is there a font that is good for both?
Currently for paper output I an using Courier New where it works well - serifs are good for paper it seems - and until I read this Lucida Console for screen.
Also note, the point sizes I speak of are Mac point sizes. Your 11-point consolas example is about 14.5 point on a Mac. :)
"If you've never tried it before, I highly recommend that you try a proportional font for a couple of weeks."
The options for the editor for delphi only shows select fixed fonts. Neat, huh?
Envy R is the winner for me. Before it, I was using Dina.
Try assembly once in a proportional font and you'll switch it right back.
The real reason proportional fonts aren't used is so that comments and array data can be lined up in columns.
Trying out Consolas today, very nice. Using 12pt and [255,255,215] as text background colour.
I have tried most of the fonts mentioned in previous posts, but finally settled on one nobody has mentioned yet: Bitstream's Reader Sans Mono.
For me this is the ultimate font for editing code.
On a Mac you can't beat Monaco. (I used Consolas on Winodows). The only problem with Monaco is that it doesn't have a bold version, so if your editor likes to highlight certain things in bold, you lose out on that feature.
Not just that, but the  in Monaco looks way too much like a square box.
Again, this is Windows only rendering that makes it look like that... It looks nothing like a 'missing unicode character' (in your code? really? ok...) on the Mac.
just out of curiosity why was calibiri not included? it's offered as a download for VS 2005 and I find it to be better than consolas; it packs more onto the screen and remains readable
I just don't see what you have against Courier New. I tried Consolas, and it just doesn't compare:
- it's too small at 10p, my fav size
- it's too large at the next size, 11p
- it saves *horizontal* space which I have plenty anyway, since my code is formatted at 80 columns and my 24" lcd is WIDE
- it looks crowded
- Courier is more spacious, the letters better defined
What exactly do you *see* in Consolas, if you don't mind me asking?
Anonymous. Anonymous anonymous anonymous.
Bitstream Vera Sans Mono if anonymous is not avail.
I'm surpised to see 11pt fonts on here, I've been using Consolas 8pt ever since I discovered the font.
I prefer to have a smaller font and be able to see more of my code at once. I find having a pair of 20" LCDs running natively at 1600x1200 helps too.
Terminus is nice for bitmap, Vera Sans Mono for antialiased. I used to use squinty little fonts (Vera at 8 or 9 pt*), but now I have a maximized editor on one monitor and everything else on the other.
* Those are real points, which are an absolute measure. If something at "9 pt" is different sizes on different OSes, then (at least) one OS is _broken_.
DejaVu Sans Mono.. which I use.. is perfect for me! Looks awesome in VIM, and Eclipse too!
I fell your pain with SQL Enterprise manager, and other parts of the client tools. Why do I have to feel like I'm using Win95 while working with MSSQL?
1) Turn off antialias.
2) Install terminus.
3) Rinse and repeat.
Love the comments about Enterprise Manager! Even MySQL has a better interface and that is open source! MS really needs to do something bout that.
Back on the topic, quite frankly I like Courier New alot (I am typing in courier new as we speak). I use it all day baby!
No fixedsys love?
In VS I have always found that fixedsys (which there's a TTF version of floating around out there) just draws me back every time ... Consolas I use for just about every other monospaced need, but in Visual Studio it's fixedsys every time.
As for colors -- I prefer dark/midnight blue background with white text.
Okay, I'm a freak. I admit that. - Of the fonts here I agree, Consolas is the way to go, but I don't always want monospace fonts. I also like Lucida Console (which someone mentioned before), but I'm a very large fan of Verdana, yes Verdana. For Code. Honest.
Franklin Gothic Medium , light colors on black is what I use, love it. easy on the eys.
I have found that the "best" font varies greatly between machines (of course), but also between apps on the same machine. The font that looks good in Notepad2 looks awful in UltraEdit, for example.
Try TheSans Mono from Lucas Fonts. Not free, but worth it. You also probably need to convert it to TTF before it starts displaying properly on screen.
Consolas was designed by Lucas Fonts, and has some essence of TheSans Mono.
Inconsolata looks all washed out and inconsistent on my Windows machine. The Mac screenshot on the site makes it look much better, though.
Monospace fonts are pointless nowadays anyway, though. Do your eyes a favor and use a real font.
Just for your information, in case you like it. There is another fine console font available for free from Raize Software
However, with the event of Consolas, I think it's days are counted, Consolas really beats any console font out there. I love it too!
I shit you not Jeff, my co-worker about 3 cubicles over uses Comic Sans in Visual Studio. He claims it's easier to read.... :O
Inconsolata is a coding font designed to look good in print (at high resolution). In fact, much of its subtlety is only apparent when printed out at 300dpi or higher. This is clearly somewhat of a niche font.
I find nothing beats Vera Sans Mono for my purposes, which involves a lot of real time programming in C. Vera Sans Mono is a monospace font that reads much like a proportional font. It has compact character spacing, but is more legible for me than any of the other fonts shown above. I've spent too much time trying these and many more. Vera Sans Mono seems to have a slightly larger x-height, which may be what gives it the edge over Consolas.
Good text editors allow different fonts to be specified for screen and print. Try setting screen to Vera Sans Mono or Consolas and print to Inconsolata.
i use bitstream vera sans mono for *everything*--fixed font emails in thunderbird, code in visual studio, securecrt terminals and textpad come to mind. i just love the zero in that font.
and since you are bringing up fonts and colors again, jeff, can you possibly change your blog colors to be white text on a black background? not pure black or pure white of course (hardocp.com hurts my eyes after reading one article), but something besides what you have now? that would be just swell.
I'm actually a fan of the X11 classic 6x13 fixed font. My monitors have big enough pixels that it works rather well for me.
I believe the particular application affects the choice of font. Some older applications, Programmers File Editor for example, just dont render text right with an OpenType font. A bitmap font, however, works great. PFE uses its own edit control; that probably factors into the display ugliness.
Another factor in choosing a font is if the application is a GUIish console one, especially using line graphic characters. You're pretty much stuck using a font like Terminal in that case.