Game Development Community

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
Page«First 1 2 Next»
#21
01/02/2008 (7:48 pm)
I'm anxiously awaiting any progress on this issue. My game is nearing completion, but the font doesn't show up on other computers without the .ttf file installed in c:/windows/fonts. Any suggestions would be greatly appreciated.
#22
01/03/2008 (1:39 pm)
Even when you include the uft fonts in the game/common/fonts folder before building the game?

Greg
#23
01/03/2008 (7:39 pm)
Greg - I think you mean the game/common/data/fonts folder. That was exactly the problem, Samo's solution above would have worked, if I'd done the writefontcache() properly, but when that didn't work I tried copying the .utf files directly into the built game and they didn't show up.

So I took my time and followed the steps carefully and this time the writefontcache() did work and put the .utfs in the right place. Now the custom font does show up on other computers, although there are some little glitches in how it displays (some pixels are moved around) but I think this is possibly due to wrong font sizes or something similar.

Thanks Greg and Samo and everyone else.

Matthew - Samo's fix above seems to work for TGB 1.5.1, I still haven't switched my game over to 1.6 yet as this fix doesn't seem to work in 1.6 - hopefully you will be able to integrate it into the next version of TGB.
#24
01/10/2008 (6:03 pm)
Esc2Games fix is working on 1.5 but not in 1.6

Turning to 1.5 again since there is a bug with the file writing in 1.6 ;)

Thanks pals!
#25
01/10/2008 (7:27 pm)
Isaac,
With 1.6 I'm having no trouble with the fonts showing up for non-installed fonts as long as the appropriately sized .ufts are in
game/common/data/fonts

I have not changed $Gui::fontCacheDirectory at all. I've tested it with Windows and Mac, with good results. Admittedly, I have not been able to test in Vista yet.

Greg
#26
01/30/2008 (6:50 pm)
Not working in TGB 1.6

from profiles.cs in gui
$Gui::fontCacheDirectory = expandFilename("~/data/fonts");

When you run the console command writeFontCache it writes to appData path. I copied fonts to game/common/data/fonts and still no gooda.
Page«First 1 2 Next»