diff --git a/.nuspec/Microsoft.Maui.Resizetizer.targets b/.nuspec/Microsoft.Maui.Resizetizer.targets index 7c6867bac976..ec77275b0143 100644 --- a/.nuspec/Microsoft.Maui.Resizetizer.targets +++ b/.nuspec/Microsoft.Maui.Resizetizer.targets @@ -464,17 +464,15 @@ - $([System.IO.Path]::GetFileName(%(_MauiFontCopied.Identity))) $([System.IO.Path]::GetFileName(%(_MauiFontCopied.Identity))) - - + @@ -522,6 +520,7 @@ diff --git a/src/Core/src/Fonts/EmbeddedFontLoader.Tizen.cs b/src/Core/src/Fonts/EmbeddedFontLoader.Tizen.cs index 3483089bd07c..d4cba12a6788 100644 --- a/src/Core/src/Fonts/EmbeddedFontLoader.Tizen.cs +++ b/src/Core/src/Fonts/EmbeddedFontLoader.Tizen.cs @@ -2,6 +2,7 @@ using System.Diagnostics; using System.IO; using ElmSharp; +using Tizen.Common; using IOPath = System.IO.Path; using TApplication = Tizen.Applications.Application; @@ -22,8 +23,9 @@ public partial class EmbeddedFontLoader : IEmbeddedFontLoader } var filePath = IOPath.Combine(FontCacheDirectory.FullName, font.FontName!); + var name = IOPath.GetFileNameWithoutExtension(filePath); if (File.Exists(filePath)) - return filePath; + return name; try { using (var fileStream = File.Create(filePath)) @@ -34,13 +36,11 @@ public partial class EmbeddedFontLoader : IEmbeddedFontLoader font.ResourceStream.CopyTo(fileStream); } - //TODO: should include below - //if (DotnetUtil.TizenAPIVersion > 5) - //{ - // FontExtensions.FontReinit(); - //} - - return filePath; + if (DotnetUtil.TizenAPIVersion > 5) + { + Utility.FontReinit(); + } + return name; } catch (Exception ex) { diff --git a/src/Core/src/Fonts/FontManager.Tizen.cs b/src/Core/src/Fonts/FontManager.Tizen.cs index 21abbc794307..6d1a9ee6f512 100644 --- a/src/Core/src/Fonts/FontManager.Tizen.cs +++ b/src/Core/src/Fonts/FontManager.Tizen.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using System.Collections.Concurrent; using Microsoft.Extensions.Logging; diff --git a/src/Core/src/Fonts/FontRegistrar.Tizen.cs b/src/Core/src/Fonts/FontRegistrar.Tizen.cs index d78a2831363e..8915d20e89fc 100644 --- a/src/Core/src/Fonts/FontRegistrar.Tizen.cs +++ b/src/Core/src/Fonts/FontRegistrar.Tizen.cs @@ -15,9 +15,8 @@ public partial class FontRegistrar : IFontRegistrar Stream GetNativeFontStream(string filename, string? alias) { // TODO: check other folders as well - var resDirPath = Tizen.Applications.Application.Current.DirectoryInfo.Resource; - var fontPath = Path.Combine(resDirPath, filename); + var fontPath = Path.Combine(resDirPath, "fonts", filename); if (File.Exists(fontPath)) return File.OpenRead(fontPath); diff --git a/src/SingleProject/Resizetizer/src/TizenSplashUpdator.cs b/src/SingleProject/Resizetizer/src/TizenSplashUpdator.cs index 0559f47e702b..46172cf40cb5 100644 --- a/src/SingleProject/Resizetizer/src/TizenSplashUpdator.cs +++ b/src/SingleProject/Resizetizer/src/TizenSplashUpdator.cs @@ -13,6 +13,9 @@ public class TizenSplashUpdator : Task [Required] public ITaskItem[] MauiSplashScreen { get; set; } + [Required] + public string ManifestFile { get; set; } + [Required] public string IntermediateOutputPath { get; set; } @@ -108,7 +111,7 @@ public void UpdateColorAndMoveFile(string sourceFilePath, string destFilePath) public void UpdateManifest() { XmlDocument doc = new XmlDocument(); - var xmlPath = Environment.CurrentDirectory + "\\tizen-manifest.xml"; + var xmlPath = Path.Combine(Environment.CurrentDirectory, ManifestFile); try { doc.Load(xmlPath);