I installed FontForge from my distribution's package manager (pacman on Arch Linux).
I tried to patch several ttf fonts: JetbrainsMono (downloaded here) and Inconsolata (downloaded from google fonts), in various style. All fail with the same error message:
$ fontforge -script font-patcher --octicons static/Inconsolata-Bold.t
tf
Copyright (c) 2000-2020. See AUTHORS for Contributors.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
Version: 20200314
Based on sources from 2020-03-18 19:16 UTC-ML-D-GDK3.
The following tables are ignored by FontForge
'STAT' style attributes table
Use-my-metrics flag set on at least two components in glyph 631
File original-source.otf does not exist
Traceback (most recent call last):
File "font-patcher", line 924, 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
I don't know what is the problem ?
Arch Linux
It doesn't make it very clear, but you cannot just run the script on it's own - you need to first clone the repo with --depth 1 and run the script from there. You may be able to get away with only downloading the files you need from src, but cloning will definitely fix this for you.
I ran into this issue as well.
@ryanoasis, could what tools and resources are needed and where to find them be clarified in the Font Patcher section? For example, it wasn't immediately clear that the font-patcher script was in the repo, and I didn't know from where the script was expecting to pull the glyphs until I decyphered the Python code in the error message.
There is a new repository with just the font-patcher and all the necessary files as long as @ryanoasis is too busy to create a different repo for the font-patcher only (as he intends to do) ...
Hi, I would just like to +1 @Etherian and @cfbender comments above. It is completely unclear that you need to have the repo cloned locally in order to run the font-patcher. It makes sense after the fact, as the glyphs to patch have to come from somewhere, but it is not mentioned anywhere in the documentation. I ran into this problem when I first tried patching my own fonts as well.
The default values for the font-patcher could also be added in the documentation. For instance, it is unclear which glyph packs are patched by default until you actually run the script. It would be nice to know this priori.
Great project though and works great when you know what to do! Thanks for all the work.
I ran into the exact same problem. You should mention this in the doc. Definitely.
I think this is definitely confusing. Yes @wimstefan is right the goal is to create a separate repo for the patcher (and its required files) and I believe that would mean removing it from this repo to reduce confusion. Thoughts?
This was created a while back but just haven't gotten around to moving stuff yet: https://github.com/NerdFonts/patcher
It's not as simple as just copying the files.. or well if we keep the files in both repos it _could_ be. There is a lot of automation for the builds where things are pretty tightly coupled. Haven't looked into this for some time but understand it is a pain point
Maybe something like a submodule could be useful if you're worried about the file duplication
Most helpful comment
There is a new repository with just the font-patcher and all the necessary files as long as @ryanoasis is too busy to create a different repo for the font-patcher only (as he intends to do) ...