From ca48e18b570a4066166eb56187c16233e55c45a4 Mon Sep 17 00:00:00 2001 From: Jaap-Jan de Wit | DodoTech Date: Sat, 8 Aug 2026 15:22:04 +0200 Subject: [PATCH] Give the phone the desktop's face: Montserrat by default --- .../DodoSshAndroidApplication.cs | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/DodoSSH.Client.Android/DodoSshAndroidApplication.cs b/src/DodoSSH.Client.Android/DodoSshAndroidApplication.cs index 6b8498b..8cdd90f 100644 --- a/src/DodoSSH.Client.Android/DodoSshAndroidApplication.cs +++ b/src/DodoSSH.Client.Android/DodoSshAndroidApplication.cs @@ -1,6 +1,7 @@ // See the note at the top of MainActivity for why the platform namespaces are reached through `global::`. using Avalonia; using Avalonia.Android; +using Avalonia.Media; using DodoSSH.Client.Android.Platform; using global::Android.App; using global::Android.Runtime; @@ -46,6 +47,30 @@ public sealed class DodoSshAndroidApplication : AvaloniaAndroidApplication + /// + /// This used to be the one place the two heads disagreed on purpose: the recorded v2 decision was + /// "Android recolours with the shared palette and keeps its own default sans", on the reasoning that a + /// phone's system font is a phone's own business. The user has reversed that, this pass — the phone now + /// takes the desktop's face as well as its colours, and docs/design-import-gaps.md is corrected + /// to say so rather than left asserting a decision that no longer holds. + /// + /// WithInterFont still registers Inter, for the same reason Program.cs keeps it on the + /// desktop: it is what the layout suite pins and what a glyph Montserrat does not cover falls back to. + /// What changes is which face answers first. Montserrat ships embedded in + /// DodoSSH.Client.Shell/Assets/Fonts already — this project references that assembly for + /// Theme/Phone.axaml's own MonoFont, so no csproj or asset work was needed to reach it + /// from here, only the same block the desktop's + /// Program.BuildAvaloniaApp sets. + /// protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) => - base.CustomizeAppBuilder(builder).WithInterFont(); + base.CustomizeAppBuilder(builder) + .WithInterFont() + .With(new FontManagerOptions + { + DefaultFamilyName = "avares://DodoSSH.Client.Shell/Assets/Fonts#Montserrat", + FontFallbacks = + [ + new FontFallback { FontFamily = new FontFamily("avares://Avalonia.Fonts.Inter/Assets#Inter") }, + ], + }); }