

Fonts for hackers - brezina
http://www.xobni.com/bryan/?p=12

======
jsnx
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.

------
vegashacker
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.

~~~
joshwa
Yeah, Monaco 12 in Textmate is pretty darn comfortable. I wish I could turn on
AA in Terminal.app...

~~~
vegashacker
Why can't you?

~~~
joshwa
Howdoyalikethat? Turns out I can! Monaco 9 AA, line-height at 0.8x is quite
nice for log file monitoring.

------
Zak
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.

------
davidw
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>

------
asmosoinio
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>

~~~
tlrobinson
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.

~~~
asmosoinio
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.

~~~
tlrobinson
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-...](http://www.codinghorror.com/blog/images/programming-
fonts-2-comicsans.png)

...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?

~~~
asmosoinio
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.

------
dfranke
I prefer Terminus or DejaVu Sans Mono.

~~~
kflasch
Terminus is my font of choice.

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

~~~
dfranke
I wish it had more glyphs, though. I like typing math symbols into my code
comments. Terminus can't display them.

------
tlrobinson
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...](http://www.partlyhuman.com/blog/roger/aliased-text-mac-eclipse)

------
altay
I prefer Webdings:
[http://www.zakie.fsnet.co.uk/ChatRoomsStuff/Help/wingdingsfo...](http://www.zakie.fsnet.co.uk/ChatRoomsStuff/Help/wingdingsfontchart.htm)

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.

------
tokipin
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...](http://en.wikipedia.org/wiki/Core_fonts_for_the_Web#The_fonts)
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

~~~
ralphc
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.

------
alec
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.

------
Shorel
IMO, nothing beats Lucida Console 10pts.

------
kingnothing
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...](http://www.bitstream.com/font_rendering/products/dev_fonts/vera.html)

------
llimllib
It needs to be dina for me.

<http://www.donationcoder.com/Software/Jibz/Dina/index.html>

------
zandorg
For Consolas without Visual Studio 2005 check:

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

------
aristus
profonts are quite nice as well. <http://www.tobias-jung.de/seekingprofont/>

------
gms
Another vote for monaco on Carbon Emacs (OS X). White text on black
background, obviously :)

------
nmeyer
i use 10pt monaco on windows with ClearType turned on

