Bug 118896 - FILEOPEN: RTF wrong font size for Hebrew Text
Summary: FILEOPEN: RTF wrong font size for Hebrew Text
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.5 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: preBibisect, regression
Depends on:
Blocks: RTL-CTL RTF-New-Import
  Show dependency treegraph
Reported: 2018-07-22 21:30 UTC by Michael Vlasenko
Modified: 2023-01-18 05:45 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

the file in RTF format (1.66 KB, application/rtf)
2018-07-22 21:34 UTC, Michael Vlasenko
comparison MSO 2010 and LibreOffice 6.2 (73.95 KB, image/png)
2018-07-23 07:55 UTC, Xisco Faulí
minimized test (796 bytes, application/rtf)
2018-12-27 18:39 UTC, Michael Vlasenko

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Vlasenko 2018-07-22 21:30:34 UTC
When you import the text into a LibreOffice word processor you will see the problem in Hebrew text

Steps to Reproduce:
Specifically for the test, I created the file in RTF format. See attachment.
This file may be correctly viewed using WordPad or MS Word. 
But when you import the text into a LibreOffice word processor you will see the problem in Hebrew text.

Actual Results:
The Hebrew font "Times New Roman" is replaced by a "Lucida Sans Unicode" (It depends on the settings of the LibreOffice Writer, maybe another). The font size is also incorrect. 

Expected Results:
Should be the 11th pin, but it is displayed on the 12th.

Reproducible: Always

User Profile Reset: No

Additional Info:
This problem is only with the Hebrew text. The rest of the text is displayed correctly.
Comment 1 Michael Vlasenko 2018-07-22 21:34:30 UTC
Created attachment 143697 [details]
the file in RTF format
Comment 2 Xisco Faulí 2018-07-23 07:55:10 UTC
Created attachment 143707 [details]
comparison MSO 2010 and LibreOffice 6.2
Comment 3 Xisco Faulí 2018-07-23 07:56:49 UTC
Reproduced in

Version (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

but not in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-
Comment 4 Xisco Faulí 2018-07-23 08:02:46 UTC
Closing as dupe of bug 118902

*** This bug has been marked as a duplicate of bug 118902 ***
Comment 5 Xisco Faulí 2018-07-23 08:20:55 UTC
let's keep this one open as well to track the font size issue. The font type issue is tracked in bug 118902
Comment 6 Xisco Faulí 2018-07-23 08:23:12 UTC
Font size also reproduced in

LibreOffice 3.5.0 
Build ID: d6cde02
Comment 7 Eyal Rozenberg 2018-12-27 16:49:02 UTC
Can you please minimize the test case so that it only has _one_ line?

Also, do you see the same problem with Arabic text?
Comment 8 Michael Vlasenko 2018-12-27 18:39:33 UTC
Created attachment 147864 [details]
minimized test

> Also, do you see the same problem with Arabic text?
Yes, for Arabic the same problem. 
> Can you please minimize the test case so that it only has _one_ line?
See Attachment.
... Michael
Comment 9 QA Administrators 2020-12-27 03:36:32 UTC Comment hidden (obsolete, spam)
Comment 10 Justin L 2021-01-22 13:58:08 UTC
In Word 2010, I see everything in Times New Roman font (as stated by OP), but everything is also in size 12 font. So, like other things, they probably change their defaults in different situations.

I notice that in Word 2010 - the Normal paragraph style has size 11 for both Latin and CTL. In Writer, both of these are set to 12.

There is no style definition section in the RTF, so styles will just be LO defaults. So there may be a "bug" here that LO doesn't use the right defaults in the case where there is no {\stylesheet.

\f2 - the font being applied to the CTL scripts, is defined as \fRoman, so that suggests that it should not be applied to \fbidi scripts.

But even if I change it to \fbidi, that didn't fix it. That's because it isn't implemented yet, and all font changes are considered _ascii
        case RTF_FNIL:
        case RTF_FROMAN:
        case RTF_FSWISS:
        case RTF_FMODERN:
        case RTF_FSCRIPT:
        case RTF_FDECOR:
        case RTF_FTECH:
        case RTF_FBIDI:
            // TODO ooxml:CT_Font_family seems to be ignored by the domain mapper
Comment 11 Eyal Rozenberg 2021-02-15 10:10:59 UTC
Changing to a non-Hebrew-specific meta bug, as per comments #8 and #10.