-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat(typography): add PRETTY/BALANCE textWrap modes with DP-based balanced wrapping #8297
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
base: main
Are you sure you want to change the base?
feat(typography): add PRETTY/BALANCE textWrap modes with DP-based balanced wrapping #8297
Conversation
…anced word wrapping\n\n- Introduces and wrap styles\n- Uses dynamic programming to minimize raggedness\n- Integrates with 2D renderer; works with existing alignments including JUSTIFIED\n\nRefs processing#7712
|
🎉 Thanks for opening this pull request! For guidance on contributing, check out our contributor guidelines and other resources for contributors! Thank You! |
|
@Vansh0204 have you created tests for this feature? |
|
Thanks for reviewing, sir! I haven't added tests yet – I'll add comprehensive unit tests for the PRETTY/BALANCE textWrap modes covering the main functionality and edge cases. I'll push them shortly. |
|
a good place to start would be the alignment tests in
eventually we will also need pixel-based tests like those here: https://github.com/processing/p5.js/blob/dev-2.0/test/unit/visual/cases/typography.js |
|
Hi @dhowe, sir! I've updated the PRs to include the necessary tests. |
|
Sorry, did you make this PR against the dev-2.0 branch ? |
|
Yes sir, the PR is currently targeting dev-2.0. Should I change the base branch to main instead, or would you prefer I rebase my changes on top of dev-2.0? Let me know which branch you'd like me to target, and I'll update accordingly. |
|
Yes @dhowe sir, that's correct! The PR is targeting main. I can see it shows "base: main" at the top of the PR. Let me know if there's anything else you'd like me to address! |
|
both of these PR's need to target |
|
@dhowe sir, I have to work on it. |
|
Thank you, @dhowe sir for your guidance. |
|
@dhowe Sir, one last request, can you please review my new PRs? |



PR2
Addresses and resloved #7712