Font Cache Problems
by Gary Preston · in Torque Game Engine · 10/09/2006 (12:22 pm) · 3 replies
I'm running TGE and loading up a gui which uses a none standard true type font. When the font is installed as a windows font the characters display correctly in the gui. However, once I remove that font from windows, TGE defaults the gui back to the standard Arial font rather than using the generated uft cache files.
Is there anything I'm missing from the following steps:-
1) Install custom font in windows via control panel
2) Load tge and "dumpFontCache()" and check font is used in profiles at correct size and cache knows about it
3) Run "populateAllFontCacheRange(1,128);"
4) Run "writeFontCache();"
5) Delete custom font from windows
6) Run TGE again.
After doing the above, I would have expected tge to use the font cache having been unable to locate the font as installed in windows. But this doesn't appear to be the case, instead all text is rendered in the default Arial font.
Am I doing something wrong, or is there a bug in TGE1.4 to do with unicode font cache usage?
Is there anything I'm missing from the following steps:-
1) Install custom font in windows via control panel
2) Load tge and "dumpFontCache()" and check font is used in profiles at correct size and cache knows about it
3) Run "populateAllFontCacheRange(1,128);"
4) Run "writeFontCache();"
5) Delete custom font from windows
6) Run TGE again.
After doing the above, I would have expected tge to use the font cache having been unable to locate the font as installed in windows. But this doesn't appear to be the case, instead all text is rendered in the default Arial font.
Am I doing something wrong, or is there a bug in TGE1.4 to do with unicode font cache usage?
#2
10/09/2006 (1:13 pm)
I'd make sure to go through this thread to the end; it seemed to fix the problem for me.
#3
Rubes: I had a feeling this would be a known problem but with the forum search playing up it was a little hard to find anything related. Thanks for the link, I'll have a read through it tomorrow. Probably worth me grabbing 1.4.2 from cvs and running a comparison to see if any further bug fixes can be merged over :)
10/09/2006 (1:54 pm)
Eric: I think I know which path you mean, can't remember the exact name but it's something like $Gui::somefontpathname set to expandfilename("./cache"); by default. I've checked that and it looks ok.Rubes: I had a feeling this would be a known problem but with the forum search playing up it was a little hard to find anything related. Thanks for the link, I'll have a read through it tomorrow. Probably worth me grabbing 1.4.2 from cvs and running a comparison to see if any further bug fixes can be merged over :)
Torque Owner Eric Johnson
EDIT- Yup, I was waay off. Just went through my links and found the same link Rubes posted below...