Bug 136851 - No-break space not working with Asian font text or mixed Western and Asian
Summary: No-break space not working with Asian font text or mixed Western and Asian
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CJK Formatting-Mark
  Show dependency treegraph
 
Reported: 2020-09-17 15:14 UTC by Thomas Lendo
Modified: 2024-09-27 14:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lendo 2020-09-17 15:14:43 UTC
No-brake space not working with Asian font text or mixed Western and Asian font text.

Steps to reproduce:

1. Create a new Writer document.
2. Copy the following text and paste it in the document: 范围从20至100mm成层
3. Shrink the document width with the horizontal ruler to any position within '100mm'

Result: No line break in '100mm'.

3. Insert a no-break space between '100' and 'mm' with Ctrl+Space or the Special Characters dialog (U+A0)
4. Insert a no-break space between the last two Chinese characters '成层'.

Result: The line will break between '100' and 'mm' or between the 2 'm' or between '成层' when you reposition the ruler.

Expected result: No line break in a Western string with a no-break space or between any characters that are linked with a no-break space.


Version: 7.1.0.0.alpha0+ (x64)
Build ID: abcc4eb907661e07ad850ccce7eb06f129da4286
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: de-AT (de_AT); UI: en-US
Comment 1 Dieter 2021-04-01 08:51:25 UTC
I confirm it with

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: f96004096268f5e71120678e32fc8c74055819aa
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 2 Ming Hua 2021-04-01 16:16:59 UTC
Not exactly surprising, as the default line-breaking rule for (modern) Chinese is "anywhere but some special place before/after punctuation marks", as we don't use spaces to separate "words" at all.  And new exceptions to this rule had to be introduced when Latin-and-Chinese mixed text layout was considered.

It's probably not hard to fix though, one just needs to treat non-breaking spaces not as whitespace character when considering line-break positions.

It would be interesting to know if the same problem exists for Korean texts, as they use spaces to separate words.  Japanese doesn't (just like Chinese) and presumably is also affected.
Comment 3 QA Administrators 2023-04-02 03:24:11 UTC Comment hidden (obsolete)
Comment 4 Thomas Lendo 2023-04-09 19:06:56 UTC
Still existing with 7.5.2.2
Comment 5 Buovjaga 2024-09-27 14:47:29 UTC
Still repro and already in 3.5

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 59fc2b5ca9678855feb30345761dad739b546edc
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 27 September 2024