-
Notifications
You must be signed in to change notification settings - Fork 111
Text Overflow Issue with Characters in Strings #544
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
Comments
Hi @Rahulhanje, Good catch! You are correct. The behavior of the live sketch does not match the behavior of the Processing code on the page. This is due to a discrepancy between the way that Processing and p5.js handle text wrapping. In Processing, it is sufficient to call However, in p5.js, you have to additionally call To fix this, you will need to edit the corresponding For more details about updating live examples, please see examples.md. I'll assign this issue to you. Let me know if you still have questions and feel free to make a pull request for the change. |
Correction: the behavior difference is specific to character-wise wrapping. Word wrap DOES work in p5.js by default if you set boundaries for the text rectangle. However it does NOT wrap on characters. |
Thank you for assigning the issue to me I’ll start working on it and will need a bit of time to resolve it. |
@SableRaf I Created a pull request on solving this issue can you please review the code and merge it |
Hi Rahulhanje, I took a look at your pull request and have merged it into the website |
Thankyou @Stefterv this is my First open source Contribution |
I checked the website, and my change is visible. It's working perfectly fine |
Hi @Rahulhanje, Thank you so much and congratulations on your first contribution! 🎉 I reopened this issue to mention that the Please open a new PR to revert the changes and only leave the Thank you again for your efforts! If you have any questions, feel free to ask. |
@SableRaf |
I reverted the changes except for |
You are correct! The example code featured on the Character String example page doesn't resize the window. Therefore the Note: I described the character wrapping discrepancy between Processing and p5.js in more detail here: processing/p5.js#7163 (comment) |
this means that i should not take care of vertical overflow of text right so it match the behavior of Processing. |
Correct. The dynamic height adjustment was a clever addition but it doesn't match the Processing sketch so it needs to be removed. Thanks! |
This seems to be an issue on a small number of examples. Feel free to open an issue over at the https://github.com/processing/processing-examples/ repository. |
Okay, I created a new issue regarding that typo. Is it assignable to me? If possible, I request that it assigned to me. |
Great! Thanks @Rahulhanje 🙏 |
Welcome @SableRaf |
@SableRaf
I have encountered an issue where entering a string of text that exceeds the dimensions of the canvas results in the text being cut off or becoming unreadable. The problem arises when the length of the string surpasses the available canvas size.
example URL:https://processing.org/examples/charactersstrings.html
I’d like to work on this issue. Could @SableRaf please assign it to me? Also, I would appreciate any guidance on how to fix it.
The text was updated successfully, but these errors were encountered: