From a30935b5bd71b139659e9ecd5afe5283cc0faaee Mon Sep 17 00:00:00 2001 From: colons Date: Thu, 16 Nov 2023 11:13:40 +0000 Subject: [PATCH] Disable subpixel smoothing when the reader is going to be inverted. This prevents chromatic aberration on text in the 'Invert' theme. --- src/web/epub-viewer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/web/epub-viewer.js b/src/web/epub-viewer.js index 3f9520ac..cbd054bf 100644 --- a/src/web/epub-viewer.js +++ b/src/web/epub-viewer.js @@ -302,6 +302,7 @@ const setStyle = style => { 'background': bgColor, 'font-size': `${fontSize}px !important`, 'line-height': `${spacing} !important`, + '-webkit-font-smoothing': invert ? 'antialiased' : 'auto', '-webkit-hyphens': hyphenate ? 'auto' : 'manual', '-webkit-hyphenate-limit-before': 3, '-webkit-hyphenate-limit-after': 2,