Bug 451766 - Non-english characters does not display correctly on the fist line of annotation text elements
Summary: Non-english characters does not display correctly on the fist line of annotat...
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 21.12.3
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-21 13:37 UTC by Mikael
Modified: 2022-03-21 21:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael 2022-03-21 13:37:45 UTC
SUMMARY
The top padding in text annotation objects is to small in Okular and the result is that non-english characters (with something above the actual character) are cropped on the first line.
This seems to be a display-only issue in Okular because in other viewers (with decent padding) the same text annotations displays correctly on the first line.


STEPS TO REPRODUCE
1. Create a Typewriter or an Inline note annotation in Okular.
2. Paste the Swedish letters "ÅÄÖ" on the first line.
3. The text will be cropped so that the dots above the letters are not visible and the letters will look like "AAA" instead.

OBSERVED RESULT
The text will be cropped so that the dots above the letters are not visible and the letters will look like "AAA" instead.

EXPECTED RESULT
Decent padding with enough space above the first line of text so that non-english characters can be correctly displayed.

SOFTWARE/OS VERSIONS
Linux/Debian Buster
Okular installed as Flatpak from Flathub.
Okular Version 21.12.3
KDE Frameworks Version 5.92.0
Qt Version 5.15.3 (built against 5.15.3)
Using Poppler 22.03.0
Comment 1 Luigi Toscano 2022-03-21 13:45:06 UTC
This looks like the usual duplicate of bug 305534, which is really a problem in poppler (the library used to handle PDF files).
Comment 2 Mikael 2022-03-21 14:18:49 UTC
Thank you for the feedback!
I am not a programmer so I most likely you are right, but I was a little surprised: I understand that Poppler are the cause of annotation formatting not being correctly stored in the PDF files when created in Okular and then saved. But in this case the the problem is the reverse in comparison to most other annotation issues; annotations created in Okular does not look correct in Okular itself but looks correct in other viewers. This made me think the issue can actually be fixed in Okular.
Comment 3 Mikael 2022-03-21 14:22:21 UTC
:) But seems like it has been discussed quite allot in the other thread and it does not look like I want to be the guy to post again in that discussion.
Comment 4 Albert Astals Cid 2022-03-21 21:37:58 UTC
This is not https://bugs.kde.org/show_bug.cgi?id=305534

This is just the y position of the characters not being calculated correctly and the top part of the rendering being cut.

This is a bug of how poppler renders the annotations, there's nothing that okular can do to change that, please open a bug at https://gitlab.freedesktop.org/poppler/poppler/-/issues