Re: [ft-devel] FT_Init_FreeType allocating memory before I get a chance to set the allocators.

2009-06-25 Thread Werner LEMBERG
I wonder whether this code from FT_Init_FreeType (*alibrary)-version_major = FREETYPE_MAJOR; (*alibrary)-version_minor = FREETYPE_MINOR; (*alibrary)-version_patch = FREETYPE_PATCH; should be moved to FT_New_Library to make FT_Library_Version more generic. I suppose that you don't

Re: [ft-devel] FT_Init_FreeType allocating memory before I get a chance to set the allocators.

2009-06-24 Thread Werner LEMBERG
1) We have our own struct that contains both the ft library and an FT_Memory object. 2) We initialize the fields in the FT_Memory object so that our callbacks are called. 3) We call FT_New_Library and tell it to use our memory object. This is the first FT2 API call. //

Re: [ft-devel] FT_Init_FreeType allocating memory before I get a chance to set the allocators.

2009-06-23 Thread Leon Woestenberg
Hello, On Mon, Jun 22, 2009 at 5:21 PM, Mickey Gabelmic...@monfort.co.il wrote: Tom van Dijck wrote:    We have had no problem using FT2 with our own allocators (we work on    systems were malloc() and free(), and possibly dynamic allocation    entirely, are not present)    So either I am

Re: [ft-devel] FT_Init_FreeType allocating memory before I get a chance to set the allocators.

2009-06-22 Thread Mickey Gabel
Werner LEMBERG wrote: both FT_New_Memory, and FT_New_Library (functions called within FT_Init_FreeType) are allocating memory, before I have a chance of setting the function pointers in FT_Memory.. To get around that I added an extra argument to the FT_Init_FreeType, which allows me to

Re: [ft-devel] FT_Init_FreeType allocating memory before I get a chance to set the allocators.

2009-06-22 Thread Graham Asher
I agree - I also have had no problem using custom allocators with FreeType 2. I have successfully used DlMalloc, and currently use a hybrid system comprising a fast-access pool of small blocks and a fallback to standard malloc and free. Graham Asher CartoType Mickey Gabel wrote: Werner

Re: [ft-devel] FT_Init_FreeType allocating memory before I get a chance to set the allocators.

2009-06-22 Thread David Turner
As noted by other posters, FT_Init_Library is a convenience function. You may want to use FT_New_Library instead to provide your own custom allocator. 2009/6/22 Werner LEMBERG w...@gnu.org both FT_New_Memory, and FT_New_Library (functions called within FT_Init_FreeType) are allocating

Re: [ft-devel] FT_Init_FreeType allocating memory before I get a chance to set the allocators.

2009-06-22 Thread Tom van Dijck
We have had no problem using FT2 with our own allocators (we work on systems were malloc() and free(), and possibly dynamic allocation entirely, are not present) So either I am doing it wrong, or Tom van Dick is doing it wrong. a totally unintentional spelling error ;) I like it

Re: [ft-devel] FT_Init_FreeType allocating memory before I get a chance to set the allocators.

2009-06-22 Thread Mickey Gabel
Tom van Dijck wrote: We have had no problem using FT2 with our own allocators (we work on systems were malloc() and free(), and possibly dynamic allocation entirely, are not present) So either I am doing it wrong, or Tom van Dick is doing it wrong. a totally unintentional

Re: [ft-devel] FT_Init_FreeType allocating memory before I get a chance to set the allocators.

2009-06-21 Thread Werner LEMBERG
both FT_New_Memory, and FT_New_Library (functions called within FT_Init_FreeType) are allocating memory, before I have a chance of setting the function pointers in FT_Memory.. To get around that I added an extra argument to the FT_Init_FreeType, which allows me to provide an FT_Memory

Re: [ft-devel] FT_Init_FreeType allocating memory before I get a chance to set the allocators.

2009-06-21 Thread Werner LEMBERG
both FT_New_Memory, and FT_New_Library (functions called within FT_Init_FreeType) are allocating memory, before I have a chance of setting the function pointers in FT_Memory.. To get around that I added an extra argument to the FT_Init_FreeType, which allows me to provide an FT_Memory