Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change the error to a warning when searching for font path #2403

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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