Index: Application/Riskeer/src/Application.Riskeer.Migration.Console/app.config =================================================================== diff -u -r77bc8319f1dc24faa36202bd5e820c939b1ec4c1 -r65d4a730c7126022da1feb029547907243004ce4 --- Application/Riskeer/src/Application.Riskeer.Migration.Console/app.config (.../app.config) (revision 77bc8319f1dc24faa36202bd5e820c939b1ec4c1) +++ Application/Riskeer/src/Application.Riskeer.Migration.Console/app.config (.../app.config) (revision 65d4a730c7126022da1feb029547907243004ce4) @@ -27,7 +27,7 @@ - + \ No newline at end of file Index: Application/Riskeer/src/Application.Riskeer/app.config =================================================================== diff -u -r20e56eb6497bdc3e31a6324b929164a19581dfe2 -r65d4a730c7126022da1feb029547907243004ce4 --- Application/Riskeer/src/Application.Riskeer/app.config (.../app.config) (revision 20e56eb6497bdc3e31a6324b929164a19581dfe2) +++ Application/Riskeer/src/Application.Riskeer/app.config (.../app.config) (revision 65d4a730c7126022da1feb029547907243004ce4) @@ -58,7 +58,7 @@ - + \ No newline at end of file Index: Core/Common/src/Core.Common.Util/Drawing/FontHelper.cs =================================================================== diff -u -r26534f9dd1772ce4464717c45c147d4426d20df4 -r65d4a730c7126022da1feb029547907243004ce4 --- Core/Common/src/Core.Common.Util/Drawing/FontHelper.cs (.../FontHelper.cs) (revision 26534f9dd1772ce4464717c45c147d4426d20df4) +++ Core/Common/src/Core.Common.Util/Drawing/FontHelper.cs (.../FontHelper.cs) (revision 65d4a730c7126022da1feb029547907243004ce4) @@ -21,7 +21,6 @@ using System; using System.Drawing; -using System.Drawing.Drawing2D; using System.Drawing.Text; using System.Linq; using System.Runtime.InteropServices; @@ -64,37 +63,6 @@ return new Font(privateFontCollection.Families.Last(), 14.0F); } - /// - /// Creates a from the given and . - /// - /// The font to use. - /// The unicode to create an image from. - /// A . - /// Thrown when any parameter is null. - public static Bitmap CreateBitmapFromFont(Font font, string unicode) - { - if (font == null) - { - throw new ArgumentNullException(nameof(font)); - } - - if (unicode == null) - { - throw new ArgumentNullException(nameof(unicode)); - } - - var bitmap = new Bitmap(4096, 4096); - using (Graphics graphics = Graphics.FromImage(bitmap)) - { - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - graphics.DrawString(unicode, new Font(font.FontFamily, 2600), Brushes.Black, 0, 0); - } - - return bitmap; - } - [DllImport("gdi32.dll")] private static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, uint cbFont, IntPtr pdv, [In] ref uint pcFonts); Index: Core/Common/test/Core.Common.Util.Test/Drawing/FontHelperTest.cs =================================================================== diff -u -r26534f9dd1772ce4464717c45c147d4426d20df4 -r65d4a730c7126022da1feb029547907243004ce4 --- Core/Common/test/Core.Common.Util.Test/Drawing/FontHelperTest.cs (.../FontHelperTest.cs) (revision 26534f9dd1772ce4464717c45c147d4426d20df4) +++ Core/Common/test/Core.Common.Util.Test/Drawing/FontHelperTest.cs (.../FontHelperTest.cs) (revision 65d4a730c7126022da1feb029547907243004ce4) @@ -67,46 +67,5 @@ var exception = Assert.Throws(Call); Assert.AreEqual("privateFontCollection", exception.ParamName); } - - [Test] - public void CreateBitmapFromFont_FontNull_ThrowsArgumentNullException() - { - // Call - void Call() => FontHelper.CreateBitmapFromFont(null, ""); - - // Assert - var exception = Assert.Throws(Call); - Assert.AreEqual("font", exception.ParamName); - } - - [Test] - public void CreateBitmapFromFont_UnicodeNull_ThrowsArgumentNullException() - { - // Setup - var privateFontCollection = new PrivateFontCollection(); - Font font = FontHelper.CreateFont(Resources.ValidFont, privateFontCollection); - - // Call - void Call() => FontHelper.CreateBitmapFromFont(font, null); - - // Assert - var exception = Assert.Throws(Call); - Assert.AreEqual("unicode", exception.ParamName); - } - - [Test] - public void CreateBitmapFromFont_ValidData_CreatesExpectedBitmap() - { - // Setup - var privateFontCollection = new PrivateFontCollection(); - Font font = FontHelper.CreateFont(Resources.ValidFont, privateFontCollection); - - // Call - Bitmap bitmap = FontHelper.CreateBitmapFromFont(font, "I"); - - // Assert - Assert.AreEqual(4096, bitmap.Height); - Assert.AreEqual(4096, bitmap.Width); - } } } \ No newline at end of file Index: Core/Gui/src/Core.Gui/Core.Gui.csproj =================================================================== diff -u -r3eee4aed86083ca0959349312a74b426739a9205 -r65d4a730c7126022da1feb029547907243004ce4 --- Core/Gui/src/Core.Gui/Core.Gui.csproj (.../Core.Gui.csproj) (revision 3eee4aed86083ca0959349312a74b426739a9205) +++ Core/Gui/src/Core.Gui/Core.Gui.csproj (.../Core.Gui.csproj) (revision 65d4a730c7126022da1feb029547907243004ce4) @@ -1,4 +1,4 @@ - + @@ -92,6 +92,11 @@ true all + + 5.15.3 + true + all + 2.0.12 true @@ -153,6 +158,7 @@ + Index: Core/Gui/src/Core.Gui/Forms/Log/MessageWindow.cs =================================================================== diff -u -r62dc4de7b4c4495417c6d5c4706f304ad42c32b3 -r65d4a730c7126022da1feb029547907243004ce4 --- Core/Gui/src/Core.Gui/Forms/Log/MessageWindow.cs (.../MessageWindow.cs) (revision 62dc4de7b4c4495417c6d5c4706f304ad42c32b3) +++ Core/Gui/src/Core.Gui/Forms/Log/MessageWindow.cs (.../MessageWindow.cs) (revision 65d4a730c7126022da1feb029547907243004ce4) @@ -31,6 +31,7 @@ using Core.Common.Util.Drawing; using Core.Gui.Clipboard; using Core.Gui.Properties; +using FontAwesome.Sharp; using log4net.Core; namespace Core.Gui.Forms.Log @@ -156,9 +157,9 @@ Font = font }; - buttonCopy.Image = FontHelper.CreateBitmapFromFont(font, "\uE90D"); - buttonClearAll.Image = FontHelper.CreateBitmapFromFont(font, "\uE90E"); - dialogImage = FontHelper.CreateBitmapFromFont(font, debugLevelUnicode); + buttonCopy.Image = font.FontFamily.ToBitmap(0xE90D, 512); + buttonClearAll.Image = font.FontFamily.ToBitmap(0xE90E, 512); + dialogImage = font.FontFamily.ToBitmap(0xE90C, 512); } private void PopulateMessages()