Page 1 of 1

new IrrFontTool wrongful output

Posted: Mon Jan 21, 2008 2:35 pm
by fadi
Hi guys,

It seems that the new font tool doesn't output the font-bitmap with the correct char boundaries (i.e Red/Yellow pixel dots).

When is this expected to be fixed?
as I need to use the unicode support (Arabic) letters.

Thanks.

Fadi

Re: new IrrFontTool wrongful output

Posted: Mon Jan 21, 2008 4:25 pm
by rogerborg
fadi wrote:It seems that the new font tool doesn't output the font-bitmap with the correct char boundaries (i.e Red/Yellow pixel dots).
Is that the same problem reported here?

Does the suggested workaround work for you, or is it a different problem?

Posted: Mon Jan 21, 2008 5:53 pm
by bitplane
I'm very interested in knowing whether the font stuff works with an Arabic character set, it was written by an ASCII-only, English speaking guy. Please let me know :)

Posted: Tue Jan 22, 2008 10:57 am
by fadi
rogerborg,
thanks for the link, I had seen it before and yes it is the same problem but the workaround given is not clear to me.
i understand that loading xml font is not 100% done in 1.4 so simply uncheck the vector font and use bitmap instead.
but i tried both and the bitmap is not compatable, and the vector fonts gave the same error reported in the link when trying to load it.

Oh one more problem, I am using IrrLicht .Net CP which is till now compatable with 1.3.1 and not 1.4, so probably i would still want to stay with the bitmap format for now.

Any ideas or solutions?

As for arabic letters being used, I believe it should work, probably there will be some fine tuning needed to have them appear connected as in our language adjecent letters will most probably need to be connected to the previous letter, next letter or both.

I am willing to help in this, but I need something to start with :).

Thanks

Posted: Tue Jan 22, 2008 12:40 pm
by bitplane
Even if you generate a bitmap font, the character regions are saved into XML. With Arabic or Chinese fonts, the font often has to span more than one bitmap file, so the information about which bitmaps are used and where the regions are is held in the XML instead of being embedded into the bitmap. Since a few people are having problems with this, I'll make this clear in the error message when failing to load a font image.

Posted: Tue Jan 22, 2008 1:53 pm
by fadi
bitplane,

thanks and I understand what you are saying, but where does this point me for a solution? :roll:

Posted: Tue Jan 22, 2008 5:42 pm
by drewbacca
He told you what to do. Load the xml font file in your code and make sure you do not check the vector option when making the font files.

Additionally, It seems that the fonts are still messed up if you create a font when clear type is enabled in windows. The font will appear sort of bold and generally smudged and ugly. I have made this mistake many times, can there be a warning about this when you run the program?

Posted: Tue Jan 22, 2008 6:18 pm
by fadi
Oh... i feel silly :oops: , it must me the long hours of work...
and i must admit that I still am learning the concepts and ideas of irrLicht.

meanwhile, to find a workaround (for my case) what I did was create my
text using .net Graphics object's DrawString()
and save it as a bitmap file, load it as a texture onto a billboardnode and add it to the my world.

it worked fine, need some tweaking to get best results for the font drawing technique.
but I'll diff. try the above solution and see how it goes...
I hate deadlines :(...

Thanks all

Posted: Tue Jan 22, 2008 11:48 pm
by bitplane
drewbacca wrote:Additionally, It seems that the fonts are still messed up if you create a font when clear type is enabled in windows. The font will appear sort of bold and generally smudged and ugly. I have made this mistake many times, can there be a warning about this when you run the program?
Thanks for pointing this out, maybe it can be disabled when drawing the font, if not then issue a warning like you said.