From 5ce851b60408ea42956a752998b9fa3d7938ca05 Mon Sep 17 00:00:00 2001 From: "Mr.Ebonycat" Date: Sat, 4 Oct 2025 06:01:33 +0800 Subject: [PATCH] fix: add CJK font support for Linux (#2719) --- app/lib/config/theme.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/lib/config/theme.dart b/app/lib/config/theme.dart index 21925b3c..69844d88 100644 --- a/app/lib/config/theme.dart +++ b/app/lib/config/theme.dart @@ -40,6 +40,14 @@ ThemeData getTheme(ColorMode colorMode, Brightness brightness, DynamicColors? dy AppLocale.zhHk || AppLocale.zhTw => 'Microsoft JhengHei UI', _ => 'Segoe UI Variable Display', }; + } else if (checkPlatform([TargetPlatform.linux])) { + fontFamily = switch (LocaleSettings.currentLocale) { + AppLocale.ja => 'Noto Sans CJK JP', + AppLocale.ko => 'Noto Sans CJK KR', + AppLocale.zhCn => 'Noto Sans CJK SC', + AppLocale.zhHk || AppLocale.zhTw => 'Noto Sans CJK TC', + _ => 'Noto Sans', + }; } else { fontFamily = null; }