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

Fix text overflow issues in boundsOfString #1594

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

hollandjake
Copy link
Contributor

What kind of change does this PR introduce?

Noticed an issue in the latest rotatable text PR #1588 , which was computing the bounds of the text incorrectly when the height limit is reached.

This was caused by the LineWrapper using the document.y for calculating current position (rather than using the offset from the text origin). Fix is to replicate the same behaviour as how heightOfString method works by just moving the y pos down a line.

Checklist:

  • Unit Tests
  • Documentation
  • Update CHANGELOG.md
  • Ready to be merged

@hollandjake hollandjake mentioned this pull request Jan 27, 2025
4 tasks
@blikblum blikblum merged commit 868e9be into foliojs:master Jan 27, 2025
3 checks passed
@hollandjake hollandjake deleted the fix-rotatable-text branch January 30, 2025 11:21
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