The place for ad hoc chat about Nerd Fonts (Patched Fonts collection and Patcher)
Hi everyone, I have a quick question about using the font-patcher
script for patching fonts. I have a few icons I want to add in addition to the standard glyphs nerd font adds. When using the --custom
flag like so:
~/nerd-fonts > fontforge -script font-patcher '.../Input-Regular.ttf' --custom '<path-to-font>/new-icons.tff'
I get the following error:
The requested file, new-icons.ttf, does not exist
Traceback (most recent call last):
File "font-patcher", line 925, in <module>
main()
File "font-patcher", line 919, in main
patcher.patch()
File "font-patcher", line 88, in patch
symfont = fontforge.open(__dir__
+ "/src/glyphs/" + patch['Filename'])
OSError: Open failed
Is this normal behavior? If I add new-icons.tff
to the .../src/glyphs/
folder in the cloned repo then it works fine, but is this the expected way to use the font-patcher? Thanks
Hi @ryanoasis , did you consider switching to devopicon instead of devicon ? devicon is unmaintained. see vorillaz/devicons#133
Regarding this, I'd love to add to the set of icons in vorillaz/devicons, but sadly it seems like that's a dead end. @ryanoasis - assuming you don't accept one-off icons, is there a process for adding a new icon set to nerd-fonts?
To add new icons I looked at the fontpatcher to see what URLs the patcher takes glyphs from, and got my glyph added to the upstream. I thought that I had to run the patcher again but that didn't work as I posted above. SO I don't know how to get changes from upstream into the main nerdfonts project, but I THINK that for local use you can just edit the font patcher and put your own git url there for your new icons.
Thanks for the tip! I followed your example.
@amitlevy21 What you can do is get SourceCode Pro
from google fonts which has box characters. Then use the nerd font patcher to patch the characters in (use -custom
option, drop sourcecode font into src/glyphs
). OPen font-patch scripts and change CUSTOM_ATTR = {
# 'pa' == preserve aspect ratio
'default': {'align': '', 'valign': '', 'stretch': '', 'params': ''},
Ie no horiztaonl and vertical centering, or else the block chars will all be centered (a problem with left half block, and like upper block glyphs)
FireCode
was a monospaced font anyway, why the FireCode Mono
, Fira Mono
? And why has NF then got Fura variants of them?
I'm thinking about creating a installer that grabs all of them this way, but first, a question:
Do all of these zips follow a consistent format such that that can be predictably navigated without knowing more than the name of the zip?