Hello! I’m having trouble using the text() function in p5.js.
I understand that when you provide 5 inputs to the function, the last four describe a rectangle in which it will wrap your provided string. However, in some of my projects it wraps the text by hyphenating the words that cross the box, and moving the rest of the word to the next line, and in other projects if a word crosses the box it moves the entire word to the next line.
Ex 1:
The quick brown fox jump-
ed over the lazy dog.
Ex 2:
The quick brown fox
jumped over the lazy dog.
My issue is that I don’t know how to tell the function which of these options I want.
In most instances I’d prefer the second option, but p5.js seems to be deciding at random which option it takes.
Thanks in advance to anyone who can help me with this!