Patching another font for Powerline? With Kitty you don’t need to
If you use Vim/Neovim with any sort of status line plugin, you will be used to requiring a ‘patched’ version of your favourite font so you get to see the various glyphs for ‘fork’ of ‘line number’ etc
Nerd Fonts has a huge swathe of ready patched fonts you can use, but every so often I find one that causes issues. This time is was trying to get Iosevka Slab patched. For reasons I can’t explain, the font patching script was having none of it and I couldn’t generate a patched version.
Then I remembered that Kitty, the Terminal program I use has a great feature that lets you use whatever font you want for certain character ranges, without ever having to worry about patching a font.
The symbol_map
setting
symbol_map U+E5FA-U+E62B,U+E700-U+E7C5,U+F000-U+F2E0,U+E200-U+E2A9,U+E0A3,U+E0B4-U+E0C8,U+E0CA,U+E0CC-U+E0D2,U+E0D4,U+f500-U+fd46 JetBrainsMono Nerd Font
The symbol_map
setting lets you map unicode codepoints to a particular font. In this case, a Nerd Fonts Wiki provides details of the unicode ranges all the icons use. That means you can set another, already patched, font as the source for these symbols. That means, in my case, I keep those glyphs mapped to my already patched Jet Brains Mono and I can use whatever ‘main’ font I want.
I’ll never have to patch a font again!
Updated range list:
symbol_map U+23fb-U+23fe,U+2500-U+259f,U+2665,U+26a1,U+276c-U+2771,U+2b58,U+e000-U+e00a,U+e0a0-U+e0a3,U+e0b0-U+e0b8,U+e0ca,U+e0cc-U+e0d4,U+e200-U+e2a9,U+e300-U+e3e3,U+e5fa-U+e6b1,U+e700-U+e7c5,U+ea60-U+ebeb,U+f000-U+f2e0,U+f300-U+f372,U+f400-U+f532,U+f0001-U+f1af0 JetBrainsMono Nerd Font