Nerd Fonts is a project that patches developer targeted fonts with a high number of glyphs (icons). Specifically to add a high number of extra glyphs from popular 'iconic fonts' such as Font Awesome, Devicons, Octicons, and others.
The following Sankey flow diagram shows the current glyph sets included:
Diagram created using @SankeyMATICImportant Notices
master
branch file paths are not considered stable. Verify your repository URI references- cloning this repository is not recommended (due to Repo size) unless you are going to be contributing to development
Table of Contents
- 1 - Manual
- 2 - Release Archive Download
- 3 - Install Script
- 4 - Homebrew Fonts (macOS (OS X))
- 5 - Clone Repo
- 6 - Ad Hoc Curl Download
- 7 - Arch User Repository (AUR) (Arch Linux)
- 8 - Patch Your Own Font
Additional Info
TL;DR
Nerd Fonts takes popular programming fonts and adds a bunch of Glyphs. There is also a font patcher available if your desired font isn't already patched. For more high level information see the wiki. If you are looking for the Vim plugin see VimDevIcons ➶.
Various Download Options for Fonts
If you...
Option 1.
want to quickly grab an individual font download from thepatched-fonts/
directoryOption 2.
want to download a font family package of variations (bold, italic, etc.) see download an archiveOption 3.
want to automate installing or use in scripts see the Install ScriptOption 4.
are on macOS and want to use Homebrew see Homebrew FontsOption 5.
want complete control then see cloning the repoOption 6.
want to use thecurl
command or use in scripts see Ad Hoc Curl DownloadOption 7.
are on Arch Linux and want to use AUR packages see Unofficial Arch User RepositoriesOption 8.
want to patch your own font see the Font Patcher
Features
- A FontForge Python script to patch any font
- Includes an option to create Monospaced (fixed-pitch, fixed-width) or double-width (non-monospaced) glyphs
- For more details see the Font Patcher section
51
already patched font families- Over
1,444,400
unique combinations/variations of patched fonts (more details) - Over
2,824
glyphs/icons combined (more details)- Current glyph sets include: Powerline with Extra Symbols, Font Awesome, Material Design Icons, Weather, Devicons, Octicons, Font Logos (Formerly Font Linux), Pomicons, Codeicons
- Monospaced (fixed-pitch, fixed-width) or double-width (non-monospaced) glyphs version of each font
- This refers to the Nerd Font glyphs themselves not necessarily the Font as a whole
- A Developer/Contributor provided bash script to re-patch all the fonts
Glyph Sets
See Wiki: Glyph Sets and Codepoints for more details
Icon names in shell
Patched Fonts
*RFN = Reserved Font Name
Combinations
- Over
1,485,000
unique variations/combinations (Power Set) of patched fonts:50
patched font typefaces719
patched font families2,876
'complete' variations/combinations'1,485,410'
possible variations/combinations-
1,488,286
total calculated combinations (2,876 + 1,428,110)
- Combinations for each font are any combination of Variations
Variations
- no flags given (defaults to only Seti-UI + Custom and Devicons)
- double (variable/proportional) or single (fixed/monospaced) width glyphs
- Font Awesome
- Font Awesome Extension
- Material Design Icons
- Weather
- GitHub Octicons
- Font Logos (Formerly Font Linux)
- Powerline Extra Symbols
- IEC Power Symbols
- Pomicons
- Codicons
- Windows Compatibility
Font Installation
Option 1: Download and Install Manually
Best option for quickly getting a specific individual font.
Download the specific patched font of your choice
Option 2: Release Archive Download
Best option if you want an archive or complete font family of variations (Bold, Italic, etc.).
Fonts are available for download as packages in the latest release
Option 3: Install Script
Best option if you want to automate installing or for use in scripts.
Note: Requires cloning the repo as of now
All fonts:
- Installs all the patched Fonts (Warning: This is a lot of Fonts adding up to a large size)
./install.sh
or, in Powershell (Windows only):
./install.ps1
Single font:
- Installs a single Font of your choice
./install.sh <FontName>
./install.sh Hack
./install.sh HeavyData
or, in Powershell (Windows only):
./install.ps1 <FontName>
./install.ps1 Hack
./install.ps1 HeavyData
Option 4: Homebrew Fonts
Best option if on macOS and want to use Homebrew.
All fonts are available via Homebrew Cask Fonts on macOS (OS X)
brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
Option 5: Clone the Repo
Best option for full control, all or some of the fonts, or contributing to development.
A full clone of this repository is not required nor efficient (mostly due to Repository size) if you are simply only interested in a limited set of fonts.
If you do want to clone the entire repo be sure to shallow clone:
git clone --depth 1
If you want to clone a sub-directory, use git sparse-checkout
. The following example requires Git v2.26
:
git clone --filter=blob:none --sparse [email protected]:ryanoasis/nerd-fonts
cd nerd-fonts
git sparse-checkout add patched-fonts/JetBrainsMono
Option 6: Ad Hoc Curl Download
Option if you want to use the
curl
command or for use in scripts.
Linux
mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf
Note: deprecated alternative paths: ~/.fonts
macOS (OS X)
cd ~/Library/Fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf
Option 7: Unofficial Arch User Repository (AUR)
Option for Arch Linux and wanting to use AUR packages.
The following fonts are available via AUR packages on Arch Linux:
- Nerd Fonts Complete (double-width)
- Nerd Fonts Complete (single-width) (out of date)
- Nerd Fonts DejaVu Complete
- Nerd Fonts Source Code Pro Complete
- Nerd Fonts Git (out of date)
- Nerd Fonts Fira Code
- Nerd Fonts Terminus
- Nerd Fonts Liberation Mono
- Nerd Fonts Go Mono
- Nerd Fonts Anonymous Pro
- Nerd Fonts Noto
- Nerd Fonts Inconsolata
Option 8: Patch Your Own Font
The option for patching your own font or fully customizing the patched font.
Use the provided Python command line script to generate a patched font from your own font to get the extra new glyphs
See: Font Patcher for usage
- use this option if you do not want to use one of the fonts provided
- you will still need to copy the generated font to the correct font directory on your system
Patching the font of your own choosing for use with the VimDevIcons ➶:
-
requires: Python 2 (or Python 3),
python-fontforge
package (version20141231
or later, see the install instructions) -
alternative install method on OSX:
brew install fontforge
-
alternative method on Linux: Using the AppImage
-
alternative method using Docker: Docker Hub
-
Usage:
./font-patcher PATH_TO_FONT
-
Alternative usage: Execute the patcher with the FontForge binary using the script flag:
./fontforge -script font-patcher PATH_TO_FONT
-
Patching fonts using the AppImage:
Note:
chmod u+x
the AppImage after download. All supplied paths need to be absolute and an explicit output path is required! If everything is located in the same directory, you can use the$PWD
shorthand../FontForge.AppImage -script $PWD/font-patcher $PWD/BaseFont.ttf -out /tmp
-
Patching fonts with Docker:
docker run -v /path/to/fonts:/in -v /path/for/output:/out nerdfonts/patcher [OPTIONS]
Full options:
usage: font-patcher [-h] [-v] [-s] [-l] [-q] [-w] [-c] [--fontawesome]
[--fontawesomeextension] [--fontlinux] [--octicons]
[--powersymbols] [--pomicons] [--powerline]
[--powerlineextra] [--material] [--weather]
[--custom [CUSTOM]] [--postprocess [POSTPROCESS]]
[--removeligs] [--configfile [CONFIGFILE]]
[--progressbars | --no-progressbars] [--careful]
[-ext [EXTENSION]] [-out [OUTPUTDIR]]
font
Nerd Fonts Font Patcher: patches a given font with programming and development related glyphs
* Website: https://www.nerdfonts.com
* Version: 2.0.0
* Development Website: https://github.com/ryanoasis/nerd-fonts
* Changelog: https://github.com/ryanoasis/nerd-fonts/blob/master/changelog.md
positional arguments:
font The path to the font to patch (e.g., Inconsolata.otf)
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-s, --mono, --use-single-width-glyphs
Whether to generate the glyphs as single-width not double-width (default is double-width)
-l, --adjust-line-height
Whether to adjust line heights (attempt to center powerline separators more evenly)
-q, --quiet, --shutup
Do not generate verbose output
-w, --windows Limit the internal font name to 31 characters (for Windows compatibility)
-c, --complete Add all available Glyphs
--fontawesome Add Font Awesome Glyphs (http://fontawesome.io/)
--fontawesomeextension
Add Font Awesome Extension Glyphs (https://andrelzgava.github.io/font-awesome-extension/)
--fontlinux, --fontlogos
Add Font Linux and other open source Glyphs (https://github.com/Lukas-W/font-logos)
--octicons Add Octicons Glyphs (https://octicons.github.com)
--powersymbols Add IEC Power Symbols (https://unicodepowersymbol.com/)
--pomicons Add Pomicon Glyphs (https://github.com/gabrielelana/pomicons)
--powerline Add Powerline Glyphs
--powerlineextra Add Powerline Glyphs (https://github.com/ryanoasis/powerline-extra-symbols)
--material, --materialdesignicons, --mdi
Add Material Design Icons (https://github.com/templarian/MaterialDesign)
--weather, --weathericons
Add Weather Icons (https://github.com/erikflowers/weather-icons)
--custom [CUSTOM] Specify a custom symbol font. All new glyphs will be copied, with no scaling applied.
--postprocess [POSTPROCESS]
Specify a Script for Post Processing
--removeligs, --removeligatures
Removes ligatures specified in JSON configuration file
--configfile [CONFIGFILE]
Specify a file path for JSON configuration file (see sample: src/config.sample.json)
--progressbars Show percentage completion progress bars per Glyph Set
--no-progressbars Don't show percentage completion progress bars per Glyph Set
--careful Do not overwrite existing glyphs if detected
-ext [EXTENSION], --extension [EXTENSION]
Change font file type to create (e.g., ttf, otf)
-out [OUTPUTDIR], --outputdir [OUTPUTDIR]
The directory to output the patched font file to
Examples
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf -s -q
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf --use-single-width-glyphs --quiet
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf -w
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf --windows --quiet
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf --windows --pomicons --quiet
./font-patcher Inconsolata.otf --fontawesome
./font-patcher Inconsolata.otf --fontawesome --octicons --pomicons
./font-patcher Inconsolata.otf
./FontForge.AppImage -script /tmp/nerdfonts/font-patcher /tmp/nerdfonts/CascadiaMonoPL-Semibold.ttf --fontawesome -out /tmp
./FontForge.AppImage -script $PWD/font-patcher $PWD/CascadiaMonoPL-Semibold.ttf --octicons -out $HOME
docker run --rm -v ~/myfont/patchme:/in -v ~/myfont/patched:/out nerdfonts/patcher
docker run --rm -v ~/Desktop/myfont/patchme:/in -v ~/Desktop/myfont/patched:/out nerdfonts/patcher --fontawesome
Gotta Patch 'em All Font Patcher!
-
for Contributor or Developer use
-
re-patches all fonts in the unpatched directory:
./gotta-patch-em-all-font-patcher\!.sh
-
can optionally limit to specific font name pattern:
./gotta-patch-em-all-font-patcher\!.sh Hermit
Contributing
See contributing.md
Unstable File Paths
Reference the release branch and not the master branch because paths are subject to change for each release
- For example:
-
✅ Use:https://github.com/ryanoasis/nerd-fonts/blob/0.9.0/patched-fonts/Hermit/Medium/complete/Hurmit%20Medium%20Nerd%20Font%20Complete.otf
-
❌ Instead of:https://github.com/ryanoasis/nerd-fonts/blob/
master/patched-fonts/Hermit/Medium/complete/Hurmit%20Medium%20Nerd%20Font%20Complete.otf
-
Other Good Fonts to Patch
A list of additional good fonts to patch that cannot be provided or shared due to their license:
- Input Mono (license restriction)
- Possibly coming with external hosting :)
- PragmataPro (not free)
- Consolas (proprietary)
- Operator Mono (not free)
- Dank Mono (not free)
Project Motivation
Changelog
See changelog.md
License
MIT © Ryan L McIntyre
Powerline Icons are too small
Using mintty, the screenshot shows "Meslo LG S DZ" but the other "Meslo"-fonts, "Droid Sans Mono", "Bitstream Vera Sans Mono" and "DejaVu Sans Mono" also look like this.
Fonts from 2.0 release are not being correctly identified as Monospace
🎯 Subject of the issue
Initial issue description (from 23/May/2018) I use Meslo LG M for Powerline and want to use the Nerd Fonts patched version. I tried all Meslo LG M in the repository, but none of them appeared in the gnome-terminal's fonts list. they were listed in the system, thought (in the fonts application).
I also downloaded the original ones, without any patches, and they got listed.
Anyone has any clue about how to fix this?
Update 24/May/2018 I have also tried
Droid Sans
, and it is not being listed too. I downloaded Terminator to see if it lists them, and it did.Update 31/May/2018 With other people experiencing the same issue with other fonts, the issue's title was updated from "Meslo fonts not being listed on gnome-terminal" to the current one, as suggested by @gargoyle.
🔧 Your Setup
Odd gap between glyphs and text
Not sure what happened, but since updating my fonts to include the new icons, I'm getting some weird spacing between the powerline glyphs and regular text.
Using other fonts that have powerline support do not have this issue.
possible to make download resume?
OS : Arch linux
been trying to completed the download for 2..0GB file size for 9 hours, but it keep on close-up the download connect around 1.5 -1.7GB, with the message below
curl: (18) transfer closed with 1529402169 bytes remaining to read
possible to make it resumeable? so that once the transfer closed up, it will be resume again
Consider font style when generating familyname and fontname
These small modifications to the font patching script take the separate font styles into account when generating the font family and font name of the generated fonts. This ideally consolidates all of the fonts under a single font family each as a unique font style when the patched fonts are installed.
I'm not fully aware of the standards used with regards to the dashes in the different strings that are assumed in this pull request so additional normalization may need to be done in order to prevent these changes from causing problems on fonts that have non-standard or incorrect metadata. I'm happy to put research into this if this is a desired modification to the script.
Hack hints are being removed in Nerd Fonts patched versions, here's the fix
Great project Ryan. Thanks for including Hack with your patched releases.
It looks like your patching approach is removing the hints from the Hack ttf variants. This could lead to issues for some Linux distros and all Windows users. They are simple to restore if you would like to modify your releases (or for anyone who wants to do this on their own).
Use the following approach prior to the font installs:
autohint.sh
script and ttfautohint Control Instructions Files (Hack-*-TA.txt
) from this directory of the Hack repository https://github.com/chrissimpkins/Hack/blob/master/postbuild_processing/tt-hintingautohint.sh
shell script based upon the Nerd Fonts release file names (and outfile path of your choice)chmod +x autohint.sh
./autohint.sh
to restore the hints.These hints may/likely will change with new Hack releases so it is necessary to use Control Instruction Files that are part of the same Hack release that you patch.
`fi` shows as a telephone with `Inconsolata NF`
🎯
fi
shows as a telphone withInconsolata NF
Type
file
, and you see<telephone symbol>li
🔧 Your Setup
★ Optional
Monofixes
Description
TL;DR - See "What does this Pull Request (PR) do?" below
I was having problems getting many of the monospace fonts to work under windows. Specifically, the fonts were not being detected as monospace, so they wouldn't work under MobaXterm or GVim.
Unfortunately, getting things to work properly with both Windows and MacOS turned out to require a lot of trial and error.
Some of the fun I discovered:
OTF formatted monospace fonts are detected as such by Windows. So, initially I added the option to modify the extension, forced the fonts I wanted to be OTF, and called it a day. Unfortunately, I discovered that TTF fonts converted to OTF had a strange problem with MacOS. Specifically glyph number 0xE0C8 would be somehow skipped, and all subsequent glyphs would be mis-numbered.
To get TTF fonts detected properly as monospace under Windows, I found that EVERY glyph must be assigned the same width. This includes empty/blank glyphs, and often requires the source font glyphs to be modified in this way.
When using the windows-compatible named fonts on MacOS, I found that some font families where not being handled properly. Different weights of the same font would conflict with each other. This was caused by the font name being the identical across the font weights. I solved this by tweaking how the windows name is generated, and ensure it is unique for each font weight. IMHO, it would be better to have only one naming convention that works everywhere. This would eliminate half of the binary fonts and generation time.
I also wanted to preserve the aspect ratio of the glyphs when generating a monospace font, but wanted the powerline separators to remain line-height. After trial and error, I found that setting the ymax/ymin/height based upon the os2 parameters to be more consistent than scanning the line-draw characters.
I ended up doing some minor refactoring (normalizing indent amounts, removing unused variables, etc) in the process, so I completely understand if my changes are too drastic for a pull.
Requirements / Checklist
./font-patcher Inconsolata.otf --fontawesome --octicons --pomicons
./gotta-patch-em-all-font-patcher\!.sh Hermit
What does this Pull Request (PR) do?
Improves generation of monospace fonts so they properly work under windows
How should this be manually tested?
Generate some fonts.
Any background context you can provide?
See description.
What are the relevant tickets (if any)?
Screenshots (if appropriate or helpful)
Various fonts (including: Hurmit) glyphs offset/wrong size
Subject of the issue
Text and glyphs at 14pt:
text at 14pt, glyphs at 18pt:
The glyphs seem to be either shifted on x and y axis, or just their size doesn't match text, or even both.
Your Setup
OSX, iTerm2, tmux.
Patching Monaco and failing. No correct glyphs, non aligned or Powerline symbols too big
Subject of the issue
I've been trying all day today to patch correctly
Monaco and Menlo Nerd Complete **Mono**
, but I've failed spectacularly. I've been trying different options provided by the script but I wasn't able to a correctly display font on my terminal.First, I've tried to patch the original font from my fonts folder (
System/Library/Fonts/
), but I wasn't able to make it in a way to display the correct glyphs or correctly aligned.Then, I found that @taohex already has done the patching, thus I downloaded the fond and tried to transform to mono, the closest thing I've been able to yield is this
As you can see the Powerline extra symbols are slightly bigger than the fond, and I can't figure out how to fix it.
I've got the same result with the
Menlo
font.If you can lend me a hand I would be grateful. I also think that, if possible, if you can add those fonts to the repository would be great.
Monaco
is the default font of rStudio and now it's possible to call the terminal from within the app so I would like to use zsh with nerd fonts to make similar to my setup in iTerm2.Your Setup
Monaco
and alsoMenlo
.iTerm2
as my main terminal, but I'm trying to patchMonaco
because I want to use it onrStudio
. I need the fonts in mono because rStudio uses only mono fonts.Mac OS X 10.11.6 El Capitan
and I've dowloadedfontforge
withhomebrew
.CaskaydiaCove Font Does not Include Any Accent Characters
🗹 Requirements
🎯 Subject of the issue
Experienced behavior: The CaskaydiaCove Font linked in the release 2.1.0 doesn't contain German umlauts.
Expected behavior: The CaskaydiaCove Font should contain German umlauts as the original Cascadia Code Font does contain them. Furthermore, running
fontforge -script font-patcher src/unpatched-fonts/CascadiaCode/Regular/CascadiaCode-Regular.otf -c --mono --out .
generates a font which contains German umlauts as well.Example symbols: German Umlauts are affected. However, I'm not sure whether there are more accent characters which are affected.
äöü
Update: All accent characters are missing
🔧 Your Setup
Anonymice Powerline Nerd Font Complete.ttf
)?iterm2
,urxvt
,gnome
,konsole
)?★ Screenshots (Optional)
Cannot use OTF fonts for conhost, requires showing all fonts in Windows Terminal
🗹 Requirements
🎯 Subject of the issue
Experienced behavior: CaskaydiaCove Windows Compatible NF does not show up for conhost.exe, and only the Mono fonts (no ligatures) show up for Windows Terminal. Looking at existing bugs, this has been reported quite a few times and was apparently fixed, though subsequent comments say it still occurs.
Looking at #994 it seems this could be because OTF isn't well-supported. Could a TTF download be offered as well, if not a combination of OTF and TTF. IIRC, some fonts used to be distributed that way: both in an archive, though I may be thinking of a different forge.
Expected behavior: CaskaydiaCove NF fonts show up everywhere I'd like to use them: conhost.exe, wt.exe, code.exe, etc.
Example symbols: N/A
🔧 Your Setup
Anonymice Powerline Nerd Font Complete.ttf
)?iterm2
,urxvt
,gnome
,konsole
)?★ Screenshots (Optional)
Font patcher
Regarding using font patcher, does it have dependencies and need that the whole repository be cloned? Please add some information to the readme page.
nf-seti-go2 not rendering
🗹 Requirements
🎯 Subject of the issue
Experienced behavior: No icon (other icons work, atleast most of them)
Expected behavior: Should be rendered Example symbols:
nf-seti-go2
🔧 Your Setup
Anonymice Powerline Nerd Font Complete.ttf
)?nerd-fonts-jetbrains-mono v2.2.2
iterm2
,urxvt
,gnome
,konsole
)?★ Screenshots (Optional)
Fedora repo does not exist for Hack
🎯 Subject of the issue
Experienced behavior: The package manager instructions for installing
Hack
for Fedora say to enable theheliocastro/hack-fonts
copr project, but it doesn't exist.Expected behavior: N/A
Example symbols: N/A
🔧 Your Setup
None of these are applicable as you can't install it.
★ Screenshots (Optional)
N/A
font-patcher: Pull 'Mono' to front in names
[why] When we crate a font we take the OriginalName, add "Nerd Font" and which patches we applied, and add "Mono" if --mono has been specified:
But the 'Mono' part is quite important, but this scheme will put it in a place where it is easily out of view or has been removed (to keep the name short).
This truncation is especially bad on Windows Compatiple and when the user installs both the 'Nerd Font' and the 'Nerd Font Mono':
become after truncation
[how] Always put the "Mono" directly after "Nerd Font" and all the other name components come later.
Requirements / Checklist
What does this Pull Request (PR) do?
Change the Family/Full/File name of all
Nerd Font Mono
fonts: Pull theMono
directly after theNerd Font
How should this be manually tested?
Any background context you can provide?
What are the relevant tickets (if any)?
Screenshots (if appropriate or helpful)