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
}
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