freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Fwd: buiding ttfautohint with cmake?


From: Cosimo Lupo
Subject: Re: [ft-devel] Fwd: buiding ttfautohint with cmake?
Date: Wed, 13 Dec 2017 13:44:02 +0000

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.

On Wed, Dec 13, 2017 at 1:32 PM Tom Kacvinsky <address@hidden> wrote:
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?

[1] https://cffi.readthedocs.io/en/latest/

On Wed, Dec 13, 2017 at 7:23 AM, Werner LEMBERG <address@hidden> wrote:

>> What do you think about providing function pointers to TTF_autohint
>> for memory allocation and deallocation instead?
>
> it's bit more complicated to pass a function pointer with ctypes,
> but it's possible.  Whatever you think is best,

Well, I simply don't know what is best.  I can imagine that it is
beneficial to have a single memory allocation routine for both the DLL
and the caller for garbage collection stuff and the like, but maybe
I'm completely wrong...

Any other opinions?


    Werner

_______________________________________________
Freetype-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype-devel
--
Cosimo Lupo

reply via email to

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