-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
add text height calculation for multiline text area #5404
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
NOTES:
Processing (top): |
hey @dhowe thanks so much for doing this! i was going to say all the examples look right but i wasn't sure about baseline vs center but it seems you've figured that out. :) For the leading question, i think we might want to fix that, but that doesn't need to happen as part of this fix. (i just checked and the behavior your're showing is the same on the |
Cool. If I remember correctly the different manner of calculating leading was a group decision made at the time as it yielded better results, but certainly open to re-discussing. |
also @outofambit perhaps you have a preference, one way or the other, regarding #5408 ... |
fixed with #5432! |
(As previously noted in #5366)
We support vertical alignment of text with
textAlign()
, but right now the vertical height for multiline text is not computed. This means that a single line text is vertically aligned properly, but not multiline text.It might be tricky to calculate the total height of multiline text because the text wrap style will change how many lines of text are laid out.
https://editor.p5js.org/outofambit/sketches/eqIUrqXH6 would demonstrate this issue, but won't render until we release a version of p5.js with the bug fix in #5366.
The text was updated successfully, but these errors were encountered: