Bug 135778 - Characters misplaced in rtl text with fonts "B fontName"
Summary: Characters misplaced in rtl text with fonts "B fontName"
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
6.4.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://github.com/harfbuzz/harfbuzz/...
Whiteboard:
Keywords: bibisectNotNeeded, regression
Depends on:
Blocks: Regressions-HarfBuzz
  Show dependency treegraph
 
Reported: 2020-08-15 04:12 UTC by bocedoc
Modified: 2022-08-11 20:09 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example Text and Font (64.08 KB, application/zip)
2020-08-15 04:12 UTC, bocedoc
Details
other Persian Standard Fonts. "B Nazanin" is official font of Persian universities (thesis). (184.86 KB, application/zip)
2020-08-16 06:46 UTC, bocedoc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bocedoc 2020-08-15 04:12:44 UTC
Created attachment 164326 [details]
Example Text and Font

Some characters are not in their real place if typed in a row (with All standard Persian fonts "B fontName").

Example:
U+651 and (U+0627 + U+064B)

اتّفاقاً


Also for:
U+651 and (U+0627 + U+064C)
U+651 and (U+0627 + U+064D)


*Please check the Attachment Files
Comment 1 Ming Hua 2020-08-15 16:26:05 UTC
Reproduced with 7.0.0 on Windows 10:
Version: 7.0.0.3 (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU 线程: 2; 操作系统: Windows 10.0 Build 18363; 界面渲染: Skia/点阵; VCL: win
Locale: zh-CN (zh_CN); 界面: zh-CN
Calc: threaded

However it seems to be specific to this font, as changing to other fonts (I've tried Scheherazade and Noto Kufi Arabic, not sure how suitable they are for Persian, though) gives the correct rendering shown in the picture.  So not sure if this is a bug in LO or in this font.
Comment 2 Ming Hua 2020-08-15 16:38:22 UTC
Reproducible with 6.4.5:
Version: 6.4.5.2 (x64)
Build ID: a726b36747cf2001e06b58ad5db1aa3a9a1872d6
CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: zh-CN (zh_CN); UI-Language: en-US
Calc: threaded

...but not with 5.2.7:
Version: 5.2.7.2 (x64)
Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
CPU Threads: 2; OS Version: Windows 6.19; UI Render: default; 
Locale: zh-CN (zh_CN); Calc: group

Harfbuzz related?
Comment 3 bocedoc 2020-08-16 06:40:51 UTC
No, all fonts that names start with "B " are special for Persian Test and are quite standard.

Also, this problem exists only in LibreOfficeWriter and does not exist in MicrosoftWord or gedit or notepad...
Comment 4 bocedoc 2020-08-16 06:46:55 UTC
Created attachment 164341 [details]
other Persian Standard Fonts.
"B Nazanin" is official font of Persian universities (thesis).
Comment 5 bocedoc 2020-08-16 06:59:59 UTC
However, this is a very important problem that needs to be resolved.
Comment 6 Volga 2021-04-01 13:55:25 UTC
This is reported in GitHub repo
https://github.com/harfbuzz/harfbuzz/issues/2647
Comment 7 ⁨خالد حسني⁩ 2022-08-11 17:32:38 UTC
These fonts are essentially broken and depend on undocumented quirks of Windows OpenType implementation. The issue might be fixed in HarfBuzz, but there is nothing to fix in LibreOffice itself.