[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] External stream
From: |
Michael Jansson |
Subject: |
[Freetype] External stream |
Date: |
Sun, 16 Sep 2001 19:21:27 +0200 |
Hi,
I'm trying to use
FT_Open_Face() to open a font with a home brewed stream and am having a problem.
The docs states that I'm not supposed to poke at the 'memory' field of my custom
'FT_Stream_Rec_' structure, as it is supposed to be set by the lib. However, I'm
getting a crash (null point reference when stream->memory is used) if I
don't. Is this a know problem?
Adding these lines
to src/base/ftobjs.c (from the current stable build 2.0.4) would be one
solution:
204a205,208
>
>
/* Use default memory pool from the library if none is provided.
*/
> if
(stream->memory==NULL)
>
stream->memory = memory;
Another approach
would be to lift the FT_Memory structure from /internal/ftobjs.h, which
currently seems to suggest that this is private stuff. If so, then
FT_New_Memory() could be used. However, there is no FT_Done_Memory as far as I
can tell. Simply calling free() on the struct would not work, if the client
may use a different memory manager than what was used when the FreeType lib was
compiled. Anyway, I prefer adding the lines above to ftobjs.c as this is a
cleaner solution.
Am I missing
something? Am I the only one trying to use my own stream implementation?
Thanks,
-
Michael
- [Freetype] External stream,
Michael Jansson <=