Using fonts
by Koen Van Baelen · in Torque Game Builder · 06/23/2007 (1:06 pm) · 12 replies
How can I use custom fonts in the GUI builder? Can I use .ttf files for this, or does it have to be another format? I also need some sample code, because the documentation isn't exactly clear on this.
#2
06/25/2007 (8:28 am)
But he asked how to use custom fonts. Which to me says fancy image fonts (multiple colors, borders, shading etc) that every video game has. You can't use a font like that with TGB. Well, not without some tricks. You can try the tool I made here www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=12093 but it doesn't seem to work right with TGB 1.5 beta, and I don't have time to fix it. Another thing to try is using bitmap fonts. There's a resource for that somewhere but you might need a pro license to use it. TGB only allows use of installed system fonts and only in one color (unless I'm missing something).
#3
You can specify the text color inside of the profile itself. You can also create a ML text control and specify different fonts, colors, and other attributes via the markup language even on a per character basis :)
Though thanks for posting additional helpful info.
06/25/2007 (8:34 am)
True he did say custom fonts, though I guess that says different things for both of us. To me that doesn't mean bitmap fonts, but a typical custom font, such as the mass types you can download for Photoshop and various other visual editing programs. Said fonts (or ones you create yourself) are just standard fonts and as such can be used by Torque easily.Quote:TGB only allows use of installed system fonts and only in one color (unless I'm missing something).
You can specify the text color inside of the profile itself. You can also create a ML text control and specify different fonts, colors, and other attributes via the markup language even on a per character basis :)
Though thanks for posting additional helpful info.
#4
06/25/2007 (8:49 pm)
Wait.. so are you saying we can add things like shading and outlines to a TGB textobject? If so I've been wasting lots of time trying to get my RPG dialogue GUI to display good looking fonts :( Right now they're only white (or any solid color I choose). I can't use ML text controls..I must use textobjects or the illusion of sliding text won't work. If there's a way to make the fonts look more "gamey" on a textobject I'd love to read more about it.
#5
06/27/2007 (11:05 am)
Whoops, I didn't mean fancy image fonts by custom fonts, I meant font files that I downloaded from the internet and installed on my pc. Anyway, it seems to work. Thanks for the help!
#6
06/27/2007 (2:24 pm)
Just out of curiosity.. Am I the only one who thinks the default fonts don't really look like your average video game fonts? Even if I were to find a "custom" font that looks more gamey...that's just going to be the shape of it..it will still be all one color.
#7
Though a bitmap font is another option.
06/27/2007 (3:13 pm)
I agree, though there are a lot of pretty interesting and more "flashy" custom fonts that are files just like the default fonts.Though a bitmap font is another option.
#8
06/27/2007 (3:35 pm)
You can also achieve some pretty cool looking text by using other effects (particles etc.). Off the top of my head, I'm thinking of Twilight Princess. The text in that is just a solid color with a faint goldish glow. It's simple but it looks nice. It'd be as simple as adding a behavior that defines the effect.
#9
06/27/2007 (3:37 pm)
Very true Luke, I got an interesting effect using particles and paths to write flaming text (though thats to the extreme lol).
#10
But how "flashy" can any of these alleged fonts be in one solid color?
So basically to make a font that resembles a video game font (and not a word processor) we have to write our own font routines. I'll add "fonts" to my ever-growing todo list ;)
06/27/2007 (9:31 pm)
@ Matthew, But how "flashy" can any of these alleged fonts be in one solid color?
So basically to make a font that resembles a video game font (and not a word processor) we have to write our own font routines. I'll add "fonts" to my ever-growing todo list ;)
#11
I assume that you are informed about font engine's flaws. If you export fonts with padding, play with them via photoshop and then import it, they are slightly moved down and right. I am trying to fix this problem. It is not very easy...
George Kravas for Total - Eclipse
07/09/2007 (2:15 am)
Hello,I assume that you are informed about font engine's flaws. If you export fonts with padding, play with them via photoshop and then import it, they are slightly moved down and right. I am trying to fix this problem. It is not very easy...
George Kravas for Total - Eclipse
#12
07/09/2007 (12:41 pm)
Is there a link to see how bitmap fonts are implemented and used? Pop Cap uses bitmap fonts but they are accompanied with a text file describing it character-by-character as pixel coordinates. Is there something like this in Torque. I'm using t2dTextObjects right now but I'd like something with more customization.
Torque 3D Owner Matthew Langley
Torque