File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Flow.Launcher.Infrastructure/UserSettings Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 33using System . Diagnostics ;
44using System . Drawing ;
55using System . Globalization ;
6+ using System . Linq ;
67using System . Text . Json . Serialization ;
78using System . Windows ;
9+ using System . Windows . Media ;
810using CommunityToolkit . Mvvm . DependencyInjection ;
911using Flow . Launcher . Infrastructure . Hotkey ;
1012using Flow . Launcher . Infrastructure . Logger ;
@@ -41,12 +43,32 @@ public static string GetSystemDefaultFont()
4143 {
4244 try
4345 {
46+ var systemLanguage = CultureInfo . CurrentCulture . Name ;
4447 var font = SystemFonts . MessageFontFamily ;
45-
48+
49+ // Set Noto Sans as default font for specific languages
50+ switch ( systemLanguage )
51+ {
52+ case "ko-KR" :
53+ if ( Fonts . SystemFontFamilies . Any ( f => f . Source . Equals ( "Noto Sans KR" ) ) )
54+ return "Noto Sans KR" ;
55+ break ;
56+ case "ja-JP" :
57+ if ( Fonts . SystemFontFamilies . Any ( f => f . Source . Equals ( "Noto Sans JP" ) ) )
58+ return "Noto Sans JP" ;
59+ break ;
60+ case "zh-CN" :
61+ case "zh-Hans" :
62+ if ( Fonts . SystemFontFamilies . Any ( f => f . Source . Equals ( "Noto Sans SC" ) ) )
63+ return "Noto Sans SC" ;
64+ break ;
65+ }
66+
4667 if ( font . FamilyNames . TryGetValue ( System . Windows . Markup . XmlLanguage . GetLanguage ( "en-US" ) , out var englishName ) )
4768 {
4869 return englishName ;
4970 }
71+
5072 return font . Source ?? "Segoe UI" ;
5173 }
5274 catch
You can’t perform that action at this time.
0 commit comments