[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] Large TT Font Memory Allocation Problem
From: |
Werner LEMBERG |
Subject: |
Re: [Freetype] Large TT Font Memory Allocation Problem |
Date: |
Sat, 04 Sep 2004 08:50:44 +0200 (CEST) |
> I'm trying to load a 3 MB TrueType font. In tt_face_load_metrics,
> there is an attempt to create an array of about 139K to hold some of
> the font metrics. The allocation fails. This is on Windows XP system
> with 768 MB of RAM. Any suggestions as to why I might be getting the
> failure and how to overcome it? Thanks.
Recompile the library with
make distclean
make devel
make
then set the following environment variables:
FT2_DEBUG_MEMORY=1
FT2_DEBUG=memory:7
This former produces a memory statistics dump at FT_Done_FreeType, the
latter protocols memory allocation. See `docs/DEBUG' for details.
You have to apply the patch below to src/base/ftdebug.c (this is now
in the CVS).
Werner
======================================================================
--- ftdebug.c.old 2004-09-04 08:46:44.515694528 +0200
+++ ftdebug.c 2004-09-04 08:46:44.515694528 +0200
@@ -125,17 +125,17 @@
/* value of the `FT2_DEBUG' environment variable. It must be a list of */
/* toggles, separated by spaces, `;', or `,'. Example: */
/* */
- /* export FT2_DEBUG="any:3 memory:6 stream:5" */
+ /* export FT2_DEBUG="any:3 memory:7 stream:5" */
/* */
/* This requests that all levels be set to 3, except the trace level for */
- /* the memory and stream components which are set to 6 and 5, */
+ /* the memory and stream components which are set to 7 and 5, */
/* respectively. */
/* */
/* See the file <include/freetype/internal/fttrace.h> for details of the */
/* available toggle names. */
/* */
- /* The level must be between 0 and 6; 0 means quiet (except for serious */
- /* runtime errors), and 6 means _very_ verbose. */
+ /* The level must be between 0 and 7; 0 means quiet (except for serious */
+ /* runtime errors), and 7 means _very_ verbose. */
/* */
FT_BASE_DEF( void )
ft_debug_init( void )
@@ -189,7 +189,7 @@
if ( *p )
{
level = *p++ - '0';
- if ( level < 0 || level > 6 )
+ if ( level < 0 || level > 7 )
level = -1;
}