Fonts
Nerd Fontsโ
Oh My Posh was designed to use Nerd Fonts. Nerd Fonts are popular fonts that are patched to include icons. We recommend Meslo LGM NF, but any Nerd Font should be compatible with the standard themes.
To see the icons displayed in Oh My Posh, install a Nerd Font, and configure your terminal to use it.
Installationโ
- Oh My Posh
- homebrew
Oh My Posh has a CLI to help you select and install a Nerd Font (beta):
This command is best executed as admin so that fonts are installed system wide.
In case you have no admin rights, you can install the fonts by adding the --user
flag.
Do know this can have side-effects when using certain applications.
oh-my-posh font install
If you're using Homebrew, you can tap the homebrew-cask-fonts
repository and install Nerd Fonts from there instead:
brew tap homebrew/cask-fonts # You only need to do this once!
brew search nerd-font # Search for font packages
# EXAMPLE: Install the NF version of Fira Code
brew install --cask font-fira-code-nerd-font
Configurationโ
Make sure to configure your terminal to use the font you have installed. The following sections will show you how to do this for the most popular terminals.
- Windows Terminal
- Visual Studio Code
- Visual Studio
To ensure correct rendering of the glyphs you will need to enable the option Use the new text renderer ("AtlasEngine")
in your terminal settings.
For further details, see here.
Once you have installed a Nerd Font, you will need to configure the Windows Terminal to use it. This can be easily done
by modifying the Windows Terminal settings (default shortcut: CTRL + SHIFT + ,
). In your settings.json
file, add the
font.face
attribute under the defaults
attribute in profiles
:
{
"profiles":
{
"defaults":
{
"font":
{
"face": "MesloLGM Nerd Font"
}
}
}
}
When using Visual Studio Code, you will need to configure the integrated Terminal to make use of the Nerd Font as well. This can be done by changing the Integrated: Font Family
value in the Terminal settings (default shortcut: CTRL + ,
and search for Integrated: Font Family
or via Users
-> Features
-> Terminal
).
If you are using the JSON based settings, you will need to update the terminal.integrated.fontFamily
value. Example in case of MesloLGM Nerd Font
Nerd Font:
"terminal.integrated.fontFamily": "MesloLGM Nerd Font"
When using Visual Studio, you will need to configure the integrated Terminal to make use of the Nerd Font as well. This can be done by opening the settings
in Tools > Options > Fonts and Colors > Terminal
and selecting a font like MesloLGM Nerd Font
.
OTF fonts do not appear in Visual Studio's Terminal settings, only TTF fonts. See here for more information.
Other Fontsโ
If you are not interested in using a Nerd Font, you will want to use a theme which doesn't include any Nerd Font icons.
The minimal
themes do not make use of Nerd Font icons.
Creating your own theme is always an option too ๐