Workaround for Font bug

This commit is contained in:
Flamefire committed 2014-09-13 01:22:05 +02:00
1 parent 76ededf9f3
commit 0796cbaef8
1 file changed
+5
+5
View File
@@ -16,6 +16,7 @@
#endregion #endregion
using System; using System;
using System.Drawing;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Vocaluxe namespace Vocaluxe
@@ -66,6 +67,10 @@ namespace Vocaluxe
{ {
try try
{ {
// SetDefaultDllDirectories may cause a bug: http://stackoverflow.com/questions/25818073/using-setdefaultdlldirectories-breaks-font-handling
#pragma warning disable 168
Font dummyForWorkaround = SystemFonts.DefaultFont;
#pragma warning restore 168
CWindowsFunctions.SetDefaultDllDirectories(CWindowsFunctions.LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); CWindowsFunctions.SetDefaultDllDirectories(CWindowsFunctions.LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
} }
catch (Exception) catch (Exception)