Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
font-patcher: Fix behavior when trying to patch non-font files
[why] When the file specified to be patched is not a font file the patcher run errors out with an out of index runtime error: Traceback (most recent call last): File "/home/fini/extra/git/nerd-fonts/font-patcher", line 2155, in <module> main() File "/home/fini/extra/git/nerd-fonts/font-patcher", line 2147, in main patcher.generate(sourceFonts) File "/home/fini/extra/git/nerd-fonts/font-patcher", line 415, in generate sourceFont = sourceFonts[0] ~~~~~~~~~~~^^^ IndexError: list index out of range [how] Do not assume that the specified file will be a font file but rather check if fontforge detects a font in the file and error out if there is no font found. Fixes: #1647 Reported-by: Kristopher James Kent <[email protected]> Signed-off-by: Fini Jastrow <[email protected]>
- Loading branch information