We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0c1ed7f + 43a1df3 commit 2cf5a53Copy full SHA for 2cf5a53
1 file changed
src/LogExpert/Config/ConfigManager.cs
@@ -204,6 +204,18 @@ private Settings LoadOrCreateNew (FileInfo fileInfo)
204
205
settings.FileColors ??= [];
206
207
+ try
208
+ {
209
+ using var fontFamily = new FontFamily(settings.Preferences.FontName);
210
+ settings.Preferences.FontName = fontFamily.Name;
211
+ }
212
+ catch (ArgumentException)
213
214
+ var genericMonospaceFont = FontFamily.GenericMonospace.Name;
215
+ _logger.Warn($"Specified font '{settings.Preferences.FontName}' not found. Falling back to default: '{genericMonospaceFont}'.");
216
+ settings.Preferences.FontName = genericMonospaceFont;
217
218
+
219
if (settings.Preferences.ShowTailColor == Color.Empty)
220
{
221
settings.Preferences.ShowTailColor = Color.FromKnownColor(KnownColor.Blue);
0 commit comments