Bug 152734 - There is a visible gap after inserted Kashida with some fonts
Summary: There is a visible gap after inserted Kashida with some fonts
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:7.6.0 target:7.5.0.2
Keywords:
Depends on:
Blocks: Kashida-Justification, Tatweel
  Show dependency treegraph
 
Reported: 2022-12-30 14:29 UTC by ⁨خالد حسني⁩
Modified: 2022-12-31 10:01 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test document (126.74 KB, application/vnd.oasis.opendocument.text)
2022-12-30 14:29 UTC, ⁨خالد حسني⁩
Details
Screenhost showing current rendering (168.93 KB, image/png)
2022-12-30 14:31 UTC, ⁨خالد حسني⁩
Details
some remaining visual artefacts highighted (LO 7.6) (45.30 KB, image/png)
2022-12-31 09:05 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ⁨خالد حسني⁩ 2022-12-30 14:29:38 UTC
Created attachment 184395 [details]
Test document

With some fonts, e.g. NoName Fixed and ALM Fixed, Kashida inserted after vowel marks if followed by space. This is because in these fonts the vowel marks are spacing glyphs (they are usually non-spacing) or we are failing to account for this.
Comment 1 ⁨خالد حسني⁩ 2022-12-30 14:31:52 UTC
Created attachment 184396 [details]
Screenhost showing current rendering

Current rendering with:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fdfac3afb7e46a39bcf7143fd118e3b4b46f990e
CPU threads: 6; OS: Mac OS X 12.6.2; UI render: default; VCL: osx
Locale: en-US (en_EG.UTF-8); UI: en-US
Calc: threaded
Comment 2 Commit Notification 2022-12-30 18:04:16 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

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

tdf#152734: Calculate correctly the kashida glyph X position

It will be available in 7.6.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 3 Commit Notification 2022-12-30 19:11:27 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/062da9b0d5a44f47fb3fb3e15c7c2a3e9b6a70b8

tdf#152734: Calculate correctly the kashida glyph X position

It will be available in 7.5.0.2.

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 4 Stéphane Guillou (stragu) 2022-12-31 09:05:49 UTC
Created attachment 184407 [details]
some remaining visual artefacts highighted (LO 7.6)

Repro with:

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Fix verified with:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 12e8d57e791bb1befc0716d4d02af7d1d1ccb4ae
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

I still see some lumps and bumps with this particular example document (see attachment), but that was the case already in 7.1 at least, so likely unrelated to the bug here. Are we already tracking that somewhere, Khaled?

Thanks.
Comment 5 ⁨خالد حسني⁩ 2022-12-31 10:01:35 UTC
(In reply to Stéphane Guillou (stragu) from comment #4)
> I still see some lumps and bumps with this particular example document (see
> attachment), but that was the case already in 7.1 at least, so likely
> unrelated to the bug here. Are we already tracking that somewhere, Khaled?

That is a rasterization issue because the glyphs overlap. It is a general issue[1] and depends on the font, the rasterizer and the graphics API. Not much we can do here in LibreOffice to address.

1. http://mces.blogspot.com/2005/08/arabic-joining-rendering-problem.html