p5.js
p5.js copied to clipboard
Let characters other than space break lines
Increasing access
This would increase support for languages that use different spaces, and it would give greater control over text as a whole.
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 request details
Currently, when rendering text with a width parameter the given text is only broken on space characters. If a user wants to insert characters like a zero width joiner in order to allow text wrapping in a specific spot, p5 just ignores it and will not split the text.
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
I'm not sure I understand the use case here:
text('some text \n this is a new line', 50,50)
would work with or without setting the width
or is it something for specific languages? Thai? (I'm sorry for my ignorance)
in v2.0 users can pass the character to split on