Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text inside Label nodes doesn't account &zwsp (U+200B) as line-breaking space #102414

Closed
SysError99 opened this issue Feb 4, 2025 · 2 comments · Fixed by #102474
Closed

Text inside Label nodes doesn't account &zwsp (U+200B) as line-breaking space #102414

SysError99 opened this issue Feb 4, 2025 · 2 comments · Fixed by #102474

Comments

@SysError99
Copy link
Contributor

Tested versions

4.3-stable-web

System information

Linux 6.11.11-1-MANJARO

Issue description

Text inside Label nodes doesn't account &zwsp (U+200B) as line-breaking space. Making custom line-breaking algorithms impossible to implement.

Steps to reproduce

  • Put any text that has &zwsp (U+200B) inside for manual line-breaking.
  • Put autowrap_mode to Word.
  • Non-latin strings have abnormal proportion despite having &zwsp applied.

Minimal reproduction project (MRP)

No reproduction project, but there's sample text that includes &zwsp:

สวัสดี​ค่ะ​ ​ดิฉัน​ชื่อ​กานดา​ ​จบ​การ​ศึกษา​จาก​คณะ​บริหารธุรกิจ​ ​สาขา​การ​ตลาด​ ​มหาวิทยาลัย​ ​ABC​ ​ค่ะ​ ​ระหว่าง​เรียน​ ​ดิฉัน​เคย​เข้า​ร่วม​โปร​เจ​กต์​การ​แข่งขัน​แผน​ธุรกิจ​ ​ซึ่ง​ทำให้​ได้​พัฒนา​ทักษะ​ด้าน​การ​วางแผน​และ​การ​ทำงาน​เป็น​ทีม​ ​นอกจาก​นี้​ยัง​สนใจ​เรียน​รู้​ด้าน​การ​ตลาด​ดิจิทัล​ ​ซึ่ง​ดิฉัน​หวัง​เป็น​อย่าง​ยิ่ง​ว่า​จะ​ได้​นำ​ความ​รู้​ที่​มี​ ​มาส​ร้าง​ประโยชน์​ให้​กับ​องค์กร​ค่ะ

Text without &zwsp:

สวัสดีค่ะ ดิฉันชื่อกานดา จบการศึกษาจากคณะบริหารธุรกิจ สาขาการตลาด มหาวิทยาลัย ABC ค่ะ ระหว่างเรียน ดิฉันเคยเข้าร่วมโปรเจกต์การแข่งขันแผนธุรกิจ ซึ่งทำให้ได้พัฒนาทักษะด้านการวางแผนและการทำงานเป็นทีม นอกจากนี้ยังสนใจเรียนรู้ด้านการตลาดดิจิทัล ซึ่งดิฉันหวังเป็นอย่างยิ่งว่าจะได้นำความรู้ที่มี มาสร้างประโยชน์ให้กับองค์กรค่ะ

Unexpected behaviour:
Image of unexpected word cutting in Thai
Expected behaviour:
Image

@bruvzg
Copy link
Member

bruvzg commented Feb 4, 2025

In 4.4 ZWSP works as word break, so this is already fixed. Also, some other line breaking bugs were fixed, and these two texts should behave the same, in most cases there should be no need to add breaks manually.

Image

@bruvzg bruvzg assigned bruvzg and unassigned bruvzg Feb 4, 2025
@bruvzg
Copy link
Member

bruvzg commented Feb 6, 2025

I guess the issue also might be related to your project config, make sure you have internationalizationlocaleinclude text server data checked in the project settings, since fallback line breaking do not handle ZWSP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants