Open rafaelgonzalez opened 4 years ago
Thanks for opening the issue, @rafaelgonzalez . I'll just add some stuff from a few discussions I had with @luisangelsm on that feature from memory, so that it it is documented.
For .epub (and a few similar formats) we basically need:
We already have a zip extractor. For xml, there are Qt's own xml parsers, but we're actually looking into something more lightweight, i.e. pugixml.
For rendering, the situation is a bit complicated. Basically, these are the options:
All of these approaches have their downsides. We are not really interested in turning our reader into a browser and the amount of security patches needed to keep it safe would force a pretty steep release schedule on us. We certainly don't have the manpower to write a html renderer.
So that leaves option 3. The Qt framework comes with limited HTML4 capabilities that are already used by readers such as Okular to display epub2 files. But the renderer hasn't been updated for years. Another option would be litehtml, which is a lightweight html5 render engine also used by QtCreator (experimentally, I think) to display help files. We still would need to write boilerplate code and add support for Qt-based rendering, but in the long run this would be a solid option.
All of this is still pretty much in a stage of collecting ideas, but it would be great to see it manifest. Implementation will probably happen in small steps, #96 being the first.
litehtml
includes an example of a browser called litebrowser
for Linux, Mac and Windows. Having the three platform-specific document containers could be an alternative to writing a QT-specific one.
Um … no thanks. Adding three different codepaths with platform specific external dependencies is not a good idea. A non-platform specific solution is preferable.
It would be great if YACReader could read any kind of EPUB files.
Some publishers provide versions of their DRM-free comics under an EPUB file, which is just a zip file with images inside. YACReader is capable of reading those, but not real EPUB files.
Opened as a follow up to the discussion in #137.