Live data from Hacker News

Hack: A typeface designed for source code

sourcefoundry.org

61–70 of 249 posts

Re: Hack: A typeface designed for source code

#61
post #51

Hack is DejaVu sans mono. Below is a gif I took switching between DejaVu sans mono and Hack. Aside from line height I fail to see the difference. http://gfycat.com/SomberUnitedGermanshepherd

They do acknowledge the source of the font:

"Hack has deep roots in the libre, open source typeface community and includes the contributions of the Bitstream Vera & DejaVu projects."

It's a bit disingenuous though. I'd call Hack a straight copy of Deja Vu Sans Mono, with a few very minor tweaks. On Linux using the TTF fonts I can't even see a difference in line height:

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

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

The only glyphs I can tell which are slightly different are 'i', '0' and '_'.

Re: Hack: A typeface designed for source code

#62
post #14

On OSX put the ttf's into your ~/Library/Fonts directory. I've switched, Atom looks subtly different, but I'm surprisingly comfortable with it. Looks good.

You just have to double click the ttf files (or select them all and double click one of them) and it will install. Don't need to move them manually.

Re: Hack: A typeface designed for source code

#64

Why does source code have to be shown in fixed width? I've been using non-fixed width fonts for about a year now and I find it much nicer on the eyes. The only downside I've found is that sometimes things don't line up quite as nicely, which is purely cosmetic.

Proportional fonts do not work well with space-based alignment, but are fine with tabs.

Actually, you can't reliably use tabs for column alignment with proportional fonts. You can get everything aligned for the font you're using, and the tab width you've specified in your editor, but when someone else views the code in a different proportional font or a different tab width - or in a monospaced font! - they will likely see "off by a tab" errors.

Proportional fonts do work fine with tab-based indentation. If you stop using column alignment, as I did many years ago, then it no longer matters whether you use proportional or monospaced fonts, and it doesn't even matter whether you use tabs or spaces for indentation. All sorts of code fomatting questions just become non-issues.

And column alignment was always such a hassle, I was glad to give it up anyway. Column alignment is a pain to maintain - it all too often just ends up misaligned after people work on the code, it messes up version control diffs, and the occasions where it helps readability are easily matched by the occasions where it hurts readability.

Re: Hack: A typeface designed for source code

#65
Since everyone's mentioning their favourite code fonts -- any love for Ubuntu Mono? I know it's not trendy to like the OS default as a non-Apple user but I find myself always coming back to it when I see it in comparisons.

Re: Hack: A typeface designed for source code

#67
post #13

I desperately want to find a new code font to love but I always return to Consolas.

+1 That's a strange feeling, huh? It's similar to how we always want more (money, vacation, etc.) in life, but when we get there we just want more again. I've had the thought about Consolas many times; "Why do I keep looking for a new one when I like Consolas?". I think the answer is that we always seek novelty, because that drives evolution.

A change in environment boosts productivity, doesn't it? I read somewhere, maybe in Peopleware, that in a lighting study, they found any change (brighter, darker) to a workplace imported productivity. The idea being that it was just the change, not really mattering what was changed.

Perhaps it reflects poorly on me, but I love novelty. Different places, new software, new languages (or improved features) - it's great. I'll get a huge boost working on a shitty desk in a cold hotel, for a week. I started learning Ruby, and while I find it revolting in a way (it's like the opposite of elegance), I'm enjoying learning it.

This must be a well known effect, as MS seems to make small but very noticeable cosmetic changes to their UIs. I feel ... something when using the older version. Something slightly beneath my conscious perception, something that changes and feels fresh when I upgrade. (Similar but not quite the same thing when I use a shitty cross platform UI that doesn't get things quite right.)

I should probably collect a few good fonts and color schemes and rotate them automatically.

And you know, it doesn't really matter when working. But the novelty is very useful to get me going. Once I'm rolling on a project, I can be in any broken environment and stay in the flow.

Re: Hack: A typeface designed for source code

#68

While on the subject of fonts could an expert answer a question for me - on Windows (10 if it matters) should I install the ttf or the otf font? Is there a difference?

This should hopefully answer your question: http://superuser.com/questions/96390/difference-between-otf-...

Re: Hack: A typeface designed for source code

#69
post #41
post #30

Earlier quoted context omitted.

It does not have to be. Go ahead and use nice proportional fonts and never looks back. There are certainly no shortage of them that are high quality and easy on the eyes. But for the rest of us, having a fixed width font is as important as any other consideration. And we're always on the lookout for a fixed width font that's as pleasing and readable as you proportional font people enjoy. Don't be jealous of us gettin…

On the other hand, I don't think I've ever seen a proportional font designed specifically for programming in. Like, with the same "make sure 1/l and 0/O look different" considerations programmers' fonts get, but proportional.

You should check out Input, which is exactly that. I've been using it for a couple of months, can definitely recommend it. The only issue I've run into is that certain features in Sublime Text don't work so well with proportional fonts, such as indent guides.

http://input.fontbureau.com

Re: Hack: A typeface designed for source code

#70
post #41
post #30

Earlier quoted context omitted.

It does not have to be. Go ahead and use nice proportional fonts and never looks back. There are certainly no shortage of them that are high quality and easy on the eyes. But for the rest of us, having a fixed width font is as important as any other consideration. And we're always on the lookout for a fixed width font that's as pleasing and readable as you proportional font people enjoy. Don't be jealous of us gettin…

On the other hand, I don't think I've ever seen a proportional font designed specifically for programming in. Like, with the same "make sure 1/l and 0/O look different" considerations programmers' fonts get, but proportional.

I've been using Trebuchet MS for coding, and it does a good job on this: all the confusing pairs are easily distinguished. For example, the lowercase "l" has a little rounded hook at the bottom to it doesn't look like a capital "I". It's not perfect, but I've been enjoying using it.

Before that I used Georgia, which is also fairly good in this area. I stopped using Georgia because it rendered poorly with too-thin stems in Windows 8.1 on a MacBook Pro Retina. Looked fine in OSX and on my ThinkPad's 145 DPI display.

Post reply on HN