[Image-SIG] Incorrect PIL font handling

ewc at axelero.hu ewc at axelero.hu
Thu Jan 15 11:09:47 EST 2004


I have some problems with italic fonts. Some parts of some characters
are missing. For example font ncenI24.pil (from pilfonts:
http://effbot.org/downloads/pilfonts.zip).  When I draw character 'f',
the left bottom part of charter is missing (the right top part is OK).
When I draw 'ff', the 1st f's left bottom and right top part is
missing while the 2nd f's left bottom part is missing.

I took a look into source codes and found, that if a character has
pozition smaller than 0 (zero), in that case the hanging out part is
cut off (in case of f 12 pixels). This was for the left side of
characters. On the right side there is similar problem.

I wrote a very dirty hack:
a C function which returns the glyph object and also a C function
which returns some glyph information (e.g. dx0, baseline). I wrote
also a simple python script which draws characters by character basis.
In this way I was able to make a workaround, but I don't like this

Could anybody take a look for this problem?

Kind regards,

ps: I used Imaging-1.1.4 and Python-2.3.3

More information about the Image-SIG mailing list