PIL set font trouble

Zajcev Evgeny lg at localhost.rgz.ru
Sun Sep 3 20:10:09 CEST 2000


Hi people.

I've got a trouble with setting font in PIL library
my code is:

import Image, ImageDraw

d = Image.new("RGB", (100, 100))
dd = ImageDraw.Draw(d)
dd.text((0, 0), "TEST!)

and it rise exception:
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python1.6/site-packages/PIL/ImageDraw.py", line 149, in text
    font = self.getfont()
  File "/usr/local/lib/python1.6/site-packages/PIL/ImageDraw.py", line 57, in getfont
    self.font = ImageFont.load_path("BDF/courR14.pil")
  File "/usr/local/lib/python1.6/site-packages/PIL/ImageFont.py", line 97, in load_path
    raise IOError, "cannot find font file"
IOError: cannot find font file

--so i dont find any courR14.pil file in my file system

using Python1.6b1 API version 1009 and PIL API version 1007
os: FreeBSD 4.0 RELEASE

----
zev
newspapper <<RUSSIA>>
Moscow
lg at rgz.ru



More information about the Python-list mailing list