From ac0dc5ff4790f83c972387c3ef4d7e55611643ce Mon Sep 17 00:00:00 2001 From: Yehoshua Pesach Wallach Date: Tue, 19 Apr 2022 14:41:17 +0300 Subject: [PATCH] fontgen: added missing requested font check --- src/displayapp/fonts/generate.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/displayapp/fonts/generate.py b/src/displayapp/fonts/generate.py index e142db48..380ff3d4 100644 --- a/src/displayapp/fonts/generate.py +++ b/src/displayapp/fonts/generate.py @@ -56,6 +56,12 @@ def main(): else: sys.exit(f'requested to remove .c extension, but {font} does not have it.') + if fonts_to_run: + d = set(fonts_to_run).difference(data['fonts'].keys()) + if d: + print(f'Warning: requested font{"s" if len(d)>1 else ""} missing: {" ".join(d)}') + fonts_to_run = list(set(fonts_to_run).intersection(data['fonts'].keys())) + for (name,font) in data['fonts'].items(): if fonts_to_run and name not in fonts_to_run: continue