Patching a Licensed Font with Nerd Font Glyphs
Licensed fonts almost never ship Nerd Font glyphs. Free fonts usually have a ready-made “Nerd Font” build floating around; the licensed ones leave you to it. So you get none of the powerline arrows, file-type icons, or git symbols that make a modern prompt and statusline readable.
Not a problem, because patching them in yourself is a one-liner.
The tool
There’s a Nerd Fonts patcher that injects every icon set into any font you hand it, and it’s published as a container, so you don’t have to install FontForge or wrangle Python. Drop your font files in one directory, point the patcher at it, collect the results from another.
⚠️ Use the TTF, not the OTF. If your font ships both, reach for the
.ttffiles. The.otfvariant of some fonts comes out botched after patching, with broken metrics and missing glyphs. TTF patches cleanly.
Put your .ttf files in ./original, then:
docker run --rm \
-v "$(pwd)/original:/in" \
-v "$(pwd)/patched:/out" \
nerdfonts/patcher \
--complete \
--single-width-glyphs \
--adjust-line-height
Patched fonts land in ./patched. The flags, briefly:
--complete: bundle every Nerd Font icon set, not just a subset.--single-width-glyphs: force the icons into a single cell so terminal columns don’t drift. It also names the family… Nerd Font Mono, which is the variant you want for a terminal.--adjust-line-height: nudges vertical centering so the icons sit on the baseline properly.
Only patch what you’ll use
A premium font can ship a dozen-plus weights, from Thin through Black, plus obliques. You don’t need to patch all of them. A terminal only ever renders Regular, Bold, Italic, and Bold-Italic, so patch the core four and skip the rest:
cp MyFont-{Regular,Bold,Oblique,Bold-Oblique}.ttf original/
It’s faster, and you’re not cluttering your font list with weights you’ll never select.
Then install the patched files however you normally install fonts, point your terminal and editor at the new … Nerd Font Mono family, and restart those apps so they pick it up. A statusline with real glyphs instead of tofu is a small daily pleasure, and your nice paid font finally pulls its weight.