Open Source Typeface Hack designed specifically for Code

Martin Brinkmann
Aug 31, 2015
Updated • Aug 31, 2015

The days of confusing 0 and O, l and 1, or Z and 2 while reading through pages of code late at night are finally over with the release of Hack, an open source typeface designed specifically for code.

While it is code that Hack has been designed for, its open source free for all nature enables you to use it in any program or web application that supports custom fonts.

Hack has been designed with legibility in mind, and it shows when you look at the supported characters.

If you ever had to debug code because of a reading error, confusing 0 and O for instance or l and 1, you know how time-consuming and hard to spot these errors can be.

hack open source code font

The designer of the font Chris Simpkins lists the following design traits:

  • Oval fill in the zero counter.
  • Curved tails on select glyphs.
  • Rounded square alphabetic points.
  • Round analphabetic points.
  • Semi-bold punctuation weight.
  • Wide set punctuation.
  • Angled vertical tails & extenders.

Hack is available as a True Type (tff) and Open Type (cff) download,and as a web font. The web font can be downloaded or used directly through a content delivery network.

If you want to use the font on your computer, you need to download one or both build formats from the official website.

Extract the contents afterwards to your computer. If you use Windows, right-click on the font and select install to add it to the system.

This may not always be necessary depending on the application you are using as you may reference it directly as well.

If you install it, you gain access to the font in many programs including web browsers such as Firefox, most text and code editors, email programs and more.

hack font

It is easy enough to integrate in most programs. You find the option -- usually -- in the program settings or style preferences.

If you are using Notepad++ for instance, you find the option under Settings > Style Configurator. There you can select Hack as a global font or as a font for individual languages only.

If you are using Android Studio, you may use Hack as well. Select File > Settings > Editor > Colors & Fonts > Font.

If this is your first time there click on save as to save a new scheme. Remove the checkmark from "show only monospaced fonts" and pick Hack as the primary font. Click ok afterwards and you should get it as the primary font used in all your Android projects. (thanks Pants)

Open Source Typeface Hack designed specifically for Code
Article Name
Open Source Typeface Hack designed specifically for Code
Hack is an open source free to use typeface designed specifically for source code.

Tutorials & Tips

Previous Post: «
Next Post: «


  1. abood said on September 21, 2015 at 8:56 pm

    I installed this font on Manjaro Linux KDE and am using Sublime Text 2. It is brilliant. Thanks for sharing!

  2. Diana said on September 6, 2015 at 1:30 am

    Who cares? This font is only a slightly (and sloppily) modified version of DejaVu Sans Mono.

  3. Matthew Borcherding said on September 1, 2015 at 6:05 pm

    It’s five years old now, but this is about the best comparison of programming fonts I’ve seen:

    I use Liberation Mono myself. Dotted zeros! Lower case L and number one differ nicely. Extremely readable. My favorite between other top programming fonts including Consolas, Inconsolata, Source Pro, Lucida Console, etc.

    There’s a huge collection of programming fonts here as well, though not quite so organized:

    The Hack font is included in this second link, too.

  4. RDA said on September 1, 2015 at 12:22 pm

    I have been using this for a while:
    Inputâ„¢ Fonts for Code, from Font Bureau

  5. point said on September 1, 2015 at 8:56 am

    That’s just an unnecessary fork/rip-off of BitStreamVera/DejaVu Sans Mono (which already solves how to distinguish those similar characters). So this “hack” is a solution to a non-existent problem.

  6. vux777 said on August 31, 2015 at 7:55 pm

    consolas in Waher-style
    works perfect for me

  7. pd said on August 31, 2015 at 7:48 pm

    TTF version looks bloody terrible in Notepad++ on my old MSI Wind U100 nettop running XP. Blotchy pixels everywhere. Shame.

    1. chesscanoe said on November 19, 2017 at 5:28 am

      IBM Plex is to my eye the most functional and pleasing font family available for the glyphs it includes. (Big time personal opinion) . It is available for free at sites like .
      I read somewhere this is a preview of what will be freely available in 2018.
      I use the fonts in places like Skype for Desktop, Notepad++, GIMP, and Irfanview. With an old Chrome extension, I even use it to view sites like

    2. chesscanoe said on November 9, 2015 at 5:44 am

      TTF version looks beautiful in Notepad++ on my new laptop running Windows 10. (I missed this article until today)

      1. chesscanoe said on October 7, 2016 at 5:38 pm

        I was using Source Code Pro as my Skype IM default mono font, but “&” would not type. I tried Google’s free Noto Mono, but the zero is not dotted or slashed. Windows 10 at least has DejaVu Sans Mono Bold as a choice and it is now my favorite Mono Font, even over LibreOffice Liberation Mono, whose lower case “l” can be confused with “1” design in other fonts (to me).

      2. chesscanoe said on December 19, 2015 at 5:28 am

        I stopped using Hack because superscript glyphs are truncated at the top. While a minor problem, it still screamed an alpha font to me. With the installation of LibreOffice today, I had font Source Code Pro available to me, and Windows 10 Character Map shows no problems with any glyph. I use it in Skype and Notepad++ and am very pleased with this font.

      3. chesscanoe said on November 9, 2015 at 2:14 pm

        The only problem I’ve seen with Hack is that it truncates superscript characters on top, e.g. the symbols for “cubed” or “squared”. Since I rarely use superscripts, I’ll keep using Hack.

  8. j said on August 31, 2015 at 6:36 pm

    so where’s the link at?

    1. Martin Brinkmann said on August 31, 2015 at 7:06 pm

      It is in the first paragraph of the article.

  9. The Mighty Buzzard said on August 31, 2015 at 6:04 pm

    That’s all fine and good but who uses a non-monospace font for coding? That’s pure insanity, that is.

    1. kktkkr said on September 1, 2015 at 3:29 pm

      The designer of Input fonts addresses this exact question: if you perform data entry in table formats without tabulation, then having a non-monospaced font will mess things up. But most code doesn’t need to line up in columns, and for lines which are almost entirely similar, it becomes easier to spot the differences using a proportional font. (Of course, monospaced fonts are much better if you’re counting characters or lining up your comments.)

      What bothers me is that Hack actually appears to be just a monospace font. Which means that it’s not novel in any way – pretty much all modern coding fonts easily pass the I1liOD0o tests! And with Input or Bitstream Vera or DejaVu Sans, you get both proportional and monospace fonts that are visually consistent even if you switch between them.

      1. Pants said on September 1, 2015 at 4:49 pm

        Been using this for the last 3 days and I’m kinda liking it. Sure, there’s nothing particularly breakthrough about it (I1liOD0o tests etc), but for me (using TTF on Win7) its crystal clear and clean and easily readable at very small sizes (am using a size 8 – 7 is slightly smaller than what I’m used to, but it’s easily readable, and I’ll switch to it next project). It’s still perfectly legible at size 5. It is a taller font though, I seem to lose some vertical space, which is at a premium.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.