Visual Studio

Customize Microsoft Visual Studio using Nerd Fonts

How to modify or personalize the appearance of all your Microsoft Visual Studio windows, including Terminals, with your preferred font and color scheme.

7 min read
A customized geek workspace with three monitors
A customized geek workspace with three monitors 

Do you ever find yourself reminiscing about the good old days of Windows, or perhaps you've just got a natural inclination for personalizing everything you lay your hands on? Well, you're not alone. Many of us share that same itch for customization, especially when it comes to our development tools.

In this blog post, we'll dive into how you can infuse a dash of personality and style into Microsoft Visual Studio by harnessing the power of Nerd Fonts. But to get there, we'll need some essential tools and tricks in our toolbox.

The result of my customization looks like this:

Screenshot of Windows Terminal running Ubuntu 22.04, gotop, k9s and ohmyposh
Screenshot of Windows Terminal running Ubuntu 22.04, gotop, k9s and ohmyposh

The Essentials: What You Need

Before we embark on this journey of customization, let's gather the essentials:

Now that we've got our toolkit ready, let's explore how we can make Visual Studio truly our own.

The Visual Studio Terminal Dilemma

As you embark on this journey of customization, you'll likely encounter a minor hiccup—Visual Studio's Terminal Window. While we may have made peace with all the fancy clutter in the Windows Terminal, Visual Studio's Terminal doesn't always play nice with the custom fonts that OhMyPosh brings to the table. The result? A less-than-ideal appearance.

Visual Studio 2022 Terminal Window with ASCII art instead of Windows Terminal like "design"
Visual Studio 2022 Terminal Window with ASCII art instead of Windows Terminal like "design"

But don't worry; Visual Studio, a versatile tool that's been around since the '90s, offers a way out. You can customize the terminal font to align with your Nerd Font preference. Here's how:

  1. Open Visual Studio 2022.
  2. Navigate to "Tools" > "Options" > "Fonts and Colors."
    This is where the magic happens. The "Fonts and Colors" dialog allows you to set the font and color for various elements within Visual Studio, including windows and docks. Since the Terminal is one of these elements, you can precisely tailor its appearance to your liking.
  3. Select Your "Nerd Font."
    Here's where you bridge the gap between your Nerd Fonts setup in the Windows Terminal and Visual Studio. Choose the same "Nerd Font" you use in your Windows Terminal settings.
  4. Admire the Result.
    With this alignment, you'll now have a Visual Studio Terminal that complements your overall developer setup. Your terminal will look something like this:

Step-by-Step guide in pictures

2) The "Tools" > "Options" > "Fonts and Colors." Dialog

Tools > Options > Fonts and Colors Dialog
Tools > Options > Fonts and Colors Dialog
Cascadia Code in the Text Editor Fonts and Colors Window of Visual Studio

In this dialog, you have the power to customize the font and color settings for a wide range of elements within Visual Studio, including its various windows and docks. Importantly, among these elements, the Terminal is one that can be finely tailored to your preferences.

⚠️
Caution: Visual Studio > Fonts and Colors Settings
For the Terminal Window specifically it is in some cases required that you install the TTF Version of the Nerd Fonts

Finally this options allows you to use the same Nerd Font settings as your already customized Windows Terminal, achieving a unified and stylish appearance, like this:

Microsoft Visual Studio 2022 using Nerd Font in Terminal Window
Microsoft Visual Studio 2022 using Nerd Font in Terminal Window

The Beauty of Customization

Now, let's talk about the real beauty of this customization journey: flexibility.

As we grow older (and hopefully wiser), our eyesight might not be as sharp as it once was. But Visual Studio has got our back.

The ability to adopt different font sizes in various windows and docks within Visual Studio is a feature that's incredibly welcome. Whether it's increasing the font size for better readability or decreasing it to fit more information on the screen, you can fine-tune your coding environment to suit your needs.

Since Visual Studio gets a major UI/UX overhaul lets hope this feature will still remain.

Conclusion

In the end, Visual Studio, along with the power of Nerd Fonts, Windows Terminal WSL2, and OhMyPosh, offers a level of customization that lets you craft a development environment that truly feels like home. It's a blend of nostalgia, personalization, and functionality that helps you work comfortably and efficiently.

So, if you're like me—a '90s kid with a penchant for personalization—dive into Visual Studio's customization options and make it your own. Your coding journey may not be more productive but a touch more stylish and nostalgic.

Happy coding!

Additional Resources ...

What's the difference between a shell and a terminal? The other night on Github <3 with Mike Griese

I think there might be a bit of a misunderstanding here - there are two different kinds of applications we're talking about here:
On Windows, if you just run cmd.exe directly, the OS will create an instance of conhost.exe as the terminal for cmd.exe. The same thing happens for powershell.exe, the system will creates a new conhost window for any client that's not already connected to a terminal of some sort. This has lead to an enormous amount of confusion for people thinking that a conhost window is actually a "cmd window". cmd can't have a window, it's just a commandline application. Its window is always some other terminal.
Any terminal can run any commandline client application. So you can use the Windows Terminal to run whatever shell you want. I use mine for both cmd and powershell, and also WSL:
image
It's not the Terminal's responsibility to remember the commands executed by a commandline client. That's the responsibility of the shell. How would the terminal remember commands executed by something like emacs or vim? Those are both applications where the user is typing input and hitting enter, like they would at a cmd prompt, but without something that resembles a command history.

Original Source: #6500 (comment)

Change themes, fonts, text, and contrast for accessibility
Learn how to change Visual Studio color themes, font colors, text sizes, extra-contrast colors, and more for ease of use and accessibility concerns.
Microsoft Visual Studio Documentation on Themes, Fonts and Colors
nerd-fonts/patched-fonts/CascadiaCode at master · ryanoasis/nerd-fonts
Iconic font aggregator, collection, &amp; patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, &amp; more - ryano…
Nerd Fonts on Github
Caskaydia Cove not displaying on visual studio code, but displayed correctly in the integrated terminal. · Issue #785 · ryanoasis/nerd-fonts
🗹 Requirements I have searched the issues for my issue and found nothing related and/or helpful I have searched the FAQ for help I have searched the Wiki for help 🎯 Subject of the issue Same as Tit…
Bug in Visual Studio Code - Nerd Fonts not displayed correctly
Is it possible to use Nerd Fonts as the font for Terminals in Visual Studio?
Afternoon!First, I hope everyone is well.I am currently experimenting with Visual Studio [Version: 17.5.0 Preview 4.0] (to clarify, not Visual Studio Code) and was hoping to utilize a Nerd Font,
Issue in Visual Studio Terminal Window Color and Fonts

Share This Post