Game Development Community

Text Object scale up?

by Gustavo Boni · in Torque Game Builder · 03/23/2008 (10:03 am) · 5 replies

Hi, not sure if its a bug or i'm missing something, but when i add a text object to my level it starts very small, so i increased the character height and i got that:

img526.imageshack.us/img526/6190/89507991yg7.jpg
How do i scale up my text objects?

#1
03/23/2008 (2:05 pm)
You need to set the "fontsizes" field to something more appropriate.

In the editor, add the dynamic field "fontsizes" and play around with the values. For a character height of 3 I try using a font size of 18-20 depending on the font. Increase the character height, increase the font size.
#2
03/23/2008 (2:33 pm)
Actually, you don't have to use trial and error to get a font to look right (although it was something I did for quite a while). Cutting and pasting this from one of the TDN tutorials:

Quote:One note: If the score text does not look sharp, you can edit this by going into the .t2d file of your level and changing the "fontSizes" property of the t2dTextObject. To find the right fontSize, take your display resolution and divide it by the camera size. In this tutorial, the display resolution is 1024x768 and the camera size is 100x75. 1024/100 and 768/75 both are 10.24. Take the character height of 3 and multiply that by 10.24 and you get 30.72 which is rounded to the fontSize of 31. Do that for your resolution and camera size and it should look right.
#3
03/23/2008 (2:52 pm)
Hey, that is awesome! Thanks Mike!
#4
03/23/2008 (3:57 pm)
Being the TDN guru comes in handy apparently. Nice piece of info, thanks!
#5
03/23/2008 (6:30 pm)
Hey Mike! Thank you very much!! It works!!