I know that I’ve used a simple solution to this before, but I having a “senior moment.”
While I can use textSize to get the height of text, when used along with TextWrap, the function continues to return the height of a single line, no matter how many lines TextWrap generates for a long string.
What’s the simple way of determining the total height of a wrapped string? Thanks.
@Mark are you sure? When I run the code that Ignatz linked to, this one, https://codea.io/talk/discussion/comment/61697/#Comment_61697
It seems to work fine, textSize accurately reports the total height of a block wrapped with textwrapwidth. Could it be a push/pop style issue? (AFAIR wrap width is included in the style stack)
Nope, but after a bit of experimentation, it seems like a combination of CORNER mode, large font size, and relatively narrow window is required to generate the issue. I can work around it so… Never mind.
Thanks for checking. I wouldn’t have realized my results were odd if someone hadn’t confirmed most situations worked fine.