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
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paragraph-Alignment
  Show dependency treegraph
 
Reported: 2021-09-30 09:44 UTC by [REDACTED]
Modified: 2023-12-26 15:34 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
File showing the problem (16.47 KB, application/vnd.oasis.opendocument.text)
2021-09-30 09:48 UTC, [REDACTED]
Details
New sample file with em space a the end of a line (33.74 KB, application/vnd.oasis.opendocument.text)
2022-09-26 16:16 UTC, [REDACTED]
Details

Note You need to log in before you can comment on or make changes to this bug.
Description [REDACTED] 2021-09-30 09:44:55 UTC
Description:
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 [REDACTED] 2021-09-30 09:48:23 UTC
Created attachment 175390 [details]
File showing the problem

Added document that shows the bug.
Comment 2 [REDACTED] 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.
Comment 4 Dieter 2022-08-31 06:16:55 UTC
Peter, I've opened attachment 175390 [details] but couldn't see spaces at end or begining of a line. So perhaps the problem has been gone? Could you please retest with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.

Version: 7.4.0.3 (x64) / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 5 [REDACTED] 2022-09-26 16:13:12 UTC
@Dieter: All em spaces appear in the middle of lines, where they don't do any harm. If you will copy & paste a few words to force an em space to the end of a line, you will see the problem is still there, even in version 7.4.1.2 Snap. Will upload a new sample file.
Comment 6 [REDACTED] 2022-09-26 16:16:42 UTC
Created attachment 182682 [details]
New sample file with em space a the end of a line

Edited sample file with em space at the end of a line.
Comment 7 Dieter 2022-10-01 04:51:28 UTC
Now I can see the problem and confirm it with

Version: 7.4.1.2 (x64) / LibreOffice Community
Build ID: 3c58a8f3a960df8bc8fd77b461821e42c061c5f0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL