From 80b516cb68328a0639accfe1eb260e8ec4611e5b Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 20 Oct 2025 19:29:27 -0700 Subject: [PATCH] Revert "try jp" This reverts commit d0524b10110104baafcdc1ec385c3d57bc5ef901. --- selfdrive/assets/fonts/NotoSansJP-Regular.ttf | 3 -- system/ui/lib/application.py | 35 ++++++------------- 2 files changed, 10 insertions(+), 28 deletions(-) delete mode 100644 selfdrive/assets/fonts/NotoSansJP-Regular.ttf diff --git a/selfdrive/assets/fonts/NotoSansJP-Regular.ttf b/selfdrive/assets/fonts/NotoSansJP-Regular.ttf deleted file mode 100644 index 6df2f0a66e..0000000000 --- a/selfdrive/assets/fonts/NotoSansJP-Regular.ttf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f32915916d2d6f35bb0d3d7ef0784504914bf0235afb02eec552bd14d06d3552 -size 5450308 diff --git a/system/ui/lib/application.py b/system/ui/lib/application.py index 17cd4cabb5..aeeadcebb4 100644 --- a/system/ui/lib/application.py +++ b/system/ui/lib/application.py @@ -41,15 +41,15 @@ FONT_DIR = ASSETS_DIR.joinpath("fonts") class FontWeight(StrEnum): - THIN = "NotoSansJP-Regular.ttf" - EXTRA_LIGHT = "NotoSansJP-Regular.ttf" - LIGHT = "NotoSansJP-Regular.ttf" - NORMAL = "NotoSansJP-Regular.ttf" - MEDIUM = "NotoSansJP-Regular.ttf" - SEMI_BOLD = "NotoSansJP-Regular.ttf" - BOLD = "NotoSansJP-Regular.ttf" - EXTRA_BOLD = "NotoSansJP-Regular.ttf" - BLACK = "NotoSansJP-Regular.ttf" + THIN = "Inter-Thin.ttf" + EXTRA_LIGHT = "Inter-ExtraLight.ttf" + LIGHT = "Inter-Light.ttf" + NORMAL = "Inter-Regular.ttf" + MEDIUM = "Inter-Medium.ttf" + SEMI_BOLD = "Inter-SemiBold.ttf" + BOLD = "Inter-Bold.ttf" + EXTRA_BOLD = "Inter-ExtraBold.ttf" + BLACK = "Inter-Black.ttf" @dataclass @@ -353,23 +353,8 @@ class GuiApplication: all_chars = set() for layout in KEYBOARD_LAYOUTS.values(): all_chars.update(key for row in layout for key in row) - - # Ensure Japanese scripts and typical punctuation/fullwidth forms are loaded for NotoSansJP - jp_ranges = [ - (0x3000, 0x303F), # CJK Symbols and Punctuation - (0x3040, 0x309F), # Hiragana - (0x30A0, 0x30FF), # Katakana - (0x31F0, 0x31FF), # Katakana Phonetic Extensions - (0xFF00, 0xFFEF), # Halfwidth and Fullwidth Forms - (0x4E00, 0x9FFF), # CJK Unified Ideographs (basic block) - ] - for start, end in jp_ranges: - all_chars.update(chr(cp) for cp in range(start, end + 1)) - - # Keep common UI symbols - all_chars.update(list("–✓×°§•")) - all_chars = "".join(all_chars) + all_chars += "–✓×°§•" codepoint_count = rl.ffi.new("int *", 1) codepoints = rl.load_codepoints(all_chars, codepoint_count)