Serif-Schriftart im Reader auf Source Serif 4 umstellen
All checks were successful
Build and push Docker image / build (push) Successful in 18s
Test / test (push) Successful in 1m32s

Selbst gehostet (Latin + Latin Extended, normal/italic, variable
Weight 200-900) statt Google-Fonts-Request, damit der Reader offline
über den Service-Worker-App-Shell-Cache weiter funktioniert. SW-Cache
auf v44 gebumpt, damit bestehende Clients die neuen Font-Dateien
nachladen.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mxq5zi49Qs9FyQEQAeR8xc
This commit is contained in:
marwin 2026-09-12 15:05:08 +02:00
parent 26f983bbaa
commit 51fb6258b8
7 changed files with 43 additions and 3 deletions

View file

@ -2,6 +2,42 @@
diora — dark radio player theme
========================================================= */
/* Self-hosted (no external request, works offline via the service worker's
app-shell cache) — variable font covering weight 200-900 in one file per
style/subset. Latin + Latin Extended only (covers German/English text). */
@font-face {
font-family: 'Source Serif 4';
font-style: normal;
font-weight: 200 900;
font-display: swap;
src: url('/static/fonts/SourceSerif4-normal-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Source Serif 4';
font-style: normal;
font-weight: 200 900;
font-display: swap;
src: url('/static/fonts/SourceSerif4-normal-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Source Serif 4';
font-style: italic;
font-weight: 200 900;
font-display: swap;
src: url('/static/fonts/SourceSerif4-italic-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Source Serif 4';
font-style: italic;
font-weight: 200 900;
font-display: swap;
src: url('/static/fonts/SourceSerif4-italic-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
@ -1942,7 +1978,7 @@ body.dnd-mode .timer-display {
position: relative;
padding: 24px 16px;
line-height: 1.8;
font-family: Georgia, 'Times New Roman', serif;
font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
font-size: 16px;
font-weight: 400;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -4993,7 +4993,7 @@ function applyReaderSettings(isPdf) {
contentEl.style.lineHeight = readerSettings.lineHeight;
contentEl.style.setProperty('--reader-max-width', readerSettings.maxWidth + 'ch');
const fontMap = {
serif: "Georgia, 'Times New Roman', serif",
serif: "'Source Serif 4', Georgia, 'Times New Roman', serif",
sans: 'system-ui, -apple-system, sans-serif',
humanist: 'Verdana, Geneva, sans-serif',
mono: "'Courier New', monospace",

View file

@ -2,12 +2,16 @@
* diora service worker — caches the app shell for offline use.
*/
const CACHE = 'diora-v43';
const CACHE = 'diora-v44';
const PODCAST_CACHE = 'diora-podcast-v1';
const SHELL = [
'/static/css/app.css',
'/static/js/app.js',
'/static/manifest.json',
'/static/fonts/SourceSerif4-normal-latin.woff2',
'/static/fonts/SourceSerif4-normal-latin-ext.woff2',
'/static/fonts/SourceSerif4-italic-latin.woff2',
'/static/fonts/SourceSerif4-italic-latin-ext.woff2',
];
// Install: pre-cache the app shell