[Image-SIG] Loading OpenType font (PIL 1.1.5, Python 2.4.1, Windows XP)

Laszlo Zsolt Nagy gandalf at designaproduct.biz
Fri Sep 16 15:54:58 CEST 2005


  Hello,

This two liner:

import ImageFont
font = ImageFont.truetype('arial.ttf',14)


Gives me this error:

Traceback (most recent call last):
  File "T:\Python\Projects\PILTest\test.py", line 2, in ?
    font = ImageFont.truetype('arial.ttf',14)
  File "C:\Python24\Lib\site-packages\PIL\ImageFont.py", line 202, in 
truetype
    return FreeTypeFont(filename, size, index, encoding)
  File "C:\Python24\Lib\site-packages\PIL\ImageFont.py", line 121, in 
__init__
    self.font = _imagingft.getfont(file, size, index, encoding)
TypeError: function takes at most 3 arguments (4 given)

What am I doing wrong?




More information about the Image-SIG mailing list