Index: Core/Common/src/Core.Common.Util/Drawing/FontHelper.cs =================================================================== diff -u -r9fff4df794c7a477ef037ff87b7520bd0cf360a6 -rbc686806c1d1faa65d427d1a3455610d66164dfd --- Core/Common/src/Core.Common.Util/Drawing/FontHelper.cs (.../FontHelper.cs) (revision 9fff4df794c7a477ef037ff87b7520bd0cf360a6) +++ Core/Common/src/Core.Common.Util/Drawing/FontHelper.cs (.../FontHelper.cs) (revision bc686806c1d1faa65d427d1a3455610d66164dfd) @@ -22,7 +22,6 @@ using System; using System.Drawing; using System.Drawing.Text; -using System.Linq; using System.Runtime.InteropServices; namespace Core.Common.Util.Drawing @@ -38,7 +37,6 @@ /// The data to create the from. /// The created . /// Thrown when is null. - /// Thrown when is not a valid font. public static Font CreateFont(byte[] fontData) { if (fontData == null) @@ -56,11 +54,6 @@ AddFontMemResourceEx(fontPtr, (uint) fontData.Length, IntPtr.Zero, ref dummy); Marshal.FreeCoTaskMem(fontPtr); - if (fonts.Families.ToArray().Length == 0) - { - throw new ArgumentException("Font data could not be loaded."); - } - return new Font(fonts.Families[0], 14.0F); } } Index: Core/Common/test/Core.Common.Util.Test/Drawing/FontHelperTest.cs =================================================================== diff -u -rb63fade0e22ce3993cd31e2ced93261ed43e6c42 -rbc686806c1d1faa65d427d1a3455610d66164dfd --- Core/Common/test/Core.Common.Util.Test/Drawing/FontHelperTest.cs (.../FontHelperTest.cs) (revision b63fade0e22ce3993cd31e2ced93261ed43e6c42) +++ Core/Common/test/Core.Common.Util.Test/Drawing/FontHelperTest.cs (.../FontHelperTest.cs) (revision bc686806c1d1faa65d427d1a3455610d66164dfd) @@ -51,22 +51,5 @@ var exception = Assert.Throws(Call); Assert.AreEqual("fontData", exception.ParamName); } - - [Test] - public void CreateFont_InvalidFontData_ThrowsArgumentException() - { - // Setup - var random = new Random(); - var fontData = new byte[100000]; - - random.NextBytes(fontData); - - // Call - void Call() => FontHelper.CreateFont(fontData); - - // Assert - var exception = Assert.Throws(Call); - Assert.AreEqual("Font data could not be loaded.", exception.Message); - } } } \ No newline at end of file