Fixed Issue 129.

This commit is contained in:
Michael Möller
2010-10-06 19:18:07 +00:00
parent 0be214b3f2
commit 4dc9a5e13d

View File

@@ -305,8 +305,13 @@ namespace OpenHardwareMonitor.GUI {
} }
private Font CreateFont(float size, FontStyle style) { private Font CreateFont(float size, FontStyle style) {
return new Font(SystemFonts.MessageBoxFont.FontFamily, size, try {
style); return new Font(SystemFonts.MessageBoxFont.FontFamily, size, style);
} catch (ArgumentException) {
// if the style is not supported, fall back to the original one
return new Font(SystemFonts.MessageBoxFont.FontFamily, size,
SystemFonts.MessageBoxFont.Style);
}
} }
private void SetFontSize(float size) { private void SetFontSize(float size) {