[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] Y advance when a glyp is rotated.
From: |
Olivier Couet |
Subject: |
[Freetype] Y advance when a glyp is rotated. |
Date: |
Fri, 16 Aug 2002 11:53:44 +0200 (CEST) |
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 ?
Cheers, Olivier
--
Org: CERN - European Laboratory for Particle Physics.
Mail: 1211 Geneve 23 - Switzerland
E-Mail: address@hidden Phone: +41 22 7676522
WWW: http://cern.ch/Olivier.Couet/ Fax: +41 22 7677155
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freetype] Y advance when a glyp is rotated.,
Olivier Couet <=