64350ca632
Bump foliate-js to include readest/foliate-js#22. The scrolled-mode scroll container (#container) lost its compositing layer in the GPU-hint cleanup, so on Windows' always-on scrollbars the scrollbar appeared on open then vanished once adjacent-section preloading changed the content height. Restoring transform: translateZ(0) on the scrolled #container keeps the scrollbar composited so it repaints across content-size changes. Closes #4470 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2.1 KiB
2.1 KiB
name, description, metadata
| name | description | metadata | ||||||
|---|---|---|---|---|---|---|---|---|
| rsvp-font-settings-4519 | RSVP word uses the reader's font face/family via getBaseFontFamily; overlay renders in the top document where fonts are mounted |
|
#4519 — RSVP (speed-reading) word display now mirrors the reader's font face/family
settings instead of a hardcoded font-mono.
Key facts (non-obvious):
- The RSVP overlay (
RSVPOverlay.tsx, rendered viacreatePortaltodocument.bodyfromRSVPControl.tsx) lives in the top document, NOT an iframe. So it cannot read the iframe's--serif/--sans-serifCSS variables thatgetFontStylessets. Instead apply a resolvedfont-familystring. getBaseFontFamily(viewSettings)insrc/utils/style.tsreturns the resolved body font chain (serif or sans-serif perdefaultFont, including the chosen typeface,defaultCJKFont, and any custom font selected as serif/sans). It reuses the sharedbuildFontFamilyListshelper extracted fromgetFontStyles.- This works because fonts are already mounted in the top document:
FoliateViewer.tsxcallsmountCustomFont(document, font)for user-imported fonts, andReader.tsxcallsmountAdditionalFonts(document)for the basic Google fonts. - KNOWN GAP:
Reader.tsxcallsmountAdditionalFonts(document)WITHOUT the book-language CJK flag, so the built-in CJK web fonts (LXGW WenKai, Noto Serif JP, etc.) only mount in the top document whenisCJKEnv()is true. A non-CJK-env user reading a CJK book may see a system CJK fallback in the RSVP word rather than the exact web font. Latin fonts and user-imported custom fonts are unaffected (always mounted). The iframe loads CJK fonts per-doc viamountAdditionalFonts(detail.doc, isCJKLang(...))regardless of env. - RSVP keeps its own font size control (localStorage
readest_rsvp_fontsize); only face/family were wired up. Font weight is intentionally left as the RSVP design (wordfont-medium, ORP charfont-bold).
Related: iframe-cross-realm-instanceof (top-realm vs iframe-realm distinction).