From 0796cbaef82de468547eb2590fbe43605c7be4d2 Mon Sep 17 00:00:00 2001 From: Flamefire Date: Sat, 13 Sep 2014 01:22:05 +0200 Subject: [PATCH] Workaround for Font bug --- Vocaluxe/COSFunctions.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Vocaluxe/COSFunctions.cs b/Vocaluxe/COSFunctions.cs index d8aec79a..5cf43ce1 100644 --- a/Vocaluxe/COSFunctions.cs +++ b/Vocaluxe/COSFunctions.cs @@ -16,6 +16,7 @@ #endregion using System; +using System.Drawing; using System.Runtime.InteropServices; namespace Vocaluxe @@ -66,6 +67,10 @@ namespace Vocaluxe { 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); } catch (Exception)