News for hackers. Stuff that matters.
Re:Collection of the best fonts for programming by yareally on Sunday April 28, 2013 @09:58PM (#5623695)
I'm surprised Liberation Mono[1][2] (similar to the Deja Vu font) is not on the list or the bitmap font, Dina[3]. I end up using Liberation Mono much more nowadays (which is similar to Dina), since bitmap fonts don't have support in a lot of development tools and Dina has no real UTF-8 support. However, Dina was my first real "programming font" I used and still love it where I can use it.

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

[2] https://fedorahosted.org/liberation-fonts/

[3] http://www.donationcoder.com/Software/Jibz/Dina/

Re:Collection of the best fonts for programming by StuieK on Sunday April 28, 2013 @10:07PM (#5623718)
Hey man, feel free to add it! (the entire site is collaboratively written)
Re:Collection of the best fonts for programming by yareally on Sunday April 28, 2013 @10:09PM (#5623725)
Will do :)

I just found it surprising no one else had added them already.

Re:Collection of the best fonts for programming by wahnfrieden on Monday April 29, 2013 @02:02AM (#5624341)
How is it better than Menlo, also based on Deja Vu?
Re:Collection of the best fonts for programming by yareally on Monday April 29, 2013 @04:15AM (#5624719)
It's hard for me to give you an exact comparison (because I'm not an OSX user and have never used Menlo), but I can give you an idea based on a comparison to Deja Vu (on both Linux and Windows 7). Some of my reasons are preference (what looks better) and some are factual (like spacing).

Liberation Mono is a more vertically compact font, but I consider it just as readable as Deja Vu. I can fit around 7 more lines on my 1920x1200 monitor with 13pt Liberation versus 12pt Deja Vu. Deja Vu just takes up way more space than it needs to and (my opinion) does not make it anymore readable than Liberation or Dina.

I generally dislike anti-aliasing/smoothing on fonts when writing code in certain editors/ides (looking at you Intellij Idea). I don't mind it elsewhere, but Java just sucks at rendering fonts with its generic anti-aliasing scheme. Since I dislike it in Intellij and I use their IDE quite a bit for Android/Java, Python, JavaScript or PHP, I disable the Java anti-alias setting and most fonts tend to look bad that way as they're designed for smoothing.

Liberation though looks great with little to no distortion even without anti-aliasing enabled. I would have stuck with Dina (similar to it) since bitmap fonts do not get smoothed out by the OS or IDE, but many editors do not support bitmap fonts and the lack of UTF-8 support with Dina is a letdown as well. It's still a great font, just the tools I use end up being more important than the font itself.

Compared to Deja Vu, Liberation has less distortion glyphs without smoothing enabled and much more readable. The real downside to Liberation Mono is the 0 has just a dot in the center of it instead of a full slash unlike Menlo (doesn't bother me as I can see it, but I would prefer a slash).

Just for reference and because pictures give a better idea than my own preferences, here's a comparison:

Deja Vu 12pt: http://imageshack.us/a/img543/9845/dejavu12.png

Deja Vu 12pt (no font smoothing): http://imageshack.us/a/img547/858/dejavu12noaa.png

Liberation Mono 13pt: http://imageshack.us/a/img43/691/liberation13.png

Liberation Mono 13pt (no font smoothing): http://imageshack.us/a/img708/6315/liberation13noaa.png

Re:Collection of the best fonts for programming by hmottestad on Sunday April 28, 2013 @03:47PM (#5622470)
My favorite is Verdana.

Yes. A proportional font for programming. In the beginning I hated tabs and white space, until I just got used to it. Now it's much easier to read my own code. Words jump out of the text because spaces are spaces and "i" doesn't make me doubt for a split second where the word starts and ends.

Re:Collection of the best fonts for programming by Stratoscope on Sunday April 28, 2013 @05:35PM (#5622872)
I'm another proportional font programming fanatic. I have tried just about every plausible monospaced and and proportional font, and the one I keep coming back to is Georgia. On a high-enough resolution display (125DPI or better) with ClearType, I find it easier to read than Verdana or other sans-serif fonts.

Georgia is a bit of a radically-proportional font: even the numbers are proportionally spaced! Most proportional fonts have monospaced numbers. I think I would probably like monospaced numbers, but I do like Georgia enough that the proportional numbers don't bother me.

I find the same benefit you do: I have an easier time reading my code (and other people's code too). There's a subtle benefit as well: it's completely removed the temptation for me to look for column alignment when there's no need for it. I think monospaced fonts trick our eyes into seeing, and seeking out, vertical patterns that don't really need to exist.

Since as I mentioned in another comment, I just don't do column alignment any more (indentation only), that takes away the old arguments about "tabs for indentation and spaces for alignment" and such. It doesn't matter if you use tabs or spaces for indentation; the code will look fine either way. And there's no column alignment to get messed up.

I should also mention that I don't have any beef with people who prefer monospaced fonts. I do have a beef with coding standards that only work in monospaced fonts because of column alignment and similar column-oriented formatting tricks.

Re:Collection of the best fonts for programming by ygra on Monday April 29, 2013 @02:27AM (#5624391)
> Most proportional fonts have monospaced numbers.

Most fonts that are worth their money come with monospaced and proportional numbers in both lining and old-style forms. Those can be chosen via OpenType features but I fear most code editors don't allow choice in that matter.

Re:Collection of the best fonts for programming by clhodapp on Sunday April 28, 2013 @04:35PM (#5622640)
At risk of sounding blunt, I do want to ask: have you tried several fixed-width fonts, or have you just used whichever is default on your system? In my experience, there seems to be no issue seeing where there is a space (not even for a split second) with well-designed fixed-width fonts. In fact, for me, it's more apparent, as spaces tend to be wider in fixed-width fonts, being the width of the widest character.
Re:Collection of the best fonts for programming by hmottestad on Sunday April 28, 2013 @04:52PM (#5622722)
I tried a bunch yes, and was fairly happy with them. Then I read about using proportional fonts for programming and just had to try it. It was a tad weird in the beginning but soon felt much more natural.
Re:Collection of the best fonts for programming by kennywinker on Sunday April 28, 2013 @04:47PM (#5622701)
+1 for proportional fonts. I'm a long time user of Times New Roman in Xcode. I keep TextMate and my terminal monospaced, but for Objective C proportional fonts work perfectly once you adjust.

I kindof makes sense because ObjC methods are so wordy, that you would want a font aimed at readability rather than symbols.

My Xcode theme is here gor anyone who wanta to try http://objectivesea.tumblr.com/post/3109860705/newromantimes...

Re:Collection of the best fonts for programming by platz on Sunday April 28, 2013 @04:59PM (#5622746)
I would love to see list of proportional fonts people are using for programming.
Re:Collection of the best fonts for programming by jussij on Sunday April 28, 2013 @07:56PM (#5623383)
How do you actually code effectively with a proportional font?

Without a monospaced font, column cut, copy and paste operations are effectively eliminated (as nothing lines up vertically) and that is one of the programmer editing constructs I use the most.

I could not live without column editing.

Re:Collection of the best fonts for programming by to3m on Sunday April 28, 2013 @09:34PM (#5623643)
Lack of column editing always drives me back to monospaced fonts in the end, too. I like the proportional look, but column operations ate just too convenient.

(Perhaps I need to make an emacs keyboard shortcut to toggle font type at the press of a key. Then i could quickly switch to monospaced for my rectangular operations. That might work. Wouldn't help for Xcode or Visual Studio though.)

Re:Collection of the best fonts for programming by ygra on Monday April 29, 2013 @02:32AM (#5624411)
I think it was Eclipse that switched to a Monospace font when entering column selection mode. While having a mode and not a quasi-mode for that operation is highly questionable to me, the automatic switch is a very nice touch. Especially to those who usually use a proportional font.
Re:Collection of the best fonts for programming by Stratoscope on Monday April 29, 2013 @07:24AM (#5625412)
UltraEdit and UEStudio also do that. It takes care of the column selection problem nicely.

Komodo doesn't switch automatically, but you can set up a keyboard shortcut to switch between monospaced and proportional fonts.

Re:Collection of the best fonts for programming by Someone on Monday April 29, 2013 @01:50PM (#5627642)
I am very curious: where (programming language) and how do you use column editing? I must be missing out on some huge productivity booster, but I think having automatic code layout makes this feature as good as 100% superfluous.
Re:Collection of the best fonts for programming by adamzochowski on Monday April 29, 2013 @04:40PM (#5628570)
Column mode becomes helpful any time you have a few lines of code that look and operate very close to each other.

For example https://github.com/torvalds/linux/blob/master/security/commo...

you are writing "cap_capget", you could write three lines,

     effective
     inheritable
     permitted
And now, select in block mode the text you typed, click copy. Then select blank column to the right of any of the text, and type

     = cred->cap_
once you finished typing that (since you typed in block mode, it typed that across all 3 lines at once), now press your ctrl-v . and then type semicolon. Done.

        *effective   = cred->cap_effective;
	*inheritable = cred->cap_inheritable;
	*permitted   = cred->cap_permitted;
Here is some quick example of how you could use column mode during programming.

http://www.youtube.com/watch?v=yeYmPV3DpG8

Re:Collection of the best fonts for programming by sytelus on Monday April 29, 2013 @10:36PM (#5630137)
Re:Collection of the best fonts for programming by Stratoscope on Sunday April 28, 2013 @07:50PM (#5623366)
One thing about font choices is that they will vary depending on several factors:

* The pixel density of your display

* Rendering method (ClearType, OSX anti-aliasing, etc.)

* The size of text you prefer

* How sharp your vision is

* And of course, personal taste.

As a reference point, I'm using Windows 8 on a moderately high-density display for a Windows laptop, at around 140 DPI. I'm old, with less than perfect vision, but it corrects well with my single-vision computer glasses.

My favorite font these days, as I mentioned elsewhere, is Georgia. I just find it so easy to read.

Other proportional fonts I've tried for coding and liked fairly well are Verdana, Cambria, Rockwell, and Source Sans Pro.

The best thing, of course, is to try a few and see what pleases your eyes.

Re:Collection of the best fonts for programming by leephillips on Sunday April 28, 2013 @10:11PM (#5623730)
Ascii art in comments won't work: not acceptable.
Re:Collection of the best fonts for programming by kennywinker on Monday April 29, 2013 @02:02AM (#5624343)
Ah! But I have a hack for that!

Xcode handles mixed proportional and monospaced fonts fairly well. Comments are in a monospaced font, everything else is proportional.

I assume you were joking, but the issue of ascii art in the comments actually came up super quickly when I switched to proportional fonts.

Re:Collection of the best fonts for programming by Stratoscope on Monday April 29, 2013 @07:32AM (#5625442)
Oh, now that is interesting.

I didn't realize it until you mentioned it, but Komodo has a similar feature. You can select monospaced or proportional for any syntax element. I think I will try putting comments in monospaced and see how it works out.

Thanks for the tip!

Re:Collection of the best fonts for programming by leephillips on Monday April 29, 2013 @10:23AM (#5626303)
Doesn't work in console Vim: not acceptable.

(67% joking - as you know ascii art in comments is sometimes a real thing.)

Re:Collection of the best fonts for programming by hmottestad on Monday April 29, 2013 @12:01PM (#5626986)
Doesn't work on punch cards either :(

(99% joking)

Re:Collection of the best fonts for programming by Stratoscope on Monday April 29, 2013 @04:40PM (#5628578)
But it does work on paper tape. 0% joking.

My first summer job was back in 1969 at a company in Phoenix called TransData.

We had a program on the Sigma 5 called Ferret, which would copy data and read and punch paper tapes and stuff like that.

You'd end up with a lot of rolls of paper tape with your various programs and files on them. The problem with these rolls was knowing which was which.

Traditionally you would leave a few inches of blank tape at the beginning and write the file name on it with a pen. When you roll up the tape and put a rubber band around it, you've got the filename right there. This did get a little tiresome though.

The paper tape for the ASR33 stored a byte at a time - eight holes that you could punch or not punch before the tape advanced to the next row. So I updated Ferret to punch out the filename in an 8px font that you could read after you rolled the tape up.

And I'm almost certain it was a proportional font!

Re:Collection of the best fonts for programming by alcuadrado on Sunday April 28, 2013 @04:14PM (#5622566)
Interesting, but how do you know if you passed the column 80? how do you work when the coding standards mix tabs and spaces (like tab for indenting, spaces for multi-line aligning)?
Re:Collection of the best fonts for programming by Stratoscope on Sunday April 28, 2013 @05:18PM (#5622813)
Those are coding standards designed for monospaced fonts. They work poorly with proportional fonts, but there is a simple solution: abandon those standards.

With regard to indenting vs. column alignment, don't do column alignment. Code is an outline. It's not a spreadsheet. Column alignment is not beneficial in most cases, and it wreaks havoc with source control diffs. Is it really better to code like this:

  double someFunctionName( int                 index,                 // counts things
                           SomeType            secondParamWithStuff,  // fancy object with stuff
                           SomeLongerNamedType third )                // whatever
instead of this:

  double someFunctionName(
      int index,  // counts things
      SomeType secondParamWithStuff,  // fancy object with stuff
      SomeLongerNamedType third  // whatever
  )
Now sure, the second version may look a bit sloppy if you're used to the first, but it has several real advantages:

* Much less horizontal eye movement

* No eye tracking across wide swaths of whitespace

* Changing one name doesn't require reformatting the whole thing

* Since you don't have to reformat, it doesn't generate unrelated diffs

* It works equally well in proportional or monospaced fonts

Oddly enough, many years ago I switched to the second style, not because I was using a proportional font at the time, but because I was really tired of reformatting multiple lines of code just because I'd refactored one variable or type name.

And then some time later I tried a proportional font. My code looked fine in the proportional font, and it was still just as readable in a monospaced font.

WRT 80 columns or whatever your limit is, I just don't worry about that. I generally keep my lines quite a bit shorter than that, but if a particular piece of code is more readable with a longer line, I don't sweat it.

Re:Collection of the best fonts for programming by jussij on Sunday April 28, 2013 @08:12PM (#5623438)
> Code is an outline. It's not a spreadsheet. Column alignment is not beneficial in most cases

But there are many cases where code works best as a spreadsheet.

For example any time you need to initialise an array of structures, that is best viewed using a grid like pattern.

> but because I was really tired of reformatting multiple lines of code just because I'd refactored one variable or type name. Any decent editor with smart indenting should eliminate most of that effort.

Also if the editor is scriptable editor, it should be possible to create a simple script to semi-automate the task.

Re:Collection of the best fonts for programming by Stratoscope on Sunday April 28, 2013 @09:45PM (#5623662)
> But there are many cases where code works best as a spreadsheet.

Indeed, that's true, and I don't mean to be too much of a proportional font fanatic. Even if I try to avoid coding styles that require monospaced fonts to be readable, there are always cases where it helps to get a monospaced view of the code.

One feature I really like in an editor is an easy way to switch between proportional and monospaced views. The best support I've seen for this is in Komodo [1]. Like many editors, Komodo supports multiple themes of font face/size/colorization/etc. What it does differently, though, is that each theme has two font selections, a proportional font and a monospaced one. So you can pick your favorite for each, and then choose whichever works best for the particular code you're looking at right now.

Oddly enough, out of the box Komodo doesn't give you a keyboard shortcut to switch between proportional and monospaced, but it's easy enough to add a keyboard shortcut for this. (In the Key Bindings dialog, look for User Interface: Use Fixed/Proportional Font.) I have this set to Alt+O which is unused in a default Komodo installation on Windows, and it's easy to remember because "proportional/monospaced font" has a heck of a lot of "O"s in it. :-)

But when I do use an editor that only offers monospaced fonts, it's not a terrible thing. I use your excellent Zeus IDE [2] for my Go coding and it's a pleasure to work with. Sure, I miss my proportional fonts, but having the integrated debugger and other goodies for Go makes it well worth it.

[1] http://www.activestate.com/komodo-edit

[2] http://www.zeusedit.com/

Re:Collection of the best fonts for programming by jussij on Sunday April 28, 2013 @10:26PM (#5623761)
> I use your excellent Zeus IDE [2] for my Go coding and it's a pleasure to work with.

Funnily enough I'm the author of the Zeus editor. Glad to read you like using it :)

> Sure, I miss my proportional fonts, but having the integrated debugger and other goodies for Go makes it well worth it.

Over the years many Zeus users have asked for proportional fonts so you’re not the only user who misses them.

The reality is many years ago, Zeus was designed with only mono-spaced fonts in mind.

At that time, the simple rule of knowing all characters are the same width and height seemed to greatly simplify the design of the editor.

And once that design decision was made it's amazing how many places in the editor code that rule then ends getting coded, making it very difficult to change :(

Given the time again I think the underlying design would be different.

Re:Collection of the best fonts for programming by Stratoscope on Monday April 29, 2013 @07:45AM (#5625478)
Ah yes, I know how that goes. Very hard to undo a fundamental design decision. Well, proportional or monospaced, Zeus is great either way. :-)
Re:Collection of the best fonts for programming by ShirtlessRod on Sunday April 28, 2013 @09:05PM (#5623571)
> Also if the editor is scriptable editor, it should be possible to create a simple script to semi-automate the task.

True, but why do it in the first place?

Note that I'm not supporting proportional fonts here -- I much prefer fixed-width -- but I also don't like formatting function signatures like that.

Re:Collection of the best fonts for programming by jussij on Sunday April 28, 2013 @09:24PM (#5623620)
> True, but why do it in the first place?

For me, I prefer reading and editing vertically aligned code.

Also I don't find it overly difficult to make sure everything is line up vertically.

Re:Collection of the best fonts for programming by ShirtlessRod on Tuesday April 30, 2013 @09:53PM (#5636021)
It's not difficult, it's just one more thing to have to do.

Like most things, I think it really just boils down to an aesthetic preference, and it's usually up to whoever actually maintains the code anyway. :)

Re:Collection of the best fonts for programming by mapleoin on Monday April 29, 2013 @04:57AM (#5624871)
> Those are coding standards designed for monospaced fonts. They work poorly with proportional fonts, but there is a simple solution: abandon those standards.

Do you ever work in a team?

Re:Collection of the best fonts for programming by Stratoscope on Monday April 29, 2013 @06:24AM (#5625178)
> Do you ever work in a team?

Yes, of course, many times. And on teams with a variety of coding standards, some loose and some more strict.

Did the coding style I suggested seem unsuitable for team use?

Re:Collection of the best fonts for programming by mapleoin on Monday April 29, 2013 @06:47AM (#5625274)
Yes, you suggested abandoning coding standards designed for monospaced fonts, specifically maximum line length. While most programmers use monospaced fonts, you are bound to clash with someone and make their lives harder by dropping some standards.
Re:Collection of the best fonts for programming by Stratoscope on Monday April 29, 2013 @07:22AM (#5625403)
Don't read too much into that part of what I wrote; I said it poorly. I'm quite aware that most people use monospaced fonts, and my code has to be just as readable in a monospaced font as in a proportional font, or it's no good.

I don't like excessively long lines any more than anyone else does, and I do pay attention to the column numbers. I just don't worry about them much, partly because my coding style naturally tends to produce shorter line lengths.

Compare:

  function niftyExampleFunction( niftyExampleParameter,            // nifty comment
                                 anotherNiftyExampleParameter ) {  // another comment
      doStuff();
  }
vs.

  function niftyExampleFunction(
      niftyExampleParameter,  // nifty comment
      yetAnotherNiftyExampleParameter  // another comment
  ) {
      doStuff();
  }
That's a line width of 84 vs. 56 for the same code. Fair enough?
Re:Collection of the best fonts for programming by Stratoscope on Monday April 29, 2013 @06:15PM (#5629211)
Just another thought that I forgot about last night. You were asking about teams and maximum line length. As I think back, most of the teams I've been on in recent years just weren't very worried about that. We all kept to short lines as a matter of readability, but didn't have any particular hard limit if a particular piece of code happened to be more readable with longer lines.

Of course this was long after the days of 80-column Teletypes, and we were mostly using various GUI editors that didn't have a hard restriction on line length.

But back in the days when I coded on a Teletype, I definitely kept all the lines shorter than 80 columns! :-)

Re:Collection of the best fonts for programming by sltkr on Sunday April 28, 2013 @06:06PM (#5622988)
Elastic tabstops [1] would work perfectly with proportional fonts.

1. http://nickgravgaard.com/elastictabstops/

Re:Collection of the best fonts for programming by anonymous on Monday April 29, 2013 @03:41AM (#5624615)
One critique I have of elastic tabs is that you need to read the whole document to know how to lay out just what you see before you. That's not an issue with files up to a couple of thousand slocs, but I've had to work with 60ksloc autogenerated source files and waiting for one of those to be parsed and laid out would be a pain in the ass.
Re:Collection of the best fonts for programming by VLM on Sunday April 28, 2013 @04:34PM (#5622634)
I don't use a proportional font like the OP but graphics art stuff like that is best handled by computer.

For example if you do sysadmin scripts in perl and edit with vim and have perltidy installed, its more or less just (esc) :%! perltidy (enter) and it looks beautiful.

Gave up on 80 columns a couple years ago. Haven't looked back much.

Re:Collection of the best fonts for programming by hmottestad on Sunday April 28, 2013 @04:31PM (#5622620)
First off I'm a student. Though the last summer job I had people didn't really care that much. Tabs/spaces doesn't really matter much. 80 char width also never been a problem. If it makes sense to have it on a 150 char line, then so be it. If it makes sense to split it up, then do that.

The only time I ran into length problems was when I was asked to print my code on A4 paper for an exam.

Re:Collection of the best fonts for programming by alcuadrado on Sunday April 28, 2013 @04:41PM (#5622669)
80 coloumns avoid that (and other) problems.

mixing tabs and spaces is strange and IMO should be avoided, but it sometimes happen :( all-spaces FTW

Re:Collection of the best fonts for programming by Karn on Sunday April 28, 2013 @06:45PM (#5623122)
Verdana is great for alphanumeric characters, and a little enhancement of the scope characters/operators makes it perfect for programming: http://i.imgur.com/KCKtUR1.png
Re:Collection of the best fonts for programming by watty on Sunday April 28, 2013 @09:33PM (#5623639)
Looks interesting, can you link it somewhere please? You've posted this several times but have yet to share. I'm not quite sure of your legality concerns, Verdana can be downloaded in tens of thousands of sites by simply searching Google. Even Microsoft has it freely available: http://www.microsoft.com/typography/fonts/font.aspx?FMID=181...
Re:Collection of the best fonts for programming by hmottestad on Monday April 29, 2013 @04:05AM (#5624681)
Share what?

What legality concerns?

Why would tens of thousands of sites from google be of interest?

And of coure microsoft has the font. It's their font afterall.

"Verdana is a humanist sans-serif typeface designed by Matthew Carter for Microsoft Corporation" [Wikipedia]

Re:Collection of the best fonts for programming by Someone on Monday April 29, 2013 @01:47PM (#5627622)
Freely? If you read that page, you'll find it is $30 per typeface or $110 for a family of four, for use on workstations. Few if any people will buy that, though, as the font ships with lots of software (for example, it ships with Mac OS X and Windows)
Re:Collection of the best fonts for programming by shakesbeard on Sunday April 28, 2013 @04:01PM (#5622515)
Recently switched from Consolas to Bitstream Vera Sans Mono. Has been a good experience so far.

http://i.imgur.com/qNlpYvn.png

http://www.dafont.com/bitstream-vera-mono.font

Re:Collection of the best fonts for programming by georgebashi on Sunday April 28, 2013 @05:27PM (#5622849)
There's a fork of Bitstream Vera called DejaVu, which adds support for a huge range of characters:

http://dejavu-fonts.org/wiki/Main_Page

Re:Collection of the best fonts for programming by lobster_johnson on Sunday April 28, 2013 @05:36PM (#5622875)
+1. That has been my perfect mono font for the last 1-2 years.
Re:Collection of the best fonts for programming by fjordan on Sunday April 28, 2013 @04:27PM (#5622610)
+1 for Bitstream Vera Sans Mono!
Re:Collection of the best fonts for programming by osener on Sunday April 28, 2013 @04:05PM (#5622534)
My favorite fixed-width font is Akkurat Mono. It is by far the best font I've ever used but unfortunately it is quite pricey.

Here's how it looks on my system: http://ozansener.com/images/github-browse-file-1.png

Homepage: http://lineto.com/The+Fonts/Font+Categories/Text+Fonts/Akkur...

Re:Collection of the best fonts for programming by lobster_johnson on Sunday April 28, 2013 @05:35PM (#5622871)
Looks almost indistinguishable from DejaVu Sans Mono [1]. Screenshot here: http://i.imgur.com/MYB1i5N.png

[1] http://dejavu-fonts.org/wiki/Main_Page

Re:Collection of the best fonts for programming by osener on Sunday April 28, 2013 @08:02PM (#5623399)
IMO they are far from indistinguishable (maybe you are thinking about Menlo?). I find Akkurat Mono more pleasant to use. DejaVu Sans Mono looks too dense compared to Akkurat Mono's softer looks.

Here is a side by side comparison: http://cl.ly/image/1j030D031g0U/o

Since people seem to care about it, I should also note that it has a nice slashed zero you can see on line 6 which I prefer to DSM's dotted counterpart.

Edit: Here's how it looks like when I adjust DSM's line-spacing to match Akkurat Mono's default, it still has that busy look: http://cl.ly/image/1z3Z393x1s3l/o

Re:Collection of the best fonts for programming by lobster_johnson on Sunday April 28, 2013 @09:11PM (#5623590)
Busy look? Akkurat Mono is simply more squat and tight; look at the "a" and "e", for example. For me, it gives a gnarly, squinting kind of look reminiscent of Courier New, compared to Deja's more rounded openness.

Here's an animation comparing them (Deja is the bigger one, Akkurat the squat one): http://i.imgur.com/lkOzDWN.gif

I really dislike Akkurat's bloated commas and semicolons, the exaggerated "+" (which has not enough spacing, either), and the shallow braces are not good, they look like parantheses.

The only thing I like about Akkurat, I have to say, is the less classical "&". Deja uses the "et"-style ampersand, which looks unfinished at the kind of code sizes used for programming.

But each to his own, I guess.

And that slashed zero is an Ø [1], my friend, not a zero. :-)

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

Re:Collection of the best fonts for programming by osener on Sunday April 28, 2013 @10:13PM (#5623736)
Fair points all around (though I disagree with all of them except "+" being exaggerated). DejaVu's characters are a bit too tall for my taste, a clear example of this is the oval 'o' character. I also like to have a pronounced difference in the height of lower case and upper case letters.

Since we are doing character by character comparison I find "="s of DejaVu too wide (which causes "===" to look bad). It's "<" and ">" are too tight which makes it look bad when used as angle brackets. Backticks are slimmer, lower case "L" looks out of place and (apparently) it doesn't have an italic "*" (I don't know if Akkurat Mono is supposed to have it but it looks nice).

I don't get the point you are trying to make about slashed zeros. https://en.wikipedia.org/wiki/Slashed_zero

It all boils down to personal preference, thanks for stating yours :). You might also like Liberation Mono, which is my second favorite.

Re:Collection of the best fonts for programming by lobster_johnson on Sunday April 28, 2013 @11:22PM (#5623900)
I guess you pinpointed one reason I like Deja so much: The x height of its lowercase letters is slightly higher than the median line.

In other words, the x height is higher than the middle stroke in capital "E" (or "F", "A", etc.). The reason I like this is because code uses mostly lowercase letters (unless you write COBOL), and if you keep the x height classically aligned, the font ends up looking squat and gnarly, like Akkurat.

Deja exaggerates the x height by (in display terms, at the point size that I use) two pixels, which evens it out and "fills out" the line height more nicely, making for a more harmonic flow, even though this also means the middle strokes of some capital letters don't line up with the tops of the lowercase letters. (This is not a violation of typography rules, by the way.)

Fonts like Akkurat, with classical x heights, look more sparse because lines with only lowercase letters leave more room above the x height, and the difference in height between lower and upper case is more pronounced.

Anyway.

I agree that Deja's angle brackets are a bit too angled. Akkurat's is better.

The problem with Deja's "=" is not the length but the spacing. It has the same spacing issue as Akkurat's "+".

However, I categorically reject your criticism of Deja's lower-case "L". It's perfect because it looks precisely like the character L, whereas Akkurat's "l" looks like the number 1. (It's also consistent with the overall shape of the font, matching the arcs in characters such as f and j.)

I was jesting about the 0/Ø. I don't care whether there is a center dot or a slash myself.

Looked at Liberation, but it's not for me. Too... squished.

Re:Collection of the best fonts for programming by osener on Sunday April 28, 2013 @11:31PM (#5623925)
> The problem with Deja's "=" is not the length but the spacing. It has the same spacing issue as Akkurat's "+".

Doesn't it become a length problem when we are talking about a fixed-width font though?

Thanks for elaborating, you obviously know more about typography than I do! I don't have much reasoning behind my choice of font apart from personal taste.

I just took another look at Liberation Mono for the first time in years and it is eerily similar to Akkurat Mono which probably explains why I like both of them so much.

Re:Collection of the best fonts for programming by lobster_johnson on Monday April 29, 2013 @12:20PM (#5627092)
> Doesn't it become a length problem when we are talking about a fixed-width font though?

When drawn on its own with a space before and after, the length itself is not the problem, but of course in a monospace font, character_spacing = (character_width - actual_width_of_glyph), so you are right in that respect. Semantics. :-)

Re:Collection of the best fonts for programming by codex on Sunday April 28, 2013 @05:59PM (#5622960)
In my experience it's nicer than DSM on the Mac.
Re:Collection of the best fonts for programming by lbotos on Sunday April 28, 2013 @07:21PM (#5623251)
What Theme is this?
Re:Collection of the best fonts for programming by lobster_johnson on Monday April 29, 2013 @02:56PM (#5627962)
Re:Collection of the best fonts for programming by methehack on Sunday April 28, 2013 @04:43PM (#5622683)
Wow, purty screenshot. What's the emacs theme you're using?
Re:Collection of the best fonts for programming by osener on Sunday April 28, 2013 @04:47PM (#5622700)
Re:Collection of the best fonts for programming by sjm on Sunday April 28, 2013 @10:08PM (#5623720)
The problem I have with Akkurat Mono is there seems to be no bold/italic variations, which I often like to incorporate into themes.
Re:Collection of the best fonts for programming by osener on Sunday April 28, 2013 @10:21PM (#5623751)
I usually disable bold fonts in my editor and terminal emulator (I like when they provide an option like "draw bold text in bright colors") but I see your point. It would definitely be nice if they were available especially considering the price tag.
Re:Collection of the best fonts for programming by bitserf on Sunday April 28, 2013 @10:38PM (#5623791)
I don't suppose you have any screenshots of what it looks like on a Retina Mac display?
Re:Collection of the best fonts for programming by osener on Sunday April 28, 2013 @10:49PM (#5623821)
I don't own a Retina display and I'm not sure about the correct scale but here is an example rendering of Akkurat Mono in a bigger font size: http://cl.ly/image/16423o3J0H3N/o
Re:Collection of the best fonts for programming by bitserf on Monday April 29, 2013 @04:21AM (#5624747)
Well, I've never really quibbled over the price of a font if I liked it. I bought PragmataPro as well, a few years ago, and used it for quite some time.

Answer is, Akkurat Mono looks rather nice on Retina, going to use it for a while and see if its one of the classics like Inconsolata.

http://cl.ly/image/1j1N3E0k2O10 (Objective-C)

Thanks for linking the font!

Re:Collection of the best fonts for programming by platz on Sunday April 28, 2013 @04:42PM (#5622672)
When did Monaco fall out of favor? What don't people like about it? I kind of like it's angularity.
Re:Collection of the best fonts for programming by peterhil on Sunday April 28, 2013 @05:35PM (#5622873)
These newfangled Mac OS X users have not used it enough to appreciate it’s pixel-perfected beauty. I’ve been using it as my monospaced font of choice since 1996 when I started to use Macs.
Re:Collection of the best fonts for programming by YooLi on Sunday April 28, 2013 @05:43PM (#5622897)
When Menlo replaced it in 10.6?
Re:Collection of the best fonts for programming by maxjacobson on Sunday April 28, 2013 @05:46PM (#5622905)
that's what i like to use!
Re:Collection of the best fonts for programming by brianpgordon on Sunday April 28, 2013 @05:02PM (#5622755)
These have some poor screenshots. Compare their Terminus screenshot with mine:

http://i.imgur.com/4NhZ3h2.png http://i.imgur.com/yaCGIWG.png

Re:Collection of the best fonts for programming by qu4z-2 on Sunday April 28, 2013 @07:23PM (#5623262)
Agreed. As someone who uses Terminus I opened the link and said "What?! That's not what Terminus looks like!"
Re:Collection of the best fonts for programming by anonymous on Monday April 29, 2013 @03:06AM (#5624514)
Terminus starts looking slightly bad in bold and slanted variants and their editor looks like uses it bolded for some reason. Personally, I love Terminus and use it for my terminal and text editor with GNU Unifont as fallback for Asian scripts.
Re:Collection of the best fonts for programming by danjessen on Sunday April 28, 2013 @03:48PM (#5622474)
Currently use Pragmata Pro ... It's different, and thats proberbly why I'm trying it out for a while.

I use it with Sublime Text 2 and the scheme called Big Duo

http://cl.ly/image/3M413B322I1O

Re:Collection of the best fonts for programming by b3b0p on Sunday April 28, 2013 @03:51PM (#5622487)
On Windows I have been using Envy Code R

http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-cod...

or Source Code Pro

https://github.com/adobe/source-code-pro

On Mac, I use Source Code Pro or Menlo.

Re:Collection of the best fonts for programming by PavlovsCat on Sunday April 28, 2013 @07:05PM (#5623188)
I'll second Envy Code R; I use it in bold for better readability at small size.
Re:Collection of the best fonts for programming by n1c on Sunday April 28, 2013 @03:05PM (#5622309)
As a lover of Inconsolata I never felt the 1/l was all that similar (re: Inconsolata-g).
Re:Collection of the best fonts for programming by itafroma on Sunday April 28, 2013 @03:28PM (#5622407)
The 1/l distinction isn't that bad, but the curved quotation marks and apostrophe were enough to warrant a variant, Inconsolata-dz[1]. Looks like Inconsolata-g is actually built upon the -dz variant because it includes the straight quotation marks and apostrophe.

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

Re:Collection of the best fonts for programming by jackalope on Sunday April 28, 2013 @08:39PM (#5623503)
They're not. That comparison was taken from the Inconsolata-g page and is either outdated or inaccurate. Visit the Inconsolata page to see the actual font (which hasn't changed since 2009, I believe): http://levien.com/type/myfonts/inconsolata.html
Re:Collection of the best fonts for programming by StuieK on Sunday April 28, 2013 @03:12PM (#5622342)
It wasn't a huge deal for me, but I could tell that Inconsolata-g had enough of an improvement to warrant the change.
Re:Collection of the best fonts for programming by hbbio on Sunday April 28, 2013 @03:23PM (#5622387)
And even strongly statically typed languages won't catch the typo if l is of type int...
Re:Collection of the best fonts for programming by oofabz on Sunday April 28, 2013 @03:27PM (#5622402)
I like serifs so I use Luxi Mono. It used to be the RedHat console font and it was inspired by the Sun console font. On Debian it's in the ttf-xfree86-nonfree package.
Re:Collection of the best fonts for programming by mbq on Sunday April 28, 2013 @03:37PM (#5622435)
+1 For Luxi Mono; technically it is terrible for programming (0&O and 1&l pairs look almost the same), but I'm somehow addicted to it. So I really hope one day someone will make open source "Luxi Mono-g" clone...
Re:Collection of the best fonts for programming by cpeterso on Sunday April 28, 2013 @07:38PM (#5623323)
If you'd like to see tiny fonts taken to the extreme, check out "The Bee’s Knees", a font with x-height of 3 pixels but surprisingly legible because it uses subpixel rendering:

http://www.sitepoint.com/two-teeny-tiny-fonts/

Re:Collection of the best fonts for programming by walshemj on Sunday April 28, 2013 @03:33PM (#5622420)
Why do none of them have slashed zeros and german style 7's and Z with a slash which are 3 things I want in a font designed for programming.
Re:Collection of the best fonts for programming by fredleblanc on Sunday April 28, 2013 @03:50PM (#5622480)
I've been using Glyphs on a Mac to create web-icon fonts for the site I make, but it also seems to be able to edit fonts (most of the time). I don't really know a ton about font-making, but it seems that with most of the fonts you'd edit, the kerning and all that is already defined.

If it's a matter of adding a couple slashes to 7's/Z's or to 0's, that should be reasonably straight-forward to do. In Glyphs, it would be a matter of adding a new shape for the slash wherever you want it. Then File -> Export and you're on your way.

(And obviously you might run into license violations if you're changing fonts you're not allowed to. This post isn't meant to address the legal side of it, just a guy at his desk fixing fonts for his own use.)

(Edit: typo.)

Re:Collection of the best fonts for programming by agrona on Tuesday April 30, 2013 @03:03AM (#5630772)
Proggy has a variant with a slashed 0. Can't see I've ever seen a 7 or Z with a slash in it, though.
Re:Collection of the best fonts for programming by notatoad on Sunday April 28, 2013 @08:37PM (#5623499)
You want both the 7s and Zs slashed? Wouldn't that defeat the purpose?
Re:Collection of the best fonts for programming by aeflash on Sunday April 28, 2013 @08:47PM (#5623529)
The slashes are to distinguish them from 1's and 2's (only a problem in hand writing, IMO), not from each other.
Re:Collection of the best fonts for programming by derleth on Sunday April 28, 2013 @10:01PM (#5623703)
The way I write the numeral '1', I'm in more danger of confusing it with lowercase 'l' than numeral '7'. I believe this is one of those little things that helps mark people out as European or American. (To prevent my numeral '1' from colliding with my lowercase 'l', I'll add tiny serifs to the numeral top and bottom.)

Confusing capital 'Z' with numeral '2' is possible for me; luckily, capital 'Z' is really uncommon in what I create. If I feel it might be a problem, I'm likely to increase the curviness of the top of my numeral '2'.

Anyway, this is all handwriting. Typefaces, which aren't scrawled in haste, have a lot of other tricks they can use to distinguish glyphs.

Re:Collection of the best fonts for programming by igravious on Sunday April 28, 2013 @03:55PM (#5622502)
What's so important with having slashes on 7s and Zs?
Re:Collection of the best fonts for programming by kd0amg on Sunday April 28, 2013 @04:11PM (#5622559)
I do it in handwriting to make them easier to distinguish from 1 and 2, though in typed text, they tend to look different enough for me.
Re:Collection of the best fonts for programming by walshemj on Sunday April 28, 2013 @07:33PM (#5623306)
Its some what old school it's to stop confusing similar symbols O and 0 for example - It may be more common in the more technical branches of programming and in science and tech fields.
Re:Collection of the best fonts for programming by herge on Sunday April 28, 2013 @09:02PM (#5623564)
Nobody has mentioned mensch! (http://robey.lag.net/2010/06/21/mensch-font.html) Mostly like Menlo except with really big angled brackets and a more conventional l.
Re:Collection of the best fonts for programming by Splendor on Monday April 29, 2013 @12:07PM (#5627016)
Those giant angle brackets make lambdas look too weird for me.
Re:Collection of the best fonts for programming by dschuler on Sunday April 28, 2013 @03:53PM (#5622494)
The instructions for the Consolas font on Mac OS include downloading an Office update for Mac and extracting the font. I just realized that I already have the font installed, since I also have a copy of Office installed :)
Re:Collection of the best fonts for programming by chj on Sunday April 28, 2013 @08:35PM (#5623492)
I used Inconsolata and thought I would never switch again. Now I am finding myself using Ubuntu Mono. It's not that Inconsolata is bad or something, I guess you will get bored anyhow after one or two years.
Re:Collection of the best fonts for programming by edwintorok on Sunday April 28, 2013 @03:38PM (#5622436)
My favourite is Linux Libertine Monospaced, available since v5.3.0: http://www.linuxlibertine.org/index.php?id=2&L=1

You can try it out if you select Monospaced from the dropdown here: http://www.linuxlibertine.org/index.php?id=86&L=1

Other than that from that list of fonts, Source Code Pro looks quite good too.

Re:Collection of the best fonts for programming by jongold on Sunday April 28, 2013 @05:05PM (#5622773)
Offbeat suggestion (and definitely not free or readily available) - LineTo Akkurat Mono. I've always been a little bit obsessed with monospace type & this is definitely my favourite. I use it in Sublime, Vim & iTerm 2 - hate using Macs that don't have it installed. http://lineto.com/The+Fonts/Font+Categories/Text+Fonts/Akkur...
Re:Collection of the best fonts for programming by reillyse on Sunday April 28, 2013 @11:06PM (#5623864)
The site needs to make it clearer which font is the best, it looks initially like it's a countdown from 50 of the best fonts (the second font has 49) and then when I get to the bottom there is a ton of them on 0 so I presume now they are votes.. pretty confusing
Re:Collection of the best fonts for programming by subsection1h on Monday April 29, 2013 @12:36AM (#5624105)

    The site needs to make it clearer which font is the best
There is no best font.
Re:Collection of the best fonts for programming by hfz on Sunday April 28, 2013 @09:00PM (#5623560)
So I browsed around for a free alternative of Nitti, most popularly known as iA Writer's font. Someone recommended an alternative: Cousine. http://www.fontsquirrel.com/fonts/cousine

It's my new favorite now.

Re:Collection of the best fonts for programming by rbanffy on Sunday April 28, 2013 @09:17PM (#5623600)
I still prefer the 3278 feel of https://github.com/rbanffy/3270font (which is why I did it).

Love the retro touch it gives my terminal. Now, if only Gnome Terminal supported phosphor persistence...

Re:Collection of the best fonts for programming by micampe on Sunday April 28, 2013 @09:47PM (#5623667)
Re:Collection of the best fonts for programming by qznc on Monday April 29, 2013 @04:39AM (#5624805)
He lp, the kerning in your eva lua t ion screenshot looks terrible. I prefer other Op t ions. ;)
Re:Collection of the best fonts for programming by leephillips on Monday April 29, 2013 @10:31AM (#5626357)
It's a fixed-width font. It doesn't have kerning.
Re:Collection of the best fonts for programming by adregan on Sunday April 28, 2013 @05:02PM (#5622762)
It's not free, but iA's writer got me hooked on Nitti:

http://www.boldmonday.com/en/nitti

I love working in that typeface and have it set to default in Sublime Text and Terminal.

Re:Collection of the best fonts for programming by Freaky on Monday April 29, 2013 @11:35AM (#5626828)
You'll claw Misc Fixed SemiCondensed 6x13 out of my cold dead hands. Nothing beats a good bitmap font for crisp rendering at smaller sizes.

http://i.imgur.com/afWazoB.png

http://en.wikipedia.org/wiki/Fixed_(typeface)

http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html

http://www.twoevils.org/html/files.html (TrueType version)

Re:Collection of the best fonts for programming by q_revert on Sunday April 28, 2013 @08:13PM (#5623443)
moved around a fair bit between DejaVu Sans Mono/Inconsolata/Consolas etc before eventually settling on Ubuntu Mono, which really holds up extremely well at smaller sizes (7/8 pt)
Re:Collection of the best fonts for programming by rhengles on Sunday April 28, 2013 @03:47PM (#5622471)
It's a shame Lucida Console is at last position, I like it a lot.
Re:Collection of the best fonts for programming by vangale on Sunday April 28, 2013 @07:49PM (#5623358)
I wanted to add a vote for Lucida Console, but stopped when it was asking me to login. Oh well! I like the letter shapes in some other fonts better, but Lucida Console is the only one with proper horizontal width IMHO, although it could be I've just been using it too long.
Re:Collection of the best fonts for programming by eterm on Sunday April 28, 2013 @04:46PM (#5622695)
Really this site should have randomised the order in which the font samples appear.

Right now, votes are directly influenced by page order, which I suppose is indicative that people don't feel strongly about their fonts.

Re:Collection of the best fonts for programming by T-R on Sunday April 28, 2013 @08:22PM (#5623457)
Thanks for the feedback!

We'll definitely be iterating on how we rank and present viewpoints to try to reduce bias. We don't want to remove indicators of popularity entirely, though, since that would reduce the utility of the site for readers who are still trying to decide. We do intend, though, to at least provide enough information for users to judge where there may be bias for themselves, and we'll try to eliminate it where we can.

Re:Collection of the best fonts for programming by ben336 on Sunday April 28, 2013 @05:40PM (#5622888)
uh, the correlation goes the other way. They're sorted by page order. The popular ones get voted up.
Re:Collection of the best fonts for programming by wahnfrieden on Sunday April 28, 2013 @03:36PM (#5622433)
Menlo
Re:Collection of the best fonts for programming by jimmahoney on Sunday April 28, 2013 @04:20PM (#5622587)
Anonymous Pro
Re:Collection of the best fonts for programming by StuieK on Sunday April 28, 2013 @04:10PM (#5622555)
Site is getting hugged to death by you guys, working on getting it back up. Sorry!
Re:Collection of the best fonts for programming by antihero on Sunday April 28, 2013 @05:51PM (#5622927)
Can't do without Tamzen. An efficient use of pixels, and big enough for me to read.

If you have even a mildly decent display (1920x1080 at 15.6"), pixel fonts are beautiful and readable.

Re:Collection of the best fonts for programming by ryanhorn on Sunday April 28, 2013 @04:17PM (#5622578)
Awesome, I've been looking for something like this. Would be even more awesome if the fonts were embedded with a syntax highlighted editor ;)
Re:Collection of the best fonts for programming by chiph on Sunday April 28, 2013 @10:35PM (#5623780)
ProFont wasn't mentioned. It's a monospace truetype font designed to look it's best at 9 points size, so you get more code on the screen.
Re:Collection of the best fonts for programming by creaktive on Monday April 29, 2013 @07:46AM (#5625481)
Re:Collection of the best fonts for programming by account_taken on Monday April 29, 2013 @03:42AM (#5624620)
Why did he color certain characters? It makes those chars standout which defeats the purpose of choosing a font for distinct shapes.
Re:Collection of the best fonts for programming by flyinglizard on Sunday April 28, 2013 @11:45PM (#5623960)
I'm using a font called zevv-peep, like it a lot.

http://zevv.nl/play/code/zevv-peep/

Re:Collection of the best fonts for programming by kurrent on Sunday April 28, 2013 @11:30PM (#5623921)
I'd like to mention the font ProggyClean. After trying several fonts, this was the winner for me.
Re:Collection of the best fonts for programming by bliker on Sunday April 28, 2013 @05:50PM (#5622919)
I think it is worth mentioning that font-smoothing can be a great improvement on windows.
Re:Collection of the best fonts for programming by fernly on Sunday April 28, 2013 @10:54PM (#5623841)
So which of these have a good complement of Unicode points?
Re:Collection of the best fonts for programming by fernly on Monday April 29, 2013 @12:24AM (#5624075)
So to reply to my own question, a minimal standard would be the first four code blocks, plus Greek, math operators, and box drawing symbols. Anonymous Pro and Andale Mono reach this standard, Inconsolata doesn't.

A higher standard would be Menlo and Courier New, both having all those plus the Greek Extended (with accents), Cyrillic, Hebrew and Arabic sets, and a mess of other symbols. Deja Vu Sans Mono is missing the Hebrew, at least the version I have, but adds a bunch of dingbats and miscellaneous symbols. Everson Mono (not mentioned in the subject article and not a great programming font) has even more, all the odd-ball language support like Lao and Gothic.

Edit after checking the others mentioned: Only Menlo, Courier New, and Liberation Mono have Hebrew, a bit of a surprise given how much software is done in Israel. Those three have the largest complements of glyphs, and Liberation Mono is open and free.

Re:Collection of the best fonts for programming by rshm on Sunday April 28, 2013 @09:40PM (#5623651)
no mention of liberation mono here. I find it like verdana of monospaced fonts.

http://i.imgur.com/ejCs0nG.png

Re:Collection of the best fonts for programming by Marazan on Monday April 29, 2013 @04:37AM (#5624799)
monofur for life. It's a pretty quixotic font but I haven't seen one that has better clarity of distinguishing between characters as it.
Re:Collection of the best fonts for programming by alcuadrado on Sunday April 28, 2013 @04:14PM (#5622567)
11pt in the demos? Real programmers use 10pt!
Re:Collection of the best fonts for programming by codex on Sunday April 28, 2013 @05:57PM (#5622949)
No Pragmata or Akkurat Mono? Amateurs.
Re:Collection of the best fonts for programming by alexvr on Sunday April 28, 2013 @08:44PM (#5623520)
Consolas & Monaco <3
Re:Collection of the best fonts for programming by Qantourisc on Monday April 29, 2013 @01:39AM (#5624278)
Warning: after clicking on vote you get a facebook-login pop-up.
Re:Collection of the best fonts for programming by the1 on Sunday April 28, 2013 @09:09PM (#5623583)
i thought better fonts make me a better programmer. i was wrong.
Re:Collection of the best fonts for programming by drivebyacct2 on Sunday April 28, 2013 @05:58PM (#5622955)
Source Code Pro looks way, way better on my machine. I hate what Macs do to fonts. http://i.imgur.com/DRywIsw.png