Description
Version
5.0.0 - 5.4.2
5.4.3-dev.20230502
5.5.0-dev.20230501
Link to Minimal Reproduction
Steps to Reproduce
- Create a chart with any text and set it up to wrap set text when overflowing.
- Use characters of the so-called non-BMP.
- Try some widths until you break within the character or before a space (or both as in the minimal reproduction)
Current Behavior
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
Activity
Ovilia commentedon Jun 13, 2023
The related logic is at https://github.com/ecomfe/zrender/blob/1e27245f74781ec9e9e6f17650b1caeaee15639e/src/graphic/helper/parseText.ts#L614
echarts-bot commentedon 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 commentedon Jul 24, 2023
There already is a pull request pending (ecomfe/zrender#1006)