foliate
foliate copied to clipboard
ebooks unreadable
Hello,
I have got three ebooks that are not displayed properly when using either calibre on Windows or foliate on Linux. Using the EPUB.js Input Example page generates the same issue.
When opened in Adobe Digital Editions, the ebooks are readable. I do not want to use Adobe Digital Editions.
I am reporting the problem here because since submitting the issue on 01.03.2021, there has only been scant activity on futurepress/epub.js. Seeing that there are bug reports for epub.js on johnfactotum/foliate and that there is johnfactotum/epub.js, I am hoping that maybe this is the right place.
The ebooks in question are:
The issue occurs every time one of the ebooks is displayed and affects all pages.
Can this be fixed?
Regards,
zchap26
@zchap26 There are many reasons for which a book can be unreadable.
What is your Foliate version?
What is your install method?: meson, flatpak, snap, which other?
Does this happen with (free/libre) Gutenberg Books?
All of these books seem proprietary. Perhaps there is a problem with the DRM fonts? (if any)
Have you tried changing the default font? On the right in Foliate > Menu > Font button
Maybe it's the spacing. You can change that in Foliate, too.
Consider unticking "Use Publisher Font" in Foliate.
One final option is if you are willing to edit the epub with calibre. Then you would remove the fonts entirely from the epub. This way any reader that is viewing the locally edited files will use the system font, which presumably solves the problem.
Can't say for sure without seeing the files, but those look like fixed layout books with hardcoded spacing designed to work with a specific font, and it looks broken when the font is not loaded.
Now, as to why the font failed to load, I haven't any idea. Might be that the format isn't supported by WebKitGTK, or maybe Epub.js isn't resolving the path properly, or some other issue.
Foliate 2.6.3 flatpak Don Quixote seems to display without any issues changing the default font does not resolve the issue changing the spacing does not resolve the issue Use Publisher Font was not ticked, changing this option does not seem to have any effect
If other ePub's like Don Quixote display acceptably (enough), then Foliate is working.
Note: If The books display (too) perfectly in Adobe products that can be an issue. Epubs are essentially html pages; some html pages optimised for Mac/Win browsers, can show defects when displayed in Linux browsers. Maybe the ePub's are perfect, but for the wrong OS or browser (webkit).
Can this be fixed?
No.
same issue here , ebub is good in other readers ( moon reader on android and calibre on linux ) ,
sample sshot ( left foliate, right calibre )
font is roboto in both readers, changing font also doesn't help. broken rendering is constant with all fonts .
edit : same issue as in #650
I think I know why the fonts aren't loaded. It's probably because the fonts are obfuscated. If you unzip the EPUB file, you should see a file called encryption.xml
in the META-INF/
directory. Obfuscated fonts need to be decrypted, which Epub.js doesn't do. So the fonts don't work.
If it's true, then if you delete the encryption.xml file, delete the font files, zip the extracted files into a new zip with the same structure, and rename to file.epub, then this problem should disappear.
@itprojects If it's true, doing those things will not make the problem disappear.
First of all, currently obfuscated fonts are already ignored. So deleting them will do nothing.
But more importantly, in fixed layout books, the position of all the text is fixed, so the correct font is required. If you've ever opened a PDF that forgets to embed a specific font, you'd see the same kind of broken rendering.
@johnfactotum You're probably right. No harm in trying, maybe we learn something for debug :)
Fixed in the gtk4
branch.