* src/base/ftobjs.c (FT_New_Library): Only allocate rendering pool if FT_RENDER_POOL_SIZE is > 0. From Savannah patch #5928.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
diff --git a/ChangeLog b/ChangeLog
index c48a0b7..ed3f311 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-13 Derek Clegg <dclegg@apple.com>
+
+ * 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 <david@freetype.org>
* src/cache/ftbasic.c, include/freetype/ftcache.h: introduce
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index afd8139..8a433b3 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -302,7 +302,9 @@ FT_BEGIN_HEADER
/* 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
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 19c64be..be9bf16 100644
--- 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;