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

escape character \n does not work in text() function #446

Closed
domportera opened this Issue Dec 4, 2014 · 4 comments

Comments

Projects
None yet
3 participants
@domportera

domportera commented Dec 4, 2014

I haven't tried any of the other escape characters, but when trying to use \n in a p5.js sketch, it is totally ignored. The only way to do line breaks within a single text() function is to use the version of the function that takes parameters for a bounding box.

@GoToLoop

This comment has been minimized.

Show comment
Hide comment
@lmccart

This comment has been minimized.

Show comment
Hide comment
@lmccart

lmccart Dec 4, 2014

Member

yup, sounds like we'll need to add a workaround as this isn't natively supported by HTML5Canvas
http://stackoverflow.com/questions/5026961/html5-canvas-ctx-filltext-wont-do-line-breaks

Member

lmccart commented Dec 4, 2014

yup, sounds like we'll need to add a workaround as this isn't natively supported by HTML5Canvas
http://stackoverflow.com/questions/5026961/html5-canvas-ctx-filltext-wont-do-line-breaks

@GoToLoop

This comment has been minimized.

Show comment
Hide comment
@GoToLoop

GoToLoop Dec 4, 2014

Contributor

If you're gonna add a workaround to \n, can you also do it for \t too? :D

Contributor

GoToLoop commented Dec 4, 2014

If you're gonna add a workaround to \n, can you also do it for \t too? :D

@lmccart lmccart closed this in 1c6c8a2 Dec 5, 2014

@GoToLoop

This comment has been minimized.

Show comment
Hide comment
@GoToLoop

GoToLoop Dec 5, 2014

Contributor

Wow! That was fast! Thx @lmccart ! ^_^

Contributor

GoToLoop commented Dec 5, 2014

Wow! That was fast! Thx @lmccart ! ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment