Bug 407020

Summary: When the default font size for epub is changed, links are at the wrong positions
Product: [Applications] okular Reporter: Laura David Hurka <laura.stern>
Component: EPub backendAssignee: Okular developers <okular-devel>
Status: REOPENED ---    
Severity: normal CC: aacid, brutalnumberboy, jan.rathmann, nate
Priority: NOR    
Version First Reported In: 1.7.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: When the default epub font is not Ubuntu 8, links are broken
When the default font size for epub is not changed, links are not broken

Description Laura David Hurka 2019-04-28 18:20:22 UTC
Created attachment 119693 [details]
When the default epub font is not Ubuntu 8, links are broken

SUMMARY
Links in epub documents are at fixed positions, which are only valid with the default font size (Settings -> Configure Backends), which is Ubuntu 8.
Even when the font size was changed before the epub was opened, the links are at the wrong position.

STEPS TO REPRODUCE
1. Download e. g. https://github.com/paulkoegel/redux-offline-docs/raw/master/redux-documentation-2019-01-04.epub or https://www.freecadweb.org/manual/a-freecad-manual.epub and open in Okular.

OBSERVED RESULT
Links are where they should be.

STEPS TO REPRODUCE
2. Go to Settings -> Configure Backends and change the default epub font size. (E. g. Ubuntu 14)

OBSERVED RESULT
Links are still at the old position.

EXPECTED RESULT
Links are where they should be.

SOFTWARE/OS VERSIONS:
KDE Neon 5.15.4
KDE Frameworks 5.57.0
Qt 5.12.0
Okular 1.7.10, Epub Backend 0.2.3
Comment 1 Laura David Hurka 2019-04-28 18:21:05 UTC
Created attachment 119694 [details]
When the default font size for epub is not changed, links are not broken
Comment 2 Albert Astals Cid 2019-05-13 21:14:17 UTC
It works again if you reload the document right? (i.e. if you press F5)
Comment 3 Laura David Hurka 2019-05-13 21:39:34 UTC
No, still at wrong positions.

But it works with text selection:
1. Change font size
2. Text selection selects text at old position.
3. Reload (F5) or restart Okular
4. Text selection selects text at correct position.
Comment 4 Albert Astals Cid 2019-05-13 22:07:47 UTC
oh, ok, the "fixed by" reloading has already an existing bug about it afair, but if this one doesn't get fixed by reloading then it's not a duplicate :)
Comment 5 Jan Rathmann 2023-03-11 13:39:18 UTC
It seems that this bug happens every time the font+size configuration in the Epub backend is set to anything deviating from the global default font+size configuration of Plasma desktop.

E.g.:
Plasma Systemsettings -> Appearance -> Fonts: "Noto Sans 10"
-> links in epub files work correctly only for "Noto Sans 10"

Plasma Systemsettings -> Appearance -> Fonts: "Bitstream Charter 11"
-> links in epub files work correctly only for "Bitstream Charter 11"

Tested with Neon user live image (okular-extra-backends needs to be installed).
Comment 6 John Kizer 2025-06-14 14:46:50 UTC
*** Bug 505083 has been marked as a duplicate of this bug. ***