Irrlicht FontTool - Hebrew/Arabic letters

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
J2T
Posts: 2
Joined: Sat Apr 19, 2008 12:56 pm
Location: Berlin

Irrlicht FontTool - Hebrew/Arabic letters

Post by J2T »

Hi Community,

i recognized measurement problems with some Hebrew and Arabic letters. For example look at code points 0x0591 to 0x059F. I uploaded a picture and marked the characters this will go faster.

As you can see the characters stuck in another. The character are a vowel sign, and thus inherently defined as a combining character. The circle stands for the letter it combines with.

Additional: These vowels are not forced to be in every font which supports the Hebrew charset. There are fonts which don't show the vowels.

Anybody here who knows why the measurement in the fonttool fails here?It measures the character correct but does not take care of the circle.

Code: Select all

if (GetCharABCWidthsW(dc, currentchar, currentchar, &abc)) // for unicode fonts, get overhang, underhang, width
                {
                    //size.cx = abc.abcB;
                    fa.underhang  = abc.abcA;
                    fa.overhang   = abc.abcC;
 
                    if (abc.abcB-abc.abcA+abc.abcC<1)
                        continue; // nothing of width 0
                }
Uncommented size.cx = abc.abcB as a short hack but this doesn't results in a acceptable solution. There are still characters stuck in to each other.

The way around i tried to avoid the circle. I found MainType - Fontcreator where the circle is not present. Instead of Irrlicht Fonttool or Windows charmap etc. I tried several things like MultiByteToWideChar or FoldStringW to map the precomposed forms of the character. (all direct in the glyph enumeration through looping the unicode ranges)

I hope someone can head me up :)

bests,
J2T
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Thanks for reporting. I have added an entry to the bugtracker, so the problem doesn't get lost: https://sourceforge.net/tracker/?func=d ... tid=540676
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
J2T
Posts: 2
Joined: Sat Apr 19, 2008 12:56 pm
Location: Berlin

Post by J2T »

I would be very happy if someone could post a explanation/solution or just a guess how to solve this problem till the bug is fixed officially :)
ilovedessy
Posts: 16
Joined: Tue Mar 16, 2010 6:17 pm
Location: BULGARIA
Contact:

Post by ilovedessy »

Try THE VERY Advanced irrFontTool by N. Atanassov
http://irrlicht.sourceforge.net/phpBB2/ ... e521a6d955

It uses Advanced measurement
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht FontTool - Hebrew/Arabic letters wrong measurem

Post by CuteAlien »

Very old problem, so I guess chances to get any further info on this are probably zero. Anyway - I just tried a few hebrew fonts unter X11 with the newFontTool and they all worked fine. Now there's still a chance this is a problem with the oldFontTool or happening only on Windows, but unless I get further info about problems I'm just closing this bug for now as not reproducible.

Edit: Re-opened the bug. I could reproduce it unter Windows with the newFontTool (using hebrew-arial). Unicode characters U+0591 to 05d0 are for example going over each other.
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
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Irrlicht FontTool - Hebrew/Arabic letters

Post by hendu »

Eh, why not merge your TTF code?

I'm using it and it works well. Only the style was absolutely horrible, it wasn't even consistent with itself, it had all kinds of indent, brace starts everywhere, I had nightmares after reading that.

I mean, what kind of editor lets you get away with indenting with 1-10 spaces and 1-4 tabs, all for the same indent level :P (and yes, there were lines with one line having 1 space and the next having say 7 spaces...)
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht FontTool - Hebrew/Arabic letters

Post by CuteAlien »

Not sure which ttf code you mean - the one from my homepage or some other? The one on my homepage was mostly written by someone else and he never mentioned a license unfortunately, I've just fixed a few bugs in it (and it's using tab=4 btw).

But that's another topic, the fonttool should probably work correct independent of what else there is. I just had hoped I could close this bug, but turned out I can't.
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
Post Reply