Compiles but errors 'createFont' when run
by Charles Rhinehart · in Torque Game Engine · 11/09/2003 (11:10 am) · 11 replies
Hi,
I'm an OS X guy who's trying to compile on Linux (SuSE 8.2) for the first time - the compile ran fine. When I run the executable in the examples directory I get an error :
platformX86UNIX/x86UNIXFont.cc @ 121
createFont : cannot load font
I've searched the forum for any past posts with this error, but didn't find any related to this message.
Has anyone else encounter (and hopefully fixed) this problem before?
Thanks in advance.
I'm an OS X guy who's trying to compile on Linux (SuSE 8.2) for the first time - the compile ran fine. When I run the executable in the examples directory I get an error :
platformX86UNIX/x86UNIXFont.cc @ 121
createFont : cannot load font
I've searched the forum for any past posts with this error, but didn't find any related to this message.
Has anyone else encounter (and hopefully fixed) this problem before?
Thanks in advance.
#2
11/09/2003 (12:37 pm)
Perhaps it's trying to use a font you don't have installed?
#3
11/09/2003 (12:45 pm)
When I got the error I tried to install all the fonts on the distrib disk to no avail.. I'll look and see what font it's trying to use if I can.
#4
Addendum: in gdb i get the following message - "This GDB was configured as "i586-mandrake-linux-gnu"..."/opt/Code/Gaming/torque/example/torqueDemo_DEBUG.bin": not in executable format: File truncated"
12/04/2003 (7:21 pm)
I hadn't updated HEAD in a while, but now that i have updated i am getting the same issue with Mandrake 9.2 and now the debug build is refusing to load in gdb. I will try to find some time to look at it this weekend.Addendum: in gdb i get the following message - "This GDB was configured as "i586-mandrake-linux-gnu"..."/opt/Code/Gaming/torque/example/torqueDemo_DEBUG.bin": not in executable format: File truncated"
#5
12/07/2003 (7:01 am)
So far all i could track down is that it is trying to load the Arial font at size 36, but it doesn't seem to be included.
#6
12/07/2003 (7:21 am)
Thanks for looking into this, I appreciate it.
#7
12/07/2003 (7:34 am)
Found it. The problem is in common/ui/defaultProfiles.cs at line 214 changing fontsize from 36 to 24 seems to fix the issue.
#8
12/07/2003 (7:39 am)
Here is a patchdiff -Nur torque/example/common/ui/defaultProfiles.cs torque.3/example/common/ui/defaultProfiles.cs
--- torque/example/common/ui/defaultProfiles.cs 2003-09-30 15:31:52.000000000 -0400
+++ torque.3/example/common/ui/defaultProfiles.cs 2003-12-07 10:54:18.000000000 -0500
@@ -213,7 +213,7 @@
if(!isObject(GuiBigTextProfile)) new GuiControlProfile (GuiBigTextProfile : GuiTextProfile)
{
- fontSize = 36;
+ fontSize = 24;
};
if(!isObject(GuiCenterTextProfile)) new GuiControlProfile (GuiCenterTextProfile : GuiTextProfile)
#10
12/07/2003 (7:51 am)
No problem, I sent the patch to tim gift, hopefully it gets added to cvs.
#11
One is that the font name that can't be loaded isn't reported until after the AssertFatal. Swap the two printouts and initialize the string buffer where the font's name will be returned to fix that.
The other problem is that the font names are Microsoft proprietary. If you own a Windows license, you can install the missing fonts. Google for msfonts. Freshmeat used to have a project for this but the maintainer's site is now 404'ing the Freshmeat links.
Meanwhile you can also use the procedure described here to assemble a MS font package:
corefonts.sourceforge.net/
Another useful resource is the Linux Font HOWTO:
tldp.org/HOWTO/Font-HOWTO/
07/14/2005 (3:04 pm)
Same issue today running a modified 1.4.rc1 TGE. Two issues here:One is that the font name that can't be loaded isn't reported until after the AssertFatal. Swap the two printouts and initialize the string buffer where the font's name will be returned to fix that.
The other problem is that the font names are Microsoft proprietary. If you own a Windows license, you can install the missing fonts. Google for msfonts. Freshmeat used to have a project for this but the maintainer's site is now 404'ing the Freshmeat links.
Meanwhile you can also use the procedure described here to assemble a MS font package:
corefonts.sourceforge.net/
Another useful resource is the Linux Font HOWTO:
tldp.org/HOWTO/Font-HOWTO/
Torque Owner Charles Rhinehart
...
Loading compiled script starter.fps/client/ui/aboutDlg.gui.
Loading compiled script starter.fps/client/ui/startMissionGui.gui.
Loading compiled script starter.fps/client/ui/joinServerGui.gui.
Fatal: (platformX86UNIX/x86UNIXFont.cc @ 121) createFont: cannot load font
Platform::debugBreak: triggering SIGSEGV for core dump