[cairo] Freetype to Cairo - newb needs help
behdad at behdad.org
Tue Oct 23 13:38:09 PDT 2007
On Tue, 2007-10-23 at 15:20 -0400, Behdad Esfahbod wrote:
> > # find DLLs
> > cairo_dll = ctypes.CDLL("libcairo.so")
> > freetype_dll = ctypes.CDLL("libfreetype.so")
> > # this makes pycairo's internals available.
> > pycairo_dll = ctypes.PyDLL(cairo._cairo.__file__)
> Yep, this is what I was pointed to by pygtk authors too. I'm going to
> add this to cairo website.
Though, doesn't work out of the box for me as recent-enough pycairo only
exports the init_cairo symbol. /me goes finding other ways.
> > # specify some types
> > cairo_dll.cairo_ft_font_face_create_for_ft_face.restype =
> > pycairo_dll.PycairoFontFace_FromFontFace.restype = ctypes.py_object
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo