Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.7k
feat(typography): add JUSTIFIED horizontal alignment for bounded text in 2D renderer#8294
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 ourterms of service andprivacy 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?
Conversation
…erer- Justifies non-final lines in bounded text()- Keeps final line ragged- Maps Canvas2D textAlign to LEFT when JUSTIFIED is set- WEBGL remains left-aligned for nowRefsprocessing#7712
96200c1 to05aa09aComparedhowe commentedNov 27, 2025
@Vansh0204 have you created tests for this feature? |
Vansh0204 commentedNov 28, 2025
Thanks for reviewing, sir! I haven't added tests yet – I'll add comprehensive unit tests for JUSTIFIED alignment in the 2D renderer covering inter-word spacing distribution and edge cases. I'll push them shortly. |
dhowe commentedNov 28, 2025
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 |
Vansh0204 commentedNov 30, 2025
Hi@dhowe, sir! I've updated the PRs to include the necessary tests. |


Uh oh!
There was an error while loading.Please reload this page.
PR 1
Addresses#7712