Bug 162803 - Spurious kashida in text box after font change
Summary: Spurious kashida in text box after font change
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Jonathan Clark
URL:
Whiteboard: target:25.2.0 target:24.8.2
Keywords:
Depends on:
Blocks: RTL-Textbox Kashida-Justification, Tatweel
  Show dependency treegraph
 
Reported: 2024-09-05 08:56 UTC by Jonathan Clark
Modified: 2024-09-13 17:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample attachment (8.89 KB, application/vnd.oasis.opendocument.text)
2024-09-05 08:59 UTC, Jonathan Clark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Clark 2024-09-05 08:56:24 UTC
Description:
Text boxes draw errant kashida glyphs on top of other characters after a font change which reduces the number of lines in a justified paragraph.

Steps to Reproduce:
1. Open the attachment.
2. Observe that the textbox has two lines of text, and kashida in the first line.
2. Select all text in the textbox, and change the font to B Nazanin.
3. Observe now that the textbox has one line of text, and kashida that overlap other characters.
4. Click off of the textbox. The stray kashida disappear.

Actual Results:
Kashida glyphs are drawn on top of other characters.

Expected Results:
The final line of the paragraph is not justified, so it should not contain any kashida glyphs.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: d6e8b0f3fc6e8af2b00cf4969fd0d2fa45b9a62e
CPU threads: 32; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Jonathan Clark 2024-09-05 08:59:58 UTC
Created attachment 196246 [details]
Sample attachment

This is the attachment to use while following the above instructions.
Comment 2 Hossein 2024-09-05 11:15:15 UTC Comment hidden (obsolete)
Comment 3 Hossein 2024-09-05 11:16:24 UTC
Confirming the issue with the latest LO 25.2 dev master:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 691308125bf53dfde7f1735dc73467d55f6a5966
CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL threaded

> Expected Results:
> The final line of the paragraph is not justified, so it should not contain
> any kashida glyphs.
Please note that this is not limited to the last line of paragraph. As visible in attachment 183252 [details] when changing the font to "B Nazanin", the problem can happen anywhere, from last line to other middle lines of a paragraph.
Comment 4 Commit Notification 2024-09-09 13:44:20 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6eb0523e27473fe2ebe281b2682a5045f3b39312

tdf#162803 editeng: Fix invalid kashida array after layout

It will be available in 25.2.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 Commit Notification 2024-09-11 15:24:25 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/26fa1ac0d738d2c6de780545848abf10f823a9c0

tdf#162803 editeng: Fix invalid kashida array after layout

It will be available in 24.8.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.