shithub: freetype+ttf2subf

Download patch

ref: 8d463a53d115c45237431965365e5ca03509b4bb
parent: 711cf8474935cbe85d02428445e9fbee13fa44f6
author: Werner Lemberg <[email protected]>
date: Sun May 13 12:01:55 EDT 2007

* src/base/ftobjs.c (FT_New_Library): Only allocate rendering pool
if FT_RENDER_POOL_SIZE is > 0.  From Savannah patch #5928.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-13  Derek Clegg  <[email protected]>
+
+	* src/base/ftobjs.c (FT_New_Library): Only allocate rendering pool
+	if FT_RENDER_POOL_SIZE is > 0.  From Savannah patch #5928.
+
 2007-05-11  David Turner  <[email protected]>
 
 	* src/cache/ftbasic.c, include/freetype/ftcache.h: introduce
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -302,7 +302,9 @@
   /* The size in bytes of the render pool used by the scan-line converter  */
   /* to do all of its work.                                                */
   /*                                                                       */
-  /* This must be greater than 4KByte.                                     */
+  /* This must be greater than 4KByte if you use FreeType to rasterize     */
+  /* glyphs; otherwise, you may set it to zero to avoid unnecessary        */
+  /* allocation of the render pool.                                        */
   /*                                                                       */
 #define FT_RENDER_POOL_SIZE  16384L
 
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3706,8 +3706,9 @@
 
     /* allocate the render pool */
     library->raster_pool_size = FT_RENDER_POOL_SIZE;
-    if ( FT_ALLOC( library->raster_pool, FT_RENDER_POOL_SIZE ) )
-      goto Fail;
+    if ( FT_RENDER_POOL_SIZE > 0 )
+      if ( FT_ALLOC( library->raster_pool, FT_RENDER_POOL_SIZE ) )
+        goto Fail;
 
     /* That's ok now */
     *alibrary = library;