[cairo] Freetype to Cairo - newb needs help

Donn donn.ingle at gmail.com
Tue Oct 23 07:48:19 PDT 2007


> The functions take FT_Library* and FT_Face* though.  You can wrap them
> like both are simple ints.

I tried these:

>>> from ctypes import *
>>> f=CDLL("libfreetype.so")
>>> c=CDLL("libcairo.so")

>>> face=c_void_p()
>>> lib=c_void_p()
>>> f.FT_New_Face(lib,"F.TTF",0,face)
6
>>> cairoface = c.cairo_ft_font_face_create_for_ft_face(face)
Segmentation fault

Tried again:
>>> face=c_int()
>>> lib=c_int()

>>> f.FT_New_Face(lib,"F.TTF",0,face)
6

>>> cairoface = c.cairo_ft_font_face_create_for_ft_face(face)
Segmentation fault


What's the better procedure?
/d


More information about the cairo mailing list