[Image-SIG] PIL Fonts

clive sinclair clive at evclose.freeserve.co.uk
Sat Mar 20 21:10:37 CET 2010


I am running Python 2.6 and have just installed PIL 1.1.7 running on Win 
2000.

When I try to get a font object eg by
font = ImageFont.truetype("C:\WINNT\Fonts\arial.ttf", 15)
I get an exception
   File "C:\Python26\lib\site-packages\PIL\ImageFont.py", line 134, in 
__init__
     self.font = core.getfont(file, size, index, encoding)
IOError: cannot open resource.

Looking into Class FreeTypeFont I see that _imagingft service is 
required. This file is present in C:\Python26\Lib\site-packages\PIL.
Should this file be installed during the Python2.6 setup? What should I 
do to fix this problem? I had basically the same problem with PIL 1.1.6.

C Sinclair




More information about the Image-SIG mailing list