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

[Bug] Zrender Overflow Word Wrapping can Break Apart Characters and can Break Before Spaces #18583

Open
Wetterquarz opened this issue May 2, 2023 · 3 comments · May be fixed by ecomfe/zrender#1006
Labels
bug difficulty: easy Issues that can be fixed more easily than the average. en This issue is in English
Milestone

Comments

@Wetterquarz
Copy link

Wetterquarz commented May 2, 2023

Version

5.0.0 - 5.4.2
5.4.3-dev.20230502
5.5.0-dev.20230501

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-marker&code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GOAHmAQOQAqOAtiDgE4CGYArkzrAMIAWLaAHNuEOGD7cewOmKGwA6jhwBrADSxBAE02wsMeWDJgMkriwBmRphmCwLwJgGNuAd1YgQc27AGeccK4QEpqAPBuAhjsRUZEx0ZRqROhG5ADKYACeuASoxMTAAG7MFvquVABG5irxicRBWhIEACwADABMNQC-RB0JHQDcQA

Steps to Reproduce

  1. Create a chart with any text and set it up to wrap set text when overflowing.
  2. Use characters of the so-called non-BMP.
  3. Try some widths until you break within the character or before a space (or both as in the minimal reproduction)

Current Behavior

image
The 3rd line starts with a space.
The 3rd line doesn't calculate the character widths correctly and is short.
One of the Domino Tiles has been broken into two illegal characters.

Expected Behavior

According to the Unicode Standard (https://www.unicode.org/reports/tr14/#SP) the wrapping should occur after all space-characters when a line-break is desired by the algorithm. Characters should also, obviously, not be broken in two and their width should be correctly determined.

Environment

- OS: Windows 10
- Browser: Edge 112.0.1722.58 (Chromium)

Any additional comments?

No response

@Wetterquarz Wetterquarz added the bug label May 2, 2023
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels May 2, 2023
@Ovilia Ovilia removed the pending We are not sure about whether this is a bug/new feature. label Jun 13, 2023
@Ovilia Ovilia added this to the TBD milestone Jun 13, 2023
@Ovilia
Copy link
Contributor

Ovilia commented Jun 13, 2023

@Ovilia Ovilia added the difficulty: easy Issues that can be fixed more easily than the average. label Jun 13, 2023
@echarts-bot
Copy link

echarts-bot bot commented Jun 13, 2023

This issue is labeled with difficulty: easy.
@Wetterquarz Would you like to debug it by yourself? This is a quicker way to get your problem fixed. Or you may wait for the community to fix.

Please have a look at How to debug ECharts if you'd like to give a try. 🤓

@Wetterquarz
Copy link
Author

There already is a pull request pending (ecomfe/zrender#1006)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug difficulty: easy Issues that can be fixed more easily than the average. en This issue is in English
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants