In PIL 1.1.6, ImageDraw.text will position the string incorrectly if the first character has a negative left bearing. To see the problem, show a string like "///" in an italic font. The first slash will be clipped at the left, and the string will be mis-positioned.
This patch fixes it: --- C:\src\PIL\Imaging-1.1.6\_imagingft.c 2006-12-03 06:51:26.000000000 -0500 +++ C:\src\PIL\mine\_imagingft.c 2008-02-02 16:39:20.000000000 -0500 @@ -316,13 +316,13 @@ load_flags = FT_LOAD_RENDER; if (mask) load_flags |= FT_LOAD_TARGET_MONO; for (x = i = 0; font_getchar(string, i, &ch); i++) { if (i == 0 && self->face->glyph->metrics.horiBearingX < 0) - x = PIXEL(self->face->glyph->metrics.horiBearingX); + x = -PIXEL(self->face->glyph->metrics.horiBearingX); index = FT_Get_Char_Index(self->face, ch); if (kerning && last_index && index) { FT_Vector delta; FT_Get_Kerning(self->face, last_index, index, ft_kerning_default, &delta); x += delta.x >> 6; --Ned. -- Ned Batchelder, http://nedbatchelder.com _______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig