guiE = device->getGUIEnvironment();
guiE->getSkin()->setFont(guiE->getFont("ffont.bmp"));
guiE->addStaticText(L"This is a test",core::rect<s32>(10,10,260,22), false);
Text will not show, and yes, its draw function is drawing, because it works when i comment out the guiE->getSkin()->setFont() line
guiE = device->getGUIEnvironment();
guiE->getSkin()->setFont(guiE->getFont("ffont.bmp"));
guiE->addStaticText(L"This is a test",core::rect<s32>(10,10,260,22), false);
Text will not show, and yes, its draw function is drawing, because it works when i comment out the guiE->getSkin()->setFont() line
If it works with the default Irrlicht font but not with yours, are you sure your font is formatted correctly?
When using the new font tool you have to load the .xml file, just as the docs tell you
Maybe another candiadte for the FAQs - ah, should be already in but people simply skip over it...
hybrid wrote:When using the new font tool you have to load the .xml file, just as the docs tell you
Maybe another candiadte for the FAQs - ah, should be already in but people simply skip over it...
Ok, got it to work now, but how about font colour/style? Shouldn't it be using the patterns of the image file? All it does it make everything black...
What I am trying to accomplish is a outlined (1pixel) black outline around the font done in photoshop with stroke after using the fonttool. But irrlicht seems to want to make any colour on the image black. Is there a way to do this?
You can change color of text with IGUISkin::setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor) or IGUIFont::draw (const wchar_t *text, const core::rect< s32 > &position, video::SColor color, bool hcenter=false, bool vcenter=false, const core::rect< s32 > *clip=0)
For effect you described you need to use texture ...or create your own font class.
guiE = device->getGUIEnvironment();
guiE->getSkin()->setFont(guiE->getFont("ffont.bmp"));
guiE->addStaticText(L"This is a test",core::rect<s32>(10,10,260,22), false);
Text will not show, and yes, its draw function is drawing, because it works when i comment out the guiE->getSkin()->setFont() line