Hi there,
I’ve been looking at getting a more integrated workaround to the differing font sizes between epubs and kepubs, and I think working off a patch included here is a good solution.
In place of the CSS stanza `Un-force link decoration in KePubs` changes in `libnickel.so.1.0.0`, I have put:
Code:
/* Adjust Kobo ePub font size to 150% */ body > div#book-columns > div#book-inner { font-size: 1.5em; }
(This workaround was originally found at
https://www.mobileread.com/forums/sh...0&postcount=11, which recommends adding it to kobo_extra.css)
Having re-synced my Calibre library without the “change css” setting enabled in KoboTouchExtended, this appears to have worked around the issue for all my books.
I am not entirely sure how to package this as a patch compatible with the existing tooling, but I’d be up for it being included if it’s desired!
I hope this is the right thread for this, apologies if it isn’t!
EDIT: Having done some more investigation, it looks like that stanza of CSS which is removed by that patch is actually used by the dictionary lookup highlight, the text of which is otherwise rendered white-on-white.
A better approach appears to be adding this text adjustment to the end of a shortened version of the existing CSS:
Code:
a:link,a:visited,a:active{border-bottom:1px dotted!important;color:#666!important;}#book-inner{font-size:1.5em}
(the text colour becomes #666 which is not discernibly different from #696969 on e-ink, and the underline is set to fall back to the text colour)
This appears to work much better.
I considered adjusting the font size of the standard ePub stylesheet, however, it is not reliably possible to adjust as it appears the Kobo sets the font size on the body element, and there doesn’t seem to be any standard structure between that element and other elements which set their font size relative to their parents.
EDIT 2: Further use revealed that while this approach seems pretty solid for most Kobo ePubs from both the store and Calibre, it doesn’t fix Pocket articles. I was able to work around that by adding `font-size: 1.5em` to the `body` element in the Pocket stylesheet.
The Pocket stylesheet resides in `nickel` and is zlib compressed, which it seems this patcher can’t handle. I used v4 of pipcat’s patch-nickel, which can be found at
https://www.mobileread.com/forums/sh...2&postcount=22. I also removed some comments to regain the characters to squeeze the changes in without more changes.
I notice that whilst the original Metazoa patch utility appears to support replacing strings in zlib-compressed sections of the files, this version doesn’t implement it, and the shipped patches actively work around this limitation by apparently including replacements for the zlibbed data. Would implementation of the zlib replacement functions be desired?