Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
GUI Programming

Programming With Proportional Fonts? 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?"
This discussion has been archived. No new comments can be posted.

Programming With Proportional Fonts?

Comments Filter:
  • fixed (Score:3, Interesting)

    by HalfFlat ( 121672 ) on Sunday January 17, 2010 @08:55AM (#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.

  • by drerwk ( 695572 ) on Sunday January 17, 2010 @08:56AM (#30797618) Homepage
    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: http://www.tobias-jung.de/seekingprofont/index.html [tobias-jung.de]
  • by krou ( 1027572 ) on Sunday January 17, 2010 @08:59AM (#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.

  • by neuroklinik ( 452842 ) on Sunday January 17, 2010 @09:06AM (#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.

  • Re:fixed (Score:3, Interesting)

    by arth1 ( 260657 ) on Sunday January 17, 2010 @09:14AM (#30797696) Homepage Journal

    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.

  • reads faster? (Score:5, Interesting)

    by g253 ( 855070 ) on Sunday January 17, 2010 @09:39AM (#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?
  • by Looke ( 260398 ) on Sunday January 17, 2010 @09:51AM (#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.

  • by pmontra ( 738736 ) on Sunday January 17, 2010 @09:52AM (#30797884) Homepage
    You're probably advocating for editors to support elastic tabstops [nickgravgaard.com] which seem to work well also on proportial fonts [nickgravgaard.com]. But I don't think ascii art can survive without fixed fonts.
  • by gaggle ( 206502 ) on Sunday January 17, 2010 @09:56AM (#30797924)
    Incorrect.

    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.
  • Re:Overrated (Score:3, Interesting)

    by Megane ( 129182 ) on Sunday January 17, 2010 @10:56AM (#30798296)

    I did it once too, back in the early '90s. I was working on an adware program for Buick, so I used Eras as the font in my IDE (FYI, I was using a Mac, I think the PC guys were using Turbo Pascal) and it worked out real well.

    But I prefer monospaced fonts because you can't save your font and tab stop preferences in a plain-text ASCII file, and you don't want your text to look like a complete mess when someone else looks at it. You can only use hard tabs, and 8 spaces is just too wide for most programming.

    One thing's for sure... I wish I could type this message that I'm typing right now in a proportional font. Monospaced is horrible for non-code text. But the standard text input area for HTML is monospaced. Slashdot really needs an option for an "advanced editor".

  • by Hurricane78 ( 562437 ) <deleted@noSPAM.slashdot.org> on Sunday January 17, 2010 @11:40AM (#30798678)

    If they did those studies with $JoeRandom, they are meaningless for programmers, who see fixed-width fonts all day long.

    Oh, actually I just came here to say: “Those who do not learn from history, are doomed to repeat it.” (In that some new generation thinks they have to test it for truth all over. Which can make sense... If you build up to what is already known, and not just ignore everything.)

  • Re:Dark background (Score:5, Interesting)

    by Achromatic1978 ( 916097 ) <[ten.eulbamorhc] [ta] [trebor]> on Sunday January 17, 2010 @12:02PM (#30798818)

    with a computer display, the light is generated behind the text, so you don't need the sheer volume of light a white background gives you. This was even more true of old CRT displays, but even an LCD backlight produces way to much light to read comfortably.

    Perhaps because most displays are sold pre-set to 100% brightness, 100% contrast, because that's what looks shiniest and most vibrant on display, driving sales.

    A while back, I experimented, with the assistance of a color calibrator I use for photography (i1 Display 2 [xrite.com], and turned the brightness on my LCD to 40%, contrast to 70%.

    The result? "Wow, that's so dim. I don't think I could read that..." ... for about an hour. Now it's fantastic. My eyes hurt less, especially when the room is dark, and seem more sensitive (in a good way). Reading online all day, coding... so much more pleasant. Definitely a worthwhile experiment.

  • Re:Consolas (Score:4, Interesting)

    by nabsltd ( 1313397 ) on Sunday January 17, 2010 @01:27PM (#30799406)

    Anyway, Consolas rules my world.

    I tend to use 9-point Bitstream Vera Sans Mono.

    Consolas at that size has both vertical and horizontal spacing that just doesn't look right to me. At larger sizes (11-point or more), the smaller x-height [wikipedia.org] of Consolas gives it a better look. The "x-height war" that Microsoft started where all of their standard fonts have a large x-height for more readability but far less style is reversed a bit in Consolas.

    Both Consolas and Bitstream Vera Sans Mono are great programming fonts because the easily confused characters are all obviously different. I like the comma in Consolas better, though, because it's even more obviously not a period.

  • Re:reads faster? (Score:1, Interesting)

    by Anonymous Coward on Sunday January 17, 2010 @02:22PM (#30799822)

    I'd agree - for me that's definitely true. With monospace, I know I'm typing on a grid, and I know how things should line up - it helps.

    A mono-spaced font lets you use the space itself to visualize your code. You can place a line beside another line to try to find a typo.... that kind of thing. A proportionally spaced font does not.

    Now, it is true that a good proportionally spaced Serif font is easy to read - perhaps even easier - and in the end, a programmer should program in whatever they are most comfortable with, right?

    I prefer a good monospaced font - if only because that's what I learned on, that's what I'm used to, and I'm an old codger.

  • by Anonymous Coward on Sunday January 17, 2010 @02:38PM (#30799966)

    For people who's "computer science" job consists in doing Object-Relational mapping, sure... Proportional may do the job.

    But for anyone working with "true" algorithms, forget proportional. You need a fixed-width font (and, no, the elastic tab, let alone the pathetic non-existent editors support, ain't cutting it enough).

    Show me a dynamic programming algo that doesn't look sucky with a proportional font. Show me some FSM implementation that doesn't look sucky with proportional font.

    When someone argues that "proportional font are better for programming" you can safely consider the guy mostly clueless about algorithms, big-O perfs, etc.

    They like their proportional font as much as they think nothing is bogus with someMethodThatDoesSomethingNTimes(...). Sure, with such long method names you better 'gain back' every pixel you can by using proportional fonts.

    In other words: give him the monkey ORM type job but don't count on him to know about when to use, say, a skip list.

    (btw this post touch-typed on a blind IBM Model M, monospaced font of choise being a modified 'proggy font')

         

  • by smisle ( 1640863 ) on Sunday January 17, 2010 @04:06PM (#30800588)

    If I remember right, (some) Editors (the human kind that edit manuscripts) prefer monospaced fonts for exactly the same reason - they can catch errors much easier.

    I typically use the font 'Monospace' although I'm not particularly attached to it.

  • Re:Monaco (Score:2, Interesting)

    by Obsi ( 912791 ) on Sunday January 17, 2010 @10:55PM (#30803884)

    What you propose would confuse a Scandinavian. Quoting [1]:

            The numeral 0 -- Some writers put a diagonal slash through the
            numeral 0 (zero), a practice that may have originated with early,
            low-resolution computer terminals which displayed a slashed "zero"
            glyph to distinguish it from the capital letter O. This practice is
            confusing to speakers of Danish and Norwegian languages containing
            the letter "Ø", and they prefer to place a dot in the center of zero
            for this purpose.

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

All the simple programs have been written.

Working...