Game Development Community

Error in font profile

by Roshan Kuriyan · in Torque Game Engine Advanced · 05/10/2006 (9:34 pm) · 2 replies

My program crashes when i try to add a button to my menu screen.
the error that i found in console was

Failed to load/create profile font (Arial/14)
Failed to load/create profile font (Arial/14)
----------------------------------------------------------
could anyone help me


the script in my program is as follows

//font
fontType = "Arial";
fontSize = 14;

fontColor = "0 0 0";
fontColorHL = "32 100 100";
fontColorNA = "0 0 0";
fontColorSEL= "200 200 200";

---------------------------------------------
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "56 156";
extent = "40 16";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "True";
command = "quit();";
helpTag = "0";
text = "Set";
};

#1
05/12/2006 (6:56 am)
Is that font and size used in the GUI in other controls? If not, find a font/size that is working in another control and change the code above to use it and see if that fixes it. It would be a workaround for now until you find the solution.
Or it would prove there is something else wrong with your code.

I haven't looked into GUIs yet, so don't know where they pick up their fonts from.
#2
06/26/2006 (1:28 am)
Now my Button is working.
i ve added

$Gui::fontCacheDirectory = expandFilename("dir/cache");
$Gui::clipboardFile = expandFilename("dir/cache/clipboard.gui");

in the main.cs file and got it working.