mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 14:08:11 +00:00
16 lines
537 B
Python
16 lines
537 B
Python
|
from __future__ import annotations
|
||
|
|
||
|
|
||
|
def add_font(
|
||
|
font_name: str, font: str | None, defines: list[str], sources: list[str]
|
||
|
) -> None:
|
||
|
if font is not None:
|
||
|
font_filename = font.replace("_upper", "").lower()
|
||
|
defines += [
|
||
|
"TREZOR_FONT_" + font_name + "_ENABLE=" + font,
|
||
|
"TREZOR_FONT_" + font_name + '_INCLUDE=\\"' + font_filename + '.h\\"',
|
||
|
]
|
||
|
sourcefile = "embed/lib/fonts/" + font_filename + ".c"
|
||
|
if sourcefile not in sources:
|
||
|
sources.append(sourcefile)
|