@@ -65,19 +65,21 @@ public void Save()
6565 { "pt" , "Noto Sans" }
6666 } ;
6767
68- public static string GetSystemDefaultFont ( )
68+ public static string GetSystemDefaultFont ( bool ? useNoto = null )
6969 {
7070 try
7171 {
72- var culture = CultureInfo . CurrentCulture ;
73- var language = culture . Name ; // e.g., "zh-TW"
74- var langPrefix = language . Split ( '-' ) [ 0 ] ; // e.g., "zh"
75-
76- // First, try to find by full name, and if not found, fallback to prefix
77- if ( TryGetNotoFont ( language , out var notoFont ) || TryGetNotoFont ( langPrefix , out notoFont ) )
72+ if ( useNoto != false )
7873 {
79- if ( Fonts . SystemFontFamilies . Any ( f => f . Source . Equals ( notoFont ) ) )
80- return notoFont ;
74+ var culture = CultureInfo . CurrentCulture ;
75+ var language = culture . Name ; // e.g., "zh-TW"
76+ var langPrefix = language . Split ( '-' ) [ 0 ] ; // e.g., "zh"
77+
78+ if ( TryGetNotoFont ( language , out var notoFont ) || TryGetNotoFont ( langPrefix , out notoFont ) )
79+ {
80+ if ( Fonts . SystemFontFamilies . Any ( f => f . Source . Equals ( notoFont ) ) )
81+ return notoFont ;
82+ }
8183 }
8284
8385 var font = SystemFonts . MessageFontFamily ;
@@ -162,6 +164,7 @@ public string Theme
162164 public string ResultSubFontStyle { get ; set ; }
163165 public string ResultSubFontWeight { get ; set ; }
164166 public string ResultSubFontStretch { get ; set ; }
167+ public string SettingWindowFont { get ; set ; } = GetSystemDefaultFont ( false ) ;
165168 public bool UseGlyphIcons { get ; set ; } = true ;
166169 public bool UseAnimation { get ; set ; } = true ;
167170 public bool UseSound { get ; set ; } = true ;
0 commit comments