Game Development Community

exportCachedFont() unable to write

by Brian Tan · in iTorque 2D · 05/26/2009 (3:34 pm) · 1 replies

I'm trying to implement custom fonts.
Here the sample code I used:
importCachedFont("myfont", 20, "common/ui/cache/pngs/myfont 20.png", 0, 0);
new t2dTextObject(testfont)
{
  scenegraph = %scenegraph;
  text = "abcdefghijklmnopqrstuvwxyz1234567890";
  font = "myfont";
  hideOverflow = "0";
  fontSizes = "20";
};
nothing shows up.

Then I tried calling this in the console window:
exportCachedFont("Arial", 20, "common/ui/cache/pngs/testfont 20.png", 0, 0);
and it gives me an error "GFont::exportStrip - failed to open 'common/ui/cache/pngs/testfont 20.png' for writing"

Does anybody else get this problem? If so, how did you find a way around it?

Thanks.

#1
08/28/2009 (3:07 pm)
same problem here. Did you ever find a solutions for it?