Settings: per-device interface font choice

System default plus Inter, IBM Plex Sans, Source Sans 3 and Atkinson
Hyperlegible Next (OFL 1.1, bundled as on-demand assets and loaded with
FontLoader, so the web fetches only the previewed/chosen files). Stored in
shared_preferences, applied live to Material and Cupertino text themes;
RobotoMono styles unchanged. Licences registered with LicenseRegistry.
This commit is contained in:
2026-11-04 02:01:49 +00:00
parent fa6c0864db
commit 2853b18b9e
38 changed files with 1486 additions and 26 deletions
@@ -10,6 +10,8 @@ import '../attention/notify/notification_controller.dart';
import 'default_endpoint.dart';
import 'settings_controller.dart';
import 'settings_controls.dart';
import 'settings_font_section.dart';
import '../../ui/theme/app_font_controller.dart';
import 'settings_group.dart';
import 'settings_page_body.dart';
import 'settings_notifications_section.dart';
@@ -53,8 +55,12 @@ class SettingsScreen extends StatefulWidget {
this.servers,
this.deliveryService,
this.deliveryServiceController,
this.fonts,
});
/// The device's interface font; defaults to the app's shared controller.
final AppFontController? fonts;
/// Android background delivery; hidden when absent or unsupported.
final NotificationServiceBridge? deliveryService;
final NotificationServiceController? deliveryServiceController;
@@ -190,6 +196,10 @@ class _SettingsScreenState extends State<SettingsScreen> {
controller: _controller,
workspaceField: _workspaceField,
),
// A device-local choice: a browser and a phone keep their own.
SettingsFontSection(
controller: widget.fonts ?? AppFontController.instance,
),
if (widget.notifications case final notifications?)
SettingsNotificationsSection(controller: notifications),
if (widget.deliveryService case final service? when service.supported)