|
|
measuring text size
#258734
04/01/09 19:41
04/01/09 19:41
|
Joined: Jul 2004
Posts: 1,710
MMike
OP
Serious User
|
OP
Serious User
Joined: Jul 2004
Posts: 1,710
|
Hi
OMG, i know how measure the text in the width, but the total height of the text is occupaying in pixels, how do i read that??
im just asking this , because i dont know other alternative.
I have a text and i want to use the vertical slider to scroll text down, but for that i need to know how much it uses of pixels to then multyply for the slider maximum.
Im using TrueType font, and Wrap for text , using size_y.
Thanks.
Last edited by MMike; 04/01/09 19:43.
|
|
|
Re: measuring text size
[Re: MMike]
#258736
04/01/09 19:45
04/01/09 19:45
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
I THINK that the height in pixels is its point-size. ie. arial#24 I believe is 24 pixels tall. But bold/italics may vary that.
Hopefully someone else can verify this.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: measuring text size
[Re: MMike]
#258780
04/02/09 04:19
04/02/09 04:19
|
Joined: Mar 2009
Posts: 112 Germany
KDuke
Member
|
Member
Joined: Mar 2009
Posts: 112
Germany
|
I just tested.. bold and italics don't differ from the normal text-height. It is the point-size. So you simply count the number of linefeed in your string and multiply the result with the point-size.
greeting K-Duke
Using A7 Free Click and join the 3dgs irc community! Room: #3dgs
|
|
|
Re: measuring text size
[Re: MMike]
#259492
04/06/09 13:57
04/06/09 13:57
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
I cant really test this easily ATM, but try doing a diagnostic on YourText.length. It is an internal property of the TEXT object, I havent found any documentation for it, but with any luck it may be a measure of the number of lines after 'WRAP'ing or something.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|