Weekly Pick - Using the Hack Font in Visual Studio

Hack is an open source, hand-crafted font specifically designed for source code. You can find out all about Hack by visiting the website.

It's clear that a lot of thought, care and attention have gone into this project. I have outlined some of the features taken from the webiste.

  • Minimal stroke contrast
  • Large x-height
  • Open counters (anyone know what this means?)
  • Wide apertures
  • Sturdy terminals

I'm not going to go into detail about the font, but I am going to show you how to use it in Visual Studio.

Installing Hack in Visual Studio

  • First, you need to download the font. Head over to the website and download the TrueType font.

  • The download will give you a zip file with four files in. Extract the zip file into a folder.

  • Right-click the extracted files and select Install.

  • Load Visual Studio

  • Open the fonts configuration. Tools -> Options -> Environment -> Fonts and Colors. Alternatively, just type "fonts" in the quick launch box at the top right of Visual Studio.

Visual Studio Fonts

  • Select Hack from the list of available fonts. You can change the font of lots of areas in Visual Studio by using the Show settings for: drop down list, but it defaults to Text Editor, so will change the main code window.

Whatever you do, make sure you give yourself time to adjust to your font choice. It's pretty pointless changing the font, and immediately changing it back. Stick with it for a week and then decide whether you want to keep it.