Skip to content
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
Closed

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

domportera opened this issue Dec 4, 2014 · 4 comments

Comments

@domportera
Copy link

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
Copy link
Contributor

GoToLoop commented Dec 4, 2014

@lmccart
Copy link
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
Copy link
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 as completed in 1c6c8a2 Dec 5, 2014
@GoToLoop
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants