Show Chinese, Japanese and Korean text on Android 9

Android before 10 has no font lookup, so Breeze's system face there is
Roboto alone and every Chinese, Japanese or Korean character drew as a
question mark. Register the bundled locale face on Android as well when
the language needs one; Latin languages keep the lighter startup.
This commit is contained in:
waozi committed 2026-10-29 11:45:16 -03:00
1 parent d3430e4f6a
commit 42b01535f1
1 file changed
+4 -1
+4 -1
View File
@@ -109,7 +109,10 @@ LoadLocaleFont :: (app: *InnerBreeze) -> bool {
system_font = RegisterSystemTypeface("ui")
}
system_fonts_ready = system_font
if system_font && AndroidPlatform() == 0 {
// The bundled locale face supplies what the system face lacks. Android
// before 10 has no font lookup, so Chinese, Japanese and Korean text
// needs it there too; Latin locales keep Android's lighter startup.
if system_font && (AndroidPlatform() == 0 || path != FONT_LATIN) {
RegisterFontAsset("ui-locale", path, null, 0)
} else if !system_font && !RegisterFontAsset("ui", path, null, 0) {
return false