[Okular-devel] Bug 321956 - Make paragraphs look nicer (indentation, alignment)

Albert Astals Cid aacid at kde.org
Sat Oct 17 14:06:25 UTC 2015


El Saturday 17 October 2015, a les 12:26:27, Afief Halumi va escriure:
> Hello,

Hi
 
> I've been reading a lot of epub files using Okular lately and this specific
> bug has been extremely annoying. I tried to look at what is causing it in
> the codebase and it seems that QTextDocument doesn't support the CSS
> properties used by many documents.
> 
> I would like to work on fixing this issue if that's OK with you guys, but
> I'm at a bit of a loss as to where to start... Is the correct approach here
> to add the missing properties in the Qt side of things? But then again,
> books will start using more and more CSS and we will continue playing catch
> up. Is the correct approach to use Qt's WebEngine facilities to render the
> document? That should support most (all?) of the relevant CSS properties,
> but I'm not sure if the Okular architecture supports such a change or even
> if Qt WebEngine can be used in such a way.

Okular basically just needs you to render into an image, if you can do that 
with Qt WebEngine, you can do it, also you need to support text extraction 
with positions so that search works.

> Would be great if someone could give me a couple of pointers on how to
> approach this issue. I have some basic experience with Qt, but I only used
> it to create basic management GUIs and never for something as complex as
> document rendering.

Basically you need to replace the use of qtextdocument with something else 
while still implementing the generator plugin api.

Good luck :)

Cheers,
  Albert

> 
> Thanks,
> Afief Halumi



More information about the Okular-devel mailing list