Hacker News new | past | comments | ask | show | jobs | submit login
Cosmic Sans Neue Mono: Programming Font (github.com/belluzj)
207 points by etler on Nov 21, 2013 | hide | past | favorite | 117 comments



Wow. It look really, really nice. And the "irregular" handwriting effect is just subtle enough that it adds just a bit of nice "texture". A friendly-looking monospaced font is not something I ever expected to see! The spacing and balance is perfect.

It looks great, I'm tremendously impressed, and could easily see this become a standard font for showing code excerpts in blogs etc., especially.

Plus, pretty hilarious name. :)


Texture, you say? Try this on for size: http://www.comicbookfonts.com/Code-Monkey-Constant-p/cl343.h...

It's not free, but both a) reasonably priced and b) dirt cheap during their annual sale (that Andy Ihnatko has written about at length).

It's not for everyone, but it's a "Comic Sans Mono" (if you will) that's actually not aesthetically displeasing. I use it occasionally for code, just for fun.


I think the little cool details that make it stand out work really well for short code samples, but I am a little worried they might catch your eye too much and end up being counterproductive if you look at them all day while coding.


Indeed, I'm going to give this one a spin for a bit.


"coSmic sans" for everyone else who also read it as 'comic'


Yeah I was disappointed when it wasn't a monospaced comic sans :(


Better still, monospaced Brush Script. Because eyeball pain.


That exists


It's funny, but for my entire life I misread "Comic sans" as "Cosmic sans" (seriously — sight reading is a crazy thing), so this was doubly confusing for me.


I was wondering why someone would name such a nice font after such a infamous font.


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.


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


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


The comment is the only thing that looks super legible on that screenshot.


Not sure if this is a critique of my font choice, or of objective c?


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.


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.


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.


Nobody I know does it, so it must be ridiculous!


Or of the colors?


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.


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


Totally unreadable to me. To each their own


I hate parentheses that touch.


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.


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.


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.


That's really nice. Reminds me of the same kinds of things that LightTable has been trying to accomplish.


I believe LightTable uses monospace fonts.


This made me laugh. But... just in case you were being serious, I wasn't commenting on the fonts but the project in general.


The context of the thread was on fonts, the other stuff has been covered :)


Very cool!


For me, it's alignment that makes proportional fonts absolutely unusable.


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.


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.


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.


Almost every diff and code review tool I've used can ignore whitespace changes.


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


What a coincidence! rms from a few days ago... https://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00...


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.


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


Tab alignment still works. I work around the rest in my theme by making comments monospaced, which I use occasionally to do ascii art.


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


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.


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.


why are there serifs on a font with "sans" in the name?


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


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.


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


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.


The screenshots in the wiki are broken, looks like the URLs for them went bad. Going to give it a try regardless!


Ah, I see that. That's too bad, maybe I'll see if he's alive enough to accept a pull request.


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 :)


I'm interested in a proportional font, but not times new roman.


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.


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!


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.


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. :)


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


Objective-C code tends to have longer method names than other languages, reducing the relative frequency of the special characters.


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.


The comments are in a monospaced font for some reason.


And here I thought I was the only one who did this.


Doesn't seem to render well on Windows:

http://i.imgur.com/IthgtiK.png

Same results in Word and in VS using a non-dark theme at 10 and 11pt. At 12, the extra pixel at the top of the a goes away, but is back at 14.

Also, VS doesn't bold it in the drop-down, which I think means it doesn't detect it as a monospaced font.

Any suggestions?


I have problems on Windows too. First I install the regular one, and when I'm installing the bold version it asks me whether I want to overwrite the previously installed one.

I guess they are not specified well so Windows installs only one of the two font files. So in your case you have only the regular version of the font.


I totally appreciate diversity and choice in fonts ("programming" or otherwise) but I just can't get over the fussy lowercase k. It draws my eye to it and I can't see anything else.


For me it was the lower-case i. I'm still good with Courier New


Distracting details are killer, I agree. I scan pages of code as quickly as I next-page. Fuzzy fonts can only slow me down.


Since we're talking fonts (and I don't especially care for this one) how about Menlo? Based on Bitstream Vera Sans Mono, it's available on Mac. No Mac? Check out the nearly identical DejaVu Sans Mono. Here is a cool visual comparison[1] of the two.

[1]http://typophile.com/files/menlovsdejavusansmono_6131.png


I get the idea but the "wibbly-wobbly handwriting-like fuzziness that makes it unassumingly cool" part makes me wonder why?

If you wanted to go for that "cool" look set your background to black and your font color to greed.


> and your font color to greed.

Not sure if this is an unintentional typo or a suggestion for those working in the financial industry.


I'm interpreting it as a portmanteau of green and red, which, set on black, are the predominant choices of hackers and terminals on movies and TV shows.


Nothing beats Inconsolata, IMO.



Consolas beats it hands down (with ClearType enabled or similar font rendering patches on Linux) as far as I'm concerned. It's a matter of taste.


I was a big fan of inconsolata but I transitioned to Anonymous Pro, and then Source Code Pro, which I've been using for a good while now. The three of them make my top 3.


I tried Anonymous Pro because my team was working with Mark Simonson. Switched back after a couple days. Haven't tried Source Code Pro. It looks very promising.


Definitely recommend it. Super readable (more so than Anonymous Pro), pleasing to the eye, and they took real care with the symbols that resemble each other (0O, 1l, etc). Also it has a bunch of different thickness levels, so for example with Sublime Text which tends to render letters a little thick, I can set it to the "Light" setting, while in iTerm I use "Regular".


Inconsolata for the win. From time to time I get my "change fonts frenzy", but in the end I always roll back to inconsolata.

Only drawback: 'W' and 'w', plus 'X' and 'x' are extremely similar. This is mostly not a problem, but sometimes it can be a hassle.


Inconsolata has pretty low symbol coverage, right? Not a problem if you stick to ASCII, I suppose…


Plus there is a Greek version[1] which makes my life a lot easier.

[1] https://github.com/cosmix/Inconsolata-Hellenic


I'm pretty happy with Source Code Pro.


I tried the recent Mozilla font in the hopes I'd found an Inconsolata substitute. No such luck.


True. I find Cosmic Sans Neue distracting and hard to read. Inconsolata is just perfect.


Yep, I use Inconsolata too.


i keep going back to bitstream vera sans mono, personally.


I don't know about you guys, but I use Helvetica Mono: http://www.linotype.com/1824-31635/helveticamonospaced.html

Yes, it's probably the most characterless, bland, insipid, and uninspired font out there... but it's also the most perfect-looking. And, it's readable and takes up less space than most others.

I'm surprised not more people use it.


Looks like a lovely font, but it's similar enough to Liberation Mono that I can't justify spending money on it.


l's that look like 1's are a turnoff for me :( also I like to have some character in my fonts.


Since everybody else is plugging in their monospaced fonts, here's mine: DOS/EGA[1]

It's a ttf font which simulates the old DOS font which, in my opinion, is the crispest and nicest looking font for a terminal. Try it out! (Just remember to turn antialiasing off)

[1] http://www.viste-family.net/mateusz/dos/en/dosega.htm


Haha, I love it! Even though it hurts my head! Thanks!


Love the font! I've been using Inconsolata-g for my Objective-C development for a while now, but will try this.

Also, worth mentioning, here's the list of best programming fonts for those who're interested : http://www.slant.co/topics/67/~what-are-the-best-programming...


The lower-case "m" is just too much for me to handle:

See line 7, "summary":

https://github.com/belluzj/cosmic-sans-neue/blob/master/Spec...

It doesn't match the rest of the characters and it's just too smushed-up for my tastes.


The letters are too squashed together for my taste. I used to use inconsolata but now switched to http://pcaro.es/p/hermit/ . It is a clean font with some personality thrown in. Does anyone else use hermit?


You're never the only one, I'm using it too! :)


Ah, coSmic sans.

For a moment I thought this was going to be some sort of parody, kinda like that enterprise version of fizzbuzz someone wrote a while back.

I'm actually rather fond of this font given the first impression its bestowed upon me.


Do you think it's wise to advertise this as a programming font when 0 (zero) and O (cap oh) look so much alike? At least l (lower ell) and 1 (one)seem to be different enough.


I generally find the 0/O difference to be vastly overhyped - maybe of a "what-if" that comes from the natural OCD-ness of programmers, though that's pure speculation. The number of non-contrived cases where there is actual reading confusion between the two is exceedingly minimal, especially once you factor in semi-modern editors. One of the fonts I cycle through is TheSansMono Condensed, which by default has a non-slashed zero. I've never really found it to be a problem.


Zero has a slash through it, capital o does not.


The first picture in the readme shows a zero with a slash, while the rest of the pictures show a zero that looks like an O.


No I think those are O's, not zeroes.


Here's a plug for Cousine. I haven't liked another monospace font better, and I go out of my way to set it up on every system I use.

http://www.google.com/fonts/specimen/Cousine


Can anyone tell me why the designer thought all those extra hooks and loops were a good idea? (Check out the i, g, and k.)

To my eyes, they're just visual noise. Do they confer any benefit in long-term use, or are they just whimsy?


Well, if that isn't disappointing. If you're going to name your font after the greatest of all fonts, the incredible and nuanced Comic Sans MS, then you had better deliver.


What's wrong with good old Courier New?


too thin...courier old is easier to read no?


Depends on the person... Courier "old" is fixed size, I happen to prefer the "new" version.


I misread this as "Comic Sans" and thought this was a joke submission.

Boy was I wrong.


Giving a break to Inconsolata, trying Cosmic Sans Neue for a change.


It's pretty nice, save for the 'k'.


each time I see a new font, it can hardly compete with consolas or menlo

even the old lucida console is better than all those free fonts.


Hey.... I like it.

Might try for a bit.


gorgeous font.


the title of this post is: "Comic Sans Neue Mono: Programming Font (github.com)" for sec i really thought this was a new variant of comic sans font but for programming, it turns out its actual name is cosmic sans.


Oops, that was actually a typo, but it is loosely based/related to comic sans. "The name comes from my realization that at some point it looked like the mutant child of Comic Sans and Helvetica Neue. Hopefully it is not the case any more."


dear god, why?


It's not Comic Sans, it's CoSmic Sans. My initial reaction as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: