[Okular-devel] Review Request: Fix word detection for DVI documents

Luigi Toscano luigi.toscano at tiscali.it
Mon Nov 26 23:45:41 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107429/
-----------------------------------------------------------

(Updated Nov. 26, 2012, 11:45 p.m.)


Review request for Okular.


Changes
-------

Remove old useless cruft. Thanks to Fabio D'Urso for the code review; tested on 4.10.


Description
-------

This patch attempts to restore the functionalities broken by some changes (maybe the text column selection code).

It uses a bit of heuristics to identify the end of a word and merge the boxes which enclose each character of a word (so that char_x.right==char_{x+1}.left). It also try to recognize if there is a newline ("after_space") after that a space is found.


This addresses bug 302004.
    http://bugs.kde.org/show_bug.cgi?id=302004


Diffs (updated)
-----

  generators/dvi/dviRenderer_draw.cpp b816353 

Diff: http://git.reviewboard.kde.org/r/107429/diff/


Testing
-------

Tested the faulty document from the bug, and the usual dvistd0.dvi and KDVI-features.dvi.

Tested against KDE/4.9; the patch applies to master but I didn't try it there (but dvi code did not change at all).

What is still not working?
- a isolated comma or dot is seen on a separate line (because its height does not match the rest of the line). I think that this is a problem with the algorithm which recognize the lines, as (with this patch) the information about blocks of characters are correctly passed by the dvi generator.


Thanks,

Luigi Toscano

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20121126/cee272e0/attachment.html>


More information about the Okular-devel mailing list