@ -163,6 +163,7 @@
* point_cnt = n ;
first = 0 ;
i = 0 ;
while ( i < n )
{
@ -170,7 +171,7 @@
if ( runcnt & GX_PT_POINTS_ARE_WORDS )
{
runcnt & = GX_PT_POINT_RUN_COUNT_MASK ;
first = FT_GET_USHORT ( ) ;
first + = FT_GET_USHORT ( ) ;
points [ i + + ] = first ;
if ( runcnt < 1 | | i + runcnt > n )
@ -185,7 +186,7 @@
}
else
{
first = FT_GET_BYTE ( ) ;
first + = FT_GET_BYTE ( ) ;
points [ i + + ] = first ;
if ( runcnt < 1 | | i + runcnt > n )
@ -1716,12 +1717,11 @@
/* modeled after `Ins_IUP */
static void
tt_handle_deltas ( FT_Outline * outline ,
FT_Vector * in_points ,
FT_Bool * has_delta )
tt_interpolate_deltas ( FT_Outline * outline ,
FT_Vector * out_points ,
FT_Vector * in_points ,
FT_Bool * has_delta )
{
FT_Vector * out_points ;
FT_Int first_point ;
FT_Int end_point ;
@ -1736,8 +1736,6 @@
if ( ! outline - > n_contours )
return ;
out_points = outline - > points ;
contour = 0 ;
point = 0 ;
@ -1841,6 +1839,7 @@
GX_Blend blend = face - > blend ;
FT_Vector * points_org = NULL ;
FT_Vector * points_out = NULL ;
FT_Bool * has_delta = NULL ;
FT_Error error ;
@ -1872,6 +1871,7 @@
}
if ( FT_NEW_ARRAY ( points_org , n_points ) | |
FT_NEW_ARRAY ( points_out , n_points ) | |
FT_NEW_ARRAY ( has_delta , n_points ) )
goto Fail1 ;
@ -2060,7 +2060,10 @@
/* we have to interpolate the missing deltas similar to the */
/* IUP bytecode instruction */
for ( j = 0 ; j < n_points ; j + + )
{
has_delta [ j ] = FALSE ;
points_out [ j ] = points_org [ j ] ;
}
for ( j = 0 ; j < point_count ; j + + )
{
@ -2072,15 +2075,22 @@
has_delta [ idx ] = TRUE ;
outline - > points [ idx ] . x + = FT_MulFix ( deltas_x [ j ] , apply ) ;
outline - > points [ idx ] . y + = FT_MulFix ( deltas_y [ j ] , apply ) ;
points_out [ idx ] . x + = FT_MulFix ( deltas_x [ j ] , apply ) ;
points_out [ idx ] . y + = FT_MulFix ( deltas_y [ j ] , apply ) ;
}
/* no need to handle phantom points here, */
/* since solitary points can't be interpolated */
tt_handle_deltas ( outline ,
points_org ,
has_delta ) ;
tt_interpolate_deltas ( outline ,
points_out ,
points_org ,
has_delta ) ;
for ( j = 0 ; j < n_points ; j + + )
{
outline - > points [ j ] . x + = points_out [ j ] . x - points_org [ j ] . x ;
outline - > points [ j ] . y + = points_out [ j ] . y - points_org [ j ] . y ;
}
# ifdef FT_DEBUG_LEVEL_TRACE
FT_TRACE7 ( ( " point deltas: \n " ) ) ;
@ -2128,6 +2138,7 @@
Fail1 :
FT_FREE ( points_org ) ;
FT_FREE ( points_out ) ;
FT_FREE ( has_delta ) ;
return error ;