Fonts problems
Fonts problems
Hello,
I have lots of problems with fonts and irrlicht...
I tried to use the CGUITTFont plugin, it load the font but doesn't draw it...
I tried to use Irrlicht Font Maker, but after creating bitmaps Irrlicht tells me "The amount of upper corner pixels and the lower corner pixels is not equal, font file may be corrupted."
With these fonts :
http://www.dafont.com/fr/planet.font
http://www.dafont.com/fr/space-age.font
Can tell me how to load one of these fonts in irrlicht ?
Thanks
Hilnius
I have lots of problems with fonts and irrlicht...
I tried to use the CGUITTFont plugin, it load the font but doesn't draw it...
I tried to use Irrlicht Font Maker, but after creating bitmaps Irrlicht tells me "The amount of upper corner pixels and the lower corner pixels is not equal, font file may be corrupted."
With these fonts :
http://www.dafont.com/fr/planet.font
http://www.dafont.com/fr/space-age.font
Can tell me how to load one of these fonts in irrlicht ?
Thanks
Hilnius
Use FontTool.exe to generate font. this tool will produce at least 2 files: xml file and 1+ image files. You should pass path to xml file when loading font using getFont().
Something like this:
Something like this:
Code: Select all
gui::IGUIEnvironment *irrGUI = irrDevice->getGUIEnvironment();
gui::IGUIFont* fnt = irrGUI->getFont("myfont.xml");
irrGUI->getSkin()->setFont(fnt);Just download Irrlicht SDK 1.7.1 from ( http://irrlicht.sourceforge.net/downloads.html ). It contains compiled FontTool.exe in bin folder.
Have you tried http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=37735 ?
Re: Fonts problems
Firstly, Sorry for the necro.
Secondly, i came across this very same problem and the other font program linked 2 posts up didn't like my font for some reason so that wasnt a solution for me, however i found the problem which worked for me. the font i used put pixels in the lines where the red/yellow red/blue pixels are which skews the results and gives bad font sizes etc and the above error about non matching upper and lower numbers.
TLDR - SOLUTION
remove all the white/grey pixels on the horizontal lines where you have the coloured pixels.
Secondly, i came across this very same problem and the other font program linked 2 posts up didn't like my font for some reason so that wasnt a solution for me, however i found the problem which worked for me. the font i used put pixels in the lines where the red/yellow red/blue pixels are which skews the results and gives bad font sizes etc and the above error about non matching upper and lower numbers.
TLDR - SOLUTION
remove all the white/grey pixels on the horizontal lines where you have the coloured pixels.
