I don’t understand how work the function textSize.
Can you explain me ?
Do you mean fontSize? This will change the size of your text. You can read about it here:
http://twolivesleft.com/Codea/Reference/#detail/index/fontSize
w,h = textSize("Some text")
will measure the size that Some text
will take up on the screen in the current font at the current font size. It’s the size of the surrounding box (modulo some effects with extreme italic fonts), including descender.
Interesting. @Andrew_Stacey - is this in the Codea Reference? I couldn’t see it.
Thanks
@Reefwing: It’s listed under “Text Metrics” in the “Graphics” section. I usually find it by first going to text
and looking at the Related
entries.
so it is, thanks @Andrew_Stacey! Missed that one - here is the link: http://twolivesleft.com/Codea/Reference/#detail/index/textSize