Thanks Tom,
the problem is not ctypes vs cffi. It's whether to add a new public function to deallocate the memory that was allocated inside the DLL, or to optionally provide a pointer to a callback that does the memory allocation.
I have no problem doing the latter with ctypes.
I do like cffi and have used it for other projects in the past, however for this particular one I prefer to not add a extra runtime dependency on cffi. The TTF_autohint function is simple enough that ctypes alone (included in the python standard library) can do the trick.
Have you considered CFFI? [1]
This might make things a little easier, but I am not sure since I don't have as much experience with that as I do ctypes.
Or are you more or less married to ctypes?