From 6e8295fed6728ddee3724f1e284775dbe2607b33 Mon Sep 17 00:00:00 2001 From: jklawreszuk Date: Thu, 1 Aug 2024 20:47:51 +0200 Subject: [PATCH] fix: Change the error to a warning when searching for font path --- .../Stride.Assets/SpriteFont/SystemFontProvider.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sources/engine/Stride.Assets/SpriteFont/SystemFontProvider.cs b/sources/engine/Stride.Assets/SpriteFont/SystemFontProvider.cs index e62497e893..61a0fadf07 100644 --- a/sources/engine/Stride.Assets/SpriteFont/SystemFontProvider.cs +++ b/sources/engine/Stride.Assets/SpriteFont/SystemFontProvider.cs @@ -78,10 +78,11 @@ public override string GetFontPath(AssetCompilerResult result = null) if (OperatingSystem.IsLinux()) { var fontPath = GetFontPathLinux(result); - if (fontPath == null && FontName != GetDefaultFontName()) + var defaultFont = GetDefaultFontName(); + if (fontPath == null && FontName != defaultFont) { - result?.Warning($"Cannot find font family '{FontName}'. Loading default font '{GetDefaultFontName()}' instead"); - FontName = GetDefaultFontName(); + result?.Warning($"Cannot find font family '{FontName}'. Loading default font '{defaultFont}' instead"); + FontName = defaultFont; fontPath = GetFontPathLinux(result); } return fontPath; @@ -109,7 +110,7 @@ private string GetFontPathLinux(AssetCompilerResult result) return file; } } - result?.Error($"Cannot find style '{Style}' for font family '{FontName}'. Make sure it is installed on this machine."); + result?.Warning($"Cannot find style '{Style}' for font family '{FontName}'. Make sure it is installed on this machine."); return null; }