From 190fd67c12843d536fe284d8e28b29e5c9aa8be2 Mon Sep 17 00:00:00 2001 From: Dominik Titl <78549750+morning4coffe-dev@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:39:54 +0100 Subject: [PATCH 1/2] chore: Point Fluent Icons to MDL2 Assets --- src/Uno.UI/UI/Xaml/FontFamily.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI/UI/Xaml/FontFamily.cs b/src/Uno.UI/UI/Xaml/FontFamily.cs index fa98a9ae3616..d0190a688106 100644 --- a/src/Uno.UI/UI/Xaml/FontFamily.cs +++ b/src/Uno.UI/UI/Xaml/FontFamily.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using Uno.UI; +using Windows.Networking; namespace Microsoft.UI.Xaml.Media { @@ -11,9 +12,13 @@ public partial class FontFamily public FontFamily(string familyName) { Source = familyName; - Init(familyName); + if (familyName.Equals("Segoe Fluent Icons,Segoe MDL2 Assets", StringComparison.OrdinalIgnoreCase)) + { + Source = "Segoe MDL2 Assets"; + } + // This instance is immutable, we can cache the hash code. _hashCode = familyName.GetHashCode(); } From a8cb22b12b7f8c9fc70071011cf9968ae436130f Mon Sep 17 00:00:00 2001 From: Dominik Titl <78549750+morning4coffe-dev@users.noreply.github.com> Date: Tue, 14 Jan 2025 16:18:43 +0100 Subject: [PATCH 2/2] chore: Reference font fallback issue --- src/Uno.UI/UI/Xaml/FontFamily.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Uno.UI/UI/Xaml/FontFamily.cs b/src/Uno.UI/UI/Xaml/FontFamily.cs index d0190a688106..e71a91809bc1 100644 --- a/src/Uno.UI/UI/Xaml/FontFamily.cs +++ b/src/Uno.UI/UI/Xaml/FontFamily.cs @@ -14,6 +14,7 @@ public FontFamily(string familyName) Source = familyName; Init(familyName); + // A workaround before font fallback is supported. Issue: https://github.com/unoplatform/uno/issues/10148 if (familyName.Equals("Segoe Fluent Icons,Segoe MDL2 Assets", StringComparison.OrdinalIgnoreCase)) { Source = "Segoe MDL2 Assets";