Game Development Community

How to influence text height?

by Dieter Eichert · in Torque X 2D · 03/31/2008 (9:08 am) · 2 replies

Hello.

I write text via a GUIText, but i see no way to influence the actually rendered text height. I can set the size, but its results in cutting off the lower part of the characters.

please let me know, how you do it.

thanks,
max.

#1
03/31/2008 (10:29 am)
Change the font:

GUITextStyle guiTextStyle = new GUITextStyle;
guiTextStyle.FontType = "Arial12"; // or whatever
// etc
myGUIText.Style = guiTextStyle; // assign the style to your GUIText
#2
04/01/2008 (9:08 am)
Torque 2 uses the XNA spritefont class so you can create one of those and one of the attributes is line height.