Line Spacing not working
I’ve run an epub through Kepubify (on the web) and the text renders such that in my Kobo Clara BW the Line Spacing slider does nothing. So the text, while readable, isn’t that pleasurable to read.
I ran the epub through Kepubify (web version) a 2nd time making sure ‘Full Screen Reading Fixes’ was on. It then renders beautifully on my Kobo 👍🏻. Job Done, or so I thought 😮.
Editing the new epub in Sigil I changed the spelling on some words to their UK spelling, the epub reverted to fixed, uneditable Line Spacing 😐.
No amount of using Kepubify seems to fix this.
Any thoughts?
Thanks.
I have seen this issue with some epubs: kepubify solves some of the problems, but not the line-spacing one.
On one of these problem epubs, I found the following:
- The first paragraph in the chapter was a
<div class="co">; this paragraph did obey 'Line Spacing' after conversion to.kepub.epub. - The other paragraphs in the chapter were
<div class="pi">; these paragraphs ignored the 'Line Spacing' setting.
Looking at the CSS in style.css showed that class .pi set line-height to some value, while class .co had no entry for line-height.
Some other classes also had settings for line-height, but I did not investigate whether those were actually used in the book.
When I removed the line-height setting for .pi in style.css and re-built the .kepub.epub file, it started to obey the 'Line Spacing' setting.
I don't know whether kepubify tries to remove line-height entries in the CSS, and fails for this book, or if there is some other mechanism that kepubify uses to make the book obey the 'Line Spacing' setting.
Yeah, this is a hard problem to solve, as line-height is frequently used by books for more than just the body line height.
There's a similar problem with the base font-size in some books.
I could add some heuristics to clean this sort of thing up, but it wouldn't be perfect.
It seems that some ebook publishers try to use the CSS styles to control everything about the presentation of the book—font, font-size, spacing, etc—in every part of the book—body text (all variants), chapter titles, title page, ToC; to make it just like a paper book.
Personally, I only really care about the body text and its variations, because that is the stuff that I look at most of the time.
But I can understand that it would be hard to work out which styles (classes, IDs, etc) affect the body text.
I spend a few minutes with a text editor to remove 'line-height' from all styles; this is good enough for me.
I should work out a sed script to do it automatically...