[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] External stream
From: |
Sander van der Wal |
Subject: |
Re: [Freetype] External stream |
Date: |
Mon, 17 Sep 2001 19:18:49 +0200 |
> Well, I think the documentation is misleading. My vote is on stating
that
> you should not touch the 'memory' field if you are opening either a
file
> based or a memory based stream, because FreeType will do it for you.
If you
> want to create your own stream, then there is no reason why you
should not
> be able to provide your own memory pool. This may in fact be useful
in some
> cases. I can not see any technical reasons for hacking away this
> functionality, e.g. I can set up a stream with FT_New_Memory()
without any
> problems so the docs are not correct.
>
> This is of course speculation as to what the intention were or
should be
> with respect to how stream are used by FT_Open_Face().
> >
> > > Your suggested fix is the same as mine. Note though that the
> > if-statement is
> > > needed (i.e. "if (stream->memory==NULL)"), in case an external
> > stream do
> > > provide a memory pool.
> >
> > I have looked at ftstream.h, where FT_Stream is defined: it states
> > that the memory manager field should not be touched by
applications.
> > Ergo, you cannot have an external memory manager for a FT_Stream
only.
> > Therefore the assignment must be unconditional.
So we have two choices:
- fix the docs and search for all instances in the code base to make
sure the new rules don't break existing code,
- fix the single assignment
Any comments from the freetype 2 team?
Sander van der Wal