shithub: freetype+ttf2subf

Download patch

ref: ac2ea865f3e019321f77f5c6b286ba1ddc6f6159
parent: 757bdf1aef3d93a27968857ac5b4435a52fa24a0
author: Alexei Podtelezhnikov <[email protected]>
date: Mon Aug 13 17:33:24 EDT 2018

[bdf] Remove unused overflow storage.

* src/bdf/bdf.h (bdf_glyphlist_t): Remove this type.
(bdf_font_t): Remove `overflow' field.
* src/bdf/bdflib.c (bdf_free_font): Remove `overflow' freeing.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-08-14  Alexei Podtelezhnikov  <[email protected]>
+
+	[bdf] Remove unused overflow storage.
+
+	* src/bdf/bdf.h (bdf_glyphlist_t): Remove this type.
+	(bdf_font_t): Remove `overflow' field.
+	* src/bdf/bdflib.c (bdf_free_font): Remove `overflow' freeing.
+
 2018-08-14  Werner Lemberg  <[email protected]>
 
 	[cff] Fix segv.
--- a/src/bdf/bdf.h
+++ b/src/bdf/bdf.h
@@ -158,20 +158,6 @@
   } bdf_glyph_t;
 
 
-  typedef struct  bdf_glyphlist_t_
-  {
-    unsigned short  pad;          /* Pad to 4-byte boundary.              */
-    unsigned short  bpp;          /* Bits per pixel.                      */
-    long            start;        /* Beginning encoding value of glyphs.  */
-    long            end;          /* Ending encoding value of glyphs.     */
-    bdf_glyph_t*    glyphs;       /* Glyphs themselves.                   */
-    unsigned long   glyphs_size;  /* Glyph structures allocated.          */
-    unsigned long   glyphs_used;  /* Glyph structures used.               */
-    bdf_bbx_t       bbx;          /* Overall bounding box of glyphs.      */
-
-  } bdf_glyphlist_t;
-
-
   typedef struct  bdf_font_t_
   {
     char*            name;           /* Name of the font.                   */
@@ -204,8 +190,6 @@
 
     char*            comments;       /* Font comments.                      */
     unsigned long    comments_len;   /* Length of comment string.           */
-
-    bdf_glyphlist_t  overflow;       /* Storage used for glyph insertion.   */
 
     void*            internal;       /* Internal data for the font.         */
 
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -2409,16 +2409,6 @@
     FT_FREE( font->glyphs );
     FT_FREE( font->unencoded );
 
-    /* Free up the overflow storage if it was used. */
-    for ( i = 0, glyphs = font->overflow.glyphs;
-          i < font->overflow.glyphs_used; i++, glyphs++ )
-    {
-      FT_FREE( glyphs->name );
-      FT_FREE( glyphs->bitmap );
-    }
-
-    FT_FREE( font->overflow.glyphs );
-
     /* bdf_cleanup */
     ft_hash_str_free( &(font->proptbl), memory );