diff --git a/.gitmodules b/.gitmodules index 262059b..aca6867 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "Font-Awesome"] path = Font-Awesome url = https://github.com/FortAwesome/Font-Awesome.git + branch = 6.x \ No newline at end of file diff --git a/Font-Awesome b/Font-Awesome index afecf2a..b452a2c 160000 --- a/Font-Awesome +++ b/Font-Awesome @@ -1 +1 @@ -Subproject commit afecf2af5d897b763e5e8e28d46aad2f710ccad6 +Subproject commit b452a2c086a5e3f319df61b1ce1db7d8e1ad2b7c diff --git a/src/FontAwesome6.Fonts.Net/Extensions/EFontAwesomeIconExtensions.cs b/src/FontAwesome6.Fonts.Net/Extensions/EFontAwesomeIconExtensions.cs index 32ecbdc..1315440 100644 --- a/src/FontAwesome6.Fonts.Net/Extensions/EFontAwesomeIconExtensions.cs +++ b/src/FontAwesome6.Fonts.Net/Extensions/EFontAwesomeIconExtensions.cs @@ -1,10 +1,7 @@ using FontAwesome6.Extensions; -using System.Collections.Generic; using System.Globalization; using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; using System.Windows.Media; namespace FontAwesome6.Fonts.Extensions @@ -110,12 +107,12 @@ public static Drawing CreateDrawing(this EFontAwesomeIcon icon, Brush primary, B } else { - var primaryGlyph = CreateFormattedText(info.Item1, typeface, primary, emSize); - drawingContext.DrawGeometry(primary, null, primaryGlyph.BuildGeometry(new Point(0, 0))); + var primaryFormattedText = CreateFormattedText(info.Item1, typeface, primary, emSize); + drawingContext.DrawText(primaryFormattedText, new Point(0, 0)); } #else - var primaryGlyph = CreateFormattedText(info.Item1, typeface, primary, emSize); - drawingContext.DrawGeometry(primary, null, primaryGlyph.BuildGeometry(new Point(0, 0))); + var primaryFormattedText = CreateFormattedText(info.Item1, typeface, primary, emSize); + drawingContext.DrawText(primaryFormattedText, new Point(0, 0)); #endif } return visual.Drawing; diff --git a/src/FontAwesome6.Fonts.Net/FontAwesome.cs b/src/FontAwesome6.Fonts.Net/FontAwesome.cs index 411c0f1..ac4f0d0 100644 --- a/src/FontAwesome6.Fonts.Net/FontAwesome.cs +++ b/src/FontAwesome6.Fonts.Net/FontAwesome.cs @@ -91,7 +91,7 @@ private static void OnIconPropertyChanged(DependencyObject d, DependencyProperty return; } - var icon = (EFontAwesomeIcon)d.GetValue(IconProperty); + var icon = (EFontAwesomeIcon)d.GetValue(IconProperty); #if FontAwesomePro if (icon.IsDuotone()) @@ -99,10 +99,6 @@ private static void OnIconPropertyChanged(DependencyObject d, DependencyProperty return; } #endif - -#if NET40 - d.SetValue(TextOptions.TextRenderingModeProperty, TextRenderingMode.ClearType); -#endif d.SetValue(FontFamilyProperty, icon.GetFontFamily() ?? fontAwesome._initialFontFamily); d.SetValue(TextProperty, icon.GetUnicode()); d.SetValue(TextAlignmentProperty, TextAlignment.Center);