Some letters not showing up?
by amaranthia · in Torque Game Builder · 03/27/2007 (12:48 pm) · 4 replies
I'm not quite sure how to fix this problem, so I was hoping someone else has already solved it.
I'm using a special font in my game, and while everything looks great on my computer, some of my users tell me that some letters and numbers aren't showing up in their dialog boxes. I've generated UFT files for every possible size of the font, but some of the users are still unable to see some letters.
Any ideas why this could be happening?
Here's what the text looks like on my machine:
"I'm just fine! Aren't you tired?"
And to the user:
"I'm ust fine! Aren t you tired?"
Very weird!
I'm using a special font in my game, and while everything looks great on my computer, some of my users tell me that some letters and numbers aren't showing up in their dialog boxes. I've generated UFT files for every possible size of the font, but some of the users are still unable to see some letters.
Any ideas why this could be happening?
Here's what the text looks like on my machine:
"I'm just fine! Aren't you tired?"
And to the user:
"I'm ust fine! Aren t you tired?"
Very weird!
#2
You're the second person to tell me it's probably a unicode problem. Okay, I'll disable Unicode support and see if it works.
*crosses fingers*
03/27/2007 (5:36 pm)
I know, I know, I'm trouble, I tell you! :DYou're the second person to tell me it's probably a unicode problem. Okay, I'll disable Unicode support and see if it works.
*crosses fingers*
#3
I'm guessing you're not using custom bitmap fonts (exported and reimported with fontBitmapIO()) since you'd be able to see the missing characters inside of the exported pngs. If you're not and are just using an installed font, it's easy to miss characters since it only puts character definitions for characters it sees you using while you're running your game into the .ufts. It's especially confusing when it's one of those fonts that gets installed by common applications, like Office, that most people have, so they just use the version installed on their machine instead of the .ufts.
The best thing to do in my experience is delete all the .uft files for the fonts that you're using and then call a method to recreate them the second your app starts up (in main.cs or something). Kevin Ryan posted here a while back and I'll copy the method of interest that he listed:
Set that up for the fonts you're using and call it once to make new .ufts. After your .uft files are generated you can remove the call to it (you can possibly just do it from the console too, but I remember doing it in code for some reason).
After you've recreated your .ufts, uninstall the font from your machine (assuming you have a font file somewhere to let you reinstall it). If you uninstall it, you should see exactly what a user that doesn't have the font installed would see, so you can find errors that way.
04/02/2007 (5:45 pm)
I just posted a response to the same question here: www.garagegames.com/mg/forums/result.thread.php?qt=59438.I'm guessing you're not using custom bitmap fonts (exported and reimported with fontBitmapIO()) since you'd be able to see the missing characters inside of the exported pngs. If you're not and are just using an installed font, it's easy to miss characters since it only puts character definitions for characters it sees you using while you're running your game into the .ufts. It's especially confusing when it's one of those fonts that gets installed by common applications, like Office, that most people have, so they just use the version installed on their machine instead of the .ufts.
The best thing to do in my experience is delete all the .uft files for the fonts that you're using and then call a method to recreate them the second your app starts up (in main.cs or something). Kevin Ryan posted here a while back and I'll copy the method of interest that he listed:
function populateFonts()
{
%font = "Arial";
%sizes = "18 24 32 36";
// ---
for (%i = 0; %i < getWordCount(%sizes); %i++)
populateFontCacheRange(%font, getWord(%sizes, %i), 32, 126);
writeFontCache();
}Set that up for the fonts you're using and call it once to make new .ufts. After your .uft files are generated you can remove the call to it (you can possibly just do it from the console too, but I remember doing it in code for some reason).
After you've recreated your .ufts, uninstall the font from your machine (assuming you have a font file somewhere to let you reinstall it). If you uninstall it, you should see exactly what a user that doesn't have the font installed would see, so you can find errors that way.
#4
04/02/2007 (10:57 pm)
This works! Thanks Richard!
Associate David Higgins
DPHCoders.com
Off hand, I'm thinking it may have something to do with Unicode support -- or lack thereof, perhaps ... try making a TGB Build and disabling UNICODE support -- in VS, you just remove the "UNICODE" from the Additional Build Parameters ...