mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-06 17:09:11 +00:00
chore(core): remove obsolete font names from blobs
[no changelog]
This commit is contained in:
parent
8b4936926c
commit
419737db7c
@ -280,11 +280,14 @@ class FaceProcessor:
|
|||||||
def _rs_file_name(self) -> Path:
|
def _rs_file_name(self) -> Path:
|
||||||
return (
|
return (
|
||||||
RUST_FONTS_DEST
|
RUST_FONTS_DEST
|
||||||
/ f"layout_{LAYOUT_NAME}"
|
/ f"layout_{LAYOUT_NAME.lower()}"
|
||||||
/ "fonts"
|
/ "fonts"
|
||||||
/ f"font_{self.fontname}.rs"
|
/ f"font_{self.fontname}.rs"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def _foreign_json_name(self, upper_cased: bool, lang: str) -> str:
|
||||||
|
return f"font_{self.fontname}{'_upper' if upper_cased else ''}_{lang}.json"
|
||||||
|
|
||||||
def write_files(self) -> None:
|
def write_files(self) -> None:
|
||||||
# JSON files:
|
# JSON files:
|
||||||
if self.gen_normal:
|
if self.gen_normal:
|
||||||
@ -310,10 +313,8 @@ class FaceProcessor:
|
|||||||
glyph = Glyph.from_face(self.face, c, self.shaveX)
|
glyph = Glyph.from_face(self.face, c, self.shaveX)
|
||||||
glyph.print_metrics()
|
glyph.print_metrics()
|
||||||
fontdata[map_from] = glyph.to_bytes(self.bpp).hex()
|
fontdata[map_from] = glyph.to_bytes(self.bpp).hex()
|
||||||
file = (
|
file_name = self._foreign_json_name(upper_cased, lang)
|
||||||
JSON_FONTS_DEST
|
file = JSON_FONTS_DEST / file_name
|
||||||
/ f"font_{self.fontname}{'_upper' if upper_cased else ''}_{lang}.json"
|
|
||||||
)
|
|
||||||
json_content = json.dumps(fontdata, indent=2, ensure_ascii=False)
|
json_content = json.dumps(fontdata, indent=2, ensure_ascii=False)
|
||||||
file.write_text(json_content + "\n")
|
file.write_text(json_content + "\n")
|
||||||
|
|
||||||
@ -473,7 +474,7 @@ class FaceProcessor:
|
|||||||
|
|
||||||
def gen_layout_bolt():
|
def gen_layout_bolt():
|
||||||
global LAYOUT_NAME
|
global LAYOUT_NAME
|
||||||
LAYOUT_NAME = "bolt"
|
LAYOUT_NAME = "Bolt"
|
||||||
FaceProcessor("TTHoves", "Regular", 21, ext="otf", font_idx=1).write_files()
|
FaceProcessor("TTHoves", "Regular", 21, ext="otf", font_idx=1).write_files()
|
||||||
FaceProcessor("TTHoves", "DemiBold", 21, ext="otf", font_idx=5).write_files()
|
FaceProcessor("TTHoves", "DemiBold", 21, ext="otf", font_idx=5).write_files()
|
||||||
FaceProcessor(
|
FaceProcessor(
|
||||||
@ -490,7 +491,7 @@ def gen_layout_bolt():
|
|||||||
|
|
||||||
def gen_layout_caesar():
|
def gen_layout_caesar():
|
||||||
global LAYOUT_NAME
|
global LAYOUT_NAME
|
||||||
LAYOUT_NAME = "caesar"
|
LAYOUT_NAME = "Caesar"
|
||||||
FaceProcessor(
|
FaceProcessor(
|
||||||
"PixelOperator",
|
"PixelOperator",
|
||||||
"Regular",
|
"Regular",
|
||||||
@ -527,7 +528,7 @@ def gen_layout_caesar():
|
|||||||
|
|
||||||
def gen_layout_delizia():
|
def gen_layout_delizia():
|
||||||
global LAYOUT_NAME
|
global LAYOUT_NAME
|
||||||
LAYOUT_NAME = "delizia"
|
LAYOUT_NAME = "Delizia"
|
||||||
# FIXME: BIG font id not needed
|
# FIXME: BIG font id not needed
|
||||||
FaceProcessor("TTSatoshi", "DemiBold", 42, ext="otf", font_idx=1).write_files()
|
FaceProcessor("TTSatoshi", "DemiBold", 42, ext="otf", font_idx=1).write_files()
|
||||||
FaceProcessor("TTSatoshi", "DemiBold", 21, ext="otf", font_idx=1).write_files()
|
FaceProcessor("TTSatoshi", "DemiBold", 21, ext="otf", font_idx=1).write_files()
|
||||||
@ -543,10 +544,11 @@ def gen_layout_delizia():
|
|||||||
font_idx_upper=7,
|
font_idx_upper=7,
|
||||||
).write_files()
|
).write_files()
|
||||||
|
|
||||||
|
|
||||||
LAYOUTS = {
|
LAYOUTS = {
|
||||||
"bolt": gen_layout_bolt,
|
"Bolt": gen_layout_bolt,
|
||||||
"caesar": gen_layout_caesar,
|
"Caesar": gen_layout_caesar,
|
||||||
"delizia": gen_layout_delizia,
|
"Delizia": gen_layout_delizia,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,44 +1,33 @@
|
|||||||
{
|
{
|
||||||
"fonts": {
|
"fonts": {
|
||||||
"Bolt": {
|
"Bolt": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_cs.json",
|
"1": "font_tthoves_regular_21_cs.json",
|
||||||
"2_FONT_BOLD": null,
|
"3": "font_robotomono_medium_20_cs.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_cs.json",
|
"5": "font_tthoves_demibold_21_cs.json",
|
||||||
"4_FONT_BIG": null,
|
"7": "font_tthoves_bold_17_upper_cs.json"
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_cs.json",
|
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_cs.json",
|
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Caesar": {
|
"Caesar": {
|
||||||
"1_FONT_NORMAL": "font_pixeloperator_regular_8_cs.json",
|
"1": "font_pixeloperator_regular_8_cs.json",
|
||||||
"2_FONT_BOLD": "font_pixeloperator_bold_8_cs.json",
|
"2": "font_pixeloperator_bold_8_cs.json",
|
||||||
"3_FONT_MONO": "font_pixeloperatormono_regular_8_cs.json",
|
"3": "font_pixeloperatormono_regular_8_cs.json",
|
||||||
"4_FONT_BIG": "font_unifont_regular_16_cs.json",
|
"4": "font_unifont_regular_16_cs.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_cs.json",
|
"5": "font_unifont_bold_16_cs.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_cs.json",
|
"6": "font_pixeloperator_regular_8_upper_cs.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_cs.json",
|
"7": "font_pixeloperator_bold_8_upper_cs.json"
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Delizia": {
|
"Delizia": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_cs.json",
|
"1": "font_ttsatoshi_demibold_21_cs.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_cs.json",
|
"2": "font_ttsatoshi_demibold_21_cs.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_cs.json",
|
"3": "font_robotomono_medium_21_cs.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_cs.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_cs.json",
|
"8": "font_ttsatoshi_demibold_18_cs.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_cs.json"
|
|
||||||
},
|
},
|
||||||
"Eckhart": {
|
"Eckhart": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_cs.json",
|
"1": "font_ttsatoshi_demibold_21_cs.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_cs.json",
|
"2": "font_ttsatoshi_demibold_21_cs.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_cs.json",
|
"3": "font_robotomono_medium_21_cs.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_cs.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_cs.json",
|
"8": "font_ttsatoshi_demibold_18_cs.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_cs.json"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
@ -1,44 +1,33 @@
|
|||||||
{
|
{
|
||||||
"fonts": {
|
"fonts": {
|
||||||
"Bolt": {
|
"Bolt": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_de.json",
|
"1": "font_tthoves_regular_21_de.json",
|
||||||
"2_FONT_BOLD": null,
|
"3": "font_robotomono_medium_20_de.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_de.json",
|
"5": "font_tthoves_demibold_21_de.json",
|
||||||
"4_FONT_BIG": null,
|
"7": "font_tthoves_bold_17_upper_de.json"
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_de.json",
|
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_de.json",
|
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Caesar": {
|
"Caesar": {
|
||||||
"1_FONT_NORMAL": "font_pixeloperator_regular_8_de.json",
|
"1": "font_pixeloperator_regular_8_de.json",
|
||||||
"2_FONT_BOLD": "font_pixeloperator_bold_8_de.json",
|
"2": "font_pixeloperator_bold_8_de.json",
|
||||||
"3_FONT_MONO": "font_pixeloperatormono_regular_8_de.json",
|
"3": "font_pixeloperatormono_regular_8_de.json",
|
||||||
"4_FONT_BIG": "font_unifont_regular_16_de.json",
|
"4": "font_unifont_regular_16_de.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_de.json",
|
"5": "font_unifont_bold_16_de.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_de.json",
|
"6": "font_pixeloperator_regular_8_upper_de.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_de.json",
|
"7": "font_pixeloperator_bold_8_upper_de.json"
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Delizia": {
|
"Delizia": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_de.json",
|
"1": "font_ttsatoshi_demibold_21_de.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_de.json",
|
"2": "font_ttsatoshi_demibold_21_de.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_de.json",
|
"3": "font_robotomono_medium_21_de.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_de.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_de.json",
|
"8": "font_ttsatoshi_demibold_18_de.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_de.json"
|
|
||||||
},
|
},
|
||||||
"Eckhart": {
|
"Eckhart": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_de.json",
|
"1": "font_ttsatoshi_demibold_21_de.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_de.json",
|
"2": "font_ttsatoshi_demibold_21_de.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_de.json",
|
"3": "font_robotomono_medium_21_de.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_de.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_de.json",
|
"8": "font_ttsatoshi_demibold_18_de.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_de.json"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
@ -1,44 +1,33 @@
|
|||||||
{
|
{
|
||||||
"fonts": {
|
"fonts": {
|
||||||
"Bolt": {
|
"Bolt": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_es.json",
|
"1": "font_tthoves_regular_21_es.json",
|
||||||
"2_FONT_BOLD": null,
|
"3": "font_robotomono_medium_20_es.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_es.json",
|
"5": "font_tthoves_demibold_21_es.json",
|
||||||
"4_FONT_BIG": null,
|
"7": "font_tthoves_bold_17_upper_es.json"
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_es.json",
|
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_es.json",
|
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Caesar": {
|
"Caesar": {
|
||||||
"1_FONT_NORMAL": "font_pixeloperator_regular_8_es.json",
|
"1": "font_pixeloperator_regular_8_es.json",
|
||||||
"2_FONT_BOLD": "font_pixeloperator_bold_8_es.json",
|
"2": "font_pixeloperator_bold_8_es.json",
|
||||||
"3_FONT_MONO": "font_pixeloperatormono_regular_8_es.json",
|
"3": "font_pixeloperatormono_regular_8_es.json",
|
||||||
"4_FONT_BIG": "font_unifont_regular_16_es.json",
|
"4": "font_unifont_regular_16_es.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_es.json",
|
"5": "font_unifont_bold_16_es.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_es.json",
|
"6": "font_pixeloperator_regular_8_upper_es.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_es.json",
|
"7": "font_pixeloperator_bold_8_upper_es.json"
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Delizia": {
|
"Delizia": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_es.json",
|
"1": "font_ttsatoshi_demibold_21_es.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_es.json",
|
"2": "font_ttsatoshi_demibold_21_es.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_es.json",
|
"3": "font_robotomono_medium_21_es.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_es.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_es.json",
|
"8": "font_ttsatoshi_demibold_18_es.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_es.json"
|
|
||||||
},
|
},
|
||||||
"Eckhart": {
|
"Eckhart": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_es.json",
|
"1": "font_ttsatoshi_demibold_21_es.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_es.json",
|
"2": "font_ttsatoshi_demibold_21_es.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_es.json",
|
"3": "font_robotomono_medium_21_es.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_es.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_es.json",
|
"8": "font_ttsatoshi_demibold_18_es.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_es.json"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
@ -1,44 +1,33 @@
|
|||||||
{
|
{
|
||||||
"fonts": {
|
"fonts": {
|
||||||
"Bolt": {
|
"Bolt": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_fr.json",
|
"1": "font_tthoves_regular_21_fr.json",
|
||||||
"2_FONT_BOLD": null,
|
"3": "font_robotomono_medium_20_fr.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_fr.json",
|
"5": "font_tthoves_demibold_21_fr.json",
|
||||||
"4_FONT_BIG": null,
|
"7": "font_tthoves_bold_17_upper_fr.json"
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_fr.json",
|
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_fr.json",
|
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Caesar": {
|
"Caesar": {
|
||||||
"1_FONT_NORMAL": "font_pixeloperator_regular_8_fr.json",
|
"1": "font_pixeloperator_regular_8_fr.json",
|
||||||
"2_FONT_BOLD": "font_pixeloperator_bold_8_fr.json",
|
"2": "font_pixeloperator_bold_8_fr.json",
|
||||||
"3_FONT_MONO": "font_pixeloperatormono_regular_8_fr.json",
|
"3": "font_pixeloperatormono_regular_8_fr.json",
|
||||||
"4_FONT_BIG": "font_unifont_regular_16_fr.json",
|
"4": "font_unifont_regular_16_fr.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_fr.json",
|
"5": "font_unifont_bold_16_fr.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_fr.json",
|
"6": "font_pixeloperator_regular_8_upper_fr.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_fr.json",
|
"7": "font_pixeloperator_bold_8_upper_fr.json"
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Delizia": {
|
"Delizia": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_fr.json",
|
"1": "font_ttsatoshi_demibold_21_fr.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_fr.json",
|
"2": "font_ttsatoshi_demibold_21_fr.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_fr.json",
|
"3": "font_robotomono_medium_21_fr.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_fr.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_fr.json",
|
"8": "font_ttsatoshi_demibold_18_fr.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_fr.json"
|
|
||||||
},
|
},
|
||||||
"Eckhart": {
|
"Eckhart": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_fr.json",
|
"1": "font_ttsatoshi_demibold_21_fr.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_fr.json",
|
"2": "font_ttsatoshi_demibold_21_fr.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_fr.json",
|
"3": "font_robotomono_medium_21_fr.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_fr.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_fr.json",
|
"8": "font_ttsatoshi_demibold_18_fr.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_fr.json"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
@ -1,44 +1,33 @@
|
|||||||
{
|
{
|
||||||
"fonts": {
|
"fonts": {
|
||||||
"Bolt": {
|
"Bolt": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_it.json",
|
"1": "font_tthoves_regular_21_it.json",
|
||||||
"2_FONT_BOLD": null,
|
"3": "font_robotomono_medium_20_it.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_it.json",
|
"5": "font_tthoves_demibold_21_it.json",
|
||||||
"4_FONT_BIG": null,
|
"7": "font_tthoves_bold_17_upper_it.json"
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_it.json",
|
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_it.json",
|
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Caesar": {
|
"Caesar": {
|
||||||
"1_FONT_NORMAL": "font_pixeloperator_regular_8_it.json",
|
"1": "font_pixeloperator_regular_8_it.json",
|
||||||
"2_FONT_BOLD": "font_pixeloperator_bold_8_it.json",
|
"2": "font_pixeloperator_bold_8_it.json",
|
||||||
"3_FONT_MONO": "font_pixeloperatormono_regular_8_it.json",
|
"3": "font_pixeloperatormono_regular_8_it.json",
|
||||||
"4_FONT_BIG": "font_unifont_regular_16_it.json",
|
"4": "font_unifont_regular_16_it.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_it.json",
|
"5": "font_unifont_bold_16_it.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_it.json",
|
"6": "font_pixeloperator_regular_8_upper_it.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_it.json",
|
"7": "font_pixeloperator_bold_8_upper_it.json"
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Delizia": {
|
"Delizia": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_it.json",
|
"1": "font_ttsatoshi_demibold_21_it.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_it.json",
|
"2": "font_ttsatoshi_demibold_21_it.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_it.json",
|
"3": "font_robotomono_medium_21_it.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_it.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_it.json",
|
"8": "font_ttsatoshi_demibold_18_it.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_it.json"
|
|
||||||
},
|
},
|
||||||
"Eckhart": {
|
"Eckhart": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_it.json",
|
"1": "font_ttsatoshi_demibold_21_it.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_it.json",
|
"2": "font_ttsatoshi_demibold_21_it.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_it.json",
|
"3": "font_robotomono_medium_21_it.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_it.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_it.json",
|
"8": "font_ttsatoshi_demibold_18_it.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_it.json"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
@ -1,44 +1,33 @@
|
|||||||
{
|
{
|
||||||
"fonts": {
|
"fonts": {
|
||||||
"Bolt": {
|
"Bolt": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_pt.json",
|
"1": "font_tthoves_regular_21_pt.json",
|
||||||
"2_FONT_BOLD": null,
|
"3": "font_robotomono_medium_20_pt.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_pt.json",
|
"5": "font_tthoves_demibold_21_pt.json",
|
||||||
"4_FONT_BIG": null,
|
"7": "font_tthoves_bold_17_upper_pt.json"
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_pt.json",
|
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_pt.json",
|
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Caesar": {
|
"Caesar": {
|
||||||
"1_FONT_NORMAL": "font_pixeloperator_regular_8_pt.json",
|
"1": "font_pixeloperator_regular_8_pt.json",
|
||||||
"2_FONT_BOLD": "font_pixeloperator_bold_8_pt.json",
|
"2": "font_pixeloperator_bold_8_pt.json",
|
||||||
"3_FONT_MONO": "font_pixeloperatormono_regular_8_pt.json",
|
"3": "font_pixeloperatormono_regular_8_pt.json",
|
||||||
"4_FONT_BIG": "font_unifont_regular_16_pt.json",
|
"4": "font_unifont_regular_16_pt.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_pt.json",
|
"5": "font_unifont_bold_16_pt.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_pt.json",
|
"6": "font_pixeloperator_regular_8_upper_pt.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_pt.json",
|
"7": "font_pixeloperator_bold_8_upper_pt.json"
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Delizia": {
|
"Delizia": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_pt.json",
|
"1": "font_ttsatoshi_demibold_21_pt.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_pt.json",
|
"2": "font_ttsatoshi_demibold_21_pt.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_pt.json",
|
"3": "font_robotomono_medium_21_pt.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_pt.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_pt.json",
|
"8": "font_ttsatoshi_demibold_18_pt.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_pt.json"
|
|
||||||
},
|
},
|
||||||
"Eckhart": {
|
"Eckhart": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_pt.json",
|
"1": "font_ttsatoshi_demibold_21_pt.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_pt.json",
|
"2": "font_ttsatoshi_demibold_21_pt.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_pt.json",
|
"3": "font_robotomono_medium_21_pt.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_pt.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_pt.json",
|
"8": "font_ttsatoshi_demibold_18_pt.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_pt.json"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
@ -1,44 +1,33 @@
|
|||||||
{
|
{
|
||||||
"fonts": {
|
"fonts": {
|
||||||
"Bolt": {
|
"Bolt": {
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_tr.json",
|
"1": "font_tthoves_regular_21_tr.json",
|
||||||
"2_FONT_BOLD": null,
|
"3": "font_robotomono_medium_20_tr.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_tr.json",
|
"5": "font_tthoves_demibold_21_tr.json",
|
||||||
"4_FONT_BIG": null,
|
"7": "font_tthoves_bold_17_upper_tr.json"
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_tr.json",
|
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": "font_tthoves_bold_17_upper_tr.json",
|
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Caesar": {
|
"Caesar": {
|
||||||
"1_FONT_NORMAL": "font_pixeloperator_regular_8_tr.json",
|
"1": "font_pixeloperator_regular_8_tr.json",
|
||||||
"2_FONT_BOLD": "font_pixeloperator_bold_8_tr.json",
|
"2": "font_pixeloperator_bold_8_tr.json",
|
||||||
"3_FONT_MONO": "font_pixeloperatormono_regular_8_tr.json",
|
"3": "font_pixeloperatormono_regular_8_tr.json",
|
||||||
"4_FONT_BIG": "font_unifont_regular_16_tr.json",
|
"4": "font_unifont_regular_16_tr.json",
|
||||||
"5_FONT_DEMIBOLD": "font_unifont_bold_16_tr.json",
|
"5": "font_unifont_bold_16_tr.json",
|
||||||
"6_FONT_NORMAL_UPPER": "font_pixeloperator_regular_8_upper_tr.json",
|
"6": "font_pixeloperator_regular_8_upper_tr.json",
|
||||||
"7_FONT_BOLD_UPPER": "font_pixeloperator_bold_8_upper_tr.json",
|
"7": "font_pixeloperator_bold_8_upper_tr.json"
|
||||||
"8_FONT_SUB": null
|
|
||||||
},
|
},
|
||||||
"Delizia": {
|
"Delizia": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_tr.json",
|
"1": "font_ttsatoshi_demibold_21_tr.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_tr.json",
|
"2": "font_ttsatoshi_demibold_21_tr.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_tr.json",
|
"3": "font_robotomono_medium_21_tr.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_tr.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_tr.json",
|
"8": "font_ttsatoshi_demibold_18_tr.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_tr.json"
|
|
||||||
},
|
},
|
||||||
"Eckhart": {
|
"Eckhart": {
|
||||||
"1_FONT_NORMAL": "font_ttsatoshi_demibold_21_tr.json",
|
"1": "font_ttsatoshi_demibold_21_tr.json",
|
||||||
"2_FONT_BOLD": "font_ttsatoshi_demibold_21_tr.json",
|
"2": "font_ttsatoshi_demibold_21_tr.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_21_tr.json",
|
"3": "font_robotomono_medium_21_tr.json",
|
||||||
"4_FONT_BIG": null,
|
"5": "font_ttsatoshi_demibold_21_tr.json",
|
||||||
"5_FONT_DEMIBOLD": "font_ttsatoshi_demibold_21_tr.json",
|
"8": "font_ttsatoshi_demibold_18_tr.json"
|
||||||
"6_FONT_NORMAL_UPPER": null,
|
|
||||||
"7_FONT_BOLD_UPPER": null,
|
|
||||||
"8_FONT_SUB": "font_ttsatoshi_demibold_18_tr.json"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
|
@ -189,13 +189,12 @@ class FontsTable(BlobTable):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def from_dir(cls, model_fonts: dict[str, str], font_dir: Path) -> Self:
|
def from_dir(cls, model_fonts: dict[str, str], font_dir: Path) -> Self:
|
||||||
"""Example structure of the font dict:
|
"""Example structure of the font dict:
|
||||||
(The beginning number corresponds to the C representation of each font)
|
(The key number corresponds to the index representation of each font set in `gen_font.py`)
|
||||||
{
|
{
|
||||||
"1_FONT_NORMAL": "font_tthoves_regular_21_cs.json",
|
"1": "font_tthoves_regular_21_cs.json",
|
||||||
"2_FONT_BOLD": "font_tthoves_bold_17_cs.json",
|
"3": "font_robotomono_medium_20_cs.json",
|
||||||
"3_FONT_MONO": "font_robotomono_medium_20_cs.json",
|
"5": "font_tthoves_demibold_21_cs.json",
|
||||||
"4_FONT_BIG": null,
|
"7": "font_tthoves_bold_17_upper_cs.json"
|
||||||
"5_FONT_DEMIBOLD": "font_tthoves_demibold_21_cs.json"
|
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
fonts = {}
|
fonts = {}
|
||||||
@ -203,7 +202,7 @@ class FontsTable(BlobTable):
|
|||||||
if not file_name:
|
if not file_name:
|
||||||
continue
|
continue
|
||||||
file_path = font_dir / file_name
|
file_path = font_dir / file_name
|
||||||
font_num = int(font_name.split("_")[0])
|
font_num = int(font_name)
|
||||||
try:
|
try:
|
||||||
fonts[font_num] = Font.from_file(file_path).build()
|
fonts[font_num] = Font.from_file(file_path).build()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user