Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > b64c1c4a097f3db847720444326edc8d > files > 20

freetype-2.2.1-25.el5_5.src.rpm

Index: freetype-2.2.1/include/freetype/internal/tttypes.h
===================================================================
--- freetype-2.2.1.orig/include/freetype/internal/tttypes.h	2006-03-24 14:41:22.000000000 +0200
+++ freetype-2.2.1/include/freetype/internal/tttypes.h	2006-06-24 22:02:59.000000000 +0300
@@ -1472,6 +1472,7 @@
     FT_Byte*    tags;       /* current touch flags         */
     FT_UShort*  contours;   /* contour end points          */
 
+    FT_UShort   first_point /* offset of first (#0) point  */
   } TT_GlyphZoneRec, *TT_GlyphZone;
 
 
Index: freetype-2.2.1/src/truetype/ttgload.c
===================================================================
--- freetype-2.2.1.orig/src/truetype/ttgload.c	2006-06-24 22:03:08.000000000 +0300
+++ freetype-2.2.1/src/truetype/ttgload.c	2006-06-24 22:03:36.000000000 +0300
@@ -572,6 +572,7 @@
     zone->cur        = load->outline.points + start_point;
     zone->tags       = (FT_Byte*)load->outline.tags + start_point;
     zone->contours   = (FT_UShort*)load->outline.contours + start_contour;
+    zone->first_point = start_point;
   }
 
 
Index: freetype-2.2.1/src/truetype/ttinterp.c
===================================================================
--- freetype-2.2.1.orig/src/truetype/ttinterp.c	2006-06-24 22:03:54.000000000 +0300
+++ freetype-2.2.1/src/truetype/ttinterp.c	2006-06-24 22:04:31.000000000 +0300
@@ -5379,9 +5379,9 @@
     if ( contour == 0 )
       first_point = 0;
     else
-      first_point = (FT_UShort)(CUR.pts.contours[contour - 1] + 1);
+      first_point = (FT_UShort)(CUR.pts.contours[contour - 1] + 1 - CUR.pts.first_point);
 
-    last_point = CUR.pts.contours[contour];
+    last_point = CUR.pts.contours[contour] - CUR.pts.first_point;
 
     /* XXX: this is probably wrong... at least it prevents memory */
     /*      corruption when zp2 is the twilight zone              */
@@ -6315,7 +6315,7 @@
 
     do
     {
-      end_point   = CUR.pts.contours[contour];
+      end_point   = CUR.pts.contours[contour] - CUR.pts.first_point;
       first_point = point;
 
       while ( point <= end_point && (CUR.pts.tags[point] & mask) == 0 )