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,17 +1,11 @@
|
|||
import '../../l10n/strings.dart';
|
||||
import '../../mews/document.dart';
|
||||
import '../fonts.dart';
|
||||
import '../controllers/reader_settings_controller.dart'
|
||||
show ReaderSettingsController;
|
||||
import 'mews_urls.dart';
|
||||
import 'page_blocks.dart';
|
||||
|
||||
/// The bundled typefaces the reader can pick. Adding a font is one TTF in
|
||||
/// assets/fonts, one entry in pubspec.yaml, one entry here and one label in
|
||||
/// the locale file.
|
||||
const _fonts = <({String family, String labelId})>[
|
||||
(family: 'Atkinson Hyperlegible', labelId: 'settings-font-atkinson'),
|
||||
];
|
||||
|
||||
/// Message ids for the values the controller accepts. Kept literal so every
|
||||
/// id in the locale file can be found by searching for it.
|
||||
const _themeLabels = {
|
||||
|
|
@ -43,7 +37,7 @@ Future<MewsPage> buildSettingsPage(
|
|||
...chrome(title: title, current: url, strings: strings),
|
||||
HeadingBlock(2, [MewsText(strings.t('settings-font-heading'))]),
|
||||
choiceRow([
|
||||
for (final font in _fonts)
|
||||
for (final font in readerFonts)
|
||||
(
|
||||
href: MewsUrls.action('set-font', {'value': font.family}),
|
||||
label: strings.t(font.labelId),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue