Serif-Schriftart im Reader auf Source Serif 4 umstellen
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:
parent
26f983bbaa
commit
51fb6258b8
7 changed files with 43 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
BIN
static/fonts/SourceSerif4-italic-latin-ext.woff2
Normal file
BIN
static/fonts/SourceSerif4-italic-latin-ext.woff2
Normal file
Binary file not shown.
BIN
static/fonts/SourceSerif4-italic-latin.woff2
Normal file
BIN
static/fonts/SourceSerif4-italic-latin.woff2
Normal file
Binary file not shown.
BIN
static/fonts/SourceSerif4-normal-latin-ext.woff2
Normal file
BIN
static/fonts/SourceSerif4-normal-latin-ext.woff2
Normal file
Binary file not shown.
BIN
static/fonts/SourceSerif4-normal-latin.woff2
Normal file
BIN
static/fonts/SourceSerif4-normal-latin.woff2
Normal file
Binary file not shown.
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue