How to show the right font
by Isaac Barbosa · in Torque Game Builder · 12/03/2007 (8:58 am) · 26 replies
Hello,
sorry if this is a cross post with this (but I need a better "Thread topic" to catch some help): www.garagegames.com/mg/forums/result.thread.php?qt=68586
I'm really really desespetared and stressed due to this:
I have saved my font in common/data/fonts... and the problem is that if a machine doesn't have the font in windows/fonts the game doesn't shows the appropiate font, it show always "ARIAL" by default, and of course, that screw up the whole texts in the game, and with that, the whole game :(
I'm not an expert and I feel stupid doing this question, but if this is a TGB bug how can I deal with it to fix it?
Thanks again
sorry if this is a cross post with this (but I need a better "Thread topic" to catch some help): www.garagegames.com/mg/forums/result.thread.php?qt=68586
I'm really really desespetared and stressed due to this:
I have saved my font in common/data/fonts... and the problem is that if a machine doesn't have the font in windows/fonts the game doesn't shows the appropiate font, it show always "ARIAL" by default, and of course, that screw up the whole texts in the game, and with that, the whole game :(
I'm not an expert and I feel stupid doing this question, but if this is a TGB bug how can I deal with it to fix it?
Thanks again
#2
Sorry for the question... can you explain in more detail how to achieve that? where is the place to check for that?
Thanks
12/03/2007 (11:29 am)
@SpiderSorry for the question... can you explain in more detail how to achieve that? where is the place to check for that?
Thanks
#3
Search for them on your hard drive.
Then do a text search for this: $Gui::fontCacheDirectory. Change it to a folder in your game. Copy the .uft files into that folder.
I'm shooting from the hip here, a little bit. I haven't actually tried any of this.
12/03/2007 (2:43 pm)
I think the files are *.uftSearch for them on your hard drive.
Then do a text search for this: $Gui::fontCacheDirectory. Change it to a folder in your game. Copy the .uft files into that folder.
I'm shooting from the hip here, a little bit. I haven't actually tried any of this.
#4
I found uft files in 1.1.3 TGB games.
But in my computer, in 1.5, there are no uft being created! TGB is reading from windows/fonts!
What could be wrong? Are UFT file being destroyed or not created at all? Is this a bug?
12/03/2007 (3:32 pm)
@Spider:I found uft files in 1.1.3 TGB games.
But in my computer, in 1.5, there are no uft being created! TGB is reading from windows/fonts!
What could be wrong? Are UFT file being destroyed or not created at all? Is this a bug?
#5
\Application Data\GarageGames\TorqueGameBuilder\fonts
12/03/2007 (4:40 pm)
I see some in Documents And Settings\
#6
There are no fonts in my folders :(
I search all over my hard drive and nothing. I try to compile in windows xp in another machine and the problem persists. So, the question is: how can I do to be able to get my uft files? are those files created once game is compiled and used after that or are them created everytime game is executed?
Thanks and please help me with this issue, can't find a solution :(
12/07/2007 (6:05 pm)
@Spider,There are no fonts in my folders :(
I search all over my hard drive and nothing. I try to compile in windows xp in another machine and the problem persists. So, the question is: how can I do to be able to get my uft files? are those files created once game is compiled and used after that or are them created everytime game is executed?
Thanks and please help me with this issue, can't find a solution :(
#7
Torque should create a *.utf for it when you create a profile using that font. I think in your case lets find out first why Torque isn't creating the *.utf file.
Aun.
12/07/2007 (6:13 pm)
@ Issaac , what font type are you using ? Are you sure the font is installed on your machine ?Torque should create a *.utf for it when you create a profile using that font. I think in your case lets find out first why Torque isn't creating the *.utf file.
Aun.
#8
It is a true type: Dominican
I have installed in my system because I can see it if I'm in development. But the uft are not created and I can't see the font in other machines that doesn't have the font installed in windows/fonts folder... if the font is in that folder the font is viewed well in the game without the uft.... the problem is that most of people would not have the specific font in their systems and you can't say "please install this font before run the game..."
12/07/2007 (6:39 pm)
@Aun, thanksIt is a true type: Dominican
I have installed in my system because I can see it if I'm in development. But the uft are not created and I can't see the font in other machines that doesn't have the font installed in windows/fonts folder... if the font is in that folder the font is viewed well in the game without the uft.... the problem is that most of people would not have the specific font in their systems and you can't say "please install this font before run the game..."
#9
12/08/2007 (8:04 am)
And most likely you wouldn't have the right to redistribute the font anyway. Is the font protected? Some fonts are protected against embedding and such.
#10
And I don't believe that that is the problem since no uft file at all is created. The fonts folder is empty... neither Arial or any font is created as uft.
I believe this is a bug, but can't find a solution. :(
12/08/2007 (8:10 am)
I'm not sure about that. I believe it is free to use.And I don't believe that that is the problem since no uft file at all is created. The fonts folder is empty... neither Arial or any font is created as uft.
I believe this is a bug, but can't find a solution. :(
#11
You can find uft's in "C:\Documents and Settings\userxx\Application Data\GarageGames\TorqueGameBuilder\fonts"
12/08/2007 (3:43 pm)
It's a bug. Even if there exists uft fonts in $Gui::fontCacheDirectory, arial is displayed.You can find uft's in "C:\Documents and Settings\userxx\Application Data\GarageGames\TorqueGameBuilder\fonts"
#12
Thanks... Obviously it is a bug and I really hope it is fixed in next release.
And no, uft are not in my computer, not in the path you say, neither in any folder :(
I will wait for next release playing heroes of might and magic :)
12/08/2007 (4:15 pm)
@Samo,Thanks... Obviously it is a bug and I really hope it is fixed in next release.
And no, uft are not in my computer, not in the path you say, neither in any folder :(
I will wait for next release playing heroes of might and magic :)
#13
12/12/2007 (2:00 pm)
Changing $Gui::fontCacheDirectory to point to somewhere inside the game's folder, like common/data/fonts, worked for me. If you're doing that though, you should run the game directly from its folder (copy in TGBGame and the DLLs), and not through the Game Builder.
#14
to:
but the font is not showed yet, I still viewing Arial font. What else can I do to fix this? is this problem fixable?
Thanks and sorry but this is a huge bug for me and I can't fix it :(
12/13/2007 (8:31 am)
I have the uft file in the right folder (myGame/common/data/fonts) and I have changed:$Gui::fontCacheDirectory = getPrefsPath("fonts");to:
$Gui::fontCacheDirectory = getPrefsPath("common/data/fonts");but the font is not showed yet, I still viewing Arial font. What else can I do to fix this? is this problem fixable?
Thanks and sorry but this is a huge bug for me and I can't fix it :(
#15
because the echoed path is:
C:/Users/Isaac/AppData/Roaming/Independent/UntitledGame/common/data/fonts
and the font is not at that location.
I was able to fix this in XP because the echoed path is the correct one. BUt if there is a problem with this
$Gui::fontCacheDirectory = getPrefsPath("common/data/fonts"); in Vista
is there a chance to fix it?
Thanks :)
12/13/2007 (9:49 am)
It seems that there is a problem with $Gui::fontCacheDirectory = getPrefsPath("common/data/fonts"); or $Gui::fontCacheDirectory = getPrefsPath("fonts"); in vista:because the echoed path is:
C:/Users/Isaac/AppData/Roaming/Independent/UntitledGame/common/data/fonts
and the font is not at that location.
I was able to fix this in XP because the echoed path is the correct one. BUt if there is a problem with this
$Gui::fontCacheDirectory = getPrefsPath("common/data/fonts"); in Vista
is there a chance to fix it?
Thanks :)
#16
Try this:
1. In common/gui/profiles.cs change $Gui::fontCacheDirectory = "./common/data/fonts";
2. start your project and type writefontcache() in console window. This command creates fonts folder with all uft fonts you use in your gui controls.
3. use full font names in fontType property in your gui control. In my case fontType = "BankGothic" didn't work until I changed to fontType = "BankGothic Md BT Medium", although both uft files were created with writeFontCache().
4. you can remove your windows ttf font and start your project - no more Arial ;)
---------------------
Samo
12/13/2007 (1:45 pm)
Ok, reading Kalle's post I've finally got this thing working. :)~Try this:
1. In common/gui/profiles.cs change $Gui::fontCacheDirectory = "./common/data/fonts";
2. start your project and type writefontcache() in console window. This command creates fonts folder with all uft fonts you use in your gui controls.
3. use full font names in fontType property in your gui control. In my case fontType = "BankGothic" didn't work until I changed to fontType = "BankGothic Md BT Medium", although both uft files were created with writeFontCache().
4. you can remove your windows ttf font and start your project - no more Arial ;)
---------------------
Samo
#17
12/13/2007 (4:11 pm)
Thanks SAMO! that did the trick :) :) :)
#18
expandFilename("~/data/fonts")
to
"./common/data/fonts"
my game no longer runs. It crashes immediately upon running. This is the end of the console.log:
I'm getting the same issue where fonts don't show up on a computer without the original font installed. Using TGB 1.6.0
12/15/2007 (9:10 pm)
Samo - when I change $Gui::fontChaceDirectory from expandFilename("~/data/fonts")
to
"./common/data/fonts"
my game no longer runs. It crashes immediately upon running. This is the end of the console.log:
Compiling C:/Documents and Settings/Conor/My Documents/My Games/Harpooned/common/gui/profiles.cs... Loading compiled script C:/Documents and Settings/Conor/My Documents/My Games/Harpooned/common/gui/profiles.cs. Loading compiled script C:/Documents and Settings/Conor/My Documents/My Games/Harpooned/common/gui/cursors.cs. Loading compiled script C:/Documents and Settings/Conor/My Documents/My Games/Harpooned/common/gui/messageBoxOk.gui.
I'm getting the same issue where fonts don't show up on a computer without the original font installed. Using TGB 1.6.0
#19
At this point it looks like I'm going to have to convert all my text into images and write my own character management system to replace TGB's fonts system - this is a big waste of time I'm hoping to be able to avoid.
12/15/2007 (9:24 pm)
I tried TGB 1.5.1 and it doesn't crash when I make the $Gui::fontChacheDirectory change above, however the font's still don't show up. I'm not using any TGB gui systems, I'm just placing text objects in the scene. On my development computer they work fine, but on any other computer they don't show up. No errors in the console, just invisible fonts.At this point it looks like I'm going to have to convert all my text into images and write my own character management system to replace TGB's fonts system - this is a big waste of time I'm hoping to be able to avoid.
#20
12/16/2007 (12:30 am)
I've specifically logged this and plan to investigate/test this further.
Torque Owner Spider
Find the font files that are created by TGB. Find the place where TGB looks for the font files when your game loads. Put the font files somewhere in your game folder and CHANGE the place that TGB looks to point to that folder.