Public Access
Repaint both heads in the v5 palette and embed its three fonts
This commit is contained in:
1 parent
49645db680
commit
bea0279937
16 files changed
+611
-99
No files matched your search
@@ -93,17 +93,25 @@ internal static class Program
|
||||
|
||||
/// <summary>Used by the designer as well as by <see cref="Main"/>.</summary>
|
||||
/// <remarks>
|
||||
/// <c>WithInterFont</c> registers Inter; it does not make it the default, and until this line the
|
||||
/// application shipped a font it then declined to use — falling back to Segoe UI on Windows and to
|
||||
/// whatever fontconfig offered on Linux. Almost nothing visible moves, because App.axaml sets
|
||||
/// <c>MonoFont</c> on essentially every control that draws text, but the fallback behind those is now
|
||||
/// a font that travels with the build rather than one the machine is assumed to have. The layout
|
||||
/// suite pins the same family, and has to: see HeadlessApp.
|
||||
/// <c>WithInterFont</c> still registers Inter, and it is still what the layout suite pins: see
|
||||
/// HeadlessApp. What changed is which face answers when nothing more specific is asked for. The v5
|
||||
/// design specifies Montserrat, and unlike the substitution this comment used to explain, Montserrat
|
||||
/// now ships embedded in the shell project rather than being requested by a name the machine may not
|
||||
/// have — see DodoSSH.Client.Shell/Assets/Fonts and its csproj entry. Inter stays registered and is
|
||||
/// named as a fallback, so a glyph Montserrat does not cover still resolves to a font that travels
|
||||
/// with the build rather than to whatever the platform's default sans happens to be.
|
||||
/// </remarks>
|
||||
public static AppBuilder BuildAvaloniaApp() =>
|
||||
AppBuilder.Configure<DodoSshApp>()
|
||||
.UsePlatformDetect()
|
||||
.WithInterFont()
|
||||
.With(new FontManagerOptions { DefaultFamilyName = "avares://Avalonia.Fonts.Inter/Assets#Inter" })
|
||||
.With(new FontManagerOptions
|
||||
{
|
||||
DefaultFamilyName = "avares://DodoSSH.Client.Shell/Assets/Fonts#Montserrat",
|
||||
FontFallbacks =
|
||||
[
|
||||
new FontFallback { FontFamily = new FontFamily("avares://Avalonia.Fonts.Inter/Assets#Inter") },
|
||||
],
|
||||
})
|
||||
.LogToTrace();
|
||||
}
|
||||
Reference in new issue
Block a user