Reading fonts in Settings: Atkinson Hyperlegible, Lexend, Literata, Source Serif, OpenDyslexic (#359)

All under the SIL Open Font License, taken from Fontsource's npm
packages with their licences beside them in web/fonts. Atkinson is the
Braille Institute's 2025 Next, one variable file. Each is its Latin
subset only, 33-118 KB, fetched once a browser chooses it; anything
outside Latin falls to the next font of the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 01:26:02 +00:00
parent ea5c15cc58
commit 75afaa291c
16 changed files with 501 additions and 4 deletions

View File

@@ -1643,9 +1643,24 @@ body:has(#player.on) #status{padding-bottom:3px}
}
/* ---------- A font chosen in Settings (#359) ---------- */
/* The reading fonts, from ipx like Inter, each its Latin letters only: anything else, Greek or
Cyrillic, is drawn in the next font of the list. Italics are synthesized, as Inter's are.
shortcut: Latin only, add each font's latin-ext file with a unicode-range if accented
Central European titles show in a second face. */
@font-face{font-family:"Atkinson Hyperlegible Next";src:url(/fonts/atkinson.woff2) format("woff2");font-weight:200 800;font-display:swap}
@font-face{font-family:Lexend;src:url(/fonts/lexend.woff2) format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:Literata;src:url(/fonts/literata.woff2) format("woff2");font-weight:200 900;font-display:swap}
@font-face{font-family:"Source Serif 4";src:url(/fonts/source-serif.woff2) format("woff2");font-weight:200 900;font-display:swap}
@font-face{font-family:OpenDyslexic;src:url(/fonts/opendyslexic-400.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:OpenDyslexic;src:url(/fonts/opendyslexic-700.woff2) format("woff2");font-weight:700;font-display:swap}
/* Last in the file: each rule ties with a theme's own body font, and the later one wins. No rule
for the default, which leaves each theme as it is. */
:root[data-font="inter"] body{font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
:root[data-font="system"] body{font-family:-apple-system,BlinkMacSystemFont,system-ui,"Segoe UI",Roboto,"Noto Sans",sans-serif}
:root[data-font="atkinson"] body{font-family:"Atkinson Hyperlegible Next",system-ui,sans-serif}
:root[data-font="lexend"] body{font-family:Lexend,system-ui,sans-serif}
:root[data-font="literata"] body{font-family:Literata,Georgia,serif}
:root[data-font="source"] body{font-family:"Source Serif 4",Georgia,serif}
:root[data-font="dyslexic"] body{font-family:OpenDyslexic,system-ui,sans-serif}
:root[data-font="serif"] body{font-family:Charter,"Iowan Old Style","Bitstream Charter",Georgia,Cambria,"Noto Serif",serif}
:root[data-font="mono"] body{font-family:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,"Noto Sans Mono",monospace}