Closed danielweck closed 2 years ago
That is to be expected with advanced settings given letter-
and word-spacing
are strongly tied to dyslexia, where you don’t want small caps nor all caps, etc.
And these advanced settings were designed as either “on” or “off” – if the CSS variable is inlined on :root
it’s considered “on” (even if the value is 0
). If it isn’t then it is “off” and doesn’t apply – and override author styles.
That said, it may be possible to filter value 0
with something like :not([style*=--USER__wordSpacing:0]):not([style*=--USER__wordSpacing: 0])
– note the extra space because this is something to account for – appended to all these selectors, although I can’t tell what the performance impact could be – we’ve hit quite a significant number of performance regressions so I prefer to mention that point.
Fixed in Thorium via https://github.com/readium/r2-navigator-js/commit/c547705c5000687914ba2fad97ab027a0c094611 and https://github.com/edrlab/thorium-reader/commit/5c0c392751c7df8d0008a9104e2fcf34bfd3b65c (in a nutshell: we weren't handling the "zero" values correctly, now we do :)
Issue first reported in Thorium by @ThomasR128
https://github.com/edrlab/thorium-reader/issues/1387
Reproducible with https://standardebooks.org/ebooks/john-muir/my-first-summer-in-the-sierra
The screenshot below is with the "Georgia" typeface in both Thorium and Books.app on MacOS (note the missing
small-caps
font-variant
:And here's the culprit:
font-variant: none;
in ReadiumCSS triggered byletter-spacing
.https://github.com/readium/readium-css/blob/583011453612e6f695056ab6c086a2c4f4cac9c0/css/src/modules/user-settings-submodules/ReadiumCSS-letterSpacing_pref.css#L19