diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-07-10 16:06:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-10 16:06:24 +0200 |
| commit | 9f4e397947fd0d1978fbef687e7cab9b6d98ea52 (patch) | |
| tree | bbb26cd27e009bbcb6fb6515b0f425ac0b7faa56 /lib/lettering/utils.py | |
| parent | ef6df385c30f85c739dc5c5098134529ed52d160 (diff) | |
Lettering: skip font with corrupt json file (#3071)
* lettering: warn about corrupt/missing json file
* ignore hidden directories and files placed directly in the font folder
Diffstat (limited to 'lib/lettering/utils.py')
| -rw-r--r-- | lib/lettering/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/lettering/utils.py b/lib/lettering/utils.py index d1ec1b8e..1ba1bb9a 100644 --- a/lib/lettering/utils.py +++ b/lib/lettering/utils.py @@ -23,6 +23,8 @@ def get_font_list(): continue for font_dir in font_dirs: + if not os.path.isdir(os.path.join(font_path, font_dir)) or font_dir.startswith('.'): + continue font = Font(os.path.join(font_path, font_dir)) if font.marked_custom_font_name == "" or font.marked_custom_font_id == "": continue |
