Slashdot: News for Nerds


Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Programming With Proportional Fonts?

timothy posted more than 4 years ago | from the now-that's-wild-and-crazy dept.

GUI 394

theodp writes "Betty or Veronica? Mary Ann or Ginger? Proportional or Monospaced? There's renewed interest in an old blog post by Maas-Maarten Zeeman, in which M-MZ made the case for programming with proportional fonts, citing studies that show proportional fonts can be read 14% faster than fixed-width fonts. Try it for a couple of weeks, he suggests, and you might like it too. Nowadays, Lucida Grande is M-MZ's font of choice on OS X, and he uses Lucida Sans on Windows. Helvetica, anyone?"

cancel ×


Hmmm... (-1, Flamebait)

Anonymous Coward | more than 4 years ago | (#30797548)

Sounds like programming for retards to me.

Re:Hmmm... (0, Redundant)

HNS-I (1119771) | more than 4 years ago | (#30797708)

Sounds like it shouldn't be a problem as long as you stick with 'the one true style' K&R.

prophecy (4, Funny)

Anonymous Coward | more than 4 years ago | (#30797550)

this guys just trying to ensure the prophecy of the helvetica wars is fulfilled

They're doing it wrong (4, Funny)

CdBee (742846) | more than 4 years ago | (#30797672)

/. is meant to be the font of all knowledge, not the knowledge of all fonts

Monaco (3, Funny)

psergiu (67614) | more than 4 years ago | (#30797554)

Monaco is fixed-width & good looking.

Re:Monaco (5, Insightful)

psergiu (67614) | more than 4 years ago | (#30797582)

background: black
foreground: X11:peachpuff or #99CF96
font: X11:10x20 or Monaco 12pt

That's way faster to read than anything on a bleed-your-yeys white background.

TFA is comparing 10pt Monaco with a 12pt font. Put them both at 12pt and Monaco - which is monospaced - the way God intended computer displays to be - wins.

Re:Monaco (1)

frisket (149522) | more than 4 years ago | (#30797826)

background: black
foreground: X11:peachpuff or #99CF96
font: X11:10x20 or Monaco 12pt

That's almost exactly how my Emacs starts up, except I tend to use 12x24 for text documents (eg XML, LaTeX, etc) as it's even more readable; I don't do a lot of programming these days. The trick is to get the right set of colours for font-lock-mode...

Re:Monaco (0)

Anonymous Coward | more than 4 years ago | (#30797900)

That's way faster to read than anything on a bleed-your-yeys white background.

Unless most colors on black are near-painful for you, like it is for me. I feel like I've been staring at a lightbulb and get annoying "burn in" very quickly. Oddly enough, green text on black doesn't do this unless it's lime green.

Re:Monaco (1)

A Friendly Troll (1017492) | more than 4 years ago | (#30797966)

That's way faster to read than anything on a bleed-your-yeys white background.

For a lot of people (I've seen estimates between 20% and 50%), light-on-dark is much harder to read than dark-on-light, even if they wear corrective glasses or contact lens.

I get headaches from reading light text on a dark background...

Re:Dark background (1)

dshk (838175) | more than 4 years ago | (#30798166)

That's way faster to read than anything on a bleed-your-yeys white background.

You should
1. setup good lighting
2. adjust your monitor to the lighting

and then you won't want to go back to black background. There is a reason why we use white paper and dark ink.
There are a few people who indeed need dark background, but that is related to serious eye disorders.

Re:Monaco (3, Insightful)

Jurily (900488) | more than 4 years ago | (#30797608)

There are a lot of fixed width fonts specifically designed so each character is unique in appearance. That is not negotiable when programming.

oO0 il1 lilli

Re:Monaco (5, Informative)

psergiu (67614) | more than 4 years ago | (#30797692)

Monaco is one of them. 0 is slashed and 1, l, I and | are unique.

Re:Monaco (4, Funny)

Anonymous Coward | more than 4 years ago | (#30798084)

Bah, you kids and your unique characters. I use fixedsys, and typing the wrong characters has never been a pr0blem.

Re:Monaco (3, Funny)

h4rm0ny (722443) | more than 4 years ago | (#30797710)

Still, I'd be willing to give it a try. If I knew how to get proportional fonts in vi. Anyone tell me how to add proportional fonts to a terminal in KDE 4?

Re:Monaco (1)

TheRaven64 (641858) | more than 4 years ago | (#30798070)

This is actually something that I've been playing with recently. For simple command-line programs, including the shell, there's no reason why the terminal emulator can't use proportional fonts. For things that use curses, it's a bit more difficult. You can more or less get it working if you have the terminal sends SIGWINCH every time you make a line long enough to cause it to wrap, resetting the window 'width' to the number of characters in the line that will wrap. Programs that use curses to generate dialog boxes will still break, but vim will work more or less correctly. You can, of course, also provide extra terminal control codes for getting the width of a given line and for using a fixed-width font (for things like curses drawing).

Re:Monaco (1)

thogard (43403) | more than 4 years ago | (#30797802)

Monaco is fixed-width & good looking.
Um no... its not good looking.

Pffffft... (0)

Anonymous Coward | more than 4 years ago | (#30797556)

... yeah right!

Overrated (3, Insightful)

tjstork (137384) | more than 4 years ago | (#30797572)

I've programmed in proportional fonts. It's ok, but I prefer fixed width for alignment.

Many years ago ... (5, Informative)

Anonymous Coward | more than 4 years ago | (#30797628)

... /. had a thread very similar to this.

And there were a lot of valuable inputs, like

* 1. Make sure that the font's period (.) sign and the comman (,) sign is BIG, to aid in the debugging process.

* 2. Color of the font and background must also complement each others. Too much contrast hurts the eyes. Too little will blur them up and make it hard to see.

There are many other very useful pointers in that thread. If anyone can dig that thread up it would be very very useful for the new crop of programmers.

Re:Overrated (4, Informative)

interiot (50685) | more than 4 years ago | (#30798022)

Elastic tabstops [] solve the alignment problem. "Do what I mean, not what I say" with whitespace is a good thing, particularly when the width of a character can be totally different for every reader. Elastic tabstops aren't implemented in many editors yet (currently available as an optional feature in gedit [] and Code Browser [] ), but once it becomes more widespread, many more programmers will be free to try out proportional fonts for coding.

Re:Overrated (0)

Anonymous Coward | more than 4 years ago | (#30798098)

But alignment would be the same no matter what font you use, at least assuming you don't mix tabs and spaces. Two spaces in a non-proportional font are always the same width, but so are two spaces in a proportional font.

Granted, two spaces in many proportional fonts aren't going to be enough to make indentation obvious, but beyond that...

Consolas (5, Insightful)

Mangala (604031) | more than 4 years ago | (#30797584)

Microsoft's Consolas with properly tweaked ClearType has been my personal favorite since its release. Another huge improvement to my code screen is changing the background color to a light grey - still not a dark color scheme, but much less glaring than pure white.

Re:Consolas (4, Insightful)

Anonymous Coward | more than 4 years ago | (#30797754)

Second the Consolas recommendation. One reason why I prefer fixed-width fonts is that proportional fonts reserve too little room for dots, commas, semicolons and other "narrow" characters, which happen to be of great importance in programming. Proportional fonts focus on text, while programming languages focus on structure.

Re:Consolas (2, Informative)

MoeDrippins (769977) | more than 4 years ago | (#30797858)

I do much the same. I waffle between light grey and "wheat"* for the background, but never, ever white.

* wheat: []

Re:Consolas (1)

gbjbaanb (229885) | more than 4 years ago | (#30797862)

second the light grey, but I use an off-white instead. The creamy colour is still white-ish so doesn't look as nasty as grey but takes the edge off pure white. Hint: you need to take the tiniest amount off, too much and the little colour square you thought looked good will turn yellow on a large panel.

Re:Consolas (1)

EdZ (755139) | more than 4 years ago | (#30797902)

I can't find the link right now, but I remember reading that the easiest to read (i.e. a sample group were able to read it fastest on average) font and background colours are a pale yellow for the background and a dark green for the font.

For bug-free code ... (5, Funny)

Anonymous Coward | more than 4 years ago | (#30797590)

MS Comic Sans is simply the best. My code doesn't have bugs, it has bloopers and out-takes.

Re:For bug-free code ... (-1, Troll)

mdenham (747985) | more than 4 years ago | (#30797670)

See, back in my day, we only had three fonts to work with - Times Roman, Courier, and Helvetica. One day I needed to make a program, and none of these fonts were cutting it. Did I mention that it was for someone I hate? Anyway, I went with the only sans-serif font we got to use, Helvetica. I hog-tied that sucker and proceeded to rape the shit out of it. It whined, it begged, it called me names for hours. Finally, exhausted, I let loose into it and left it to cry in a puddle of its own rasters.

Nine months later, Comic Sans MS was born.

fixed (2, Interesting)

HalfFlat (121672) | more than 4 years ago | (#30797606)

fixed, AKA 6x13, or more formally, -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1.

The one true programming font. No other font better manages the compromise between legibility and compactness, and being a well-crafted bitmap font, it is crisper and clearer than ever on modern LCD screens.
X11 got it right 25 odd years ago, and now with near-full Unicode support, it's only gotten better.

Re:fixed (1)

psergiu (67614) | more than 4 years ago | (#30797626)

or 10x20 if you have a high-dpi display.

Re:fixed (2, Interesting)

arth1 (260657) | more than 4 years ago | (#30797696)

I'm a predominantly Unix (and -like) user myself, but X11 fonts is one department where I think work is needed. The choice between 75 and 100 dpi (newer displays tend to be far more than 100 dpi), and no subpixel smoothing? As for "fixed", it's one of the least readable fixed width fonts. Whenever I encounter it, I switch it over to "screen" (by Haeberli, then at SGI), or better yet, consolas if hinted fonts are supported.

As for TFA and using proportional fonts for programming, all I can say is that the author can't be doing a lot of unified diffs, or working with languages where the amount of indentation is significant (fortran, anyone?). Hell, even doing a cut/paste becomes more difficult when some of the letters are much narrower.
And with most prop fonts, good luck seeing the difference between variables like ill, lil and il1, or B80, 8BO and B8Ø, for that matter.

Re:fixed (1)

Stele (9443) | more than 4 years ago | (#30797750)

I've been copying "Screen13" around to my various systems since working on SGIs in the 90s. I even have my editor set up to use the white on dark blue/purple background found in SGI terminals. Very nice readable font and text you can stare at all day.

Re:fixed (0)

Anonymous Coward | more than 4 years ago | (#30798056)

As for TFA and using proportional fonts for programming, all I can say is that the author can't be doing a lot of unified diffs, or working with languages where the amount of indentation is significant (fortran, anyone?).

Python, anyone?

Pencil and Paper (4, Insightful)

turgid (580780) | more than 4 years ago | (#30797616)

It's the only way to write real code.

Re:Pencil and Paper (1)

Starlon (1492461) | more than 4 years ago | (#30797644)

I prefer goat's blood and human skin, with a nice big feather from a bird of prey for a quill.

Re:Pencil and Paper (2, Informative)

MrMr (219533) | more than 4 years ago | (#30798036)

Goose feathers make better quills than those from birds of prey.
And yes, I do program in fortran.

Coding sheets. (1)

John Hasler (414242) | more than 4 years ago | (#30797758)


Re:Pencil and Paper (3, Funny)

Kjella (173770) | more than 4 years ago | (#30797792)

Cue the XKCD comic with the butterflies, but I'm too lazy to find it.

Re:Pencil and Paper (3, Funny)

amRadioHed (463061) | more than 4 years ago | (#30797832)

Meh, pencils have a nice sharp point and all, but dedicated card punchers are still much faster.

Re:Pencil and Paper (0)

Anonymous Coward | more than 4 years ago | (#30798060)

I only need '1's and '0's. Give me a minus sign and I don't even need the '0'.

Re:Pencil and Paper (2, Insightful)

maxwell demon (590494) | more than 4 years ago | (#30798096)

But compiling code written that way is awkward.

ProFont ruled the day (3, Interesting)

drerwk (695572) | more than 4 years ago | (#30797618)

This was my favorite for a long time. No question about 1 and l, or 0 and O; which may have been identical in the default Monaco. Also :,;, and , where slightly bold so one could easily see statement ends.
But for whatever reason, big screens, better fonts, syntax highlighting. ProFont was quite readable in 9pt; important on small screens. I might try to put ProFont in Eclipse tomorrow. ProFont can be found here: []

Re:ProFont ruled the day (0)

Anonymous Coward | more than 4 years ago | (#30797820)

I still use it on my low-resolution laptop. My second-favourite programming font, and the one I switched to when I couldn't find a Linux version of the Dina font.

ascii-art (1)

kampangptlk (1252914) | more than 4 years ago | (#30797624)

and my lines of code cannot contain ascii-art anymore

Do the studies apply? (4, Insightful)

mattdm (1931) | more than 4 years ago | (#30797630)

Reading prose is different from reading code. I'd think that whatever you gain wouldn't be enough to make up for the loss from lack of vertical alignment.

Additionally, which monospaced font you use matters. You need one that's designed to be readable and to make clear distinctions between 0 and O, l and 1, and so on. I use Raph Levien's Inconsolata [] for coding, and it's excellent (and available under the Open Font License).

On Fedora, yum install levien-inconsolata-fonts.

Re:Do the studies apply? (1)

Kjella (173770) | more than 4 years ago | (#30797836)

Reading prose is different from reading code. I'd think that whatever you gain wouldn't be enough to make up for the loss from lack of vertical alignment.

As long as space is a fixed width, then you should still have verical alignment... Imagine:

if ( foo ) {
} else {


if ( foo ) {
} else {

In fact, I think fixed space characters can put unproductive attention to variable name lenghts over content to create "nicer" looking code.

Re:Do the studies apply? (3, Insightful)

TheRaven64 (641858) | more than 4 years ago | (#30798138)

You're confusing indenting with alignment. Indenting is a set of whitespace at the start of a line indicating the depth in the scope. Alignment can be anywhere, for example between variable types and their names in a structure. If you have an int element and a float element, you might put one space after float and three spaces after int, then the variable names will line up. In languages like Objective-C and Smalltalk it's common to have colons lined up in message sends that wrap more than one line. To do this, you need to be able to guarantee that the whitespace that you put in one line is the same width as the characters that you put in the other.

If your editor supports elastic tabstops, then you can use them, but then your code will look weird in something like viewvc or any editor that doesn't. This is why our coding conventions say you should use tabs for indenting and spaces for alignment. A tab is a semantic 'indent by one level' character, while a space is an 'advance the cursor by one character width' character. To have this work in a proportional font, you'd need to redefine space to mean 'advance the cursor by the width of the character directly above'. This is not impossible, but it would require a bit of hacking in the layout engine.

Link for hinted version (2, Informative)

msgmonkey (599753) | more than 4 years ago | (#30797974)

I thought I would have a look at this font but it looks terrible on windows with cleartype on at 11points, however I managed to find a hinted version at: []

Re:Do the studies apply? (0)

Anonymous Coward | more than 4 years ago | (#30797978)

I used to use Inconsolata until I had to work on the code of one of my colleagues. His editor automatically inserted his name at the begining of the text file. His name contain a diacritic sign which looked messed up on my machine.
I switched back to my Fedora defaults (monospaced deja vu) which had no problems with utf8 whatsoever.

Re:Do the studies apply? (1)

eliphas_levy (68486) | more than 4 years ago | (#30798092)

My opinion is like the parent's, I really can't stand the lack of vertical alignment, same length text should display in same width.
This code should have the same width no matter what:
arrayOne[1010] = 'lll'
arrayTwo[1010] = '111'

I personally use DeJavu [] Sans Mono, on all OSes. The (0,O) and (1,l) distinctions are very clear to me, and I like the curves it have.

I actually had to put it on my pendrive, along with gVim portable, as I will not stand notepad with his blocky console font.

Proportional fonts are better to read (4, Interesting)

krou (1027572) | more than 4 years ago | (#30797634)

From what I understand, the way we process written words is based on the idea that each word is a like a "picture" made up of letters. So, the easier it is to identify the picture, the easier it is for us to read. This means that the width and height of letters plays an important part in creating unique pictures. It is for this reason (at least in print) serif fonts are much easier to read than sans-serif fonts. It's also for this reason that ALL CAPS is the most difficult way to read compared to just reading normal text. On this basis alone, it's likely that proportional fonts are better to read because they're likely to create better word pictures.

Reading prose versus editing code (5, Insightful)

Krioni (180167) | more than 4 years ago | (#30797698)

What I wonder about is whether the ease of reading attributed (correctly, I assume) to proportional fonts apply to prose, but not necessarily to the kinds of reading needed in programming. When I read code, I'm sometimes looking for single-character mistakes. In a case like that, a proportional font that helps form "word-pictures" might mask an error. In other words, the speed attributed to proportional fonts is for reading comprehension — translating text into thought — but might actually detract from the speed and accuracy of reading for the purpose of editing/finding mistakes.

Re:Reading prose versus editing code (1)

krou (1027572) | more than 4 years ago | (#30797756)

That is a good point. Whether speed of reading for programming is as important as equal spacing, or identifying unique characters etc. is something that is definitely debatable. We don't read code the same way as we read a novel, not to mention that overall code structure (spacing, indents etc.) has a lot more meaning than what you'd find in a book.

Re:Proportional fonts are better to read (1)

jez9999 (618189) | more than 4 years ago | (#30798058)

I guess it just goes to show it's all down to personal taste, because I have to say I disagree with most of that. OK, reading all caps is tougher, but apart from that I find a good fixed-width font just as easy to read as a good proportional font, and serif/sans- just as easy as each other to read; if anything, sans- looks a bit nicer when printed.

It's probably better, (1, Funny)

Anonymous Coward | more than 4 years ago | (#30797658)

if you're programming in COBOL.

Re:It's probably better, (1)

Skapare (16644) | more than 4 years ago | (#30797794)

... but try it in assembly language.

Monospaced is the only way to go (2, Interesting)

neuroklinik (452842) | more than 4 years ago | (#30797662)

Reading code is not like reading prose. It's more like reading poetry, where how the text elements are spaced and aligned can say a lot about the author's intended meaning. If I'm reading a book, I definitely want it typeset with a proportional typeface. Code, on the other hand, is MUCH more legible when set monospaced.

Not the bottleneck (4, Insightful)

bcmm (768152) | more than 4 years ago | (#30797664)

Speed of reading is not a bottleneck in understanding code anyway, since I am sure it is pretty uncommon to be able to understand code while reading it as fast as you would read a novel.

And there are numerous disadvantages: lack of alignment, smaller punctuation making syntax errors less visible (" '" vs "' " for example), etc., etc.

Re:Not the bottleneck (1)

Tatarize (682683) | more than 4 years ago | (#30797730)

Yeah, the only thing about a font that wou1d make code more readab1e is making 'l' and '1' not look like the same thing. Everything e1se is icing.

Re:Not the bottleneck (1)

amRadioHed (463061) | more than 4 years ago | (#30797894)

Apparently it's even more important to have a keycaps where '1' and 'I' don't look the same.

Re:Not the bottleneck (1)

MathiasRav (1210872) | more than 4 years ago | (#30797980)

Maybe not so much 1 and l as l and I.

Re:Not the bottleneck (1)

Tatarize (682683) | more than 4 years ago | (#30798026)

Nah the two that really look similar are "A" and "A" -- Damn you identity principle.

Re:Not the bottleneck (1)

interiot (50685) | more than 4 years ago | (#30798074)

You can easily modify one of the GPL fonts to use wider punctuation, and call it a programmer's font. The important thing that makes proportional fonts faster to read is that the letters are proportional-width, punctuation width doesn't necessarily have to stay small.

I wonder .. (2, Insightful)

Anonymous Coward | more than 4 years ago | (#30797680)

How do you align comments, etc.? How do you do visual block selection? What if you want to add a small ASCII drawing to a comment?

The disatvantages seem overwhelming to me, and I find good monospace fonts (Deja Vu Sans Mono, Inconsolata, ...) easy enough to read. Also, some editors (e.g. gvim) will scale proportional fonts to make them look monospaced (and really ugly).

Re:I wonder .. (2, Insightful)

d3matt (864260) | more than 4 years ago | (#30797780)

Let's not forgot standardized coding styles. I have a hard enough time with developers who use the wrong spacing for tabs in their editor window!

Re:I wonder .. (2, Funny)

gbjbaanb (229885) | more than 4 years ago | (#30797958)

What if you want to add a small ASCII drawing to a comment?

You mean like this:

specification ---> o
original coder --> O
                  / \

Re:I wonder .. (0)

Anonymous Coward | more than 4 years ago | (#30798068)

Simply use tabs to align things. I've been using Verdana for years. The letters are also smaller, so more fit on the screen. It also works with ClearType nicely, part of the reason it's readable in small size.
And I can confirm it's better to work with it. You often look for things in the code and it makes spotting them easier.

Old news (1, Redundant)

dazedNconfuzed (154242) | more than 4 years ago | (#30797688)

In the comments there, MMZ (author) notes "This was written 2 years ago."

Re:Old news (1)

Provocateur (133110) | more than 4 years ago | (#30797786)

Is that a pre-emptive strike against /. duping? He's got to learn to play by the rules that govern /. !

Quality instead of quantity (1)

GuerreroDelInterfaz (922857) | more than 4 years ago | (#30797706)

When reading code speed is not the most important thing. Here quality is more important.

And the quality of alignment brought to you by fixed-length fonts is more important than any marginal gain in reading speed.

El Guerrero del Interfaz

Bad for the next maintainer (0)

Anonymous Coward | more than 4 years ago | (#30797720)

The people who are going to maintain your code will probably use fixed-width fonts. Clever alignments tricks won't work for them and your code will look horrible.

If I were your boss, I'd just plain forbid this.

Unless your code is for yourself only, stick to the "standards". A 14% improvement ? Gimme a break...

Re:Bad for the next maintainer (4, Interesting)

gaggle (206502) | more than 4 years ago | (#30797924)


I use proportional fonts (on whiteish background) because I'm a rebel and don't have any nostalgia for black-background-green-text terminals (i.e. I enjoy the increased readability). And contrary to your statement my code is properly tabbed, functions are aligned, everything is indented just the way FSM demands it. I know this because my coworker enjoys his nonproportional black-backgrounded terminal look and our code is interchangeable.

I simply stay away from "clever alignment tricks". I don't align comments up that sit at the end of my code lines, and you know what? Neither should you. They're annoying no matter the font-type because rewriting one line can make you end up re-indenting all the comments in that block and it's just such a silly waste of time. In my world comments go above a line, or even better is writing the code so at most it needs a little Docstring blurp to provide some context.

To recap: I'm glad you're not my boss you goddamned controlfreak. I get to read my code in sparkly pink letters as long as it doesn't affect my output or my coworkers.

Examples... (2, Informative)

wisnoskij (1206448) | more than 4 years ago | (#30797740)

I like the examples they show to prove their point.
Fixed width Monaco 10pt, which comes out too small and kind of blurry to me.
and Proportional Helvetica Neue 12pt, which is in a bigger font and is actually reasonable sized.

so yes, a reasonable sized proportional font is easier to read then a undersized fixed width font...

Re:Examples... (1)

Laughing Pigeon (1166013) | more than 4 years ago | (#30798130)

Fixed width Monaco 10pt, which comes out too small and kind of blurry to me.

That has nothing to do with the font; First off all it is not size they're talking about, if it is too small, just increase the size. And concerning the fact that it is blurry, it IS blurry but again, that has to do with the crappy quality of the picture in which the text is shown.

Vertical alignment (2, Insightful)

Skapare (16644) | more than 4 years ago | (#30797744)

I'm not willing to give up on vertical alignment. And lots of code sections I've written, in addition to ascii-art comments to explain lots of code, really needs that vertical alignment. And that's not just leading alignment, it is internal alignment.

This won't break Python's indentation based syntax because one should be using consistent indentation. But many displays of proportional fonts will collapse multiple spaces into the space of one, and even Python becomes hard to read.

The solution is to have a proper display system that can do both proportional fonts AND controlled alignment at the same time, without mangling the code files themselves, for all active programming languages (and that's a LOT of them). Inserting invisible alignment into the code is not an option unless we can teach every language parse to remove such alignment elements before parsing the code for what it is coded for. Someone could do this with a new language I don't doubt. But it remains to be seen if anyone can do it in general for all existing active languages.

Oh, and if you do come up with a solution and it just can't manage to achieve it with COBOL, I won't cry. But it better work with assembly and microcode syntax.

Re:Vertical alignment (2, Interesting)

pmontra (738736) | more than 4 years ago | (#30797884)

You're probably advocating for editors to support elastic tabstops [] which seem to work well also on proportial fonts [] . But I don't think ascii art can survive without fixed fonts.

Hard to go passed fwf (1)

dj_super_dude (86692) | more than 4 years ago | (#30797748)

Terminus is what I tend to use now, but I really liked Neep and Neep Alt(I think). I think it was in the jmk-bitmap packages or the like. Google would probably find them :)

Hahahaha! (0)

Anonymous Coward | more than 4 years ago | (#30797752)

Programming with proportional fonts, this guy is funny!
Yes, let us use Microsoft Word or OpenOffice for programming!

assembly (1)

Skapare (16644) | more than 4 years ago | (#30797776)

But try it in assembly language.

Lining things up (1)

slim (1652) | more than 4 years ago | (#30797778)

I like to line stuff up, such as assignments. (Tried to demonstrate this with a code sample, but /. comments collapse spaces)

So for a list of const definitions in .h file, for example, despite variable names of differing lengths, the "=" signs will all be in the same column, and the values will all begin in the same column.

You might be able to achieve this with a proportional font and tabs, but I don't trust tabs.

Re:Lining things up (1)

u38cg (607297) | more than 4 years ago | (#30798054)

The pre tag. Learn it, love it.

actually i want to have each variable a slightly i (1)

daveb1 (1678608) | more than 4 years ago | (#30797798)

actually i want to have each variable a slightly different colour. That way i can easily follow the use of the variable throughout the entire source. (globals etc.) .

Matter of taste (0)

Anonymous Coward | more than 4 years ago | (#30797800)

Choice of fonts is very subjective, similar to look of a desktop environment.
Take your pick.

My favourite is Terminus. Unbeatable especially in environments without anti-aliasing.

reads faster? (4, Interesting)

g253 (855070) | more than 4 years ago | (#30797808)

Are we really in such a hurry when reading code? I'm under the impression that fixed fonts allow us, when we parse code, to see the different elements more clearly because their size is determined by the number of characters. But that's just an intuition. Anyone else has the same feeling?

Helvetica? Are you nuts? (0)

Anonymous Coward | more than 4 years ago | (#30797810)

Because the distinction of 0 versus O, I versus l, and l versus | don't matter in programming languages.

I'm sorry, but that font choice is a disaster waiting to happen.

visual cues (4, Insightful)

pz (113803) | more than 4 years ago | (#30797816)

Human languages have lots and lots of redundancy, such that you can often either screw up letter order, word order, or even drop entire words, and often the full meaning is clear. Visual cues in the form of paragraphs and chapters are added to help guide the reader, but removing them would not render the text entirely incomprehensible.

Computer languages are not as forgiving, and, also, lacking redundancy, far denser. Reading speed is irrelevant because of the bottleneck formed by reading comprehension. Code is rarely read in novel-like linear fashion, but, much more often, flitting from one part of the text to another, navigating through visual cues. Visual cues in the form of often richly structured layout that includes idioms not required by syntax make navigating and comprehending code possible, and removing them although would, in most languages, not change the meaning of the code, would erect a formidable barrier to comprehension. Not using these cues to the fullest to help write clear, expressive and maintainable code is being self-indulgent and shortsighted. Requiring that a particular, and perhaps unspecified font be used for best display, rather than the ubiquitous assumption of monospaced font, is mere vanity.

Remember, when code is written, it is meant not only to be converted into executable machine language, but also to be comprehensible and comprehended by other programmers, or future selves. Clarity of expression is vital.

Python... (0, Troll)

Temkin (112574) | more than 4 years ago | (#30797822)

The Python zealots will be along shortly to defend their indentation insanity in 3... 2... 1...


But what about all the programmers ... (1)

Skapare (16644) | more than 4 years ago | (#30797824)

... out there, regardless of the coding language, who are developing and writing their code on those old punch card systems ... you insensitive clod!

Depends on the language (1)

stokessd (89903) | more than 4 years ago | (#30797840)

At work I do a bit of matlab programming and the default font makes it very hard to see the difference between parenthesis and curly brackets. That's a huge glaring flaw in the defaults that come with the IDE.

Back in the dark ages when I did a lot of FORTRAN77 programming, I would output a lot of data tables. Trying to setup the print statements to make those tables with a proportional font would make me want to kill someone.

Today I pick my fonts for programming on how readable the punctuation and letters vs. numbers are, and what I've got on the computer I sit in front of. Sadly I do a lot of code snippet writing on walk-up computers, or conference room computers, where I've got a standard windows and office font load.

I also do a lot of LabView programming, and the glyphs, icons, and lines are always proportional. :)


Small apples vs big oranges (1)

gaspyy (514539) | more than 4 years ago | (#30797844)

The "article" is stupid and ill-informed.
The author compared a Monaco at 10pt with Helvetica at 12pt and concludes Helvetica is easier to read.

I could do a similar test with Helvetica at 7pt and Arial at 12pt and conclude that Arial is better!

In programming, readability is determined by different factors than for literature. Word-pictures are less important since you basically have to deal with a lot of made-up words (variable and function names) but what's really important is to eliminate any room for misinterpretation, e.g. I vs l or " vs '' or O vs 0

Hands down, my font of choice for programming is Consolas, followed by Inconsolata.

We were taught in visual design class... (0)

Anonymous Coward | more than 4 years ago | (#30797854)

... that while proportional is more visually appealing, fixed width is easier to read when it comes to large amounts of text. I don't know if that's bunk or not, but I'd rather code in a fixed width.

Stroustrup chose proportional-width (4, Interesting)

Looke (260398) | more than 4 years ago | (#30797874)

All code in Stroustrup's "The C++ Programming Language" is presented in a proportional-width font: "At first glance, this presentation style will seem 'unnatural' to programmers accustomed to seeing code in constant-width fonts. However, proportional-width fonts are generally regarded as better than constant-width fonts for presentation of text. Using a proportional-width font also allows me to present code with fewer illogical line breaks. Furthermore, my experiments show that most people find the new style more readable after a short while."

Not only is the font proportional, but it's bold, italic, and serif as well. Now, reading a textbook is of course pretty different from editing on-screen, but I remember reconsidering some of my habits after reading that book. That code ain't hard to read.

Stroustrup is guilty of worse than that (3, Insightful)

argent (18001) | more than 4 years ago | (#30798082)

Odd. My impression after reading his book was that Stroustrup deeply misunderstood the importance of coding style. And not merely because "C++" and "style" should only be combined for humorous effect: the way "&" behaves in declarations is bizarre, and his explanation read like a rationalization for a bad decision.

type geek here (0)

Anonymous Coward | more than 4 years ago | (#30797910)

I'm a fairly serious typography geek, and I can tell you that for something like programming, fixed-width fonts make a hell of a lot of sense. When you're dealing with windows or displays that have a certain number of characters (80 char terminals, for instance), or programming languages that use a lot of nesting, having the visual cues of alignment far outweight the benefits of refined character recognition and easier legibility (which by the way generally only applies to long blocks of text set in a language in which you are conversant). And this is coming from a guy who generally can't stand seeing fixed-width fonts used (except in very specific circumstances, like this).

Yuck (0)

Anonymous Coward | more than 4 years ago | (#30797912)

Use two different font sizes to prove your point: check
Must use tabs in code to get columns to line up: check
Use Baby's First Language instead of a real language: check

Another young idiot, with another idiotic attempt to make programming easier. You can create all the baby languages you want (Java, C#, VB), and come up with all the stupid tricks you want. Programming is still hard, and will remain so.

Use fonts made for programming. (1)

mindwanderer (1169521) | more than 4 years ago | (#30797942)

Proportional fonts: look pretty, increase readibility of words.
Monospaced fonts: increase readibility of code by making all symbols very distinct (ie. ( from {, O from 0, -- not a single line, etc.). The 14% improvement you gain in reading keywords and variable and fuction names is nothing compared to the bugs that arise from similar-looking symbols.

I use Terminus, with no smoothing of any kind. Just raw, beautiful pixels.

Only if you don't use VIM (5, Insightful)

tagattack (412693) | more than 4 years ago | (#30797946)

VIM renders text-area as a grid. This is compatible with column-area selection, and other features it supports which frankly I use nearly daily. While I've honestly considered using proportional fonts — I've tried living without VIM, switching to Eclipse or IDEA for several months at a time to give the IDE experience a full opportunity. Doesn't work for me, so neither will proportional fonts.

Besides there seem to be more reasons not to use proportional fonts than to use them:

  • Lot's of people align assignments, this will look terrible.
  • Several formatting techniques (newline before curly bracket) depend on the width of whitespace.
  • Occasionally code contains tabular data which is easily formatted for digestibility using fixed-width fonts.
  • Occasionally, although rarely, comments may contain diagrams or ascii-art figures which would be rendered useless with proportional font.

Reasons to use them:

  • You might be able to read the contents of your code up to 14% faster, if you don't run into the issues above...

Call me crazy... (1)

DiSKiLLeR (17651) | more than 4 years ago | (#30798102)

Call me crazy.... but I started doing this a couple years ago.

I can't remember what font it was now; I was programming under linux using eclipse.

But I really enjoyed switching away from a fixed width font...

"Betty or Veronica?" (0)

Anonymous Coward | more than 4 years ago | (#30798114)

Betty AND Veronica

Whitespace (0)

jdevivre (923797) | more than 4 years ago | (#30798116)

I believe proper use of whitespace in programming makes enormous improvements in recognition. Spaces in proportional fonts are often thinner and less contrasting. That alone may reduce proportional effectiveness, more readable or not. One would have to form a habit of using two space characters and more tabs.
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account