shithub: freetype+ttf2subf

Download patch

ref: 4836f955f3ffb0a7c7644801daa14d0a4bb041db
parent: 457b4a81a190500fbbea8bc7b5750903704e715f
author: Werner Lemberg <[email protected]>
date: Tue Jun 6 08:54:08 EDT 2006

formatting

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,28 @@
 2006-06-06  David Turner  <[email protected]>
 
-        * include/freetype/internal/services/svpscmap.h, src/cff/cffcmap.c,
-        src/psaux/t1cmap.c, src/psnames/psmodule.c: Fix for the memory
-        leak described in bug #16759.
+	Fix memory leak described in Savannah bug #16759.
 
-        We change 'ps_unicodes_init' so that it also takes a 'free_glyph_name'
-        callback to release the glyph names returned by 'get_glyph_name'
+	We change `ps_unicodes_init' so that it also takes a
+	`free_glyph_name' callback to release the glyph names returned by
+	`get_glyph_name'
 
+	* include/freetype/internal/services/svpscmap.h (PS_Glyph_NameFunc):
+	Renamed to ...
+	(PS_GetGlyphNameFunc): This.
+	(PS_FreeGlyphNameFunc): New typedef.
+	(PS_Unicodes_InitFunc): Add variable for PS_FreeGlyphNameFunc.
 
+	* src/cff/cffcmap.c (cff_sid_to_glyph_name): Use `TT_Face' for first
+	argument.
+	(cff_sid_free_glyph_name): New function.
+	(cff_cmap_unicode_init): Updated.
+
+	* src/psaux/t1cmap.c (t1_cmap_unicode_init): Updated.
+
+	* src/psnames/psmodule.c (ps_unicodes_init): Add variable for
+	PS_FreeGlyphNameFunc and use it.
+
+
 2006-06-04  David Turner  <[email protected]>
 
 	* src/base/ftutil.c (ft_mem_qrealloc): Fix the function to accept
@@ -228,7 +243,7 @@
 	Updated.
 
 	* builds/unix/install-sh: Updated from `texinfo' CVS module at
-	Savannah.gnu.org.
+	savannah.gnu.org.
 
 	* devel/ftoption.h: Synchronize with
 	include/freetype/config/ftoption.h.
@@ -1513,7 +1528,7 @@
 2006-01-22  Werner Lemberg  <[email protected]>
 
 	* builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
-	`texinfo' CVS module at Savannah.gnu.org.
+	`texinfo' CVS module at savannah.gnu.org.
 
 2006-01-21  Werner Lemberg  <[email protected]>
 
--- a/src/cff/cffcmap.c
+++ b/src/cff/cffcmap.c
@@ -123,7 +123,7 @@
   cff_sid_to_glyph_name( TT_Face   face,
                          FT_UInt   idx )
   {
-    CFF_Font            cff     = (CFF_Font) face->extra.data;
+    CFF_Font            cff     = (CFF_Font)face->extra.data;
     CFF_Charset         charset = &cff->charset;
     FT_Service_PsCMaps  psnames = (FT_Service_PsCMaps)cff->psnames;
     FT_UInt             sid     = charset->sids[idx];
@@ -132,6 +132,7 @@
     return cff_index_get_sid_string( &cff->string_index, sid, psnames );
   }
 
+
   FT_CALLBACK_DEF( void )
   cff_sid_free_glyph_name( TT_Face      face,
                            const char*  gname )
@@ -138,6 +139,7 @@
   {
     FT_Memory  memory = FT_FACE_MEMORY( face );
 
+
     FT_FREE( gname );
   }
 
@@ -159,8 +161,8 @@
     return psnames->unicodes_init( memory,
                                    unicodes,
                                    cff->num_glyphs,
-                                   (PS_GetGlyphNameFunc)  &cff_sid_to_glyph_name,
-                                   (PS_FreeGlyphNameFunc) &cff_sid_free_glyph_name,
+                                   (PS_GetGlyphNameFunc)&cff_sid_to_glyph_name,
+                                   (PS_FreeGlyphNameFunc)&cff_sid_free_glyph_name,
                                    (FT_Pointer)cff );
   }
 
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -276,8 +276,8 @@
     return psnames->unicodes_init( memory,
                                    unicodes,
                                    face->type1.num_glyphs,
-                                   (PS_GetGlyphNameFunc)  &t1_get_glyph_name,
-                                   (PS_FreeGlyphNameFunc) NULL,
+                                   (PS_GetGlyphNameFunc)&t1_get_glyph_name,
+                                   (PS_FreeGlyphNameFunc)NULL,
                                    (FT_Pointer)face );
   }