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…
Or in PowerShell…
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
Reboot and the font is available in the properties for PowerShell and the command prompt.