Bug 118902 - RTF import: wrong font for Hebrew text
Summary: RTF import: wrong font for Hebrew text
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
4.0 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, filter:rtf, regression
Depends on:
Blocks: RTL-Hebrew
  Show dependency treegraph
Reported: 2018-07-23 06:04 UTC by Mike Kaganski
Modified: 2019-08-05 05:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Wrong font for Hebrew text in RTF: minimal reproducer (193 bytes, application/msword)
2018-07-23 06:04 UTC, Mike Kaganski
comparison MSO 2010 and LibreOffice 6.2 (30.04 KB, image/png)
2018-07-23 07:58 UTC, Xisco Faulí

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2018-07-23 06:04:43 UTC
Created attachment 143703 [details]
Wrong font for Hebrew text in RTF: minimal reproducer

In the attachment, the only defined font in the RTF is Times New Roman. It is applied to all the text in the document, and Word shows all the text (both Russian and Hebrew) using TNR. But when opened in LibreOffice, the Hebrew font is shown using the font defined in Options→LibreOffice Writer→Basic Fonts (CTL). Replacing \f1 in \pard with \loch\f1\hich\af1 fixes the problem, so apparently LibreOffice does not treat \fN as setting font for all language variants, just for Western languages, despite "Associated Character Properties" chapter in [1] tells:

> Although RTF defines a broad variety of associated character properties,
> any implementation may choose not to implement a particular associated
> character property and share the property between the Latin and Arabic
> fonts

which implies that associated character properties are optional, and in the absence of those, standard properties (like \fN) should be used for all language variants.

Tested with Version: (x64)
Build ID: b3972dcf1284967612d5ee04fea9d15bcf0cc106
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: ru-RU (ru_RU); Calc: CL

Said to be OK in OOo and AOO; suspect regression.

[1] Rich Text Format (RTF) Specification Version 1.9.1 https://www.microsoft.com/en-us/download/details.aspx?id=10725
Comment 1 Xisco Faulí 2018-07-23 07:58:44 UTC
Created attachment 143709 [details]
comparison MSO 2010 and LibreOffice 6.2
Comment 2 Xisco Faulí 2018-07-23 08:02:30 UTC
Reproduced in

Version (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

but not in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-
Comment 3 Xisco Faulí 2018-07-23 08:02:46 UTC
*** Bug 118896 has been marked as a duplicate of this bug. ***
Comment 4 Xisco Faulí 2018-07-23 08:17:59 UTC
So, in 

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-

the font was Times New Roman, then in

LibreOffice 3.5.0 
Build ID: d6cde02

it was to Sans, and later, in this range of commits ( https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=e19f1afb2c253944968f85b963934a60b87f472a..3cf91a21fc5089fb7f051bf8a04d2049da88179f ), it changed to Lohit Devanagari
Comment 5 QA Administrators 2019-08-03 03:06:07 UTC Comment hidden (obsolete)
Comment 6 Mike Kaganski 2019-08-05 05:14:11 UTC
Still repro with Version: (x64)
Build ID: c75130c129d9c5e43b76e4f26881b3db8bdb5c91
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: en-US (ru_RU); UI-Language: en-US
Calc: CL