SOURCES: freetype-cvs.patch (NEW) - some truetype regression fixes...
arekm
arekm at pld-linux.org
Mon Mar 26 01:00:26 CEST 2007
Author: arekm Date: Sun Mar 25 23:00:26 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- some truetype regression fixes from upstream
---- Files affected:
SOURCES:
freetype-cvs.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/freetype-cvs.patch
diff -u /dev/null SOURCES/freetype-cvs.patch:1.1
--- /dev/null Mon Mar 26 01:00:26 2007
+++ SOURCES/freetype-cvs.patch Mon Mar 26 01:00:21 2007
@@ -0,0 +1,137 @@
+===================================================================
+RCS file: /sources/freetype/freetype2/src/truetype/ttinterp.c,v
+retrieving revision 1.99
+retrieving revision 1.102
+diff -u -r1.99 -r1.102
+--- freetype2/src/truetype/ttinterp.c 2007/02/16 08:12:50 1.99
++++ freetype2/src/truetype/ttinterp.c 2007/03/18 07:35:08 1.102
+@@ -4839,16 +4839,18 @@
+
+
+ if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
+- FT_ARRAY_COPY( CUR.twilight.orus,
+- CUR.twilight.org,
+- CUR.twilight.n_points );
+-
+- /* get scaled orus coordinates */
+- vec1.x = TT_MULFIX( CUR.zp0.orus[L].x - CUR.zp1.orus[K].x,
+- CUR.metrics.x_scale );
+- vec1.y = TT_MULFIX( CUR.zp0.orus[L].y - CUR.zp1.orus[L].y,
+- CUR.metrics.y_scale );
+-
++ {
++ vec1.x = CUR.zp0.org[L].x - CUR.zp1.org[K].x;
++ vec1.y = CUR.zp0.org[L].y - CUR.zp1.org[K].y;
++ }
++ else
++ {
++ /* get scaled orus coordinates */
++ vec1.x = TT_MULFIX( CUR.zp0.orus[L].x - CUR.zp1.orus[K].x,
++ CUR.metrics.x_scale );
++ vec1.y = TT_MULFIX( CUR.zp0.orus[L].y - CUR.zp1.orus[K].y,
++ CUR.metrics.y_scale );
++ }
+ D = CUR_fast_dualproj( &vec1 );
+
+ #else
+@@ -5780,23 +5782,28 @@
+
+ #ifdef FIX_BYTECODE
+
++ /* UNDOCUMENTED: twilight zone special case */
++
++ if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
++ {
++ FT_Vector* vec1 = &CUR.zp1.org[point];
++ FT_Vector* vec2 = &CUR.zp0.org[CUR.GS.rp0];
++
++ org_dist = CUR_Func_dualproj( vec1, vec2 );
++ }
++ else
+ {
+ FT_Vector* vec1 = &CUR.zp1.orus[point];
+ FT_Vector* vec2 = &CUR.zp0.orus[CUR.GS.rp0];
+
+
+- if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
+- FT_ARRAY_COPY( CUR.twilight.orus,
+- CUR.twilight.org,
+- CUR.twilight.n_points );
+-
+- if ( CUR.metrics.x_scale == CUR.metrics.y_scale )
++ if ( CUR.metrics.x_scale == CUR.metrics.y_scale )
+ {
+ /* this should be faster */
+ org_dist = CUR_Func_dualproj( vec1, vec2 );
+ org_dist = TT_MULFIX( org_dist, CUR.metrics.x_scale );
+ }
+- else
++ else
+ {
+ FT_Vector vec;
+
+@@ -6173,6 +6180,7 @@
+ FT_F26Dot6 old_range, cur_range;
+ FT_Vector* orus_base;
+ FT_Vector* cur_base;
++ FT_Int twilight;
+
+ FT_UNUSED_ARG;
+
+@@ -6184,21 +6192,18 @@
+ }
+
+ /*
+- * We need to deal in a special way with the twilight zone. The easiest
+- * solution is simply to copy the coordinates from `org' to `orus'
+- * whenever a font tries to perform intersections based on some of its
+- * points.
+- *
++ * We need to deal in a special way with the twilight zone.
+ * 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 )
+- FT_ARRAY_COPY( CUR.twilight.orus,
+- CUR.twilight.org,
+- CUR.twilight.n_points );
++ twilight = ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 || CUR.GS.gep2 == 0 );
++
++ if (twilight)
++ orus_base = &CUR.zp0.org[CUR.GS.rp1];
++ else
++ orus_base = &CUR.zp0.orus[CUR.GS.rp1];
+
+- orus_base = &CUR.zp0.orus[CUR.GS.rp1];
+- cur_base = &CUR.zp0.cur[CUR.GS.rp1];
++ cur_base = &CUR.zp0.cur[CUR.GS.rp1];
+
+ /* XXX: There are some glyphs in some braindead but popular */
+ /* fonts out there (e.g. [aeu]grave in monotype.ttf) */
+@@ -6212,7 +6217,11 @@
+ }
+ 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 );
+ }
+
+@@ -6233,7 +6242,11 @@
+ 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 );
+ new_dist = (old_range != 0)
+ ? TT_MULDIV( org_dist, cur_range, old_range )
================================================================
More information about the pld-cvs-commit
mailing list