Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: line width is too small to display any characters#1956

Merged
wang1212 merged 1 commit intoreleasefrom
fix/wordWrap
Jun 24, 2025
Merged

fix: line width is too small to display any characters#1956
wang1212 merged 1 commit intoreleasefrom
fix/wordWrap

Conversation

@wang1212
Copy link
Member

@wang1212 wang1212 commented Jun 23, 2025

🀔 This is a ...

  • New feature
  • Bug fix
  • Site / Document optimization
  • TypeScript definition update
  • Refactoring
  • Performance improvement
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

In the past, implementations of text line breaks that encountered a situation where the current line could not display any characters would continue to test the next line until the maxlines limit was encountered.

If the wordWrapWidth was so small that it couldn't even display a single character, it made no sense to continue testing subsequent lines, and created redundant blank lines.

Now, if the current line encounters an arbitrary character that cannot be displayed, it will be terminated immediately.

📝 Changelog

Language Changelog
🇺🇞 English fix: terminate immediately when the line width is too small to display any characters
🇚🇳 Chinese fix: 圓行宜小到无法展瀺任意字笊时立即终止换行测试

☑ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@wang1212 wang1212 requested a review from Alexzjt June 24, 2025 02:21
Copy link
Contributor

@Alexzjt Alexzjt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@wang1212 wang1212 merged commit 43c533f into release Jun 24, 2025
2 checks passed
@wang1212 wang1212 deleted the fix/wordWrap branch June 24, 2025 02:24
wang1212 added a commit that referenced this pull request Jun 27, 2025
* fix: 🐛 Fix invalid URL links (#1951)

* fix: terminate immediately when the line width is too small to display any characters (#1956)

* docs: update documentation and examples

* fix(svg-renderer): add x and y attributes to foreignObject in SVGRenderer (#1961)

Add support for x and y attributes in foreignObject elements to ensure proper positioning in SVG rendering.

* docs: update documentation formatting and update dependencies

* perf: optimize element event distribution and attribute update process (#1944)

* fix(plugin-box2d): remove trailing slash from BOX2D_UMD_DIR

* perf: optimize element event distribution and attribute update process

* feat: use RIC to avoid frequent calls syncRTree (#1960)

* perf: optimize element event distribution and attribute update process

* perf: 增加enableRICSyncRTree

---------

Co-authored-by: wang1212 <[email protected]>

* chore: fix lint error

* refactor: enhance performance optimization with experimental features

- Move performance-related configurations from runtime to canvas config
- Introduce experimental feature flags in CanvasConfig for better control
- Optimize event propagation and attribute updates
- Add RIC (RequestIdleCallback) for syncRTree operations
- Improve type safety and code organization

---------

Co-authored-by: huiyu.zjt <[email protected]>

* chore: add changeset

* chore(release): bump version (#1958)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: iaosee <[email protected]>
Co-authored-by: huiyu.zjt <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants