News for hackers. Stuff that matters.
Re:Fonts for hackers by jsnx on Tuesday October 30, 2007 @11:31PM (#74487)
Monotype fonts are tough to get right. The Latin alphabet evolved "off the grid", as did all of its prominent variations -- for example black letter (sometimes called "gothic"), humanist (the fore-runner of our "roman type"), and chancery cursive (the fore-runner of our "italic"). The only precursor for monotype is the large, decorated capitals at the beginning of chapters and sections -- "illuminated letters" -- that were approximately square.

Some consequence: the poor spacing of the letters 'i' and 'l', and the squashed, dark appearance of the 'm' and 'w' in monotype fonts. There is something of a hopeless in the task, though, since any good monotype font will have hundreds of characters in it: punctuation, numbers, European letters, mathematical marks...

Making them all look right together, with the additional constraint of identical size, is a Herculean task.

Re:Fonts for hackers by vegashacker on Tuesday October 30, 2007 @10:32PM (#74464)
I like anti-aliased Monaco 14 pt (I know, it's large, but I'm trying to save my eyes) on Terminal.app for the Mac.
Re:Fonts for hackers by joshwa on Tuesday October 30, 2007 @11:39PM (#74496)
Yeah, Monaco 12 in Textmate is pretty darn comfortable. I wish I could turn on AA in Terminal.app...
Re:Fonts for hackers by vegashacker on Wednesday October 31, 2007 @02:00AM (#74559)
Why can't you?
Re:Fonts for hackers by joshwa on Wednesday October 31, 2007 @09:05AM (#74624)
Howdoyalikethat? Turns out I can! Monaco 9 AA, line-height at 0.8x is quite nice for log file monitoring.
Re:Fonts for hackers by plusbryan on Wednesday October 31, 2007 @12:03PM (#74685)
why might looking at a larger font somehow save your eyes? presumably, if you take appropriate breaks, it shouldn't matter how small your font is. right?

cause if I'm wrong, I seriously need to rethink this small font fetish I have...

Re:Fonts for hackers by kingnothing on Wednesday October 31, 2007 @06:24PM (#74851)
I'm not sure about you, but my eyes noticeably tire more quickly when reading small fonts versus larger fonts for prolonged periods of time.
Re:Fonts for hackers by Zak on Tuesday October 30, 2007 @11:03PM (#74477)
I like the look of Proggy, but it's bitmapped at 10px. My screen is 15.4"/1680x1050. I have pretty good vision, but looking at fonts that small all day will make my eyes bleed.
Re:Fonts for hackers by davidw on Wednesday October 31, 2007 @06:46AM (#74607)
I've been using this for a number of years and still like it:

-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1

BTW, after thinking about this, I thought it would be fun to share actual screen shots:

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

Re:Fonts for hackers by asmosoinio on Wednesday October 31, 2007 @03:48AM (#74585)
I just ditched monotype fonts a few weeks ago or so, and am not thinking about going back. Looks so much nicer, and so far I have never had any text I could not to line up neatly enough.

I am currently using "Vrinda" size 10 on my Windows Vista laptop with ClearType -- will probably use a bigger font once I buy a proper monitor.

Some nice discussion and inllustrations around this theme at Coding Horror: http://www.codinghorror.com/blog/archives/000969.html

Re:Fonts for hackers by tlrobinson on Wednesday October 31, 2007 @05:25PM (#74826)
You use variable width fonts for programming?!

I just hope I never have work on the same code with you.

There's just so many cases where having monospaced font is useful and easier to read when dealing with code.

Re:Fonts for hackers by asmosoinio on Thursday November 01, 2007 @12:38AM (#74943)
You bet I do!

And I have not changed anything in my code due to this, so I think you could work with me just fine. There's tabs for indentation, and there's... well, code. What else do you need?

Could you give some examples of these cases? I really haven't come up with any in the past few weeks, and the readability is so much better with variable width.

Re:Fonts for hackers by tlrobinson on Wednesday November 07, 2007 @10:19PM (#77317)
In programming languages every character is just as important as every other character (on average), so each character should get the same amount of space.

For example, looking at this: http://www.codinghorror.com/blog/images/programming-fonts-2-...

...the "!" in the conditional is squished into about 3 pixels, but it has just as much importance as any other character, if not more. Glancing at this code you might not even notice it. In normal text it is also important, but would appear at the end of a sentence, which would be hard to miss...but wedged in there between the "(" and "O" it gets lost.

Another example is trying to line up things. This is sort of a style preference, but sometimes I like doing things like this:

float percent = 0.4f;

int width = 640,

height = 480;

char flag = 'A';

Now, when I typed that the text field was using a monospaced font and everything was lined up perfectly. Chances are, you're viewing it with a variable width font... is it lined up? Not really. (edit: ok in this case multiple whitespace characters are converted to a single point but you get the idea)

What about this:

    float percent = 0.4f;
    int   width   = 640,
          height  = 480;
    char  flag    = 'A';
Much nicer, eh?

Variable width fonts are optimized for readability of free flowing text like books, articles, etc. Code is highly structured, and lining things up and that sort of thing can help the readability.

Can you give me cases where variable width font in code is better?

Re:Fonts for hackers by asmosoinio on Monday November 12, 2007 @08:09AM (#78708)
Sorry to reply so slowly, I read your comment already quite a bit earlier...

So you have these two points, right?

1. Each character is important

2. Lining up things

As a disclaimer, I must say that naturally this is really up to personal taste more than anything.

About 1), I'd say that you are correct, but that depends on the type of thing one is working on. I guess working on some obscure Perl code (that's where I have seen most examples with lots of code that looks like !%&[$tes]) you need to focus much more on single characters than working on for example C++ code with long named variables/function names and mostly calls to them. I am working on the latter, and have found that code like this is easier to read with variable width:

---

TFileName refName;

TXxxYyyInfo* info = iXxx->info->GetPathAndName(refName);

refName.ZeroTerminate();

---

Ok, not too good examples, but maybe you get my point?

2) is something I totally do not care about. I am way too lazy to start lining up anything by hand -- I want my editor to line up my code automatically. And it does a nice job, and I use external tools if I have to work in an environment where I can't select my editor. I don't thins my time should be spent adding spaces.

So to summarize: 1) doesn't seem to matter for me, and if code tends to have many special characters after each other it is probably better to rewrite it for readability anyway. And I don't want to do any lining up by hand anyway.

And descriptive (i.e. quite long) variable names are easier to read with variable width font.

YMMV.

Re:Fonts for hackers by dfranke on Tuesday October 30, 2007 @10:36PM (#74467)
I prefer Terminus or DejaVu Sans Mono.
Re:Fonts for hackers by kflasch on Wednesday October 31, 2007 @03:16AM (#74577)
Terminus is my font of choice.

http://www.is-vn.bg/hamster/jimmy-en.html

Re:Fonts for hackers by dfranke on Wednesday October 31, 2007 @03:26PM (#74772)
I wish it had more glyphs, though. I like typing math symbols into my code comments. Terminus can't display them.
Re:Fonts for hackers by tlrobinson on Wednesday October 31, 2007 @05:19PM (#74823)
I feel dirty using anti-aliased monospaced fonts in shells and text editors.

Apparently there's no good way to turn off anti-aliasing in Eclipse on OS X, which drove me absolutely nuts, but this guy came up with a genius (but ugly) hack to fake it:

http://www.partlyhuman.com/blog/roger/aliased-text-mac-eclip...

Re:Fonts for hackers by altay on Thursday November 01, 2007 @05:38PM (#75210)
I prefer Webdings: http://www.zakie.fsnet.co.uk/ChatRoomsStuff/Help/wingdingsfo...

Admittedly, there's a bit of a learning curve, but once you've gotten over the hump, it's much more pleasant to code "heart smiley lightning-bolt" than all those ugly letters and numbers.

Re:Fonts for hackers by tokipin on Tuesday October 30, 2007 @11:46PM (#74499)
long ago when i started programming i used OCR. it's a terrible font, designed to be easy for machines to read, "Optical Character Recognition." but at the time i didn't know that, and didn't care. i was young and wild

a few months ago i tried setting Vim to use OCR, but for whatever reason it didn't wanna. luckily in my quest i found a free package of fonts: http://en.wikipedia.org/wiki/Core_fonts_for_the_Web#The_font... these are professional fonts that you'd normally have to pay $20 a pop for, but for legal reasons they're free in their packaged form

one of the fonts is Andale Mono, which Vim didn't reject. it felt odd at first compared to Courier, mainly because Courier is quite heavy. but Andale grew on me quick and it remains my font. since then there have been times i've thought my code actually looked aesthetically beautiful

Re:Fonts for hackers by ralphc on Wednesday October 31, 2007 @09:57AM (#74641)
I got an Andale Mono install for Windows about 10 years ago, and have transferred it to computer to computer ever since. Another vote for Andale Mono.
Re:Fonts for hackers by alec on Wednesday October 31, 2007 @06:04PM (#74839)
I really like DejaVu Sans Mono. I've found it's most readable for me on an AntiqueWhite background (sort of off-white). From my .Xdefaults:

Emacs.font: DejaVu Sans Mono-12 Emacs.background: AntiqueWhite

You'll need emacs from CVS, but it is a huge improvement over previous versions if only for the better font support.

Re:Fonts for hackers by Shorel on Wednesday October 31, 2007 @12:02AM (#74512)
IMO, nothing beats Lucida Console 10pts.
Re:Fonts for hackers by kingnothing on Wednesday October 31, 2007 @06:27PM (#74852)
I've been using Bitstream Vera Sans Mono 14pt for about a month now and like it quite a bit.

http://www.bitstream.com/font_rendering/products/dev_fonts/v...

Re:Fonts for hackers by llimllib on Wednesday October 31, 2007 @11:57PM (#74939)
Re:Fonts for hackers by zandorg on Wednesday October 31, 2007 @05:27PM (#74828)
For Consolas without Visual Studio 2005 check:

http://geekfriendly.org/crap/Consolas/Microsoft/

Re:Fonts for hackers by aristus on Tuesday October 30, 2007 @11:20PM (#74484)
profonts are quite nice as well. http://www.tobias-jung.de/seekingprofont/
Re:Fonts for hackers by gms on Wednesday October 31, 2007 @12:50AM (#74531)
Another vote for monaco on Carbon Emacs (OS X). White text on black background, obviously :)
Re:Fonts for hackers by nmeyer on Tuesday October 30, 2007 @10:33PM (#74466)
i use 10pt monaco on windows with ClearType turned on