Skip to content

Commit ba3c725

Browse files
committed
enhance: use Inter as default font for all platforms (#639)
Signed-off-by: leo <[email protected]>
1 parent 26fe56e commit ba3c725

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/App.axaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ public static AppBuilder BuildAvaloniaApp()
5959
builder.UsePlatformDetect();
6060
builder.LogToTrace();
6161
builder.WithInterFont();
62+
builder.With(new FontManagerOptions()
63+
{
64+
DefaultFamilyName = "fonts:Inter#Inter"
65+
});
6266
builder.ConfigureFonts(manager =>
6367
{
6468
var monospace = new EmbeddedFontCollection(
@@ -223,7 +227,7 @@ public static void SetFonts(string defaultFont, string monospaceFont, bool onlyU
223227
if (onlyUseMonospaceFontInEditor)
224228
{
225229
if (string.IsNullOrEmpty(defaultFont))
226-
resDic.Add("Fonts.Primary", new FontFamily("fonts:Inter#Inter, $Default"));
230+
resDic.Add("Fonts.Primary", new FontFamily("fonts:Inter#Inter"));
227231
else
228232
resDic.Add("Fonts.Primary", new FontFamily(defaultFont));
229233
}

src/Resources/Themes.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<SolidColorBrush x:Key="Brush.Diff.DeletedHighlight" Color="{DynamicResource Color.Diff.DeletedHighlight}"/>
8484
<SolidColorBrush x:Key="Brush.Link" Color="{DynamicResource Color.Link}"/>
8585

86-
<FontFamily x:Key="Fonts.Default">fonts:Inter#Inter, $Default</FontFamily>
86+
<FontFamily x:Key="Fonts.Default">fonts:Inter#Inter</FontFamily>
8787
<FontFamily x:Key="Fonts.Monospace">fonts:SourceGit#JetBrains Mono</FontFamily>
8888
<FontFamily x:Key="Fonts.Primary">fonts:SourceGit#JetBrains Mono</FontFamily>
8989
</ResourceDictionary>

0 commit comments

Comments
 (0)