Bug 152196 - Visible gaps in Arabic/Persian text with fallback font
Summary: Visible gaps in Arabic/Persian text with fallback font
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.5.0 target:7.4.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: RTL-Arabic-and-Farsi
  Show dependency treegraph
 
Reported: 2022-11-24 05:03 UTC by Hossein
Modified: 2022-12-07 08:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Visible gaps in Arabic/Persian text (10.14 KB, application/vnd.oasis.opendocument.text)
2022-11-24 05:03 UTC, Hossein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2022-11-24 05:03:20 UTC
Created attachment 183747 [details]
Visible gaps in Arabic/Persian text

Description:
When copying text, or creating a new file, sometimes a fallback font is used that does not contain characters for many languages. In this case, the character dimensions are incorrectly calculated.

Steps to Reproduce:
1. Open attachment

Actual Results:
See the visible gaps in Arabic/Persian text. The selected font is "Lohit Devanagari", and the fallback font is "FreeSerif". The problem disappears when setting "FreeSerif" font for the text. The problem is not visible in the PDF export.

Expected Results:
There should not be gaps between joined characters in Arabic/Persian text like جمع.

Reproducible: Always


User Profile Reset: No


Additional Info:

Reproducible with the latest LO dev 7.5
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 651658d37bcb3f493942dd5d0b9a0d65c96f105c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Reproducible with LO 7.4
Version: 7.4.0.3 / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Not reproducible with LO 7.3
Version: 7.3.6.1 / LibreOffice Community
Build ID: 92b673af3a5e8f7cf4716be88dfaca424612f244
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 افشین 2022-11-24 05:24:27 UTC
I can reproduce this bug. 

Version: 7.4.2.3 / LibreOffice Community
Build ID: 40(Build:3)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fa-IR (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.4.2~rc3-0ubuntu0.22.04.1~lo1
Calc: threaded
Comment 2 Stéphane Guillou (stragu) 2022-12-03 09:31:47 UTC
Regression, it is not in:

Version: 7.3.7.2 / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: de-DE (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 3 Stéphane Guillou (stragu) 2022-12-03 09:47:00 UTC
bisected to:
 c61a073e681ced79313f9bf70875c7899756d7aa is the first bad commit
commit c61a073e681ced79313f9bf70875c7899756d7aa
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Jan 17 17:28:49 2022 +0100

    source bb495c6a2f00346698a041bce69a5a97effc79d7

 instdir/program/setuprc         | 2 +-
 instdir/program/versionrc       | 2 +-
 instdir/share/registry/main.xcd | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Which points to:

commit bb495c6a2f00346698a041bce69a5a97effc79d7
author	Caolán McNamara <caolanm@redhat.com>	Mon Jan 17 12:48:43 2022 +0000
committer	Caolán McNamara <caolanm@redhat.com>	Mon Jan 17 17:23:18 2022 +0100
tree f5f36ea2c968b9c8a4e3767dd49fb3f9edc828fb
parent 44c05a9ae8de321875f2e9868b7bb1046eccd64a

tdf#144862 set default render mode to LayoutAndMatchRender

Caolán, could you please have a look?
Comment 4 Commit Notification 2022-12-03 23:42:53 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c50cf1883af26daebdfc9d796ced3c20c222f43b

Related: tdf#152196 these should be at least DeviceCoordinate

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Hossein 2022-12-04 00:03:39 UTC
For me, the problem is still there with the latest patch applied.

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: c50cf1883af26daebdfc9d796ced3c20c222f43b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 Commit Notification 2022-12-04 10:23:56 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/815fd0084aaa6b8c536a13a415cb8cdaf6124ba7

Related: tdf#152196 adjustLinearPosX takes a double

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2022-12-04 10:25:06 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9935fdbcb45ef021c4a25aaced19bcefce5301d7

Related: tdf#152196 adjustLinearPosX takes a double

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2022-12-04 10:25:17 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/adcedbea71024470783406a187516be4b7bfb4d6

Resolves: tdf#152196 visible gaps with glyph fallback in Arabic/Persian text

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Caolán McNamara 2022-12-04 10:28:23 UTC
looks good to me in trunk, backport to 7-4 in gerrit
Comment 10 Hossein 2022-12-04 14:06:42 UTC
Thanks Caolán!

Verified the fix with the latest LO 7.5 dev master:

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 17caf28907ae14ecd84f270cf11e984f5bc553c1
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 11 Commit Notification 2022-12-07 08:47:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/1da94619de444da37b560a675278c3d4c1cc2f3c

Resolves: tdf#152196 visible gaps with glyph fallback in Arabic/Persian text

It will be available in 7.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.