1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-11-19 16:39:20 +02:00
nerd-fonts/readme.md

14 KiB

nerd fonts

| Unstable file paths warning: To avoid font file references breaking on releases please read |

GitHub version Join the chat at https://gitter.im/ryanoasis/nerd-fonts Flattr this git repo


Fonts Patcher
fonts-logo-small patcher-logo-small

Table of Contents

Glyph Sets

Seti-UI + Custom

  • Seti-UI / icomoon plus misc custom glyphs image

devicons

font-awesome

octicons

Pomicons

powerline-extra-symbols

image

Usage

Option A

Install any of the already provided patched fonts

Option B

Use the provided python command line script to generate a patched font from your own font to get the additional new glyphs

See: Font Patcher for usage

Patched Fonts

Font Name Reserved Font Name EM Size Status
3270 Nerd Font 1000 [TEST]
Anonymice Powerline Nerd Font Anonymous Pro 2048 [TEST]
Aurulent Sans Mono Nerd Font 1000 [TEST]
Bitstream Vera Sans Mono Nerd Font 2048 [TEST]
DejaVu Sans Mono Nerd Font 2048 [TEST]
Droid Sans Mono for Powerline Nerd Font 2048 [TEST]
Fira Mono for Powerline Nerd Font 1000 [TEST]
Heavy Data Mono for Powerline Nerd Font 2048 [TEST]
Hermut Nerd Font 1000 [TEST]
Inconsolata for Powerline Nerd Font 1000 [TEST]
Knack Nerd Font Hack 2048 [TEST]
Lekton for Powerline Nerd Font 1000 [TEST]
Literation Mono for Powerline Nerd Font Liberation 2048 [TEST]
Meslo for Powerline Nerd Font 2048 [TEST]
Monofur for Powerline Nerd Font 2400 [TEST]
M+ (MPlus) for Powerline Nerd Font 1000 [TEST]
ProFont (Windows tweaked) for Powerline Nerd Font 1200 [TEST]
ProFont (x11) for Powerline Nerd Font 1000 [FAILING]
ProggyCleanTT Nerd Font 2048 [FAILING]
Sauce Code Powerline Nerd Font Source 1000 [TEST]
Terminess for Powerline Nerd Font Terminus Font 1000 FAILING
Ubuntu Mono derivative Powerline Nerd Font 1000 [TEST]
Ubuntu Mono Nerd Font 1000 [TEST]

Combinations

  • Over 2,000 unique variations/combinations (Power Set) of patched fonts:
  • 57 font variations (just counting otf and ttf)
  • 36 combinations (Powerline Extra included by default currently)
  • Calculated combinations (36 * 57) = 2,052
  • Combinations for each font are any combination of (plus no flags option):

Glyphs Combined

image

Diagram created using @SankeyMATIC

Font Installation

Put any font you would like to use into the ~/.local/share/fonts (Linux) or ~/Library/Fonts/(OS X) folder. For example:

Linux

mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts && curl -fLo DroidSansMonoForPowerlinePlusNerdFileTypes.otf https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/DroidSansMono/Droid%20Sans%20Mono%20for%20Powerline%20Plus%20Nerd%20File%20Types.otf

deprecated alternate paths: ~/.fonts

OS X

cd ~/Library/Fonts && curl -fLo DroidSansMonoForPowerlinePlusNerdFileTypes.otf https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/DroidSansMono/Droid%20Sans%20Mono%20for%20Powerline%20Plus%20Nerd%20File%20Types.otf

Font Install Script

  • Linux & Mac OS X

    ./install.sh

Examples

./install.sh
All fonts installed to /home/ryan/.fonts

Nerd Fonts Patcher

Patching the font of your own choosing for use with the vim-devicons vim plugin:

  • requires: python2, python-fontforge package (version 20141231 or later, see the install instructions)
  • can alternately be installed on OSX via: brew install fontforge
  • Usage:
./font-patcher PATH_TO_FONT
  • Alternate usage: Alternately the patcher can be run through the fontforge binary using the script flag:
./fontforge -script font-patcher PATH_TO_FONT
usage: font-patcher [-h] [-s] [-q] [-w] [--fontawesome] [--octicons]
                    [--pomicons] [--powerline] [--powerlineextra] [--careful]
                    [-out [OUTPUTDIR]]
                    font

Patches a given font with programming and web development related glyphs
(mainly for https://github.com/ryanoasis/vim-devicons)

positional arguments:
  font                  The path to the font to be patched (e.g.
                        Inconsolata.otf)

optional arguments:
  -h, --help            show this help message and exit
  -s, --use-single-width-glyphs
                        Whether to generate the glyphs as single-width not
                        double-width (default is double-width)
  -q, --quiet, --shutup
                        Do not generate verbose output
  -w, --windows, --limit-font-name-length
                        Limit the internal font name to a maximum of 31
                        characters (for safe Windows compatiblity)
  --fontawesome         Add Font Awesome Glyphs (http://fortawesome.github.io
                        /Font-Awesome/)
  --octicons            Add Octicons Glyphs (https://octicons.github.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)
  --careful             Do not overwrite existing glyphs if detected
  -out [OUTPUTDIR], --outputdir [OUTPUTDIR]
                        The directory to output the patched font file to

Examples

./font-patcher unpatched-sample-fonts/Droid\ Sans\ Mono\ for\ Powerline.otf
./font-patcher unpatched-sample-fonts/Droid\ Sans\ Mono\ for\ Powerline.otf -s -q
./font-patcher unpatched-sample-fonts/Droid\ Sans\ Mono\ for\ Powerline.otf --use-single-width-glyphs --quiet
./font-patcher unpatched-sample-fonts/Droid\ Sans\ Mono\ for\ Powerline.otf -w
./font-patcher unpatched-sample-fonts/Droid\ Sans\ Mono\ for\ Powerline.otf --windows --quiet
./font-patcher unpatched-sample-fonts/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

Gotta Patch 'em All Font Patcher!

  • re-patches all fonts in the unpatched directory
  • mostly for Contributor/Dev use only
  • can optionally limit to specific font pattern (second example)
./gotta-patch-em-all-font-patcher\!.sh
./gotta-patch-em-all-font-patcher\!.sh Hermit

Unstable file paths

| Unstable file paths warning |

| Please make sure to reference via the release branch and not the master branch because paths are subject to being improved/changed per release | | For example (paths shorted for demonstation purposes): | | Instead of: https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/DroidSansMono/< font_path >.otf | | Please use: https://github.com/ryanoasis/nerd-fonts/blob/0.6.0/patched-fonts/DroidSansMono/< font_path >.otf |

Other Good Fonts to Patch

  • a list of additional good fonts to patch that I cannot provide or share due to the license:
  • Input Mono
    • Coming soon with external hosting :)
  • PragmataPro

Rationale

  • Originally created for use with vim-devicons vim plugin to add glyphs (icons) as labels for files based on the filetype extension or entire path

Other

  • project/repo previously known as 'nerd-filetype-glyphs-fonts-patcher', 'font-nerd-icons'

License

see LICENSE