Finally, it works

This commit is contained in:
Anurag Thakur 2023-09-30 00:47:07 +05:30
parent 0f715c8b90
commit 5721ad0e38
2 changed files with 22 additions and 1 deletions

View File

@ -72,6 +72,13 @@
#define MD5_Update FT_MD5_Update
#define MD5_Final FT_MD5_Final
#define PIXEL_BITS 8
#define ONE_PIXEL ( 1 << PIXEL_BITS )
#define TRUNC( x ) (int)( ( x ) >> PIXEL_BITS )
#define UPSCALE( x ) ( ( x ) * ( ONE_PIXEL >> 6 ) )
#define DOWNSCALE( x ) ( ( x ) >> ( PIXEL_BITS - 6 ) )
#undef HAVE_OPENSSL
#include "md5.c"
@ -2784,6 +2791,8 @@ int conic_to2(FT_GlyphSlot* slot, FT_Vector *control, FT_Vector *from, FT_Vector
case FT_CURVE_TAG_CONIC: /* consume conic arcs */
// v_control.x = SCALED( point->x );
// v_control.y = SCALED( point->y );
v_control.x = point->x ;
v_control.y = point->y ;
Do_Conic:
if ( point < limit )

View File

@ -162,8 +162,20 @@
}
/* translate outline to render it into the bitmap */
if ( x_shift || y_shift )
if ( x_shift || y_shift ){
FT_Outline_Translate( outline, x_shift, y_shift );
FT_PreLine pl = slot->prelines;
while (pl!=NULL)
{
pl->x1 += x_shift;
pl->y1 += y_shift;
pl->x2 += x_shift;
pl->y2 += y_shift;
pl = pl->next;
}
}
/* set up parameters */
params.target = bitmap;