Skip to content

An open-source cross-platform alternative to AirDrop

fix: add CJK font support for Linux (#2719)

Mr.Ebonycat5ce851b60408
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;
}