fontgen: added missing requested font check

This commit is contained in:
Yehoshua Pesach Wallach 2022-04-19 14:41:17 +03:00 committed by JF
parent 875b9c4bc5
commit ac0dc5ff47

View File

@ -56,6 +56,12 @@ def main():
else: else:
sys.exit(f'requested to remove .c extension, but {font} does not have it.') 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(): for (name,font) in data['fonts'].items():
if fonts_to_run and name not in fonts_to_run: if fonts_to_run and name not in fonts_to_run:
continue continue