[Image-SIG] font problems
David Ascher
da@skivs.ski.org
Fri, 26 Jun 1998 15:12:53 -0700 (PDT)
I'm confused about PIL fonts again. I got a BDF font, converted it to
.pil/.pbm files with bdf2pil.py, and I'm trying to use it with:
from Image import *
import ImageFont
from ImageDraw import *
f = ImageFont.load('test.pil')
x = new("L", (400,400))
d = ImageDraw(x)
d.setfont(f)
d.text((50, 50), 'this is a Test!')
x.save('test.jpg')
Alas, I get:
Traceback (innermost last):
File "test.py", line 9, in ?
d.text((50, 50), 'this is a Test!')
File "E:\DAVID\py\PIL\ImageDraw.py", line 71, in text
m = self.font.getmask(text)
File "E:\DAVID\py\PIL\ImageFont.py", line 87, in getmask
im.im.paste(self.image.im.crop(tuple(m[6:10])),
SystemError: NULL result without error in call_object
Any ideas?
Looking at the ImagingCrop code, nothing jumps out. (although I wouldn't
mind seeing real error messages, not just 'return NULL'. =).
--david