Bug 50202 - FORMATTING: Rotated RTL text mixed with numbers produces complete mess
Summary: FORMATTING: Rotated RTL text mixed with numbers produces complete mess
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.4 RC1
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: RTL-CTL Font-Rendering
  Show dependency treegraph
 
Reported: 2012-05-22 01:32 UTC by Pavel R
Modified: 2023-12-04 22:55 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Word document demonstrating import issues (12.42 KB, application/vnd.ms-word.document.12)
2012-05-22 01:32 UTC, Pavel R
Details
PDF from MS Word 2007 (166.23 KB, application/pdf)
2014-07-15 13:03 UTC, Alexandr
Details
What is being displayed by Writer (121.33 KB, image/png)
2017-11-01 23:39 UTC, Omer Zak
Details
File as exported to PDF (22.61 KB, application/pdf)
2017-11-01 23:40 UTC, Omer Zak
Details
Screenshot of rendering in Writer 24.2 alpha from 2023-11-25 (46.85 KB, image/png)
2023-12-04 22:55 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel R 2012-05-22 01:32:02 UTC
Created attachment 61942 [details]
Word document demonstrating import issues

Problem description: 
When RTL text mixed with numbers rotated by 90 or 270 degrees it is not displayed correctly.

Steps to reproduce:
1. Import MS Word document with table containing hebrew text mixed with numbers rotated 90 or 270 degrees.

Or 

2. Try to create such text in LO writer (inside or outside table) using Format/Character/Position/Rotation & scaling


Current behavior:
Various problems: rotated hebrew text is displayed as boxes or as wrong characters, sometimes only text is rotated, but numbers are not.

Expected behavior:
Display rotated text correctly.

Platform (if different from the browser): 
Tried on windows & linux. On windows with LO 3.5.3, 3.5.4 RC1 and daily build (version 3.6.0alpha0+ (Build ID: 8b1d29b)              
Browser: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120513 Firefox/14.0a2
Comment 1 s-joyemusequna 2012-05-22 03:58:34 UTC
Confirmed with LOdev 3.6 (master - 18-May-2012 02h44 x86@6-fast; Build ID: 8b1d29b), LibO 3.4.5 and LibO 3.3.4 under Windows Vista 64 / Windows XP.
Comment 2 s-joyemusequna 2012-05-22 04:44:03 UTC
Additional (not related) problem I discovered: see Bug 50207
Comment 3 Alexandr 2014-07-15 13:03:42 UTC
Created attachment 102854 [details]
PDF from MS Word 2007

I add a pdf exported from MS Word 2007 as a reference representation. In LibreOffice 4.2.5 and 4.3.0 on Debian x86_64 and Windows 7 bottom box is invisible.
Comment 4 QA Administrators 2015-07-18 17:43:11 UTC Comment hidden (obsolete)
Comment 5 Alexandr 2015-08-10 14:23:32 UTC
Reproducible with LibreOffice 4.4.5 and 5.0.0 on Debian Jessie.
Comment 6 QA Administrators 2016-09-20 10:21:31 UTC Comment hidden (obsolete)
Comment 7 Omer Zak 2017-11-01 23:38:12 UTC
Still happens in:

Version: 5.4.2.2.0+
Build ID: 1:5.4.2-3~bpo9+1
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.utf8); Calc: group

OS: Debian 64bit Stretch (Debian 9.2, with some backported packages)

Also, export to PDF does not faithfully reproduce the mess being seen.
I am attaching both screenshot and PDF export.
Comment 8 Omer Zak 2017-11-01 23:39:54 UTC
Created attachment 137433 [details]
What is being displayed by Writer

All text is at least enclosed in the boxes.
Comment 9 Omer Zak 2017-11-01 23:40:59 UTC
Created attachment 137434 [details]
File as exported to PDF

Vertical text is now outside of the two vertical boxes at top right.
Comment 10 ⁨خالد حسني⁩ 2018-03-24 21:07:42 UTC
I don’t see anything RTL specific here, replacing the Hebrew text with English one shows the same issue.
Comment 11 Eyal Rozenberg 2018-03-24 21:22:48 UTC
It's (In reply to Khaled Hosny from comment #10)
> I don’t see anything RTL specific here, replacing the Hebrew text with
> English one shows the same issue.

Those are two sentences; the second is basically valid, the first isn't. If I replace טארק with trak, the Latin letters appear in the wrong order also: I see kart, not trak, just like in Hebrew we see טארק while in fact what's typed in is קראט (the letters follow QWERTY on the keyboard, sort of).

So, this is an RTL issue, but it's not Hebrew-specific. And actually it's multiple issues:

1. Letter ordering reversed
2. Typing enter can make you go up rather than down a line w.r.t. how the letters are facing (i.e. you type Enter, type some text, and you've typed the _previous_ line's content. A weird experience).
3. Mis-rendering: Typing or deleting some of the text occasionaly keeps a part of the previously-rendered text still painted while it no longer exists, supposedly.
4. The red triangle. You see it, right? I'm not imagining things... where does that come from?
Comment 12 ⁨خالد حسني⁩ 2018-03-24 21:54:08 UTC
(In reply to Eyal Rozenberg from comment #11)
> It's (In reply to Khaled Hosny from comment #10)
> > I don’t see anything RTL specific here, replacing the Hebrew text with
> > English one shows the same issue.
> 
> Those are two sentences; the second is basically valid, the first isn't. If
> I replace טארק with trak, the Latin letters appear in the wrong order also:
> I see kart, not trak, just like in Hebrew we see טארק while in fact what's
> typed in is קראט (the letters follow QWERTY on the keyboard, sort of).
> 
> So, this is an RTL issue, but it's not Hebrew-specific. And actually it's
> multiple issues:
> 
> 1. Letter ordering reversed
> 2. Typing enter can make you go up rather than down a line w.r.t. how the
> letters are facing (i.e. you type Enter, type some text, and you've typed
> the _previous_ line's content. A weird experience).
> 3. Mis-rendering: Typing or deleting some of the text occasionaly keeps a
> part of the previously-rendered text still painted while it no longer
> exists, supposedly.
> 4. The red triangle. You see it, right? I'm not imagining things... where
> does that come from?

Then each of these issues should be reported as a separate bug, right now there are several issues in this report that might be completely unrelated.
Comment 13 QA Administrators 2019-03-28 04:20:03 UTC Comment hidden (obsolete)
Comment 14 QA Administrators 2021-03-28 03:36:21 UTC Comment hidden (obsolete)
Comment 15 QA Administrators 2023-03-29 03:25:53 UTC Comment hidden (obsolete)
Comment 16 Eyal Rozenberg 2023-12-04 22:53:14 UTC
Most of the issues Writer originally had with the sample document seem to have been resolved, one way or another, since 2017. With:

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 516f800f84b533db0082b1f39c19d1af40ab29c8
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: he-IL (en_IL); UI: en-US

I only see a problem with the lowest table cell, the one with the text about טארק.

Reporter/Khaled/others, can you confirm this on other platforms?

If you can, I suggest we close this bug and open another one about the remaining issue(s), in the spirit of Khaled's suggestion. What say you?
Comment 17 Eyal Rozenberg 2023-12-04 22:55:11 UTC
Created attachment 191236 [details]
Screenshot of rendering in Writer 24.2 alpha from 2023-11-25