feat: bundle Luciole, Literata, Charis SIL and a Hebrew fallback face
This commit is contained in:
parent
dfba1cfb16
commit
6de6672ae3
30 changed files with 624 additions and 11 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:signals/signals.dart';
|
||||
|
||||
import '../../database/database.dart';
|
||||
import '../fonts.dart';
|
||||
|
||||
/// The reader's presentation choices (spec 8.2) plus the per-app limits they
|
||||
/// move within. Values persist through ReaderSettings in the database.
|
||||
|
|
@ -19,7 +20,7 @@ class ReaderSettingsController {
|
|||
static const themeModes = ['light', 'dark', 'system'];
|
||||
static const variants = ['site', 'warm', 'cool', 'green', 'mono'];
|
||||
|
||||
final font = signal('Atkinson Hyperlegible');
|
||||
final font = signal(defaultFontFamily);
|
||||
final fontScale = signal(1.0);
|
||||
final themeMode = signal('system');
|
||||
final variant = signal('site');
|
||||
|
|
@ -34,7 +35,11 @@ class ReaderSettingsController {
|
|||
}
|
||||
|
||||
Future<bool> setFont(String family) async {
|
||||
if (family.isEmpty || family == font.value) return false;
|
||||
// Only a family this build bundles: an unknown one would silently render
|
||||
// in the platform's font instead.
|
||||
if (!readerFonts.any((f) => f.family == family) || family == font.value) {
|
||||
return false;
|
||||
}
|
||||
font.value = family;
|
||||
await _persist();
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue