[truetype] Correctly handle variation font phantom points (#52683).
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom point indices.
This commit is contained in:
parent
7d3dfcd4a5
commit
361af72eea
|
@ -1,3 +1,10 @@
|
||||||
|
2017-12-17 Jonathan Kew <jfkthame@gmail.com>
|
||||||
|
|
||||||
|
[truetype] Correctly handle variation font phantom points (#52683).
|
||||||
|
|
||||||
|
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom
|
||||||
|
point indices.
|
||||||
|
|
||||||
2017-12-17 Jonathan Kew <jfkthame@gmail.com>
|
2017-12-17 Jonathan Kew <jfkthame@gmail.com>
|
||||||
|
|
||||||
Fix incorrect advance width scaling (#52683).
|
Fix incorrect advance width scaling (#52683).
|
||||||
|
|
|
@ -3630,7 +3630,7 @@
|
||||||
FT_Pos delta_y = FT_MulFix( deltas_y[j], apply );
|
FT_Pos delta_y = FT_MulFix( deltas_y[j], apply );
|
||||||
|
|
||||||
|
|
||||||
if ( j < n_points - 3 )
|
if ( j < n_points - 4 )
|
||||||
{
|
{
|
||||||
outline->points[j].x += delta_x;
|
outline->points[j].x += delta_x;
|
||||||
outline->points[j].y += delta_y;
|
outline->points[j].y += delta_y;
|
||||||
|
@ -3640,25 +3640,25 @@
|
||||||
/* To avoid double adjustment of advance width or height, */
|
/* To avoid double adjustment of advance width or height, */
|
||||||
/* adjust phantom points only if there is no HVAR or VVAR */
|
/* adjust phantom points only if there is no HVAR or VVAR */
|
||||||
/* support, respectively. */
|
/* support, respectively. */
|
||||||
if ( j == ( n_points - 3 ) &&
|
if ( j == ( n_points - 4 ) &&
|
||||||
!( face->variation_support &
|
!( face->variation_support &
|
||||||
TT_FACE_FLAG_VAR_HADVANCE ) )
|
TT_FACE_FLAG_VAR_LSB ) )
|
||||||
|
outline->points[j].x += delta_x;
|
||||||
|
|
||||||
|
else if ( j == ( n_points - 3 ) &&
|
||||||
|
!( face->variation_support &
|
||||||
|
TT_FACE_FLAG_VAR_HADVANCE ) )
|
||||||
outline->points[j].x += delta_x;
|
outline->points[j].x += delta_x;
|
||||||
|
|
||||||
else if ( j == ( n_points - 2 ) &&
|
else if ( j == ( n_points - 2 ) &&
|
||||||
!( face->variation_support &
|
!( face->variation_support &
|
||||||
TT_FACE_FLAG_VAR_LSB ) )
|
TT_FACE_FLAG_VAR_TSB ) )
|
||||||
outline->points[j].x += delta_x;
|
outline->points[j].y += delta_y;
|
||||||
|
|
||||||
else if ( j == ( n_points - 1 ) &&
|
else if ( j == ( n_points - 1 ) &&
|
||||||
!( face->variation_support &
|
!( face->variation_support &
|
||||||
TT_FACE_FLAG_VAR_VADVANCE ) )
|
TT_FACE_FLAG_VAR_VADVANCE ) )
|
||||||
outline->points[j].y += delta_y;
|
outline->points[j].y += delta_y;
|
||||||
|
|
||||||
else if ( j == ( n_points - 0 ) &&
|
|
||||||
!( face->variation_support &
|
|
||||||
TT_FACE_FLAG_VAR_TSB ) )
|
|
||||||
outline->points[j].y += delta_y;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||||
|
|
Loading…
Reference in New Issue