davidhurka added a comment.

  TextPagePrivate::correctTextOrder() calls some complex functions, which are 
yet undocumented. Interesting stuff is happening in them, so they should get 
some documentation. I added their prototypes to core/textpage_p.h, so I can add 
documentation to them.
  
  In D21271#466691 <https://phabricator.kde.org/D21271#466691>, @yurchor wrote:
  
  > Thanks for fixing these typos.
  
  
  Thanks for spotting these typos. :)

INLINE COMMENTS

> textpage.cpp:1880
>  {
> -    //m_page->m_page->width() and m_page->m_page->height() are in pixels at
> -    //100% zoom level, and thus depend on display DPI. We scale pageWidth and
> -    //pageHeight to remove the dependence. Otherwise bugs would be more 
> difficult
> -    //to reproduce and Okular could fail in extreme cases like a large TV 
> with low DPI.
> +    // m_page->width() and m_page->height() are in pixels at
> +    // 100% zoom level, and thus depend on display DPI.

This is some interesting information, which should be documented more visible. 
Is the information still true?

> textpage.cpp:1883
> +    // To avoid Okular failing on lowDPI displays,
> +    // we scale pageWidth and pageHeight so their sum equals 2000.
>      const double scalingFactor = 2000.0 / (m_page->width() + 
> m_page->height());

Is this enough for documents with high text density? At least, this is a good 
reason for NormalizedRect::roundedGeometry().

> textpage.h:52
> + *
> + * @par Vertical Text
> + * Currently, the reordering mixes up TextEntitys which represent glyphs or 
> words of vertical text.

Documentation can’t fix https://bugs.kde.org/show_bug.cgi?id=407133. As soon as 
TextPagePrivate::correctTextOrder handles vertical text, this paragraph can be 
removed.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D21271

To: davidhurka, #okular
Cc: yurchor, okular-devel, joaonetto, tfella, ngraham, darcyshen, aacid

Reply via email to