It looks like you're new here. If you want to get involved, click one of these buttons!
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.
w,h = textSize("Some text")
Some text
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.
text
Related
so it is, thanks @Andrew_Stacey! Missed that one - here is the link: http://twolivesleft.com/Codea/Reference/#detail/index/textSize
Comments
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 thatSome 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 theRelated
entries.so it is, thanks @Andrew_Stacey! Missed that one - here is the link: http://twolivesleft.com/Codea/Reference/#detail/index/textSize