HKEY_CURRENT_USER\Console registry settings to point the FaceName value to your new typeface.
Installing the Google Font
Before you can change the font in PowerShell, the operating system must recognize the typeface. Google Fonts provides free, open-source fonts that are easy to install. Start by visiting the Google Fonts website and searching for your desired font, such as Fira Code or JetBrains Mono. Click the + Select this style button to add it to your collection. Once selected, click the download icon in the bottom-right corner to retrieve a ZIP archive containing the font files. Extract the contents of the downloaded ZIP file. You will typically find multiple weight variants like Regular, Bold, Italic, and Bold Italic. For PowerShell, you generally only need the regular and bold versions to ensure proper formatting of syntax highlighting and output. Locate the.ttf or .otf files for these two weights. To make the font available system-wide, copy these files into the Windows Fonts directory. You can access this folder quickly by pressing Win + R, typing shell:fonts, and hitting Enter. Drag and drop your selected font files into this window. Windows will automatically register the fonts, making them available to all applications, including the command line interface.
How to View Unicode Code Points Supported by Fonts in Windows? is a useful step if you plan to use specialized programming symbols or emojis, as some monospaced fonts handle special characters better than others. Verifying that your chosen font supports the glyphs you need prevents display errors later.
Updating the Registry Settings
Windows stores console appearance settings in the Registry under the current user hive. The previous draft contained incorrect instructions regarding subkeys; specifically,FaceName is a string value within the active profile key, not a subkey itself. To modify the correct location, press Win + R, type regedit, and press Enter to launch the Registry Editor. Navigate to the following path:
HKEY_CURRENT_USER\Console
Inside this key, you will see several subkeys named with hexadecimal values (e.g., {5b98...}). These represent different console host profiles. One of these subkeys corresponds to the default profile used by PowerShell when launched normally. To identify the active profile, you can check the Title value within each hex-named subkey. Look for the one that matches your current PowerShell title or simply select the first one if you want to apply the change globally to all new console windows.
Once you have identified the correct subkey, look at the right-hand pane for a value named FaceName. If it does not exist, right-click in the empty space, select New > String Value, and name it FaceName. Double-click FaceName to edit it. Enter the exact name of the font family you installed earlier. For example, if you installed "Fira Code", type Fira Code exactly as it appears in the font list. Do not include the file extension. Click OK to save the change.
It is critical to ensure there are no trailing spaces in the font name, as Windows may fail to load the font if the string does not match the internal font database precisely. If you are unsure of the exact internal name, you can check the font properties in the Fonts folder to confirm the full family name.
Applying and Verifying Changes
After saving the registry entry, close the Registry Editor completely. Open a new PowerShell window. If the changes do not appear immediately, you may need to restart the computer or log out and back in to ensure the console host reads the updated configuration. Upon launching, the text should now render using your newly selected Google Font. If the font does not change, verify that theFaceName value in the registry matches the font family name exactly. Also, check that the font was successfully copied to the shell:fonts directory. You can test the font in Notepad or Word to confirm it is installed correctly before troubleshooting the console settings.
How to Programmatically Change the Windows 11 Color Scheme might be relevant if you wish to adjust the background colors to complement your new font choice, creating a cohesive visual theme for your development environment.
Troubleshooting Common Issues
Sometimes, PowerShell may revert to the default font after an update or if the profile gets corrupted. In such cases, re-checking theHKEY_CURRENT_USER\Console key is the first diagnostic step. Ensure that the FontFamily and FontSize values are also set appropriately. A common mistake is setting the font size too small for the new typeface, which can make code difficult to read. Adjust the FontSize value (which is stored in hundredths of a point) to a comfortable level, typically between 130 and 150 for a 13-15 pt font.
Another issue arises when using pseudo-terminal emulators or remote sessions. Remote connections often ignore local font settings because they rely on the server's rendering capabilities. Local modifications only affect the client-side display of the PowerShell window on your machine.
Frequently Asked Questions
Can I use variable-width fonts in PowerShell?
Yes, but it is strongly discouraged. Variable-width fonts cause misalignment in columnar data outputs and make code indentation unreliable. Monospaced fonts are essential for maintaining the structural integrity of scripts.
Will changing the font affect my terminal color scheme?
No, the font face and the color palette are separate settings in the registry. You can change the font without altering the foreground or background colors, although you may need to adjust contrast manually for readability.
How do I reset the PowerShell font to the default?
To revert to the default, delete the FaceName string value from your active HKEY_CURRENT_USER\Console subkey. Windows will automatically fall back to the system default console font, usually Consolas or Lucida Console.
Does this method work for Command Prompt (cmd.exe)?
Yes, the same registry keys control both PowerShell and Command Prompt appearances. Changing the FaceName in HKEY_CURRENT_USER\Console applies to any console host session opened under your user account.
What is the best font for coding in PowerShell?
Monospaced fonts designed for developers, such as Fira Code, JetBrains Mono, or Cascadia Code, are ideal. They offer clear character distinction and often include ligatures that improve code readability.