mirror of
https://jihulab.com/mr-one/openpilot.git
synced 2026-10-27 13:03:42 +08:00
ui: use full Noto Sans SC fallback font so Chinese renders correctly
This commit is contained in:
Binary file not shown.
@@ -693,6 +693,10 @@ class GuiApplication(GuiApplicationExt):
|
||||
pass
|
||||
|
||||
def font(self, font_weight: FontWeight = FontWeight.NORMAL) -> rl.Font:
|
||||
# Use the CJK fallback font for languages that need it so every
|
||||
# draw call renders Chinese/Japanese/Korean/Thai glyphs properly.
|
||||
if multilang.requires_font_fallback():
|
||||
return self.fallback_font()
|
||||
return self._fonts[font_weight]
|
||||
|
||||
def fallback_font(self) -> rl.Font:
|
||||
|
||||
Reference in New Issue
Block a user