[cairo] freetype, python and ctypes
Donn
donn.ingle at gmail.com
Thu Dec 6 04:41:47 PST 2007
Hello,
I'm stuck on the code attached. The ctypes example from the cookbook works
well in it's original form, but I'm trying to present it via my API in an
easy way. The user-end of the equation should look like this:
af = AFont("font.ttf") # My easy font class
face=af.face(ctx) # fetch the 'face'
ctx.set_font_face(face) # plug it into the context
ctx.set_font_size(30)
ctx.move_to(0, 44)
ctx.show_text("Hello,")
ctx.move_to(30, 74)
ctx.show_text("world!")
ctx.fill()
My attempt keeps segfaulting. I'm sure I'm being daft, but thus far I can't
make head nor tails of it -- any takers?
\d
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctypes.segfault.py
Type: application/x-python
Size: 3082 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071206/f2985812/attachment.bin
More information about the cairo
mailing list