#1134351 okular introduces superfluous spaces into text when rendering an XPS file

Package:
okular
Source:
okular
Description:
universal document viewer
Submitter:
Albert Nash
Date:
2026-04-18 23:43:02 UTC
Severity:
normal
#1134351#5
Date:
2026-04-18 23:40:04 UTC
From:
To:
Grab https://example-files.online-convert.com/document/xps/example.xps and run okular on it. To compare, run MuPDF on the same file. Observe that in the file rendered by Okular, spurious spaces are introduced. For example, the first line after “Example content:” reads

     The names "John Doe " for males, "Jane Doe " or "Jane

whereas it should read

     The names "John Doe" for males, "Jane Doe" or "Jane

The spaces after the two occurrences of ‘Doe’ shouldn't be there.

In the text layer (viz., if you select and copy the line), you get this:

     The names "John Doe " for males, "Jane Doe " or " Jane

Here you get a superfluous space before the second ‘Jane’.

We assume (without knowing this for sure) that example.xps is written so that an orthographically correct text should emerge.

In the attachment you'll find the original file and its rendering by two the viewers: MuPDF on the left and Okular on the right.