Skip to content

Commit

Permalink
fix: Change the error to a warning when searching for font path (stri…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jklawreszuk authored Aug 11, 2024
1 parent 8e4e0cd commit 05901e0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sources/engine/Stride.Assets/SpriteFont/SystemFontProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 05901e0

Please sign in to comment.