fontgen: added missing requested font check

main
Yehoshua Pesach Wallach 2022-04-19 14:41:17 +07:00 committed by JF
parent 875b9c4bc5
commit ac0dc5ff47
1 changed files with 6 additions and 0 deletions

@ -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