2024-11-27 23:59:36 +00:00
|
|
|
class Font:
|
2025-10-09 14:02:05 +00:00
|
|
|
def __init__(self, name: str, path: str, stroke_width: int, stroke_width_bold: int, default: bool = False) -> None:
|
2024-11-27 23:59:36 +00:00
|
|
|
self.name = name
|
|
|
|
|
self.path = path
|
|
|
|
|
self.stroke_width = stroke_width
|
2025-10-09 14:02:05 +00:00
|
|
|
self.stroke_width_bold = stroke_width_bold
|
2024-11-27 23:59:36 +00:00
|
|
|
self.selected = default
|
|
|
|
|
|
|
|
|
|
def to_dict(self):
|
|
|
|
|
return {
|
|
|
|
|
"name": self.name,
|
|
|
|
|
"path": self.path,
|
|
|
|
|
"selected": self.selected,
|
2025-10-09 14:02:05 +00:00
|
|
|
"stroke_width": self.stroke_width,
|
|
|
|
|
"stroke_width_bold": self.stroke_width_bold
|
2024-11-27 23:59:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def fonts():
|
|
|
|
|
return {
|
2025-10-09 14:02:05 +00:00
|
|
|
"CYBER": Font("CYBER", "resources/OCRAEXT.TTF", 0, 3, True).to_dict(),
|
|
|
|
|
"ComicMono": Font("Comic Sans Mono", "resources/ComicMono.ttf", 0, 2).to_dict(),
|
|
|
|
|
"EstupidoEspezial": Font("¡¡¡Estupido-Espezial!!!", "resources/Estupido Espezial.ttf", 0, 2).to_dict()
|
2024-11-27 23:59:36 +00:00
|
|
|
}
|