freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] Fw: URGENT: patch for ftsynth.c


From: Werner LEMBERG
Subject: [ft-devel] Fw: URGENT: patch for ftsynth.c
Date: Mon, 23 May 2005 15:27:27 +0200 (CEST)

Here a mail from David which somehow doesn't reached the list.


    Werner

--- Begin Message --- Subject: RE: URGENT: patch for ftsynth.c Date: Mon, 23 May 2005 10:52:41 +0200
Hello Werner,

for some reason, I couldn't send e-mail last week.
You probably have seen my commit regarding a correct fix to
the problem. Sharp spikes shouldn't appear anymore when
emboldening glyphs.

By the way, I rejected the proposed patch because it distorts
the outline in very bad ways, though this is only visible at =

relatively large character sizes.

Regards,

- David Turner
- The FreeType Project  (www.freetype.org)

> -----Message d'origine-----
> De : Werner LEMBERG [mailto:address@hidden
> Envoy=E9 : vendredi 20 mai 2005 08:26
> =C0 : Turner, David
> Cc : address@hidden
> Objet : URGENT: patch for ftsynth.c
> =

> =

> =

> David,
> =

> =

> please have a look at the patch below which fixes problems with
> emboldening.  Since I want to release another pretest soon it would b=
e
> good if this patch gets applied.
> =

> =

>     Werner
> =

> =

> ---------------------------------------------------------------------=
-
> =

> =

> Index: src/base/ftsynth.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /home/cvs/freetype2/src/base/ftsynth.c,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 ftsynth.c
> --- src/base/ftsynth.c        15 May 2005 07:10:28 -0000      1.1.1.1
> +++ src/base/ftsynth.c        20 May 2005 05:24:57 -0000
> @@ -115,7 +115,9 @@
>        {
>          FT_Pos     d;
>          FT_Vector  in, out;
> +#ifdef OLD_ALGORITHM
>          FT_Fixed   scale;
> +#endif
>          FT_Angle   angle_diff;
>  =

>  =

> @@ -132,6 +134,7 @@
>          angle_in   =3D FT_Atan2( in.x, in.y );
>          angle_out  =3D FT_Atan2( out.x, out.y );
>          angle_diff =3D FT_Angle_Diff( angle_in, angle_out );
> +#ifdef OLD_ALGORITHM
>          scale      =3D FT_Cos( angle_diff/2 );
>  =

>          if ( scale < 0x400L && scale > -0x400L )
> @@ -148,6 +151,23 @@
>  =

>          outline->points[n].x =3D v_cur.x + distance + in.x;
>          outline->points[n].y =3D v_cur.y + distance + in.y;
> +#else
> +     angle_diff =3D angle_in + angle_diff / 2 - rotate;
> +     angle_diff =3D FT_Angle_Diff( 0, angle_diff );
> +
> +     d =3D distance * 2; /* strength */
> +
> +     if ( -FT_ANGLE_PI2 < angle_diff && angle_diff <=3D 0 ) {
> +             outline->points[n].x =3D v_cur.x + d;
> +     }
> +     else if ( 0 < angle_diff && angle_diff < FT_ANGLE_PI2 ) {
> +             outline->points[n].x =3D v_cur.x + d;
> +             outline->points[n].y =3D v_cur.y + d;
> +     }
> +     else if ( FT_ANGLE_PI2 <=3D angle_diff && angle_diff < =

> FT_ANGLE_PI ) {
> +             outline->points[n].y =3D v_cur.y + d;
> +     }
> +#endif
>  =

>          v_prev =3D v_cur;
>          v_cur  =3D v_next;
> =


--- End Message ---

reply via email to

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