In Windows 10, Microsoft have finally made some good additions to the console application. But there is still rooms for improvements. You have the option to change the console font, but they have made it really awkward to add additional fonts to the font list.
Most of you will probably only have two or three fonts to choose from, even though you have loads installed in Windows. In this blog post I will show you have to add additional fonts to the console application.
Note that since both the (old-school) command prompt and PowerShell share the same console application, these changes will be available for both.
First of, the font needs to meet certain criteria before it can be used in the console, the most important being that it needs to be a fixed-pitch (monospaced) font.
There are some other criteria that needs to be followed as well, but I find that most of the fonts you find suitable for consoles fulfill these. I will link to a Microsoft article describing the exact criteria for a console font later in this post if you are interested.
Next, you of course need to install the font in Windows. So far so good, but now it gets a bit more tricky.
You need to edit the registry to get the fonts to show up in the font list. Open up regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont.
On my system I have Consolas, Lucida Console and Raster Fonts as the default font choices. With the exception of the Raster Fonts, you will find the other fonts at this registry location.
For any additional fonts you want to add, just create a new string (REG_SZ) entry at this location. The name must be one or more zeros. If you already have entries with the name 0 and 00, the next one should be 000 and so on. Just add a 0 for each additional font you add.
The string data should be the name of the font. According to Microsoft this name should match the entry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts, but I have found that this is not always true.
I downloaded and installed the Hack font, but the entry under Fonts in the registry is Hack Regular (TrueType). But using Hack Regular as the registry value under Console\TrueTypeFont did not work. The font showed up in the font list, but choosing it never changed the font. I found out the “correct” value for this font was just Hack, so if you can’t get it to work right away you might need to experiment a bit.
After you have added the fonts you want, you need to reboot before it will work.
After you have logged back in you should be able to change the font from the properties window of the console application.
This is the Microsoft article I mentioned earlier: Necessary criteria for fonts to be available in a command window
Enjoy experimenting with new fonts in the console!