Hello,
I just created a font using the new Linux FontTool (I haven't used Irrlicht for a couple of years, just checking it out again). I must say, I'm very impressed with the new Linux support for font creation. However, I'm seeing one potential problem.
On Linux, wchar_t is 4 bytes long while on Windows, it is only 2 bytes. Thus, the font XML file is essentially being saved in UTF-32 when created by the Linux FontTool, while it is likely saved in UTF-16 on Windows (I'm guessing on that one, I don't actually have Windows to try that with).
So my question is, when I do port whatever I write with Irrlicht to Windows, will it be able to load my font XML files without any encoding changes? Is IrrXML intelligent enough to determine that the files are UTF-32 or UTF-16?
Oh, and a little off topic, but could the next Irrlicht release not have the documentation packaged in a CHM file? That is extremely inconvenient for Linux users.
Thanks!
________
Hawaii dispensary
Unicode and the Linux FontTool.
Unicode and the Linux FontTool.
Last edited by disanti on Sun Feb 27, 2011 11:12 pm, edited 1 time in total.
Re: Unicode and the Linux FontTool.
Yes, it is intelligent enough to do that (though there is still a reported bug for 64-bit systems open).disanti wrote: So my question is, when I do port whatever I write with Irrlicht to Windows, will it be able to load my font XML files without any encoding changes? Is IrrXML intelligent enough to determine that the files are UTF-32 or UTF-16?
To create the html-documentation locally you can run scripts/doc/irrlicht/makedocumentation.shdisanti wrote: Oh, and a little off topic, but could the next Irrlicht release not have the documentation packaged in a CHM file? That is extremely inconvenient for Linux users.
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
Also if you have sometimes problems opening the XML files under linux, because they are UTF-32 (sometimes incorrectly written) you might wanna try this. It just converts to UTF-8, but i had unexpected behavioir in one of my projects and gEdit would not open the XML files (There was binary on the file).
Thanks to CuteAlien for the script.
#!/bin/sh
if test $# = 0
then
echo usage: utf32to8 source [target]
exit 1
fi
if iconv -f UTF-32 -t UTF-8 $1 > .utf32to8dummy
then
mv .utf32to8dummy ${2:-$1}
rm -f .utf32to8dummy
fi