Adding custom .ttf fonts
by Tim Heldna · in Torque Game Engine · 03/13/2006 (6:33 pm) · 4 replies
I've searched around for this and as far as I can tell am doing everything correctly, yet am having no luck.
Here's what I think is supposed to happen:
1) Create and install your .ttf font to windows
2) In customProfiles.cs create a new control that contains your new font
3) Your new font now appears in Torque, great!
Steps 1 - 3 work fine for me, as long as the font is installed to windows. However, run the game on a different computer that doesn't have the font installed and it just defaults to Arial.
Now It's my understanding that Torque will cache the font (eg Abduction 36 (ansi).uft) so any computer runnung your game will have access this font, without needing the .ttf file installed. This is the part that's not working for me.
How do I embed the font into Toque so I don't need the .ttf installed on windows???
Please help, this is one of those small problems that's driving me crazy!!!
Here's what I think is supposed to happen:
1) Create and install your .ttf font to windows
2) In customProfiles.cs create a new control that contains your new font
new GuiControlProfile ("MyFontTextProfile")
{
opaque = false;
fontType = "Abduction";
fontSize = 36;
fontColor = "0 0 0";
}; 3) Your new font now appears in Torque, great!
Steps 1 - 3 work fine for me, as long as the font is installed to windows. However, run the game on a different computer that doesn't have the font installed and it just defaults to Arial.
Now It's my understanding that Torque will cache the font (eg Abduction 36 (ansi).uft) so any computer runnung your game will have access this font, without needing the .ttf file installed. This is the part that's not working for me.
How do I embed the font into Toque so I don't need the .ttf installed on windows???
Please help, this is one of those small problems that's driving me crazy!!!
About the author
#2
also, you might need to modify engine/game/main.cs and update the registerExtension for uft, cvs as of a few days had it as constructFont when it should be constructNewFont
-Ron
03/13/2006 (6:58 pm)
Are you sure the uft file is in the common/ui/cache directory of the other computer? also, you might need to modify engine/game/main.cs and update the registerExtension for uft, cvs as of a few days had it as constructFont when it should be constructNewFont
-Ron
#3
Yep, it's definately in the common/ui/cache directory.
Will pop into head code, thanks for the link Rubes.
03/13/2006 (7:05 pm)
Ron,Yep, it's definately in the common/ui/cache directory.
Will pop into head code, thanks for the link Rubes.
#4
On a side note, a lot of new bugs seemed to have been introduced into 1.4. GG employees are fixing them in new releases & that's great but what does one do if they don't want to merge. I'm using tlk1.4 so it's a hassle to merge. I for one would love it if GG released a written change log of all the fixes that went into 1.4.2. Just makes life a lot easier. I'm only interested in crucial bug fixes, such as the one described in this thread.
03/13/2006 (7:25 pm)
Thank you guys, sorted it out. The section of code that Ben advises to remove seems to break things so I left it in, everything seems to work with it in.On a side note, a lot of new bugs seemed to have been introduced into 1.4. GG employees are fixing them in new releases & that's great but what does one do if they don't want to merge. I'm using tlk1.4 so it's a hassle to merge. I for one would love it if GG released a written change log of all the fixes that went into 1.4.2. Just makes life a lot easier. I'm only interested in crucial bug fixes, such as the one described in this thread.
Torque 3D Owner Rubes