Patch SF Mono with Nerd Font Icons
Patch a font to include Nerd Font icons using their font patcher script.
There's a Docker image that contains all the needed requirements, which is the approach I used. Check the
ryanoasis/nerd-fonts repo docs for non-Docker approaches.
Mainly for the nice icons in Starship. Also to understand how to do it.
Note that there are some repos that have a pre-patched SF Mono available to download. But I wanted to see what was involved in doing it myself.
Download SF Mono from developer.apple.com/fonts/
Run the installer
The files will be installed to
You should see the following:
Copy them out to somewhere like
To create the patched font:
docker run --rm -v ~/Desktop/sf-mono-original:/in -v ~/Desktop/sf-mono-patched:/out nerdfonts/patcher --powerline --use-single-width-glyphs
The output directory
~/Desktop/sf-mono-patched will be created for you. When the conversion is finished open Font Book, and drag the patched fonts in to install them. Font Book might complain about some errors. No idea if they cause problems, I just ignored them.
The patched font name will be 'SFMono Nerd Font Mono', and should contain the NerfFont Powerline glyphs.