diff options
Diffstat (limited to 'src/displayapp/fonts/generate.py')
-rw-r--r-- | src/displayapp/fonts/generate.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/displayapp/fonts/generate.py b/src/displayapp/fonts/generate.py index 380ff3d4..d0ae8dee 100644 --- a/src/displayapp/fonts/generate.py +++ b/src/displayapp/fonts/generate.py @@ -43,10 +43,6 @@ def main(): with open(args.config, 'r') as fd: data = json.load(fd) - for enabled_feature in args.features: - if enabled_feature not in data['features']: - sys.exit(f'Error: the requested feature {enabled_feature} does not exist in {args.config}.') - fonts_to_run = args.font if args.removec and args.font: fonts_to_run = [] @@ -66,13 +62,11 @@ def main(): if fonts_to_run and name not in fonts_to_run: continue sources = font.pop('sources') - if 'patches' in font: - patches = font.pop('patches') - else: - patches = None + patches = font.pop('patches') if 'patches' in font else [] + features = font.pop('features') if 'features' in font else [] for enabled_feature in args.features: - if name in data['features'][enabled_feature]: - sources.extend(data['features'][enabled_feature][name]) + if enabled_feature in features: + sources.extend(features[enabled_feature]) font['fonts'] = [FontArg(thing) for thing in sources] line = gen_lvconv_line(f'{name}.c', **font) subprocess.check_call(line) |