From da670108e7f3f9bb391b3067330e957fd33300bc Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Sat, 17 May 2025 00:23:55 +0100 Subject: [PATCH] system/ui: all font weights (#35255) --- system/ui/lib/application.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/system/ui/lib/application.py b/system/ui/lib/application.py index 467cd8c5a8..a2ea392784 100644 --- a/system/ui/lib/application.py +++ b/system/ui/lib/application.py @@ -23,14 +23,15 @@ ASSETS_DIR = files("openpilot.selfdrive").joinpath("assets") FONT_DIR = ASSETS_DIR.joinpath("fonts") class FontWeight(IntEnum): - BLACK = 0 - BOLD = 1 - EXTRA_BOLD = 2 - EXTRA_LIGHT = 3 + THIN = 0 + EXTRA_LIGHT = 1 + LIGHT = 2 + NORMAL = 3 MEDIUM = 4 - NORMAL = 5 - SEMI_BOLD = 6 - THIN = 7 + SEMI_BOLD = 5 + BOLD = 6 + EXTRA_BOLD = 7 + BLACK = 8 class GuiApplication: @@ -153,14 +154,15 @@ class GuiApplication: def _load_fonts(self): font_files = ( - "Inter-Black.ttf", - "Inter-Bold.ttf", - "Inter-ExtraBold.ttf", + "Inter-Thin.ttf", "Inter-ExtraLight.ttf", - "Inter-Medium.ttf", + "Inter-Light.ttf", "Inter-Regular.ttf", + "Inter-Medium.ttf", "Inter-SemiBold.ttf", - "Inter-Thin.ttf" + "Inter-Bold.ttf", + "Inter-ExtraBold.ttf", + "Inter-Black.ttf", ) for index, font_file in enumerate(font_files):