Bug 166194 - Chinese characters crowd together in cell due to character spacing compression
Summary: Chinese characters crowd together in cell due to character spacing compression
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0 target:25.2.4 target:25...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: CJK
  Show dependency treegraph
 
Reported: 2025-04-15 10:58 UTC by Jonathan Clark
Modified: 2025-04-23 12:51 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot after following repro instructions (131.01 KB, image/png)
2025-04-15 11:02 UTC, Jonathan Clark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Clark 2025-04-15 10:58:57 UTC
Description:
This bug is a regression identified while investigating bug 166152.

When character compression is enabled in Asian layout, Edit Engine may render CJK text with overlapping glyphs in certain situations.

Steps to Reproduce:
1. Open attachment 200318 [details] from bug 166152.
2. Copy all of the text in the document.
3. Create a new Calc spreadsheet.
4. From Tools -> Options -> Languages and Locales -> Asian Layout, enable "Compress punctuation and Japanese Kana".
5. Paste the previously-copied text into the top-left cell without formatting.
6. Double click the cell to begin editing.
7. Zoom in and out. You should see characters overlapping.

Actual Results:
CJK characters overlap.

Expected Results:
CJK characters should not overlap.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: eccf4cd57a1970b296e12296bf0f5a0f52e917a7
CPU threads: 32; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Jonathan Clark 2025-04-15 11:02:00 UTC
Created attachment 200345 [details]
Screenshot after following repro instructions

This screenshot shows the bug, to aid reproduction.

The overlapping characters are under the E header, toward the right. In the screenshot, it looks like a white blob due to the number of characters that are overlapping. It doesn't always look exactly like this.
Comment 2 Jonathan Clark 2025-04-15 11:07:38 UTC
Bisected to the following commit:

commit 11b15571475414ef853e21a6c96afa2ac81f848f
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Wed Oct 30 09:51:26 2024 +0200

    convert KernArray from sal_Int32 to double
Comment 3 Kevin Suo 2025-04-17 01:02:17 UTC
Set to new as I can reproduce the bug as mentioned in bug 166152.
Comment 4 Commit Notification 2025-04-22 19:54:21 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8049d3f2345d5e6ead9fcb7b84f376fc84b82706

tdf#166194 Chinese characters crowd in cell

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2025-04-23 07:05:23 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/9cd2b0f8c31d9b3bf6b95a307ec06b3bb3b9eb55

tdf#166194 Chinese characters crowd in cell

It will be available in 25.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2025-04-23 12:51:57 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-25-2-3":

https://git.libreoffice.org/core/commit/24cc7080006dea88a7f7f30ac95c6401a6f38d52

tdf#166194 Chinese characters crowd in cell

It will be available in 25.2.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.