freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] ftstring.c


From: Mai Lan LE
Subject: Re: [Freetype] ftstring.c
Date: Mon, 16 Sep 2002 18:06:10 +0200
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1

Hi,
In the ftstring.c, the advance values are computed in the layout_glyphs method. This function is used to compute the position of all character of the text. (horizontal layout).
The rotation is performed in the render_string method.
vec = glyph->pos;
FT_Vector_Transform( &vec, &trans_matrix );
vec.x += delta.x;
vec.y += delta.y;
FT_Glyph_Transform( image, &trans_matrix, &vec );


Regards
pl

Olivier Couet wrote:

Hello,

ftstring.c is one of the examples coming with the distribution. The
rotation bit is clear to me. The only part I do not "see" is how the
bitmap are positionned when rotated. According to the doc it should use
the transformed advance ... but it doesn't seems to me.

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

On Mon, 16 Sep 2002, Laurent Lequenne wrote:

Hello,

Euh.. Long time, I didin't used freetype, so I can't remember well .I
remember wekk I tryed to figure it out some hour or two, so if you send me
that piece of code that rotates that thing, I could remember me maybe :-)

Laurent


----- Original Message -----
From: "Olivier Couet" <address@hidden>
To: <address@hidden>
Sent: Monday, September 16, 2002 3:37 PM
Subject: [Freetype] ftstring.c


Hi,

I was trying to understand how the example ftstring.c works when a string
is rotated. I was very surprise to not see any where a reference to
glyph->advance.x and glyph->advance.y . Does somebody understand how the
glyphs are positioned in that example when the string is rotated ?

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


_______________________________________________
Freetype mailing list
address@hidden
http://www.freetype.org/mailman/listinfo/freetype




_______________________________________________
Freetype mailing list
address@hidden
http://www.freetype.org/mailman/listinfo/freetype







reply via email to

[Prev in Thread] Current Thread [Next in Thread]