freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Freetype] External stream


From: Michael Jansson
Subject: RE: [Freetype] External stream
Date: Tue, 18 Sep 2001 09:19:32 +0200

An assignment is needed in either case, although it should be conditional.
Also, setting stream->memory works just fine (I verified this of course
before suggesting the fix).

Regards,
- Michael

> -----Original Message-----
> From: Sander van der Wal [mailto:address@hidden
> Sent: Monday, September 17, 2001 7:19 PM
> To: address@hidden
> Subject: Re: [Freetype] External stream
> 
> 
> 
> > 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
> 
> 
> 
> 
> _______________________________________________
> Freetype mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/freetype
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]