# HG changeset patch # User moel.mich # Date 1286392687 0 # Node ID 79e9a77f6a71840647f7837c2bff763d5dff30e1 # Parent 9ddbb54998ac792a6776cd653c51da53abda2917 Fixed Issue 129. diff -r 9ddbb54998ac -r 79e9a77f6a71 GUI/SensorGadget.cs --- a/GUI/SensorGadget.cs Wed Oct 06 11:34:54 2010 +0000 +++ b/GUI/SensorGadget.cs Wed Oct 06 19:18:07 2010 +0000 @@ -305,8 +305,13 @@ } private Font CreateFont(float size, FontStyle style) { - return new Font(SystemFonts.MessageBoxFont.FontFamily, size, - style); + try { + 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) {