> > To solve this issue, memory allocation needs to be performed from the > FreeType side. Thus I added a new hook `get_state_size' which will be called > to query the size of the `state' structure of a particular port.
FreeType stores the size of its module structures as their second field explicitly for this very reason. This way you won’t need any special hooks. > Then FreeType can allocate this memory and later free it too. I did the same > thing for the image buffer. I created a new hook `get_buffer_size' which can > be called to query the size needed to place the final rendered image. The > rendering port uses this memory and it sets the `FT_GLYPH_OWN_BITMAP' flag, > thus, FreeType can free it later. Yeap. That is what this flag is for. _______________________________________________ Freetype-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype-devel
