I used Irrlicht Font Maker to generate a PNG image of a font (Lucida Handwriting, if it's important). I loaded the PNG with a CGUIFont and I drew the string "Iñtërnâtiônàlizætiøn". All those characters are on the PNG.
It outputs "Iñòtëìrnâãtiôõnàálizæçtiøùn".
There's a few extra characters here. I looked at the code, and I can't understand why it's happening.
Where does the problem come from? Is CGUIFont capable of handling this kind of string? Does Irrlicht Font Maker produce incorrect character sheets?
Handling of internationalization in CGUIFont
Re: Handling of internationalization in CGUIFont
Hi,
You wrote CGUIFont, it isn't IGUIFont ? (Cannot find CGUIFont in the API documentation...)
I've tested your string "Iñtërnâtiônàlizætiøn" with the default font :
And the output is correct.
Could you show the generated PNG you load ?
You wrote CGUIFont, it isn't IGUIFont ? (Cannot find CGUIFont in the API documentation...)
I've tested your string "Iñtërnâtiônàlizætiøn" with the default font :
Code: Select all
env->getBuiltInFont();
Could you show the generated PNG you load ?
Re: Handling of internationalization in CGUIFont
No problem! I don't think there's copyright issues with Lucida anyway.
EDIT :
What I actually meant is that I check the implementation of the IGUIFont. That's why I talked about CGUIFont. But you're right ; what I'm really doing is :
EDIT :
What I actually meant is that I check the implementation of the IGUIFont. That's why I talked about CGUIFont. But you're right ; what I'm really doing is :
Code: Select all
IGUIFont font * = env->getFont(filename);
Re: Handling of internationalization in CGUIFont
Oh! I just realized that I had a message in the log :
So, there maybe a problem with either Lucide Handwriting, or Irrlicht Font Maker. I'm trying a more common font.
Code: Select all
The amount of upper corner pixels and the lower corner pixels is not equal, font file may be corrupted.
Re: Handling of internationalization in CGUIFont
Oh, I tried with Segoe UI, and it worked! What the...?
EDIT :
Okay, I tried Nikolay Atanassov's Very Advanced irrFontTool, and when I try to load "Lucida Handwriting", I get the folowing warning :
And the tool refuses to generate a font PNG. Irrlicht Font Maker didn't complain.
So it seems that the problem came from Lucida Handwriting.
Thanks a lot!
EDIT :
Okay, I tried Nikolay Atanassov's Very Advanced irrFontTool, and when I try to load "Lucida Handwriting", I get the folowing warning :
Code: Select all
Could not get lower surface level for mip map generation
So it seems that the problem came from Lucida Handwriting.
Thanks a lot!
Re: Handling of internationalization in CGUIFont
Hm, irrlicht font tool shouldn't really produce invalid fonts I guess. On which operating system did you use it (it's implemented slightly different for Windows&Linux).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Handling of internationalization in CGUIFont
On Windows 10. I used Irrlicht Font Maker. I generated a font using Lucida Handwriting, with a map of 512x512 and a font size of 10.
Re: Handling of internationalization in CGUIFont
Thanks (Irrlicht also comes with a fontmaker tool, so I thought it was about that one).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm