> `FT_Stream_OpenMemory' is be the right function. After calling this, > you should use `FT_Stream_EnterFrame' and proceed as usual.
This is working now. I think the issue was due to some trivial error I made while creating the stream and passing it to other functions. However, could you please check if what I'm doing now is correct? http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/sfnt/sfwoff2.c?h=GSoC-2019-nikhil&id=c325089c2fd005e2c324aa4f3ddb942258aed5f1#n340 (see lines 340-344). I've not used `FT_FRAME_ENTER' as of now (in the loop) because I need to call `FT_READ_XXX' (which is not for frames) for some part of the reconstruction. I'll do that when we're ready to copy the table to the sfnt stream. > > Also, is this the right way of doing it? Is there some other way I > > can read the buffer? > > Is there are problem with `FT_READ_XXX'? Nope. It was definitely an issue with my code :-) Initially, I thought it made sense to have only one `stream' per source file (because most read macros use an implicit stream variable), but having a new stream in a separate function works perfectly. -- Nikhil _______________________________________________ Freetype-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype-devel
