Game Development Community

Fonts not coming through to project build

by Shaz · in Torque Game Builder · 08/23/2008 (10:45 pm) · 5 replies

I have about half a dozen UFT fonts in my common/data/fonts folder. I've uninstalled them from my OS to make sure the game is actually picking them up. It works perfectly when I play from Torsion or the TGB editor.

However, when I build the project, even though the fonts are in my common/data/fonts folder under the built project, they don't show up when I play the game. It defaults back to the standard old Arial. I'm not getting any console errors indicating the files can't be found.

Any ideas what I have to do to make the exe pick up the correct fonts?

#1
08/24/2008 (10:54 pm)
Ok- I've got this one sorted out, after much hair-pulling.

Seems there's a profiles.cs in common/gui and a guiProfiles.cs in game/gamescripts. I had my profiles set out in guiProfiles.cs (maybe because a tutorial did it that way?) and it worked fine when I ran from Torsion or TGB. But when I built the project, the fonts didn't show.

Moving the profiles to the bottom of common/gui/profiles.cs is what made the difference.

So I'm up and running now, and players can actually see what they're supposed to do. But I'm curious why guiProfiles.cs is even IN game/gameScripts if it's going to be ignored in a built project? I don't know how many hours I lost trying to figure this one out - should game/gamescripts/guiProfiles.cs even exist?
#2
08/24/2008 (10:58 pm)
The benefit of putting your profiles in guiProfiles.cs is that the editor knows to execute that file so that they will appear in the profiles dropdown list in the guieditor. If it is not included in build-project then that is a bug.
#3
08/24/2008 (11:07 pm)
So the difference between common/gui/profiles.cs and game/gamescripts/guiprofiles.cs is that the latter influences the guieditor (I'm assuming this means when you run it from the TGB editor) and the former doesn't?

Please do have it checked GG. I just did some testing and that's definitely the difference between a built project showing custom fonts and not showing them. Oh - all my guis are done in script as well, not via the gui editor. If that makes a difference (or explains why no-one has picked this up so far).

And if you find another explanation, I'll be all ears :)
#4
08/25/2008 (1:07 am)
Shaz, you suffer from a bug mentioned here: www.garagegames.com/mg/forums/result.thread.php?qt=72543. The same bug applies to the guiProfiles.cs file and can be fixed in the same manner in that post.
#5
08/25/2008 (1:15 am)
Mmm - I'll need you to explain that a little more. That topic is talking about datablocks, but my profiles are in guiProfiles.cs

ah - looks like I need to also change

if( isFile( %userGUIProfileFile ) )

to

if( isFile( %userGUIProfileFile ) || isFile( %userGUIProfileFile @ ".dso" ) )

correct?

Thanks for your help! Now I understand it a little better. Are these things that are scheduled for change in the next release?