diff --git a/src/App.axaml.cs b/src/App.axaml.cs index cd00517f..a434fa5e 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -58,6 +58,7 @@ namespace SourceGit var builder = AppBuilder.Configure(); builder.UsePlatformDetect(); builder.LogToTrace(); + builder.WithInterFont(); builder.ConfigureFonts(manager => { var monospace = new EmbeddedFontCollection( @@ -219,9 +220,18 @@ namespace SourceGit resDic.Add("Fonts.Monospace", new FontFamily(monospaceFont)); } - var primary = onlyUseMonospaceFontInEditor ? defaultFont : monospaceFont; - if (!string.IsNullOrEmpty(primary)) - resDic.Add("Fonts.Primary", new FontFamily(primary)); + if (onlyUseMonospaceFontInEditor) + { + if (string.IsNullOrEmpty(defaultFont)) + resDic.Add("Fonts.Primary", new FontFamily("fonts:Inter#Inter, $Default")); + else + resDic.Add("Fonts.Primary", new FontFamily(defaultFont)); + } + else + { + if (!string.IsNullOrEmpty(monospaceFont)) + resDic.Add("Fonts.Primary", new FontFamily(monospaceFont)); + } if (resDic.Count > 0) { diff --git a/src/Native/Linux.cs b/src/Native/Linux.cs index 59193e44..ca6e7c56 100644 --- a/src/Native/Linux.cs +++ b/src/Native/Linux.cs @@ -5,7 +5,6 @@ using System.IO; using System.Runtime.Versioning; using Avalonia; -using Avalonia.Media; namespace SourceGit.Native { @@ -36,13 +35,7 @@ namespace SourceGit.Native } public void SetupApp(AppBuilder builder) - { - // Fix issue https://github.com/sourcegit-scm/sourcegit/issues/447 - builder.With(new FontManagerOptions() - { - DefaultFamilyName = "fonts:SourceGit#JetBrains Mono", - }); - + { builder.With(new X11PlatformOptions() { EnableIme = true, diff --git a/src/Resources/Themes.axaml b/src/Resources/Themes.axaml index 2714c33e..5f8dca57 100644 --- a/src/Resources/Themes.axaml +++ b/src/Resources/Themes.axaml @@ -98,7 +98,7 @@ - $Default + fonts:Inter#Inter, $Default fonts:SourceGit#JetBrains Mono fonts:SourceGit#JetBrains Mono diff --git a/src/SourceGit.csproj b/src/SourceGit.csproj index 835185ab..9154bd2a 100644 --- a/src/SourceGit.csproj +++ b/src/SourceGit.csproj @@ -40,6 +40,7 @@ + @@ -55,6 +56,6 @@ - +