Re: nospam plugin
Steven Armstrong <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
On 03/06/05 17:16, Murray Cumming wrote:
> On Sun, 2005-03-06 at 17:05 +0100, Steven Armstrong wrote:
>> >> > [3] http://www.murrayc.com/blog/nospam.png
>> >
>> > Aha, [3] is now showing some errors. This seems to be it:
>> > ImportError: No module named _imagingft
>> >
>>
>> Does the file
>> /usr/lib/python2.2/site-packages/PIL/_imagingft.so exist?
>
> No.
>
>> What version of PIL are you using?
>
> This is installed already by my hoster (dreamhost) so I'm not sure, and
> I don't know how to find out.
>
It seems you have an somewhat old version of PIL installed that doesn't
support truetype fonts. As an alternative you can download some .pil
fonts from [1].
Then change line +-126 in nospam.py:
from:
font = ImageFont.truetype(_fontPath, _fontSize)
to:
font = ImageFont.load("/path/to/pilfonts/lubB10.pil")
if that doesn't work try:
import PIL.ImageFont
font = PIL.ImageFont.load("/path/to/pilfonts/lubB10.pil")
Or ask your hoster to upgrade to a recent PIL version.
hth
[1] http://effbot.org/pil/pilfonts.zip
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click