mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Refact DefaultSystemFont (minor)
This commit is contained in:
parent
409e74339b
commit
fc7c4f7664
@ -457,22 +457,13 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
}
|
||||
|
||||
var font = SystemFonts.MessageBoxFont;
|
||||
|
||||
if (Configuration.IsRunningOnLinux)
|
||||
if (Configuration.IsRunningOnLinux && IsFontPresent(Configuration.DefaultLinuxFontName))
|
||||
{
|
||||
font = new Font(Configuration.DefaultLinuxFontName, 8F);
|
||||
}
|
||||
|
||||
if (IsFontPresent(font.Name))
|
||||
{
|
||||
_defaultSystemFont = font;
|
||||
}
|
||||
else if (IsFontPresent(SystemFonts.DefaultFont.Name)) // system default
|
||||
{
|
||||
_defaultSystemFont = SystemFonts.DefaultFont;
|
||||
}
|
||||
|
||||
return _defaultSystemFont ?? new Font("Microsoft Sans Serif", 9F);
|
||||
_defaultSystemFont = IsFontPresent(font.Name) ? font : SystemFonts.DefaultFont;
|
||||
return _defaultSystemFont;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user