Hi All,
I am rotating a glyph with something like:
FT_Glyph aglyph;
FT_GlyphSlot slot = face->glyph;
FT_Get_Glyph ( slot, &aglyph );
FT_Glyph_Transform( aglyph, RotMatrix, NULL );
FT_Glyph_To_Bitmap( &aglyph, ft_render_mode_normal, 0, 1);
It seems not to bad, each glyph is rotated. Now to draw the characters
one after each other I need the x and y advance. I have no problem for the
x advance I get it via, int(slot->metrics.horiAdvance>>6) or
int(slot->advance.x>>6) both seems equivalent.
But I have problems to get a proper y advance. I thought that
int(slot->advance.y>>6) is what I need but it is always equal to 0 ...
I noticed that there is also "advance" values in: aglyph->advance.x and
aglyph->advance.y. The rotation seems to have some action on these 2
values. If I have no rotation the y value is zero, and it changes when I
rotate. But the values in aglyph->advance are really weird. For instance
on the x axis the aglyph->advance.x is very different from
int(slot->advance.x >> 6 ) ... I also tried to modify aglyph->advance.x
with the >> operator but I had no success until now.
Some body have an idea about that ?