Using the Hack Font in the Console and Visual Studio

A few days ago I saw a tweet about a new font called Hack. It’s a font that’s designed specifically for programming. No more doubts if it’s an O or a 0. Clear, enlarged punctuation for ; . ,. It’s just brilliant.

In Visual Studio…
2015-09-02 18_55_46-Kentor.AuthServices - Microsoft Visual Studio

Or in PowerShell…
2015-09-02 19_03_27-posh~git ~ authservices [master]

Installation

To install, first download the TrueType (ttf) zip from the Hack website. Doubleclick each of the files (no need to even unzip) to open them in Windows font viewer and click install from there. If you’re running Windows 10, make sure the firewall is switched on (yes, honestly). The font is now available in Visual Studio in the Environment->Fonts and Colors section in the options.

Configure in PowerShell/Console

Adding a new font to PowerShell and the console is a bit more tricky. By default, only three fonts are available in the console font settings: Consolas, Lucida Console and Raster Fonts. New fonts are not added automatically. To make the font available, a registry hack is needed.

Open regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont. Check the available values, and another one with one more 0 in the name than the existing. As the value, specify Hack.

2015-09-02 19_14_31-Registry Editor

Reboot and the font is available in the properties for PowerShell and the command prompt.

5 comments

    1. I think it looks more sleek, which is entirely a personal taste. If I have to find an objective argument it would be that the punctuation characters are semi-bold. Especially the ; is very distinct and easy to spot.

  1. …and for the love of God I can’t find how to install this and use in Microsoft Visual Studio Code. Any help on this? Thanks in advance!

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.