Add arguments to generate-fonts.py

This commit is contained in:
0x0000ff 2023-12-26 23:20:42 +00:00
parent b445ba44d8
commit 1aa1e32bca

View file

@ -18,11 +18,13 @@ class Source(object):
self.symbols = d.get('symbols') self.symbols = d.get('symbols')
def gen_lvconv_line(lv_font_conv: str, dest: str, size: int, bpp: int, format: str, sources: typing.List[Source], compress:bool=False): def gen_lvconv_line(lv_font_conv: str, dest: str, size: int, bpp: int, format: str, sources: typing.List[Source], compress:bool=False, subpixel: bool=False):
if format != "lvgl" and format != "bin": if format != "lvgl" and format != "bin":
format = "bin" if dest.lower().endswith(".bin") else "lvgl" format = "bin" if dest.lower().endswith(".bin") else "lvgl"
args = [lv_font_conv, '--size', str(size), '--output', dest, '--bpp', str(bpp), '--format', format] args = [lv_font_conv, '--size', str(size), '--output', dest, '--bpp', str(bpp), '--format', format]
if subpixel:
args.append('--lcd')
if not compress: if not compress:
args.append('--no-compress') args.append('--no-compress')
for source in sources: for source in sources: