Bug 162194 - Hyphenation shows right position for hyphenation, but executes it at wrong position on canvas in Writer
Summary: Hyphenation shows right position for hyphenation, but executes it at wrong po...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha1+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Jonathan Clark
URL:
Whiteboard: target:25.2.0 target:24.8.0.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Hyphenation
  Show dependency treegraph
 
Reported: 2024-07-25 14:53 UTC by Robert Großkopf
Modified: 2024-08-01 10:32 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample ODT (16.13 KB, application/vnd.oasis.opendocument.text)
2024-07-29 06:25 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2024-07-25 14:53:39 UTC
Typed a text content in German. At the end of a line appears 'auffallen'. Writer automatically will hyphenate it to auf-fallen. When opening the same document in LO 24.8.0.1 it will be hyphenated 'auff-allen'. 
Note: The dialog for hyphenation will show the right position, but in Writer it will be cut at the wrong position.

This bug appears in 
Version: 24.8.0.1 (X86_64) / LibreOffice Community
Build ID: 6fd6cae02baed1e82d14ed2da1f2458092354dab
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

This bug doesn't appear in LO 24.2.5.2 on the same machine.
Comment 1 Robert Großkopf 2024-07-25 20:05:04 UTC
Seems this buggy behavior depends on the font I use. Default here is DejaVu Sans. With this font the bug appears in LO 24.8.0.1 (vcl: X11 and kf5)
If I set font to Liberation Sans the buggy behavior won't appear.
Comment 2 Stéphane Guillou (stragu) 2024-07-29 06:25:33 UTC
Created attachment 195570 [details]
sample ODT

Reproduced with attachment in:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 233af54afb6e493c3538efe7c93d0f53f1b4c3ab
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

...using the hyphenation rules from the DE-frami extension.
Only the block in DejaVu Sans results in a mismatch between the dialog preview and the result on canvas.
Comment 3 Stéphane Guillou (stragu) 2024-07-29 06:43:23 UTC
Bibisected with linux-64-24.8 repo:

At [c2d0c32c6fa576d81616c063368feb82ba735344], spacing around hyphen is bad, and following "f" runs into next character. That's:

commit 30d376fb7ded4c96c85ad1112a0e44b5929657c9
author	Jonathan Clark 	Mon Apr 29 04:30:43 2024 -0600
committer	Jonathan Clark 	Fri May 17 17:35:41 2024 +0200
tdf#61444 Correct Writer text layout across formatting changes
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167016

Later on, at [57d5ce0062c0d4d2d0d99bc5ec10d66b71cc41d8, we have the current result: hyphen shown as "f-f" in preview, results in "ff-" on canvas. That's:

commit ab0a4543cab77ae0c7c0a79feb8aebab71163dd7
author	Jonathan Clark 	Tue May 07 02:43:00 2024 -0600
committer	Jonathan Clark 	Wed May 22 19:20:38 2024 +0200
tdf#124116 Correct Writer text shaping across formatting changes
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167699

Jonathan, can you please have a look?
Comment 4 Commit Notification 2024-07-30 15:49:59 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/142ce290a2a29f9794ba9a689f35d6f7e3ff588c

tdf#162194 sw: Fix for auto-hyphens inside ligatures

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 Jonathan Clark 2024-07-30 15:53:26 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> Jonathan, can you please have a look?

Thanks for bringing this to my attention.

This bug was happening because the hyphen was placed in the middle of a ligature. Among other things, the purpose of the linked fixes was to avoid ligatures being broken unnecessarily. This was a case that wasn't handled correctly.
Comment 6 Commit Notification 2024-07-30 20:58:48 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/92f62b613c3e97f35d092c090ccc3962ffe4adc7

tdf#162194 sw: Fix for auto-hyphens inside ligatures

It will be available in 24.8.1.

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 2024-08-01 10:13:50 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-24-8-0":

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

tdf#162194 sw: Fix for auto-hyphens inside ligatures

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