[truetype] Fix MD instruction for twilight zone.
* src/truetype/ttinterp.c (Ins_MD): Without this fix, the MD instruction applied to original coordinates of twilight points always returns zero.
This commit is contained in:
parent
016eba976f
commit
f4ec60fdb8
|
@ -1,3 +1,11 @@
|
|||
2011-10-25 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[truetype] Fix MD instruction for twilight zone.
|
||||
|
||||
* src/truetype/ttinterp.c (Ins_MD): Without this fix, the MD
|
||||
instruction applied to original coordinates of twilight points
|
||||
always returns zero.
|
||||
|
||||
2011-10-18 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* Version 2.4.7 released.
|
||||
|
|
|
@ -5155,25 +5155,38 @@
|
|||
D = CUR_Func_project( CUR.zp0.cur + L, CUR.zp1.cur + K );
|
||||
else
|
||||
{
|
||||
FT_Vector* vec1 = CUR.zp0.orus + L;
|
||||
FT_Vector* vec2 = CUR.zp1.orus + K;
|
||||
/* XXX: UNDOCUMENTED: twilight zone special case */
|
||||
|
||||
|
||||
if ( CUR.metrics.x_scale == CUR.metrics.y_scale )
|
||||
if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
|
||||
{
|
||||
/* this should be faster */
|
||||
FT_Vector* vec1 = CUR.zp0.org + L;
|
||||
FT_Vector* vec2 = CUR.zp1.org + K;
|
||||
|
||||
|
||||
D = CUR_Func_dualproj( vec1, vec2 );
|
||||
D = TT_MULFIX( D, CUR.metrics.x_scale );
|
||||
}
|
||||
else
|
||||
{
|
||||
FT_Vector vec;
|
||||
FT_Vector* vec1 = CUR.zp0.orus + L;
|
||||
FT_Vector* vec2 = CUR.zp1.orus + K;
|
||||
|
||||
|
||||
vec.x = TT_MULFIX( vec1->x - vec2->x, CUR.metrics.x_scale );
|
||||
vec.y = TT_MULFIX( vec1->y - vec2->y, CUR.metrics.y_scale );
|
||||
if ( CUR.metrics.x_scale == CUR.metrics.y_scale )
|
||||
{
|
||||
/* this should be faster */
|
||||
D = CUR_Func_dualproj( vec1, vec2 );
|
||||
D = TT_MULFIX( D, CUR.metrics.x_scale );
|
||||
}
|
||||
else
|
||||
{
|
||||
FT_Vector vec;
|
||||
|
||||
D = CUR_fast_dualproj( &vec );
|
||||
|
||||
vec.x = TT_MULFIX( vec1->x - vec2->x, CUR.metrics.x_scale );
|
||||
vec.y = TT_MULFIX( vec1->y - vec2->y, CUR.metrics.y_scale );
|
||||
|
||||
D = CUR_fast_dualproj( &vec );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue