Several others here have suggested my favorite font already, the standard 6x13 "Fixed" bitmap font.
Pretty much every Linux machine has a version of this, but most modern Debians (and probably others) that ship with fontconfig have bitmapped fonts turned off by default for programs that use fontconfig for their font info (i.e., not xterm, but gnome-terminal, usually gvim, et cetera).
If you want to use Fixed and other bitmapped fonts and they're just not there, take a look in /etc/fonts/conf.d for a file named (something like) 70-no-bitmaps.conf, a symblink to the same filename in /etc/fonts/conf.avail. If you remove the symblink from /etc/fonts/conf.d and instead
I tried Inconsolata briefly in my xterm window but ... I don't know, I didn't like it. I guess it's a subjective thing, but I dislike anti-aliased font, I prefer the crisp look of my fixed bitmap font. :-)
since I don't have a stackoverflow account I'll respond to your secondary question... IntelliJ / PhpStorm /etc allow you to enter a custom line spacing. (Plus PhpStorm is a great environment for web project development work)
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.
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.'
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.)
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).
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 . One size does not fit all.
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.
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.
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.
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 :-)
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?
Just nit picking, but your misspelling of Envy Code R (I read it as "envy coder") to Code Envy R gave me a deja-vu. And I found your comment at http://news.ycombinator.com/item?id=1287909. You are not alone there, though :)
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).
I'm a fan of courier, though my favorite became Bitstream Vera Sans Mono some time ago after I was searching through my fonts for a better font. I like it a lot because it makes it easy to distinguish between O and 0, and l and 1.
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).
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.
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!
This is the article that introduced me to monofur, which I dearly love even though it seems fairly unpopular. Take a look and you'll either think that lowercase L is a terrible idea or exactly the thing to distinguish it from the number 1. The rounded friendliness distinguishes it from all the other fonts I use; now when I see monofur (in the zenburn color scheme), it says "programming time" to my brain.
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.
Although I am not a programmer, I do prefer monospaced fonts, and my favorite right now is the bitmap font Tamsyn. I recently discovered it via the Arch Linux wiki and I now have it set up as the font for my Xterm windows (set via .Xdefaults).
My favorite TTF monospaced font has got to be Consolas, which I use in Windows as the font for Foobar2000 and Notepad2 (I keep everything in plain text).
From my experience,a lot programmers get set in their ways. For example, I just stuck with using the standard Console font for my IDE when I installed it years ago.
Then I came across this article, or one similar, and messed around with different fonts and sizes. The difference it made was surprising. I feel like it definitely has made an improvement in how I work.
I would recommend people try testing new fonts, layouts, etc at least once a year. the aesthetics is just as important as the content, even when coding.
consolas is an excellent font for both terminal and editing. if you would like to install it for OS X or UNIX, I have extracted the TTF as well as the OS X installer package and placed them into a repo here:
This is not directly related to fonts but for anyone using Visual Studio, this might be helpful: http://studiostyl.es/
It's a website that collects Visual Studio color schemes, so that people can download and install them rather than spending hours customizing their IDE to look like they want it to. Assuming they like one of the available schemes, of course.
I experiment with this a lot, my fonts folder is full of fixed width fonts. But I somehow always go back to Monaco (11pt) white on black background. This is using TextMate, non anti-alias. (Example: http://tinypic.com/r/2hnayq8/7 ) Perhaps TextMate is too limited in this respect (it doesn't handle proportional fonts well).
I searched through this whole thread looking for 'alias' to see if anyone else also can't stand anti-aliased fonts for coding, and I see that there are a few of us. I also always end up back with Monaco, but 10pt black on white. Perfectly readable and easy on the eyes.
Am I the only one who programs in a proportional font? It's helpful for the same reason it's helpful in print: the letters are more distinguished from each other so the brain recognizes them more quickly, and you can fit more text into the same space.
I use a modified version of Georgia which adds a slash through the zero and changes the l (ell) to look less like the 1 (one).
Variable-width fonts help with natural language, to detect phonemes or even words. Unfortunately, we are mostly dealing with machine language, where audio is not so important, so character-by-character reading is the norm.
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.
I mostly like inconsolata, but it doesn't keep my favorite part of deja-vu: the lowercase ell. I never ever confuse the ell with the one as it is so distinct. Inconsolata does this by removing the baseline on the one, which works, but I much prefer the deja-vu way of things.
I've been slowly shifting from Proggy to Consolas; it was easier once I embraced larger font sizes (I have 20/20 vision, and I'd like to keep that!). At that point, Consolas became a balm for the eyes.
Every second spent on "programming font" choice is a second wasted. Every single second. Twiddling fonts is to programming what applying flame decals is to car racing. If the font doesn't become transparent to you after uhm, about 5 seconds of focusing at the code then you should permanently switch to iPads as you have no business doing any real computing.
I think a better analogy is "Twiddling fonts is to programming what choosing a helmet is to car racing". An ill-fitting helmet will probably do the job just as well as a good fitting helmet, but why be uncomfortable?
That said, I agree that there's a limit to how much effort you should put into font selection -- find one that you like and that works for your purposes and leave it at that.
I started out using FixedSys, since it was the default on the editor I was using at the time - PFE, I think. And since taking the time to switch to the X 6x13 font (which I happened to encounter towards the end of my time at university), I must have saved enough time scrolling horizontally through other people's code to break even.
I have dicked about a bit trying out other programming fonts, it's true, but having had success the once from doing this, why not double check?
hmm... why are all programming fonts terminal style, or monospace fonts? Well I guess it's to ensure proper indentation and alignment of lines of code. I guess that explains why code looks horrible when you copy and past it into an HTML page without changing the font.
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 :)
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? :)
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.
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.
You can actually add more fonts, though it requires editing the registry and doesn't work for all fonts, I think. It does let you at least get Consolas, which is good enough for the time I spend in cmd.
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.
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 >.<)
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:
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?