mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-09-02 15:25:22 +00:00
Fixed Issue 129.
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user