fix: empty monospace font with non-empty default font fallback issue

This commit is contained in:
leo 2024-08-19 19:18:31 +08:00
parent 50d742e1eb
commit ecc1414006
No known key found for this signature in database

View file

@ -231,7 +231,10 @@ namespace SourceGit
if (string.IsNullOrEmpty(monospaceFont)) if (string.IsNullOrEmpty(monospaceFont))
{ {
if (!string.IsNullOrEmpty(defaultFont)) if (!string.IsNullOrEmpty(defaultFont))
{
monospaceFont = $"fonts:SourceGit#JetBrains Mono,{defaultFont}"; monospaceFont = $"fonts:SourceGit#JetBrains Mono,{defaultFont}";
resDic.Add("Fonts.Monospace", new FontFamily(monospaceFont));
}
} }
else else
{ {