diff --git a/src/SamplesApp/SamplesApp.Skia.Generic/SamplesApp.Skia.Generic.csproj b/src/SamplesApp/SamplesApp.Skia.Generic/SamplesApp.Skia.Generic.csproj
index 70f5df5f5cc6..e0dc51e13d45 100644
--- a/src/SamplesApp/SamplesApp.Skia.Generic/SamplesApp.Skia.Generic.csproj
+++ b/src/SamplesApp/SamplesApp.Skia.Generic/SamplesApp.Skia.Generic.csproj
@@ -46,8 +46,6 @@
-
-
diff --git a/src/SamplesApp/SamplesApp.Skia.Gtk/SamplesApp.Skia.Gtk.csproj b/src/SamplesApp/SamplesApp.Skia.Gtk/SamplesApp.Skia.Gtk.csproj
index 554f73f6f672..cbb18f908f43 100644
--- a/src/SamplesApp/SamplesApp.Skia.Gtk/SamplesApp.Skia.Gtk.csproj
+++ b/src/SamplesApp/SamplesApp.Skia.Gtk/SamplesApp.Skia.Gtk.csproj
@@ -41,7 +41,6 @@
-
diff --git a/src/SamplesApp/UITests.Shared/UITests.Shared.projitems b/src/SamplesApp/UITests.Shared/UITests.Shared.projitems
index 8b0e3fb420e4..d2cadbf5f335 100644
--- a/src/SamplesApp/UITests.Shared/UITests.Shared.projitems
+++ b/src/SamplesApp/UITests.Shared/UITests.Shared.projitems
@@ -9576,7 +9576,6 @@
-
diff --git a/src/SamplesApp/UnoIslandsSamplesApp.Skia.Wpf/UnoIslandsSamplesApp.Skia.Wpf.csproj b/src/SamplesApp/UnoIslandsSamplesApp.Skia.Wpf/UnoIslandsSamplesApp.Skia.Wpf.csproj
index 8a905eeeaf3f..dc6d49818649 100644
--- a/src/SamplesApp/UnoIslandsSamplesApp.Skia.Wpf/UnoIslandsSamplesApp.Skia.Wpf.csproj
+++ b/src/SamplesApp/UnoIslandsSamplesApp.Skia.Wpf/UnoIslandsSamplesApp.Skia.Wpf.csproj
@@ -70,8 +70,6 @@
True
Settings.settings
-
-
diff --git a/src/Uno.UI/UI/Xaml/Documents/TextFormatting/FontDetailsCache.skia.cs b/src/Uno.UI/UI/Xaml/Documents/TextFormatting/FontDetailsCache.skia.cs
index 39d1bf198200..abf563c3c77a 100644
--- a/src/Uno.UI/UI/Xaml/Documents/TextFormatting/FontDetailsCache.skia.cs
+++ b/src/Uno.UI/UI/Xaml/Documents/TextFormatting/FontDetailsCache.skia.cs
@@ -3,7 +3,6 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
-using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text.Json;
@@ -61,18 +60,19 @@ internal static void OnFontLoaded(string font, SKTypeface? typeface)
}
}
- private static Assembly _entryAssembly = Assembly.GetEntryAssembly()!;
- private static string _entryAssemblyName = _entryAssembly.GetName().Name!;
-
private static async Task LoadTypefaceFromApplicationUriAsync(Uri uri, FontWeight weight, FontStyle style, FontStretch stretch)
{
try
{
- var resourceName = uri.PathAndQuery.TrimStart('/').Replace('/', '.') + ".manifest";
- resourceName = $"{_entryAssemblyName}.{resourceName}";
- var manifestStream = _entryAssembly.GetManifestResourceStream(resourceName);
- if (manifestStream is not null)
+ // TODO (This comment should be resolved during code review):
+ // Should the user be responsible for adding ".manifest" to the ms-appx path himself?
+ // The benefit of the user doing so is that we will not have to first check if a manifest exists.
+ var manifestUri = new Uri(uri.OriginalString + ".manifest");
+ var path = Uri.UnescapeDataString(manifestUri.PathAndQuery).TrimStart('/');
+ if (await StorageFileHelper.ExistsInPackage(path))
{
+ var manifestFile = await StorageFile.GetFileFromApplicationUriAsync(manifestUri);
+ var manifestStream = await manifestFile.OpenStreamForReadAsync();
uri = new Uri(FontManifestHelpers.GetFamilyNameFromManifest(manifestStream, weight, style, stretch));
}
}