babluboy / bookworm

A simple ebook reader for Elementary OS
GNU General Public License v3.0
1.33k stars 101 forks source link

ePub book content overlap lines and are unreadable #210

Closed fabiocolacio closed 6 years ago

fabiocolacio commented 6 years ago

Books in the epub format (I have not tested other formats) are unreadable in Fedora 28.

These screenshots are taken in Fedora 28, with bookworm compiled from git-master:

The default view with no settings changed:

screenshot from 2018-08-04 00-27-24

With two-page reading enabled:

screenshot from 2018-08-04 00-17-21

babluboy commented 6 years ago

@fabiocolacio Thanks for your interest in Bookworm. On first thoughts this does not look like a distro issue. Although I have not seen this on eOS, I am thinking it’s specific to the ePub formatting which is making the rendering bad.

Any chance you can share the ePub file with me on this issue or on my email (bablu.boy@gmail.com) so that I can test it.

fabiocolacio commented 6 years ago

Hi @babluboy,

That seems like a probable cause of for this issue. All of the books I have tested come from Project Gutenberg, and thus they are likely to be formatted in a similar manner. Every book I have tried from this site has had the same issues (I do not have any other epubs to test aside from these).

The particular file shown in the screenshots above is White Nights by Fyodor Dostoyevsky, which can be downloaded from Project Gutenberg here (choosing images or no-images made no difference in my testing).

I should add that the same files render properly in other epub readers I have tested including libgepub, mupdf, and Calibre.

babluboy commented 6 years ago

Thanks @fabiocolacio . I downloaded the book and can replicate the issue - so not distro specific for sure. I have not seen this on any of my other ePubs (from other sources), so webkit is not able to render a specific formating on the Guttenburg ePubs (same issue with a couple of other epubs). I also noticed a few points:

Will look into this further

babluboy commented 6 years ago

Just checked this by opening the HTML on a webkit and there is no overlap. So this narrows it down to the fact that the CSS i'm applying is somehow messing up the formatting. Should not be hard to debug and fix.

babluboy commented 6 years ago

Made the CSS for handling the cover image specific to images - the generic * was causing the CSS to be applied to text making the overlap in line height