Change Fonts
by Gary Roberson · in Torque Game Engine · 04/21/2011 (4:35 pm) · 4 replies
I need to know how to control fonts in TGE 1.4.2
How do I load in my own fonts without using bitmaps!
How do I load in my own fonts without using bitmaps!
About the author
#2
04/22/2011 (6:55 am)
As Steve said, it's been a long long time but I am pretty sure it works the same as in Torque 3D, the fonts get saved out as .uft files and those are what you would include with your project if you were releasing it.new GuiControlProfile (testFont)
{
opaque = true;
fontType = "Arial";
fontSize = 16;
fillColor = "150 150 158"; //selection color
fontColor = "255 255 255";
justify = "left";
};
#3
Would this be in the main.cs script, or another.
@Matt,
Is this actual code, or do I replace GuiControl with the control I'm using, for example GuiTextProfile (testFont),
04/22/2011 (1:03 pm)
@Steve,Would this be in the main.cs script, or another.
@Matt,
Is this actual code, or do I replace GuiControl with the control I'm using, for example GuiTextProfile (testFont),
#4
04/22/2011 (2:50 pm)
Every gui control has a profile field. Create a new profile (or modify an existing one) with your font's name, desired size, desired color, etc. Set your control (if it displays text) to use that profile. The font name (fontType) must be a name of a font located on your system (I think it has to be a truetype font, but not certain). Torque will then generate a font cache that is located somewhere in your game directory - if this cache exists then customers do not need the system font (so distribute the cache with your game).
Associate Steve Acaster
[YorkshireRifles.com]
Look for the font declarations in the scripts as an example and then add your own.