[Okular-devel] [okular] [Bug 352359] New: A really wrong way to retrieve screen resolution for calculating annotation bounding box

S. Janczewski faza at faza.com
Sun Sep 6 19:01:54 UTC 2015


https://bugs.kde.org/show_bug.cgi?id=352359

            Bug ID: 352359
           Summary: A really wrong way to retrieve screen resolution for
                    calculating annotation bounding box
           Product: okular
           Version: 0.21.3
          Platform: openSUSE RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: okular-devel at kde.org
          Reporter: faza at faza.com

A had a real puzzle with Okular annotation bounding box. I have same software
on many computers, and on only one Okular annotations worked incorrectly: the
drawn bounding box of the annotations would be always about 4 times taller than
necessary.

After a lot of playing with it, I figured out what is wrong (I think). I
probably will eventually fix it myself, but probably will not have time to get
involved with submitting the fix formally, so someone might want to put it in
while doing other fixes.

As you may have noticed some people complained that the bounding box does not
work as it should and others cannot reproduce it. Since I think they all bark
up the wrong tree, I will describe what I think is going on in a new bug
report.

The problem occurs ONLY on a system that overwrites monitor EDID info within
xorg.conf with something like this:

Section "Monitor"    
    Option    "UseEdidDpi"  "FALSE"
    Option    "DPI"  "96 x 96"
EndSection

This is a fix for a really tiny font being used if EDID is used to determine
proper screen DPI. Some people think it is the problem with video drivers - it
isn't. The monitor that pretends to be a very large TV is the problem.  Such
monitors return resolution say 1920x1080 and 30 DPI. This is NOT a setting that
is usable for use of monitor for a personal computer, and this is why people
have to overwrite it in xorg.conf. 

The problem with Okular is that it appears someone used get-edid HW call to
read in the screen resolution and uses it to calculate proper size of bounding
box - in my case - I work with 96x96 and get-edid returns 30x30. This obviously
is wrong in many circumstances, because it assumes that high level use of
monitor (as in for PDF viewing, for example) always uses the DPI coded in
monitor EDID information - which obviously is not true in described
circumstances.  

Reproducible: Always

Steps to Reproduce:
1. Find a monitor that returns strange EDID info - say 1920x1080 30 DPI. Verify
it with monitor-edid utility, for example.
2. Make such monitor work as a linux screen without tiny fonts
3. On Okular try to draw annotation box with only single line of text.

Actual Results:  
Bounding box intended to be 1 line high ends up to be 5 lines high

Expected Results:  
One line high box - as with the computers that do not have to overwrite EDID
dpi. 

Obviously, when okular comes up with ability to allow changing of bounding box
size, this new capability will be a workaround. Now - it is not possible to
make annotations as needed on computers with such a problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list