Bug 154356 - Support breaking lines within words via hyphenation
Summary: Support breaking lines within words via hyphenation
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Hyphenation
  Show dependency treegraph
 
Reported: 2023-03-24 00:10 UTC by Eyal Rozenberg
Modified: 2023-03-26 00:46 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Paragraph with hyphenation on but no hyphenation (12.79 KB, application/vnd.oasis.opendocument.text)
2023-03-24 08:45 UTC, Eyal Rozenberg
Details
Alternate sample slide (PPTX) (92.61 KB, application/vnd.ms-powerpoint)
2023-03-25 14:01 UTC, Gerald Pfeifer
Details
Visual comparison Office 365 vs LibreOffice for Alternate sample slide (69.27 KB, image/png)
2023-03-25 14:03 UTC, Gerald Pfeifer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2023-03-24 00:10:41 UTC
To the best of my knowledge, LO never breaks lines within words, only at word boundaries. However, it sometimes makes sense to break a line within a longer word, to reduce raggedness / excessive empty space on that words line or other lines in the paragraph.

This capability would go well with paragraph-level line breaking logic, see bug 154355.
Comment 2 Eyal Rozenberg 2023-03-24 08:45:39 UTC
Created attachment 186177 [details]
Paragraph with hyphenation on but no hyphenation

Example
Comment 3 Eyal Rozenberg 2023-03-24 08:45:44 UTC
(In reply to Mike Kaganski from comment #1)
> Hyphenation?
> https://help.libreoffice.org/7.5/en-US/text/swriter/guide/using_hyphen.html

Oh. Well, that _sounds_ like what I'm asking. But - when I turn on automatic hyphenation, it doesn't seem to do anything. i.e. even very long words don't get hyphenated to fit more text onto a line
Comment 4 Mike Kaganski 2023-03-24 09:13:19 UTC
This is a question of missing hyphenation package for a given locale (en-IL in case of attachment 186177 [details]).
Comment 5 Eyal Rozenberg 2023-03-24 13:44:25 UTC
(In reply to Mike Kaganski from comment #4)
> This is a question of missing hyphenation package for a given locale (en-IL
> in case of attachment 186177 [details]).

Do we have a hyphenation fallback mechanism from LANG-LOCALE to LANG general or LANG-OTHERLOCALE?
Comment 6 Mike Kaganski 2023-03-24 14:31:31 UTC
(In reply to Eyal Rozenberg from comment #5)

No AFAICT; but indeed, it could be added - lately, I did a similar work on spell checkers, so when generic checkers exist, the fallback would find it. Yet, fallback to lang-OTHERLOCALE would need some hardcoded rules...
Comment 7 Gerald Pfeifer 2023-03-25 14:01:19 UTC
Created attachment 186212 [details]
Alternate sample slide (PPTX)

Slide 21 of attachment #127409 [details] from bug #102261 ran into the same issue,
and this is a reduced reproducer.

Once I manually set "Tools - Language - Hyphenation" the table cell shrank
from 3 lines to 2, as in PowerPoint.

This is really not ideal from a user perspective where one usually simply
wants to view and *existing* presentation and have it appear similar to
how it shows in PowerPoint. Is there anything we can do (by default)?
Comment 8 Gerald Pfeifer 2023-03-25 14:03:07 UTC
Created attachment 186213 [details]
Visual comparison Office 365 vs LibreOffice for Alternate sample slide
Comment 9 Eyal Rozenberg 2023-03-25 14:22:29 UTC
(In reply to Gerald Pfeifer from comment #7)
> Slide 21 of attachment #127409 [details] from bug #102261 ran into the same
> issue, and this is a reduced reproducer.
>
> 
> Once I manually set "Tools - Language - Hyphenation" the table cell shrank
> from 3 lines to 2, as in PowerPoint.

So, that sounds like a different issue, which is non-enabling of hyphenation when importing a PPTX. Please consider opening a separate bug for that.
Comment 10 Gerald Pfeifer 2023-03-26 00:46:10 UTC
I was actually wondering, too; filed separately as bug #154399 now.