Various improvements

- Better UX overall
- Fixes for phone in landscape
- Added line height option
- Use Warbreaker prologue (and added attribution)
This commit is contained in:
2026-03-02 21:21:53 +01:00
parent ae5818dd62
commit 676c5ad8bc
7 changed files with 986 additions and 904 deletions

33
web/load_fonts.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
if (!defined('APP_ROOT')) {
http_response_code(403);
exit;
}
$fontRoot = APP_ROOT . '/repos/ebook-fonts/fonts';
$fontEntries = [];
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($fontRoot, FilesystemIterator::SKIP_DOTS)
);
foreach ($iterator as $fileInfo) {
if (!$fileInfo->isFile()) {
continue;
}
if (strtolower($fileInfo->getExtension()) !== 'ttf') {
continue;
}
if (str_contains($fileInfo->getFilename(), 'NV_OpenDyslexic')) {
continue;
}
$relative = str_replace(APP_ROOT . '/', '', $fileInfo->getPathname());
$relative = str_replace(DIRECTORY_SEPARATOR, '/', $relative);
$fontEntries[] = $relative;
}
sort($fontEntries, SORT_NATURAL | SORT_FLAG_CASE);
$fontFilesJson = json_encode($fontEntries, JSON_UNESCAPED_SLASHES);
if ($fontFilesJson === false) {
$fontFilesJson = '[]';
}