Commit 634867898b7f741f1f6f5610310f831e0996d084

Werner Lemberg 2012-02-17T14:55:27

[autofit] Fix outline flags. * src/autofit/afloader.c (af_loader_load_g): Don't reassign `outline.flags' so that this information is preserved. See discussion starting at http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html

diff --git a/ChangeLog b/ChangeLog
index 34515fa..91a975a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-02-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[autofit] Fix outline flags.
+
+	* src/autofit/afloader.c (af_loader_load_g): Don't reassign
+	`outline.flags' so that this information is preserved.  See
+	discussion starting at
+
+	  http://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html
+
 2012-02-11  Werner Lemberg  <wl@gnu.org>
 
 	[truetype] Fix Savannah bug #35466.
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index e73109f..84a7fa8 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -465,7 +465,13 @@
       if ( error )
         goto Exit;
 
-      slot->outline = internal->loader->base.outline;
+      /* reassign all outline fields except flags to protect them */
+      slot->outline.n_contours = internal->loader->base.outline.n_contours;
+      slot->outline.n_points   = internal->loader->base.outline.n_points;
+      slot->outline.points     = internal->loader->base.outline.points;
+      slot->outline.tags       = internal->loader->base.outline.tags;
+      slot->outline.contours   = internal->loader->base.outline.contours;
+
       slot->format  = FT_GLYPH_FORMAT_OUTLINE;
     }