p5.js
p5.js copied to clipboard
[2.0] Additional text alignment options
Increasing access
Increases readability and text aesthetics over more languages and charsets
Most appropriate sub-area of p5.js?
- [ ] Accessibility
- [ ] Color
- [ ] Core/Environment/Rendering
- [ ] Data
- [ ] DOM
- [ ] Events
- [ ] Image
- [ ] IO
- [ ] Math
- [x] Typography
- [ ] Utilities
- [ ] WebGL
- [ ] Build process
- [ ] Unit testing
- [ ] Internationalization
- [ ] Friendly errors
- [ ] Other (specify if possible)
Feature enhancement details
- [ ] Support JUSTIFIED as horizontal alignment argument (prob via standard dynamic programming algorithm)
- [ ] Support PRETTY and/or BALANCE as arguments to textWrap() as described here
Hello, @dhowe can u please assign me this issue.
Sure, though each is a significant chunk of work (I actually wonder if they should be separate tickets). Which do you plan to tackle first?
- I’ll split into two PRs.
- PR1: textAlign(JUSTIFIED) in 2D for bounded text(...) , final line ragged.
- PR2: textWrap(PRETTY) + BALANCE (alias), DP-based balanced breaks.
- WEBGL falls back to left for now; I can follow up with justified glyph positioning later.
Hello @dhowe sir, I have raised both PRs can u please review them.
Hello @ksen0 @osteele @andrewn Sir, can you please review my 2 PRs?