-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
46 lines (33 loc) · 1.16 KB
/
main.py
File metadata and controls
46 lines (33 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# main.py
import sys
from core.controller import ConversionController
from app.main_window import ImageConverterApp
from core.fonts import load_font, unload_font
from core.i18n import load_translations
from core.resources import resource_path
# -------------------------------------------------------------------
# Configuración global
# -------------------------------------------------------------------
load_translations("es")
FONT_PATHS = [
resource_path("assets/fonts/InterVariable.ttf"),
]
# -------------------------------------------------------------------
# Punto de entrada
# -------------------------------------------------------------------
def main():
# Cargar fuentes personalizadas
for font_path in FONT_PATHS:
load_font(font_path)
# Inicializar controlador (core logic)
controller = ConversionController()
# Inicializar ventana principal e inyectar controller
app = ImageConverterApp(controller)
try:
app.mainloop()
finally:
# Limpieza de recursos (especialmente útil en Windows)
for font_path in FONT_PATHS:
unload_font(font_path)
if __name__ == "__main__":
main()