user8088657
user8088657

Reputation:

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, specifically CaskaydiaCove Nerd Font, for my Terminal. This is so Oh-My-Posh will have the necessary icons to display correctly.

Screenshot of Oh-My-Posh interface not rendering correctly in Visual Studio’s

However, it seems that Visual Studio does not allow Nerd Fonts as a font for the Terminal. If you look in the attached screenshots below, you can see that the setting’s dropdown does not list Nerd Fonts as options. Curiously, they are available as a choice for the Text Editor.

Screenshot displaying Nerd Fonts being available for the Text Editor in Visual Studio Screenshot displaying Nerd Fonts not being available for the Terminal in Visual Studio

Regarding to solve it myself, I have scoured the Visual Studio documentation and tried my best Google-fu to find any results. Disappointingly most search engines return results concerning Visual Studio, not Visual Studio Code.

Before I submit a report to the developers of Visual Studio, I would like to cover all my bases and make sure I am not missing something.

Any insight would be greatly appreciated. Thank you!

Upvotes: 7

Views: 10017

Answers (4)

Yonatan Gross
Yonatan Gross

Reputation: 427

After installing the Hack Nerd Font, I managed to resolve the issue by adjusting the terminal settings in Visual Studio. The key step involves specifying the font to be used by the terminal. Here's how you can do the same:

  1. Navigate to Tools > Options.
  2. Select the Terminal section.
  3. Under Font and Colors, choose Hack Nerd Font from the dropdown menu for the font.

This configuration ensures that Visual Studio Code's terminal uses the Hack Nerd Font, which includes a wide range of glyphs and symbols needed for proper display. Below is a screenshot that illustrates where these settings are located:

Settings image

By following these steps, you should be able to use the Hack Nerd Font in Visual Studio Code's terminal, improving legibility and access to various font glyphs necessary for development tasks.

Upvotes: 3

Bevan Shaw
Bevan Shaw

Reputation: 79

I had this exact problem and am switching from CaskaydiaCove Nerd Font to Hack Nerd Font following advice on a thread I am following. https://github.com/ryanoasis/nerd-fonts/issues/785#issuecomment-1547609558 shows this is a confirmed bug. I will report back if it works.

Upvotes: 0

Rasmus Westerlundh
Rasmus Westerlundh

Reputation: 135

Installing a TTF-font will make it available to select for the Visual Studio Terminal via the Fonts and Colors-settings.

Installing OTF-font files will make them appear for text editors in visual studio, but not the terminal.

Jan's guess in his answer is in fact correct.

Upvotes: 9

Jan De Dobbeleer
Jan De Dobbeleer

Reputation: 855

Wild guess here. They might still be on conhost which doesn't work with OTF files and needs TTF. So, theoretically, installing the same font as TTF could do the trick. You'll need to do a manual install from the Nerd Font repo in this case as they don't ship the TTF files inside their zip files.

Upvotes: 7

Related Questions