Bug 67594 - FILEOPEN: RTF - Writer imports punctuation signs incorrectly in RTL text
Summary: FILEOPEN: RTF - Writer imports punctuation signs incorrectly in RTL text
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTL-CTL RTF
  Show dependency treegraph
 
Reported: 2013-07-31 19:48 UTC by Emir Sarı
Modified: 2017-10-13 15:31 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT file with incorrect formatting (31.76 KB, application/vnd.oasis.opendocument.text)
2013-07-31 19:49 UTC, Emir Sarı
Details
Original .RTF file (33.83 KB, text/rtf)
2013-07-31 19:49 UTC, Emir Sarı
Details
.PDF file with correct formatting (44.48 KB, application/pdf)
2013-07-31 19:50 UTC, Emir Sarı
Details
Old Turkic font file (41.55 KB, application/x-font-ttf)
2013-07-31 19:51 UTC, Emir Sarı
Details
screenshot (105.12 KB, image/png)
2013-09-02 15:57 UTC, Jorendc
Details
Screenshot from own LO master build 20171013 (83.27 KB, image/png)
2017-10-13 15:19 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emir Sarı 2013-07-31 19:48:02 UTC
Hello,

I have .rtf files which contains RTL text with brackets and colons. They were created using TextEdit, and now I want to save them as .odt, but they are imported incorrectly. 

-In the original file, each word has colons and two spaces between them (space, colon, space), but when imported it becomes (colon, space, space). 

-Brackets do not follow RTL direction, they become  LTR instead. 

-Brackets between RTL characters has also messed up formatting and rendering issues. 

I'll now attach .pdf, .rtf, and .odt versions, also the font itself. 

Note: I am using OS X, so CoreText imports the RTL text correctly, but not the colon and the brackets (or LibreOffice). I have no idea how it will look on Linux or Windows. Also the .odt file I am attaching is not touched after importing, just embedded the font. Writing direction of all text needs to be changed to RTL to get the formatting like in .PDF file.
Comment 1 Emir Sarı 2013-07-31 19:49:01 UTC
Created attachment 83388 [details]
ODT file with incorrect formatting
Comment 2 Emir Sarı 2013-07-31 19:49:44 UTC
Created attachment 83389 [details]
Original .RTF file
Comment 3 Emir Sarı 2013-07-31 19:50:33 UTC
Created attachment 83390 [details]
.PDF file with correct formatting
Comment 4 Emir Sarı 2013-07-31 19:51:45 UTC
Created attachment 83391 [details]
Old Turkic font file
Comment 5 Emir Sarı 2013-07-31 19:53:38 UTC
Please see line 3 for brackets.
Comment 6 Emir Sarı 2013-07-31 20:30:50 UTC
Further testing: Saved the .rtf file as .odt in TextEdit, then opened it with LibreOffice, the same formatting errors. Opened the same file in TextEdit, no formatting errors.
Comment 7 Jorendc 2013-09-02 15:57:09 UTC
Created attachment 85070 [details]
screenshot

The original RTF looks quite ugly on Version: 4.1.0.4 and Version: 4.2.0.0.alpha0+
Build ID: c41920416c22bfccf7fdeeefcd69baf6eadedaa3

Import all text as black squares, with a white circle in it and a 1 in that white circle. Doesn't look correctly I guess :)?

Kind regards,
Joren
Comment 8 Emir Sarı 2013-09-02 16:01:24 UTC
@Joren, 

Since .rtf files do not allow font embedding, you'll have to install the attached font file. But it does not matter, the issue is, there should be one space before and after the colon, in this case colon is imported right next to the word; please see the attached .pdf file.
Comment 9 Jorendc 2013-09-02 16:06:03 UTC
(In reply to comment #8)
> @Joren, 
> 
> Since .rtf files do not allow font embedding, you'll have to install the
> attached font file.

Oh I'm sorry. Didn't read/saw that part :)

> But it does not matter, the issue is, there should be
> one space before and after the colon, in this case colon is imported right
> next to the word; please see the attached .pdf file.

With the font installed, I can reproduce this behavior using Mac OSX 10.8.4 with LibreOffice Version: 4.2.0.0.alpha0+
Build ID: c41920416c22bfccf7fdeeefcd69baf6eadedaa3

Kind regards
Joren :)
Comment 10 Emir Sarı 2013-09-02 16:15:15 UTC
@Joren,

Thank you very much for confirming. :)
Comment 11 QA Administrators 2015-04-19 03:21:54 UTC Comment hidden (obsolete)
Comment 12 Buovjaga 2015-06-16 18:06:42 UTC
Installed font, rtf still messed up.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 80ec99db4325a439a8a3f1d420d0a80f8bf9c439
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-06-16_00:00:20
Locale: fi-FI (fi_FI)
Comment 13 QA Administrators 2016-09-20 10:00:32 UTC Comment hidden (obsolete)
Comment 14 Lior Kaplan 2017-10-12 10:41:12 UTC
Confirmed with LibreOffice 5.4.1.
Comment 15 Yousuf Philips (jay) (retired) 2017-10-12 23:43:01 UTC
(In reply to Emir Sarı (away) from comment #0)
> -In the original file, each word has colons and two spaces between them
> (space, colon, space), but when imported it becomes (colon, space, space). 

works for me on linux.

> -Brackets do not follow RTL direction, they become  LTR instead. 
> 
> -Brackets between RTL characters has also messed up formatting and rendering
> issues. 

works for me on linux.

The only problem i see now is that it incorrectly imports the font table (bug 1130840).

Steve, Alex, Telesto: Can you guys test if this is fine on Mac?
Comment 16 Jan-Marek Glogowski 2017-10-13 15:12:24 UTC
(In reply to Yousuf Philips (jay) from comment #15)
> The only problem i see now is that it incorrectly imports the font table
> (bug 1130840).

This is actually bug 113084.
Comment 17 Alex Thurgood 2017-10-13 15:15:51 UTC
So, I added Orkun font to my OSX Font book manager, but the font doesn't show up in the list of fonts recognized by LO, which means that the RTF remains a series of illegible squares...

Version: 6.0.0.0.alpha0+
Build ID: 643e9001bff137b6e5a8784d9e1f25a51e0d1644
CPU threads: 4; OS: Mac OS X 10.13; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 18 Alex Thurgood 2017-10-13 15:18:11 UTC
Oh FFS, after a repeated restart of LO master, I can now see the font in LO and it appears to even display the RTF file correctly...but I am not an expert by any means as to how it is supposed to look.

Enclosing screenshot for comparison.
Comment 19 Alex Thurgood 2017-10-13 15:19:59 UTC
Created attachment 136954 [details]
Screenshot from own LO master build 20171013
Comment 20 Yousuf Philips (jay) (retired) 2017-10-13 15:31:13 UTC
So with confirmation that its fine on Mac, we can close this.