[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Freetype 2.1.2 & rotated text
From: |
Detlef Würkner |
Subject: |
Re: [Devel] Freetype 2.1.2 & rotated text |
Date: |
Wed, 26 Jun 2002 08:21:23 +0200 |
address@hidden (Jan Slupski) wrote:
> After I have switched to 2.1.2 (from 2.1.0) all rendered texts
> that was rotated of 45 degrees, are rotated now of -45 degrees
> (or 315 degrees).
>
> Is it a bug or a planned future?
Its a problem... The latest fix of FT_Vector_Transform() swapped
xy and yx of the input matrix. Now the rotation has changed direction,
and the shearing has changed the axis. We'll have to check all calls
to FT_Vector|Outline|Glyph_Transform()...?
The documentation (docs/tutorial/step2.html) describes the new behaviour
(xy = 0 for horizontal shear)
----8<----
// transform glyph2 (horizontal shear)
//
matrix.xx = 0x10000;
matrix.xy = 0;
matrix.yx = 0.12 * 0x10000;
matrix.yy = 0x10000;
FT_Glyph_Transform( glyph2, &matrix, 0 );
----8<----
while the source code (src/base/ftsynth.c) uses the old behaviour
(yx = 0 for horizontal shear)
----8<----
/* For italic, simply apply a shear transform, with an angle */
/* of about 12 degrees. */
transform.xx = 0x10000L;
transform.yx = 0x00000L;
transform.xy = 0x06000L;
transform.yy = 0x10000L;
FT_Outline_Transform( outline, &transform );
----8<----
Just looked into the source code of ttf.library which uses
old FreeType 1.3.1 and found it uses yx = 0 for horizontal shear
(old behaviour).
Ciao, Detlef
--
_ // address@hidden
\X/ Detlef Wuerkner, Langgoens/Germany
- [Devel] Freetype 2.1.2 & rotated text, Jan Slupski, 2002/06/25
- Re: [Devel] Freetype 2.1.2 & rotated text, Werner LEMBERG, 2002/06/26
- Re: [Devel] Freetype 2.1.2 & rotated text,
Detlef Würkner <=
- Re: [Devel] Freetype 2.1.2 & rotated text, Detlef Würkner, 2002/06/26
- [Devel] Fix for FontMatrix xy swaps, Detlef Würkner, 2002/06/26
- Re: [Devel] Fix for FontMatrix xy swaps, David Turner, 2002/06/26
- Re: [Devel] Fix for FontMatrix xy swaps, Detlef Würkner, 2002/06/27
- Re: [Devel] Fix for FontMatrix xy swaps, Sven Neumann, 2002/06/27
- [Devel] PFR FontMatrix, Detlef Würkner, 2002/06/27