Bug 185532 - RTL not supported in XPS files
Summary: RTL not supported in XPS files
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: XPS backend (show other bugs)
Version: 0.7.4
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 210355 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-25 14:48 UTC by David K
Modified: 2023-05-03 08:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
An example of the problem, censored to avoid personal identification. (121.02 KB, application/vnd.ms-xpsdocument)
2009-02-25 14:50 UTC, David K
Details
The document opened in windows (221.90 KB, image/x-xcf)
2009-04-18 11:24 UTC, David K
Details
Part of the page as it looks via Okular (35.88 KB, image/png)
2023-05-01 07:57 UTC, boaz.dodin
Details
The same part of page, as it looks converted to pdf (50.34 KB, image/png)
2023-05-01 08:00 UTC, boaz.dodin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David K 2009-02-25 14:48:36 UTC
Version:           0.7.4 (using KDE 4.1.4)
OS:                Linux
Installed from:    Fedora RPMs

Opening of an RTL XPS document results in all the RTL text reversed, unaligned and some letters appear connected.
Comment 1 David K 2009-02-25 14:50:13 UTC
Created attachment 31634 [details]
An example of the problem, censored to avoid personal identification.
Comment 2 Pino Toscano 2009-02-25 16:46:48 UTC
I don't have a Windows box around right now; could you please provide a screenshot of how should it look?
Comment 3 David K 2009-04-18 11:24:23 UTC
Created attachment 32905 [details]
The document opened in windows
Comment 4 Pino Toscano 2009-04-18 11:41:34 UTC
I see the problem now, thanks for the test case!
Comment 5 David K 2009-04-18 13:06:43 UTC
Thanks for the attention, my windows box has been (and still is) acting up...
That's why I just sent this...
BTW, I'm a developer, so if you can point me to where this is supposed to be in the code, I might be able to lend a hand.
You already use fribidi, don't you?
Comment 6 Brad Hards 2009-05-18 23:53:22 UTC
The problem doesn't appear to be lack of BiDi support (in this case - not supporting BiDiLevel is a separate problem). The problem is that we aren't supporting the Indices attribute.

<Glyphs Fill="#ff333333" FontUri="/Documents/1/Resources/Fonts/25F87007-2DB4-4A2E-9E48-08C58187F2CC.odttf" FontRenderingEmSize="12.0005" StyleSimulations="None" OriginX="301.28" OriginY="233.12" Indices="3;676;697;696,52;677,24;686;3;695;689;677;690" UnicodeString=" השרומ קסוע" />

See XPS spec section 5.1.3
Comment 7 Brad Hards 2009-05-19 05:10:31 UTC
Wasn't the Indices thing after all.

Have attached a patch at http://reviewboard.kde.org/r/715/
Comment 8 David K 2009-05-19 11:12:21 UTC
Cool, I'm glad it works now, but can anything be done to improve the spacing between the letters to make it more legible?
Comment 9 Brad Hards 2009-05-19 12:11:05 UTC
David,

Can you please explain what _specific_ issue you are talking about? I'm aware of a number of layout issues, but they have independent and separate causes. 

I'm interested in fixing them all, but some are more tractable than others.

Please show a small, specific example. 

Note that if the problem is present in the current (unpatched) version of okular, and it is not a RTL layout issue, then it needs a new bug report.

Brad
Comment 10 Brad Hards 2009-05-24 06:41:58 UTC
Fixed in r972031.
Comment 11 Pino Toscano 2009-10-12 19:30:24 UTC
*** Bug 210355 has been marked as a duplicate of this bug. ***
Comment 12 davidginzburg 2009-10-12 21:08:38 UTC
It is not a duplicate.The letters appear ok only reversed
I will provide a sample tomorrow when im near the windows machine

On Mon, Oct 12, 2009 at 7:30 PM, Pino Toscano <pino@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=185532
>
>
> Pino Toscano <pino@kde.org> changed:
>
>           What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                 CC|                            |davidginzburg@gmail.com
>
>
>
>
> --- Comment #11 from Pino Toscano <pino kde org>  2009-10-12 19:30:24 ---
> *** Bug 210355 has been marked as a duplicate of this bug. ***
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
Comment 13 boaz.dodin 2023-05-01 07:56:12 UTC
As this bug is old and fixed, I am not sure if it's the same issue. New bug may be opened on request.

Anyway, xpf file opened via Okular displays all the Hebrew text garbled and placed partly out of the page.
The same xps file converted online to pdf and looks just OK.

Okular 22.04.3
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-71-generic (64-bit)
Graphics Platform: X11
Processors: 4 × AMD A8-6500T APU with Radeon(tm) HD Graphics
Memory: 7.0 GiB of RAM
Graphics Processor: AMD ARUBA
Manufacturer: Gigabyte Technology Co., Ltd.
Comment 14 boaz.dodin 2023-05-01 07:57:44 UTC
Created attachment 158591 [details]
Part of the page as it looks via Okular
Comment 15 boaz.dodin 2023-05-01 08:00:37 UTC
Created attachment 158592 [details]
The same part of page, as it looks converted to pdf
Comment 16 Albert Astals Cid 2023-05-03 07:32:04 UTC
Just open a new bug please
Comment 17 boaz.dodin 2023-05-03 08:36:08 UTC
(In reply to Albert Astals Cid from comment #16)
> Just open a new bug please

Done - https://bugs.kde.org/show_bug.cgi?id=469300