[Image-SIG] Patch for freetype issue

Norbert Cauderan norbidur at gmail.com
Fri Jan 21 00:27:38 CET 2011


On Fri, Jan 14, 2011 at 4:21 PM, Erwan Loaëc <erwan.loaec at cgin.fr> wrote:

> Is anyone can take a look and confirm this is really a bug ?
>

 Without  the patch, following code gives 2 truncated "j". With the patch,
everything looks OK. The problem does not appear with every font but at
least with "arial" on windows and DejaVuSerif on linux.

import Image
import ImageDraw
import ImageFont
font =
ImageFont.truetype('/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf',
150,encoding="unic")
im = Image.new("RGBA",(500,800),(0,255,0,127))
draw = ImageDraw.Draw(im)
draw.text((100,10),"jj ",font=font,fill=(255,0,0,255))
draw.text((100,180),"ji",font=font,fill=(255,0,0,255))
draw.text((100,370),"jj",font=font,fill=(255,0,0,255))
im.save("test.png")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20110121/1bc6c5b3/attachment.html>


More information about the Image-SIG mailing list