News for hackers. Stuff that matters.
Re:Cosmic Sans Neue Mono: Programming Font by kennywinker on Wednesday November 20, 2013 @08:07PM (#6772453)
Every time programming fonts comes up, I always have to plug using proportional fonts. For me, anyway, it increases readability in any language that isn't super symbol-heavy (Obj-C, for example).

Xcode theme using Times New Roman: http://31.media.tumblr.com/tumblr_kweyqtEkg41qzsc93o1_500.pn...

Download link: https://gist.github.com/coryalder/811771

Not for everyone, of course, and definitely not for all langauges, but still worth mentioning.

Re:Cosmic Sans Neue Mono: Programming Font by viraptor on Wednesday November 20, 2013 @08:15PM (#6772483)
Holy kerning Batman... Maybe I'm too sensitive to this, but this text rendering engine is BAD. It says "SPA WNING". Below in SPAWNED wn is overlapping. "(sha)red" has similar problems. Lowercase "cce" however is way too wide apart.

I can see how people may like the idea, but it looks like xcode was never tested with proportional fonts...

Re:Cosmic Sans Neue Mono: Programming Font by kennywinker on Wednesday November 20, 2013 @08:26PM (#6772523)
That screenshot is pretty old, from Xcode 3, back when I first switched to TNR. I have no eye for kerning, so it didn't bother me then, but it looks a bit better in Xcode 5: http://i.imgur.com/rRxUpDY.png (included quoted text "CHARACTER SPAWNING" so it can be a/b compared).
Re:Cosmic Sans Neue Mono: Programming Font by edvinbesic on Wednesday November 20, 2013 @08:49PM (#6772590)
The comment is the only thing that looks super legible on that screenshot.
Re:Cosmic Sans Neue Mono: Programming Font by kennywinker on Wednesday November 20, 2013 @10:05PM (#6772812)
Not sure if this is a critique of my font choice, or of objective c?
Re:Cosmic Sans Neue Mono: Programming Font by dxm on Thursday November 21, 2013 @12:59AM (#6773293)
The comment is the only thing in a monospace font. It's a criticism, and a valid one, of your choice of programming font. Nobody in their rightest of minds programs in Times New Roman. I'm convinced you must be trolling us.
Re:Cosmic Sans Neue Mono: Programming Font by Stratoscope on Thursday November 21, 2013 @01:44AM (#6773409)
I agree about Times New Roman. Yuck. I use Georgia for a programming font, and it's much more readable.

Yes, it is a proportional font too. But I can assure you that I am in my right mind and am not trolling you.

Re:Cosmic Sans Neue Mono: Programming Font by limmeau on Thursday November 21, 2013 @03:38AM (#6773671)
I also use proportional fonts for Java to make the code look like it's taken from an algorithms textbook. Also, idiomatic Java as produced by IDEs usually doesn't align variables, so the code looks OK as long as the space characters themselves all are of the same width.

The C++ code I work with usually has more strenuous alignments which are only possible to get right in monospace fonts.

Re:Cosmic Sans Neue Mono: Programming Font by skrebbel on Thursday November 21, 2013 @05:24AM (#6773965)
Nobody I know does it, so it must be ridiculous!
Re:Cosmic Sans Neue Mono: Programming Font by oconnor0 on Wednesday November 20, 2013 @11:12PM (#6773009)
Or of the colors?
Re:Cosmic Sans Neue Mono: Programming Font by Jare on Thursday November 21, 2013 @06:42AM (#6774160)
My main problem with proportional fonts is not alignment (I don't really do that beyond the indentation) but symbols. Most proportional symbols, especially thin ones like dots, colons or the vertical 'or' bar, get too packed in between letters and can be hard to see. Since reading code with precision and ease is the most important trait I ask of my programming fonts, proportional fonts are out. But I'm open to suggestions about one that works.
Re:Cosmic Sans Neue Mono: Programming Font by Pxtl on Thursday November 21, 2013 @09:37AM (#6774841)
Yeah, I'd be interested in seeing proportional programming fonts, but you'd have to give the non-alpha glyphs extra weight.

Alternately, IDEs that support proportional fonts could apply extra tracking to all non-alpha glyphs (and multiple sequential spaces, too).

Re:Cosmic Sans Neue Mono: Programming Font by eclipxe on Thursday November 21, 2013 @12:47AM (#6773256)
Totally unreadable to me. To each their own
Re:Cosmic Sans Neue Mono: Programming Font by baddox on Wednesday November 20, 2013 @08:43PM (#6772564)
I hate parentheses that touch.
Re:Cosmic Sans Neue Mono: Programming Font by gilgoomesh on Wednesday November 20, 2013 @08:24PM (#6772514)
Based on the bar at the top, it looks like Xcode 3. I just tested with Xcode 5 and it kerns "AW" in Times New Roman correctly.
Re:Cosmic Sans Neue Mono: Programming Font by seanmcdirmid on Wednesday November 20, 2013 @09:54PM (#6772774)
I am currently designing/building a programming editing environment around proportional fonts (specifically, some kind of sans serif). You can see the effect in this essay I submitted sometime back on hackernews:

http://research.microsoft.com/en-us/people/smcdirm/liveprogr...

Its been fun getting font metrics working right (given a custom editor) and getting key-up and key down to work correctly, but overall, I think this is the future, especially in richer editing environments.

Re:Cosmic Sans Neue Mono: Programming Font by drharris on Thursday November 21, 2013 @09:16AM (#6774713)
I really like this, and while I wouldn't code in just any font, this one seems to lend itself. Only nitpick would be breathing room around parentheses and "." in method calls. Right now it's a bit tight. Love this article though, definitely some cool stuff going on in this space.
Re:Cosmic Sans Neue Mono: Programming Font by bjeanes on Thursday November 21, 2013 @12:31PM (#6776011)
That's really nice. Reminds me of the same kinds of things that LightTable has been trying to accomplish.
Re:Cosmic Sans Neue Mono: Programming Font by seanmcdirmid on Thursday November 21, 2013 @06:25PM (#6778282)
I believe LightTable uses monospace fonts.
Re:Cosmic Sans Neue Mono: Programming Font by bjeanes on Friday November 22, 2013 @12:27PM (#6782191)
This made me laugh. But... just in case you were being serious, I wasn't commenting on the fonts but the project in general.
Re:Cosmic Sans Neue Mono: Programming Font by seanmcdirmid on Friday November 22, 2013 @04:16PM (#6783801)
The context of the thread was on fonts, the other stuff has been covered :)
Re:Cosmic Sans Neue Mono: Programming Font by richdougherty on Thursday November 21, 2013 @01:07AM (#6773315)
Very cool!
Re:Cosmic Sans Neue Mono: Programming Font by duaneb on Wednesday November 20, 2013 @08:13PM (#6772479)
For me, it's alignment that makes proportional fonts absolutely unusable.
Re:Cosmic Sans Neue Mono: Programming Font by Stratoscope on Thursday November 21, 2013 @02:02AM (#6773450)
Alignment is the problem here, not the proportional font.

I gave up alignment in my code many years ago, back when I was still using monospaced fonts. I gave it up because I was really tired of fiddling with spaces when I changed a name in code like this:

  myType someFunctionName(someType      someVariable,
                          someOtherType someOtherVariable,
                          int           foo) {
      ...
  }
So I started doing this instead:

  myType someFunctionName(
      someType someVariable,
      someOtherType someOtherVariable,
      int foo
  ) {
      ...
  }
I found that I just didn't care that "someVariable" and "someOtherVariable" weren't lined up one above the other. In fact, I actually liked the fact that the variable names and types were closer together, so my eyes didn't have to keep scanning across a sea of whitespace to match things up. And I really liked not having to add and remove spaces every time I changed a name.

As a bonus, the overall width of my code was often much less, as in this example.

Later I discovered that using this style, my code looked the same in a proportional font as it did in a monospaced font. So I switched to a proportional font and never looked back. But the code is still just as readable in a monospaced font.

Re:Cosmic Sans Neue Mono: Programming Font by dspillett on Thursday November 21, 2013 @06:45AM (#6774167)
I still use space based alignment a fair bit, though it can be faf. What would be really nice is for a code editor to support some sort of elastic tab-stop so I can tell it that some things should stay aligned and have it do any extra work needed. I'm not sure how that could be made low-/zero-effort easy from a UI PoV though, but it would work just as well with proportional fonts too.
Re:Cosmic Sans Neue Mono: Programming Font by sanityinc on Thursday November 21, 2013 @06:54AM (#6774186)
Plus, as variables get added and renamed, the resulting realignment of tokens modifies lines unrelated to those changes, leading to messy diffs which degrade the effectiveness of most version control tools.
Re:Cosmic Sans Neue Mono: Programming Font by kisielk on Friday November 22, 2013 @02:10PM (#6783003)
Almost every diff and code review tool I've used can ignore whitespace changes.
Re:Cosmic Sans Neue Mono: Programming Font by jerf on Wednesday November 20, 2013 @09:45PM (#6772747)
I clocked substantial time in Frontier back in the day, where alignment was fundamentally handled by the outliner core, so the text could just be wrapped as in an outliner. It works fine. I don't know what syntax highlighting would look like since I haven't seen it.

It does seem like the programming environment and language must be designed for it to work nicely, though. I've tried proportional fonts in several environments since then and it's always sucked for one reason or another.

Possibly Go is structured enough for proportional fonts to cleanly work though. Haven't tried it yet; I use emacs and last time I tried proportional fonts in that it was a joke. (And that was just straight-up English, no programming at all.)

Re:Cosmic Sans Neue Mono: Programming Font by ics on Thursday November 21, 2013 @02:41AM (#6773528)
What a coincidence! rms from a few days ago... https://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00...
Re:Cosmic Sans Neue Mono: Programming Font by jerf on Thursday November 21, 2013 @08:43AM (#6774580)
Ha! Cool.

I suppose I should in fairness observe this was actually a long time ago. Since then emacs has switched to XFT; I haven't tried it since then, because well, as I mentioned most languages don't work very well with it either. But perhaps I will try it in a Go buffer here.

(A few minutes later.) Hey, this isn't so bad. I'm not sure everybody would appreciate me sticking with it since it makes it hard to tell when you've got a "long line", but it's certainly radically better than I remember from the last time I tried this.

For those who may want to play at home, I use the Droid series of fonts for my programming and I just eval-region'ed this:

    (custom-set-faces
     '(default ((t (:stipple nil :background "#ffffff"
       :foreground "#141312" :inverse-video nil :box nil 
       :strike-through nil :overline nil :underline nil
       :slant normal :weight normal :height 105
       :width normal :family "Droid Sans")))))
YMMV may vary, of course. Especially if you're not using a white background. :)

Go's attempt to auto-align struct name and types isn't working so well, though. (Fortunately, gofmt takes care of it so I still can't be wrong.)

Further follow-up: You don't realize how much you're subconsciously using the "shape" of the code to guide you until you change it and suddenly feel lost, like I'm in a fresh code base I've never seen before, despite the fact I'm actually in something I've more-or-less written from scratch over the past six weeks, which is just about the maximum level of familiarity you can have with a piece of code.

Re:Cosmic Sans Neue Mono: Programming Font by wiredfool on Wednesday November 20, 2013 @11:49PM (#6773101)
Frontier? Me too. I even brought one of the bitmap fonts from os9 to osx because it just worked better for me. (New York 9, I think).
Re:Cosmic Sans Neue Mono: Programming Font by kennywinker on Wednesday November 20, 2013 @08:29PM (#6772534)
Tab alignment still works. I work around the rest in my theme by making comments monospaced, which I use occasionally to do ascii art.
Re:Cosmic Sans Neue Mono: Programming Font by 10098 on Wednesday November 20, 2013 @11:31PM (#6773057)
i can't understand how anyone can look at this and think "hey, this is nice!". I'm not sure if it's because of using a proportional font or if it's because of the serifs, but this makes me want to do this: http://farm5.staticflickr.com/4113/5031198207_ac01d2c500_b.j...
Re:Cosmic Sans Neue Mono: Programming Font by eksith on Thursday November 21, 2013 @12:29AM (#6773210)
It's the serifs. Kerning you can get away with if the letter spacing isn't egregiously small, but in this case the letters are practically touching.

Some people find it easier to process, but I never found out why.

Re:Cosmic Sans Neue Mono: Programming Font by dspillett on Thursday November 21, 2013 @05:41AM (#6774003)
At high resolution such as printed text at small sizes people tend to find seriffed fonts quicker to read. Something to do with the serifs leading the eye. At larger sizes they just add distraction like any other decoration, and at low resolutions on small-ish text they can produce quite a mess legibility wise unless the font is very well designed with low resolution rendering in mind. Sub-pixel rendering help a little, but not nearly as much as some seem to think.

Some people insist on seriffed fonts even for small text in low resolution environments because they find them easier to read elsewhere, without considering that the different environments (screen and print) have quite different properties (or being blind to where the difference is, I know someone who blames the OS's font renderer when he is asking it for the impossible). Of course as screens progressively move towards higher PPIs (I'd love a 24"+ display with the PPI of my phone's screen) the low resolution rendering thing will diminish as an issue.

Re:Cosmic Sans Neue Mono: Programming Font by couchand on Thursday November 21, 2013 @09:30AM (#6774799)
why are there serifs on a font with "sans" in the name?
Re:Cosmic Sans Neue Mono: Programming Font by gavinpc on Thursday November 21, 2013 @10:24AM (#6775077)
Keep on pluggin'. One such comment a while back (maybe it was yours) made me finally break down and try it. I've never looked back.

Before that, I would have been physically unable to not download and test drive the OP's font.

Of course, I bound C-S-M-SPC to toggle back to monospace when needed.

(setq gpc/proportional-font "Verdana") (setq gpc/monospace-font "Source Code Pro") (setq gpc/default-font gpc/proportional-font)

;; you have to do this twice the first time, and sometimes after that if ;; you've run it in another buffer. I think the variable ;; `buffer-face-mode-face' isn't behaving quite buffer-locally (defun gpc/toggle-proportional-font () "Switch between my default proportional and monospace typefaces." (interactive) (let* ((family (if (boundp 'buffer-face-mode-face) (plist-get buffer-face-mode-face :family) gpc/default-font)) (new-family (if (string-equal family gpc/proportional-font) gpc/monospace-font gpc/proportional-font))) (message "Set font to %s" new-family) (setq buffer-face-mode-face `(:family ,new-family)) (buffer-face-mode t)))

Re:Cosmic Sans Neue Mono: Programming Font by EpicEng on Wednesday November 20, 2013 @11:23PM (#6773037)
Eeeew... I can't do proportional fonts while programming. I like more width and I like certain things to line up. I have tried others, but I always go back to Consolas.
Re:Cosmic Sans Neue Mono: Programming Font by LaGrange on Thursday November 21, 2013 @05:33AM (#6773986)
For that to work well enough, we’d need an indentation engine that doesn’t depend on manually entered whitespace — tabs aren’t enough, because you don’t always know how many tabs you’ll need. And that just won’t work at all for certain languages (see, for example, Perl, which is pretty good at confusing syntax coloring engines with perfectly common code due to some of its design choices).
Re:Cosmic Sans Neue Mono: Programming Font by vocino on Wednesday November 20, 2013 @10:06PM (#6772817)
I'd like to plug Meslo then: https://github.com/andreberg/Meslo-Font

Customized version of Apple's Menlo font. Great monospaced font for development work.

It also has a dot-zero version, which some people love.

Re:Cosmic Sans Neue Mono: Programming Font by rys on Thursday November 21, 2013 @03:04AM (#6773580)
The screenshots in the wiki are broken, looks like the URLs for them went bad. Going to give it a try regardless!
Re:Cosmic Sans Neue Mono: Programming Font by vocino on Thursday November 21, 2013 @11:41AM (#6775628)
Ah, I see that. That's too bad, maybe I'll see if he's alive enough to accept a pull request.
Re:Cosmic Sans Neue Mono: Programming Font by mogrim on Thursday November 21, 2013 @03:07AM (#6773588)
I seem to remember reading somewhere that Stroustrup (the inventor of C++) also uses a proportional font. I've tried it a few times, but generally end up using a monospace font due to laziness - I update the software and can't be bothered to change :)
Re:Cosmic Sans Neue Mono: Programming Font by platz on Wednesday November 20, 2013 @08:46PM (#6772575)
I'm interested in a proportional font, but not times new roman.
Re:Cosmic Sans Neue Mono: Programming Font by jowiar on Thursday November 21, 2013 @02:33AM (#6773505)
I've kicked around Sys (http://www.fsd.it/fonts/sys.htm) for this purpose before and like it. I'd rather code in a proportional font, but I feel like we need an editor designed for one, which we really don't have right now. Univers is also all kinds of beautiful.
Re:Cosmic Sans Neue Mono: Programming Font by kennywinker on Wednesday November 20, 2013 @10:03PM (#6772803)
I've tried out a bunch, and I haven't found one I like better. That said, Open Sans looks pretty good, and you may like the sans sarif style better. If you find anything awesome, I'd love to hear about it!
Re:Cosmic Sans Neue Mono: Programming Font by Stratoscope on Thursday November 21, 2013 @02:05AM (#6773456)
I've been using Georgia for years and really like it. Much better than Times New Roman, both for coding and for general reading.

Georgia is a pretty hardcore proportional font, though. Even the numbers are proportional, where most proportional fonts have monspaced numbers.

Re:Cosmic Sans Neue Mono: Programming Font by kennywinker on Thursday November 21, 2013 @06:19PM (#6778247)
Giving it a shot. I think I tried it out when I first switched, and wrote it off for some reason or other... but it's probably worth re-visiting. :)
Re:Cosmic Sans Neue Mono: Programming Font by Herald_MJ on Thursday November 21, 2013 @04:38AM (#6773844)
> any language that isn't super symbol-heavy (Obj-C, for example).

I can't think of any non-esoteric language more symbol-heavy than Obj-C!

Re:Cosmic Sans Neue Mono: Programming Font by spicyj on Thursday November 21, 2013 @04:42AM (#6773852)
Objective-C code tends to have longer method names than other languages, reducing the relative frequency of the special characters.
Re:Cosmic Sans Neue Mono: Programming Font by famousactress on Thursday November 21, 2013 @10:28AM (#6775101)
Woah, in your screenshot are the comments a smaller font size? I don't know if I could learn to deal with the proportional fonts, but I do really like the idea of comments rendering smaller.
Re:Cosmic Sans Neue Mono: Programming Font by JosephBrown on Thursday November 21, 2013 @10:38AM (#6775159)
The comments are in a monospaced font for some reason.
Re:Cosmic Sans Neue Mono: Programming Font by MartinCron on Wednesday November 20, 2013 @08:09PM (#6772463)
And here I thought I was the only one who did this.