From 47d0a95fd6d6c40411f9d24ae9ddfedf8de6e124 Mon Sep 17 00:00:00 2001 From: David <49467229+TheSecurityDev@users.noreply.github.com> Date: Tue, 28 Oct 2025 16:49:33 -0500 Subject: [PATCH] font: remove unifont anti-aliasing and reduce font size to 16 (#36508) remove unifont anti-aliasing and reduce font size to 16 Co-authored-by: Shane Smiskol --- selfdrive/assets/fonts/process.py | 2 +- system/ui/lib/application.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/assets/fonts/process.py b/selfdrive/assets/fonts/process.py index 06bd4e8f0e..a0d01af148 100755 --- a/selfdrive/assets/fonts/process.py +++ b/selfdrive/assets/fonts/process.py @@ -86,7 +86,7 @@ def _process_font(font_path: Path, codepoints: tuple[int, ...]): print(f"Processing {font_path.name}...") font_size = { - "unifont.otf": 24, # unifont is huge + "unifont.otf": 16, # unifont is only 16x8 or 16x16 pixels per glyph }.get(font_path.name, 200) data = font_path.read_bytes() diff --git a/system/ui/lib/application.py b/system/ui/lib/application.py index 698ed3650b..8e45191bf6 100644 --- a/system/ui/lib/application.py +++ b/system/ui/lib/application.py @@ -405,7 +405,8 @@ class GuiApplication: with as_file(FONT_DIR) as fspath: fnt_path = fspath / font_weight_file font = rl.load_font(fnt_path.as_posix()) - rl.set_texture_filter(font.texture, rl.TextureFilter.TEXTURE_FILTER_BILINEAR) + if font_weight_file != FontWeight.UNIFONT: + rl.set_texture_filter(font.texture, rl.TextureFilter.TEXTURE_FILTER_BILINEAR) self._fonts[font_weight_file] = font rl.gui_set_font(self._fonts[FontWeight.NORMAL])