Bug 144824 - Em space not treated as normal space at end or start of line in justified text
Summary: Em space not treated as normal space at end or start of line in justified text
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2021-09-30 09:44 UTC by Peter Roelofsen
Modified: 2021-09-30 10:25 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:

File showing the problem (16.47 KB, application/vnd.oasis.opendocument.text)
2021-09-30 09:48 UTC, Peter Roelofsen

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Roelofsen 2021-09-30 09:44:55 UTC
In plain text with em spaces, the em space appears at the end of or start of a line instead of being invisible, as normal spaces are. That breaks justified text.

Steps to Reproduce:
1. Enter some text spanning more than one line, format as justified text.
2. Enter an em space (U+2003) at the end of a line, where the text wraps to the next line.
3. The space will be visible at the end or start (in the case where you add a normal space) of the line, instead of serving as a separator of the adjacent words.

Actual Results:
See above.

Expected Results:
Text should wrap correctly, hiding the space at the line break.

Reproducible: Always

User Profile Reset: No

Additional Info:
The wrap code should just treat the em space as a normal space when it is at the end of a line, and only show as an em space in the middle of a line.
Comment 1 Peter Roelofsen 2021-09-30 09:48:23 UTC
Created attachment 175390 [details]
File showing the problem

Added document that shows the bug.
Comment 2 Peter Roelofsen 2021-09-30 09:49:25 UTC
Note: Calligra Words treats this correctly, which is why I think this is a bug.
Comment 3 ajlittoz 2021-09-30 10:25:06 UTC
This also happens with all other "space" characters: NO-BREAK SPACE and all those  starting at U+2000 EN QUAD up to U+200C ZERO-WIDTH NON-JOINER.

They all have property "spacing mark" without "joiner" property (to allow for a line break).

I back up the request.