feat(settings): Inter as default UI font + UI font picker (T-460)

Vendor Inter (variable + italic, OFL) under assets/fonts/inter/ and make it
the default application UI face, replacing Josefin Sans (which stays bundled
as a selectable option). pubspec font family + licenses.yaml entry per D-42.

Settings → Appearance gains a UI-font select (Inter / Josefin Sans). The root
DefaultTextStyle reads app.ui.font (kUiFontSettingKey) over the default and
re-applies live on settings change, so a pick takes effect immediately. Bump
the default UI weight to w400 — Inter reads better at Regular than Josefin's
Light.

The monospace picker is deferred to T-471: clideMonoFamily is a const at ~38
call sites (not inherited), so a live mono picker needs the family routed
through context first.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-17 20:15:01 +02:00
co-authored by Claude Opus 4.8
parent b1057b41c8
commit 21d435d1f1
12 changed files with 219 additions and 17 deletions
+6 -1
View File
@@ -48,6 +48,8 @@ class RootShellState extends State<RootShell> {
super.initState();
_keyFocus = FocusNode()..requestFocus();
widget.services.textZoom.addListener(_onZoom);
// Re-apply the UI font when its setting changes (T-460).
widget.services.settings.addListener(_onZoom);
_globalSeq = SequenceMatcher(
keymap: () => widget.services.keymap.keymap ?? Keymap(const []),
context: () => widget.services.keymap.scope,
@@ -61,6 +63,7 @@ class RootShellState extends State<RootShell> {
HardwareKeyboard.instance.removeHandler(_onRawKey);
_seqTimeout?.cancel();
widget.services.textZoom.removeListener(_onZoom);
widget.services.settings.removeListener(_onZoom);
_menuBar.dispose();
_keyFocus.dispose();
super.dispose();
@@ -77,7 +80,9 @@ class RootShellState extends State<RootShell> {
fontSize: 15,
height: clideLineHeight,
fontWeight: clideUiDefaultWeight,
fontFamily: clideUiFamily,
// User-selected UI font (Settings → Appearance, T-460), else the
// bundled default. The fallback chain still covers a missing asset.
fontFamily: widget.services.settings.get<String>(kUiFontSettingKey) ?? clideUiFamily,
fontFamilyFallback: clideUiFamilyFallback,
),
child: MediaQuery(