From 8b2e1c69f2056eaeaf11d3795bf865b6b4c21ff1 Mon Sep 17 00:00:00 2001 From: Yehoshua Pesach Wallach Date: Wed, 27 Apr 2022 18:18:02 +0300 Subject: [PATCH] fotngen: check for lv_font_conv --- src/displayapp/fonts/generate.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/displayapp/fonts/generate.py b/src/displayapp/fonts/generate.py index 5cd9fe51..4509ecc1 100755 --- a/src/displayapp/fonts/generate.py +++ b/src/displayapp/fonts/generate.py @@ -3,6 +3,7 @@ import io import sys import json +import shutil import typing import os.path import argparse @@ -36,6 +37,8 @@ def main(): ap.add_argument('-f', '--font', type=str, action='append', help='Choose specific fonts to generate (default: all)', default=[]) args = ap.parse_args() + if not shutil.which('lv_font_conv'): + sys.exit(f'Missing lv_font_conv. (make sure it is installed and in PATH)') if not os.path.exists(args.config): sys.exit(f'Error: the config file {args.config} does not exist.') if not os.access(args.config, os.R_OK):