fixing TrueType bytecode interpreter regression for HLB_____.TTF, needs more testing with other fonts
This commit is contained in:
parent
34cd7ea03d
commit
89020d9749
|
@ -1,3 +1,8 @@
|
||||||
|
2007-03-17 David Turner <david@freetype.org>
|
||||||
|
|
||||||
|
* src/truetype/ttinterp.c (Ins_IP): fixing wrong handling
|
||||||
|
of the (undocumented) twilight zone special case.
|
||||||
|
|
||||||
2007-03-09 Werner Lemberg <wl@gnu.org>
|
2007-03-09 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* Version 2.3.2 released.
|
* Version 2.3.2 released.
|
||||||
|
|
|
@ -6173,6 +6173,7 @@
|
||||||
FT_F26Dot6 old_range, cur_range;
|
FT_F26Dot6 old_range, cur_range;
|
||||||
FT_Vector* orus_base;
|
FT_Vector* orus_base;
|
||||||
FT_Vector* cur_base;
|
FT_Vector* cur_base;
|
||||||
|
FT_Int twilight;
|
||||||
|
|
||||||
FT_UNUSED_ARG;
|
FT_UNUSED_ARG;
|
||||||
|
|
||||||
|
@ -6184,21 +6185,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to deal in a special way with the twilight zone. The easiest
|
* We need to deal in a special way with the twilight zone.
|
||||||
* solution is simply to copy the coordinates from `org' to `orus'
|
|
||||||
* whenever a font tries to perform intersections based on some of its
|
|
||||||
* points.
|
|
||||||
*
|
|
||||||
* Otherwise, by definition, the value of CUR.twilight.orus[n] is (0,0),
|
* Otherwise, by definition, the value of CUR.twilight.orus[n] is (0,0),
|
||||||
* whatever value of `n'.
|
* for every n.
|
||||||
*/
|
*/
|
||||||
if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 || CUR.GS.gep2 == 0 )
|
twilight = ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 || CUR.GS.gep2 == 0 );
|
||||||
FT_ARRAY_COPY( CUR.twilight.orus,
|
|
||||||
CUR.twilight.org,
|
|
||||||
CUR.twilight.n_points );
|
|
||||||
|
|
||||||
orus_base = &CUR.zp0.orus[CUR.GS.rp1];
|
if (twilight)
|
||||||
cur_base = &CUR.zp0.cur[CUR.GS.rp1];
|
orus_base = &CUR.zp0.org[CUR.GS.rp1];
|
||||||
|
else
|
||||||
|
orus_base = &CUR.zp0.orus[CUR.GS.rp1];
|
||||||
|
|
||||||
|
cur_base = &CUR.zp0.cur[CUR.GS.rp1];
|
||||||
|
|
||||||
/* XXX: There are some glyphs in some braindead but popular */
|
/* XXX: There are some glyphs in some braindead but popular */
|
||||||
/* fonts out there (e.g. [aeu]grave in monotype.ttf) */
|
/* fonts out there (e.g. [aeu]grave in monotype.ttf) */
|
||||||
|
@ -6212,7 +6210,11 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
old_range = CUR_Func_dualproj( &CUR.zp1.orus[CUR.GS.rp2], orus_base );
|
if (twilight)
|
||||||
|
old_range = CUR_Func_dualproj( &CUR.zp1.org[CUR.GS.rp2], orus_base );
|
||||||
|
else
|
||||||
|
old_range = CUR_Func_dualproj( &CUR.zp1.orus[CUR.GS.rp2], orus_base );
|
||||||
|
|
||||||
cur_range = CUR_Func_project ( &CUR.zp1.cur[CUR.GS.rp2], cur_base );
|
cur_range = CUR_Func_project ( &CUR.zp1.cur[CUR.GS.rp2], cur_base );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6233,7 +6235,11 @@
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
org_dist = CUR_Func_dualproj( &CUR.zp2.orus[point], orus_base );
|
if (twilight)
|
||||||
|
org_dist = CUR_Func_dualproj( &CUR.zp2.org[point], orus_base );
|
||||||
|
else
|
||||||
|
org_dist = CUR_Func_dualproj( &CUR.zp2.orus[point], orus_base );
|
||||||
|
|
||||||
cur_dist = CUR_Func_project ( &CUR.zp2.cur[point], cur_base );
|
cur_dist = CUR_Func_project ( &CUR.zp2.cur[point], cur_base );
|
||||||
new_dist = (old_range != 0)
|
new_dist = (old_range != 0)
|
||||||
? TT_MULDIV( org_dist, cur_range, old_range )
|
? TT_MULDIV( org_dist, cur_range, old_range )
|
||||||
|
|
Loading…
Reference in New Issue