Hack – A typeface designed for source code
github.com
github.com
Then again, this is probably one of those perennial sorts of topics that's just enjoyable to chew over every now and again.
But that screenshot on the splash page is utterly unviewable, especially inappropriate given that their subtitle is "Hack is hand groomed and optically balanced to be your go-to code face."
For a minute I thought I must be getting really old, but then it became clear it's just shrunk down. Nobody uses fonts that small, right? right?
Shouldn't it be possible to download a font via CSS only?
Having to explain how to use your UI in your UI is always a red flag.
That said, maybe try http://sourcefoundry.org/hack/playground.html
I scrolled down for an example, saw the screenshot of tiny text and assumed that either I've gone blind or that screenshot is shit; I'm going with the latter. Maybe it looks better on a computer with an apple on it, but not on ubuntu / chrome.
Hack seems to be a nice font, otherwise. I don't know that I would switch to it as my primary, but I'll gladly add it to the collection of 20 or so "programming fonts" i seem to have collected over the years.
Does anyone program in <= 12pt type? I'm looking at this "specimen" link[1] and 12pt seems unnecessarily small. I can read it clearly, but I feel like I'm working harder to do so. 16pt is more my style.
I use 9pt fonts in Emacs on my personal laptop, because otherwise I can't use my preferred layout (a maximized frame containing three vertically split windows) and fit enough code on a 13" display.
With a high-DPI display, it's workable enough - at 72dpi it'd be a disaster, as I had opportunity to discover during a brief flirtation with a netbook. Workable though it be, I'd like to find a still broadly similar font that made pairs like i/l and ./, more easily distinguishable at such small size. Hack is not that font; it appears to be a slightly modified Vera/DejaVu Sans Mono, which is no bad thing to be sure - I've used that font exclusively for many years - but hardly revolutionary.
To be clear, I'm not sure whether Hack actually is a modification of DejaVu Sans Mono, or whether it's a novel design. Doesn't change what it looks like either way. And some decisions seem much more driven by style than by usability - for example, curving the tail of the i, to match the l, would actively harm legibility compared to DejaVu Sans Mono, where l's distinctively curved tail makes it very easy to distinguish from every other glyph that consists primarily of a single vertical stroke. That's one of the two most commonly confused groups, and so I'm not really seeing a strong legibility rationale for making one of its members less distinguishable from another.
I do. But the 10-point characters in my editor are the height of the 13 pt characters on that page. For comparable readability, my 10 pt "Droid Sans Mono" is more readable than the 18 pt "Hack" on that page.
Just pick a monospaced font that you can read and get to making something worthwhile.
Also, in the larger scope of things all the "good enough"'s at times add up to something awful. Had we perfected everything the bothering wouldn't exist. You would look at the font and click some button to have or have not become it part of your collection.
Programmer fonts are even more samey as they are used at such small sizes comparatively and of course have the additional constraint of being monospaced (most of the time).
Personally with the amount of code I stare at each day even an oddly placed pixel can be annoying.
I consider myself fairly adventurous, but this is clearly beyond my comfort zone :)
I'm not adventurous enough for proportional fonts, but the monospaced Input looks quite nice. And I'd not heard of it before. I'll definitely give it a spin.
(Edit: typos.)
Too bad it doesn't include programmer ligatures, I've been looking for a proportional font that included those (I tried hacking them in myself but couldn't figure out the font hacking tool chain).
also, this is a later version: http://www.s9w.io/font_compare/
Great for both terminal emulators and code editors alike.
https://web.archive.org/web/20150407130603/http://mckoss.com...
(the obvious: 3 height allows for a lot more lines than 5)
I mean I'm young, but my eyes can't do that. I don't know anyone who can :x
https://en.wikipedia.org/wiki/Apple_II_graphics#High-Resolut...
The Apple II's Hi-Res mode was peculiar even by the standards of the day...
Each pair of adjacent pixels generated a single color pixel via artifact color, resulting in an effective resolution of 140×200. The lower seven bits of each byte represented the pixels, while the most significant bit controlled the phase offset for that block of pixels, altering the color that was displayed...
Finally, another quirk of Wozniak's design is that while any pixel could be black or white, only pixels with odd X-coordinates could be green or orange. Likewise, only even-numbered pixels could be violet or blue.[4] This is where the so-called "fringe benefit" comes in. The Apple video hardware interprets a sequence of three or more turned-on horizontal pixels as solid white, while a sequence of alternating pixels would display as color. Similarly, a sequence of three or more turned-off horizontal pixels would display as black.
https://github.com/chrissimpkins/codeface
(Use Input)
Hack is my second favorite, but just the last year I switched to Fira Code: monospaced font with programming ligatures.
I like the zero being a slash as opposed to a dot but the rest is spot on for me.
https://github.com/tonsky/FiraCode#fira-code-monospaced-font...
I use emacs, and don't have a clue as to what font I'm using. It's monospace, and that's about all that matters to me. As long as I can tell the difference between I, 1 and l - I really couldn't care less.
For some reason, I've typed it out in a few files, such as my Emacs init and .Xresources.
Code has to be readable. Those serifs aren't merely decoration: They're visual cues that help your eye intuitively determine which letter is intended by a given shape.
Sans fonts may look "clean" but they actually take your eye longer to read.
Source with references: http://asserttrue.blogspot.com/2013/01/the-serif-readability...
One of many studies that show it's actually additional spacing that's at work when small text readability is improved with serifs: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4612630/
(click side-by-side to compare)
I think I'll switch to Fira Mono, Hack line height seems to be to condensed.
I started using it after discovering the customizer.
I've yet to find a better condensed programming font with ligatures, it's close to perfect already (for me).
Agreed. It's narrow, but does not sacrifice readability.
Then, your screen is another factor. With a lot of dpi (e.g: 4K or superior) you can pretty much anything you want since most fonts will look very readable.
Edit: I don't know why this got downvoted; if there's a way in which you want me to alter it to be more acceptable, please let me know.
Like what? Installed it with absolutely no problem at all in both Sierra and High Sierra (GM) -- and never had issues installing it in my older Mac OSes (or any other font -- some fonts created by amateurs --free .ttf varieties-- have broken metrics/config and you're warned about it sometimes. Other than that, absolutely zero issues).
>to be fair, the process for installing fonts on OSX is horrible anyway
It's literally double clicking on a font file and clicking "Install Font" on the preview that pops up.
How is that in any way "horrible"?
It was fine in Mavericks. In Sierra it has been a minor player among a very sizable collection of annoyances.
Thank you! TBF to OSX, it at least says something about general reliability that I didn't even consider this would be necessary.
> Like what?
Errors about duplicate fonts. Several occasions where dialogs open and close immediately, indicating some kind of problem, but not sure what. Even after going through the "yes, please do really install this font, even though there are 'duplicate fonts'", nothing seems to happen sometimes.
I've managed to install three of the fonts (font variants?) — Regular, Bold, and Bold Italic — but Italic refuses to install altogether.
> How is that in any way "horrible"?
Having to open four separate font files, then click a button each time to actually install them seems like a pretty tortuous process — I'm grateful it was only 4! It would be a LOT nicer if I could just select the files, right-click and choose "Install font(s)" and have it all done in a single step. That's totally aside from all the errors.
Having said that ... pro-tip: drag-and-drop. I always forget that drag-and-drop is sometimes the 'first class' way of doing something on OSX. So the quickest way, I think, would be:
1. Open 'Font Book' 2. Locate files in Finder 3. Drag and drop from the latter to the former
This process finally allowed the "Italic" variant to be installed. I'm assuming it will work with multiple variants at once; I would test that, but trying to remove the family/variants in Font Book just gives me a 'no-op' (after a confirmation dialog).
Oh, I rarely happened to need to install multiple files in the same Font Book "session". At best 4-5 files for the different fonts of the same family (X bold, X italic, etc) -- might be why I'm not seeing those issues.
>Having to open four separate font files, then click a button each time to actually install them seems like a pretty tortuous process
Having been there in 1997-200x era Linux, where you had to manually edit config files and jump through hoops to register fonts (and they wouldn't even work across all desktop environments and toolkits) I really don't see the issue...
That said, you can just drag and drop multiple font files into Font Book if I'm not mistaken. In fact, you could just drop them into your Fonts folder and they should work too -- no clicking required -- don't know if Apple removed that, used to work at least in Snow Leopard days.
That was exactly the case in this instance :)
> Having been there in ...
Sure, I don't think I've ever had a great experience installing fonts on any platform, but I hold Apple to a higher standard.
> That said, you can just drag and drop ...
I know, I said that in my update that you quoted! :-)
These glyphs include a number geometric shapes and symbols. By using a font that supports them with the proper metrics, the status line looks sharp and flawless.
Keep stuff out of the middle of my zeros, please.
The circle surrounding nothing wonderfully symbolizes a subtle concept.
Drop a dot in hole and now what are you symbolizing? A nice golf shot? When you put a slash across it are you warning me away?
No, no. I prefer my voids empty, thanks very much.
Tl;dr: the monospsce font seems to be (have been) an almost direct copy of DejaVu Mono. I don't know how much has changed over the last 2 years.
Windows doesn't render fonts the same way so I wound up creating a near clone of Monaco @ 10pt on a Mac and called it Monocle. I fixed some things that annoyed me along the way.
Here's an earlier version that I used to show people: https://fontstruct.com/fontstructions/show/517659/monoclefix...
And never had an issue finding Apple or Facebook related stuff and being shown actual apples (the fruit) or Apple (the record company) or facebook (the high school thing).
What if there is a font named Hack and a language (which, FWIK, exists as well)?
In fact if it's "extremely common" then already there's no such concern. Now it just has N+1 uses.
Would it hurt anyone to use context to know which of the two is talked about?
Then one gets confused between them. Next month a story on HN will be titled "New version of Hack released". That's confusing.
> (which, FWIK, exists as well)?
Yes I know. That doesn't weaken my point!
> Would it hurt anyone to use context to know which of the two is talked about?
Of course. Every time one has to spend effort additionally clarifying one's meaning (or worse, someone else's meaning)causes a bit of "hurt". The more popular the project the more the hurt compounds.
A case in point: all the people on HN who click through to discussions on ML thinking it was about the language only to find it's an article about machine learning, or vice versa.
> In fact if it's "extremely common" then already there's no such concern. Now it just has N+1 uses.
I didn't mean it has N different uses as a proper name. I mean that it's a commonly used word as a non-proper-name that represents one concept or a collection of very similar concepts.
Ornithologists shouldn't call their new font "Wing" and we shouldn't call our new font "Hack". The other way round would be fine.
For 1 split second. Every year or so. And only if there's no other context in the title (e.g. www.facebook.com).
>Of course. Every time one has to spend effort additionally clarifying one's meaning (or worse, someone else's meaning)causes a bit of "hurt".
It also exercises the brain for the broader world, where things are not always humanly managed and/or cleanly designed, and only need the least possible effort.