enhance: use Inter as default font for all platforms (#639)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-01 17:54:05 +08:00
parent 26fe56e065
commit ba3c72585d
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View file

@ -59,6 +59,10 @@ namespace SourceGit
builder.UsePlatformDetect();
builder.LogToTrace();
builder.WithInterFont();
builder.With(new FontManagerOptions()
{
DefaultFamilyName = "fonts:Inter#Inter"
});
builder.ConfigureFonts(manager =>
{
var monospace = new EmbeddedFontCollection(
@ -223,7 +227,7 @@ namespace SourceGit
if (onlyUseMonospaceFontInEditor)
{
if (string.IsNullOrEmpty(defaultFont))
resDic.Add("Fonts.Primary", new FontFamily("fonts:Inter#Inter, $Default"));
resDic.Add("Fonts.Primary", new FontFamily("fonts:Inter#Inter"));
else
resDic.Add("Fonts.Primary", new FontFamily(defaultFont));
}

View file

@ -83,7 +83,7 @@
<SolidColorBrush x:Key="Brush.Diff.DeletedHighlight" Color="{DynamicResource Color.Diff.DeletedHighlight}"/>
<SolidColorBrush x:Key="Brush.Link" Color="{DynamicResource Color.Link}"/>
<FontFamily x:Key="Fonts.Default">fonts:Inter#Inter, $Default</FontFamily>
<FontFamily x:Key="Fonts.Default">fonts:Inter#Inter</FontFamily>
<FontFamily x:Key="Fonts.Monospace">fonts:SourceGit#JetBrains Mono</FontFamily>
<FontFamily x:Key="Fonts.Primary">fonts:SourceGit#JetBrains Mono</FontFamily>
</ResourceDictionary>