MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / generate

Function generate

Modules/lvgl-module/assets/generate-all.py:11–18  ·  view source on GitHub ↗
(bpp, size, font_file: str, symbols: list, output: str)

Source from the content-addressed store, hash-verified

9 print(f"{filename} already exists, skipping download.")
10
11def generate(bpp, size, font_file: str, symbols: list, output: str):
12 output_file_name = f"{output}_{size}.c"
13 output_path = os.path.join("..", "source-fonts", output_file_name)
14 print(f"Generating {output_file_name}")
15 cmd = "lv_font_conv --no-compress --no-prefilter --bpp {} --size {} --font {} -r {} --format lvgl -o {} --force-fast-kern-format".format(bpp, size, font_file, ",".join(symbols), output_path)
16 ret = os.system(cmd)
17 if ret != 0:
18 raise RuntimeError(f"Font generation failed for {output_file_name} (exit code {ret})")
19
20def read_code_points_map(file_path: str):
21 codepoints = {}

Callers 1

generate_icon_fontsFunction · 0.70

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected