Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created May 23, 2017 16:24
Show Gist options
  • Save ELLIOTTCABLE/5b87ab21b11acb76a5c52d47a022b519 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/5b87ab21b11acb76a5c52d47a022b519 to your computer and use it in GitHub Desktop.
How to make a Nerd Fonts-patched (‘Powerline’) version of the Input Mono font
# Creating this because I'm *sure* I'll forget how to do this.
# 1. Customize your Input fontface, and download it from their website:
open -a Safari \
"http://input.fontbureau.com/download/index.html?size=14&language=javascript&theme=base16-dark&family=InputMono&width=200&weight=300&line-height=1.2&a=0&g=ss&i=serif&l=serifs_round&zero=slash&asterisk=height&braces=straight&preset=dejavu&customize=please"
# 2. Download the ‘patcher script’:
# (I have no idea why the hell this script requires the `changelog.md` as well; and we [ab]use
# GitHub's SVN bridge to download *just* the `src/glyphs`, instead of the 100s of megabytes of
# pre-patched fonts)
cd ~/Downloads/Input-Font
curl -o nerd-patcher.py -JO -fsSl --proto-redir -all,https \
https://raw.githubusercontent.com/ryanoasis/nerd-fonts/1.0.0/{font-patcher,changelog.md}
svn checkout https://github.com/ryanoasis/nerd-fonts/branches/1.0.0/src/glyphs src/glyphs
# 3. Install the patcher-script's dependencies:
brew install fontforge
# 4. Patch the files:
for font in Input_Fonts/Input/*.ttf; do
python nerd-patcher.py --careful --complete --progressbars "$font"; done
# 5. Install the patched fonts:
open -a 'Font Book' 'Input '*
@akaralar
Copy link

akaralar commented Aug 6, 2018

@cviebrock you rock! I had the same problem. One other issue I had was if I patched with --complete then letter J would turn into an icon. Excluding --materialicons solves the issue for my flavor of Input Mono

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment