Bug 137738 - The width of a " " (U+00A0, NON-BREAKING SPACE) changes when italicized, making underline ugly
Summary: The width of a " " (U+00A0, NON-BREAKING SPACE) changes when italicized, maki...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Linux (All)
: medium trivial
Assignee: Not Assigned
Keywords: bibisected
Depends on:
Blocks: Font-Rendering Character
  Show dependency treegraph
Reported: 2020-10-25 16:23 UTC by zeGolem
Modified: 2023-09-21 04:20 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

Sample document with Liberation Serif font (9.74 KB, application/vnd.oasis.opendocument.text)
2020-11-11 17:58 UTC, Ming Hua

Note You need to log in before you can comment on or make changes to this bug.
Description zeGolem 2020-10-25 16:23:58 UTC
If I write a " " (U+00A0, NON-BREAKING SPACE) in LibreOffice Writer, select it, and make it Italic, it will get slightly wider. The behavior isn't replicated for a normal space, and seems to be a bug, as when this same character is also underlined, the underline stays the width of the non-italic character, causing it to be slightly shorter.
This is actually mostly noticeable when underlined italic text contains this character, as it breaks the underline in a fairly noticeable way.

Steps to Reproduce:
1.Type a U+00A0 in Writer
2.Select the U+00A0 character
3.Click the "italicize" button, or press Ctrl+I
4.Observe the width of the selection (and therefore, the width of the character)

Actual Results:
The width of the selection (and therefore, the width of the character) increases.

Expected Results:
The width of the selection (and therefore, the width of the character) should stay the same, as this is the behavior of a normal space (U+0020).

Reproducible: Always

User Profile Reset: No

OpenGL enabled: Yes

Additional Info:
Version :
Build ID : 6.4.6-2
Threads CPU : 4; OS : Linux 5.8; UI Render : GL; VCL: kf5; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded

(running KDE Plasma on Manjaro Linux, was also reproducable with OpenGL disabled)

This was marked as a Writer bug because I couldn't reproduce the issue in Draw or Calc.
Comment 1 zeGolem 2020-11-11 13:09:53 UTC
I was able to reproduce this behavior on my Arch Linux machine on

Build ID: 00(Build:1)
CPU threads: 16; OS: Linux 5.9; UI render: default; VCL: kf5
Locale: fr-FR (fr_FR.UTF8); Langue IHM : fr-FR
Calc: threaded
Comment 2 Ming Hua 2020-11-11 17:58:37 UTC
Created attachment 167211 [details]
Sample document with Liberation Serif font

Reproduced with 7.1.0 alpha1:
Version: (x64)
Build ID: 987671387712c4f9061d6216ff2f001a7bb9e57b
CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: en-US
Calc: threaded
Comment 3 Ming Hua 2020-11-11 18:10:39 UTC
Although I can reproduce the described behavior, I'm not really convinced that characters have different width after being italicized is a bug by itself -- after all, as can be seen in the sample document, many other letters have different width with upright and italic forms, too.  It is, of course, understandable that users would expect non-breaking spaces to behave the same way as ordinary spaces on this issue.

The "broken underline" thing, however, is definitely a bug, therefore setting to NEW.
Comment 4 Andreas Heinisch 2022-07-28 08:07:01 UTC
Not in:
Build ID: c30963b8b4bbbe42a24b97aafa161eff9d7ccdd4
CPU threads: 16; OS: Windows 10.0; UI render: GL; 
Locale: de-DE (de_DE); Calc: CL

But in:
Version: (x64)
Build-ID: 378e26bd4f22a135cef5fa17afd5d4171d8da21a
CPU-Threads: 16; BS: Windows 10.0; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: CL
Comment 5 Andreas Heinisch 2022-07-28 08:36:09 UTC
 57746b59ac105b93db876ee352cdd444816af54a is the first bad commit
commit 57746b59ac105b93db876ee352cdd444816af54a
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Fri Apr 20 10:58:49 2018 -0700

    source 0be3db28a4db4d2c81a5cb2edd48711eec55b51b

    source 0be3db28a4db4d2c81a5cb2edd48711eec55b51b

 instdir/program/swlo.dll    | Bin 14190080 -> 14190080 bytes
 instdir/program/version.ini |   2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

Comment 6 Mike Kaganski 2022-07-28 09:04:08 UTC
Sigh, seems both 1c1747ac13a9d895df0fcba2fbb1bd266dccd74b and 0be3db28a4db4d2c81a5cb2edd48711eec55b51b were wrong ...

The first one needs some change to avoid the regression that needed the second.
Comment 7 BogdanB 2023-09-21 04:20:50 UTC
Also in
Version: (X86_64) / LibreOffice Community
Build ID: a34dcd03254480927c403d904c0e754802d97b90
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded