[Image-SIG] Unable to draw compound character of a kannada lang over an image.

Edward Cannon cannon.el at gmail.com
Wed Oct 6 02:59:54 CEST 2010


Have you tried another font? Do all fonts do this or just this one?



On Oct 5, 2010, at 3:16 AM, shilpa h <shilpa.hireraddi at gmail.com> wrote:

> Hello all,
>
> I am unable to draw kannada compound characters ಕ್ಕಾ ,  
> ಪೈ, ವೋ etc
>
> over an image using ImageDraw module's draw method. Below is my code,
>
>  #-*- coding:utf8 -*-
> import sys, codecs, string
> import Image
> import ImageDraw
> import ImageFont
>
> txt = 'ಕ್ಕಾ '
> font = ImageFont.truetype('Malige-n.ttf',20)
> im = Image.new("RGBA",(800,600),(100,155,100))
> draw = ImageDraw.Draw(im)
> draw.text( (0,100), unicode(txt, 'UTF-8'), font=font2)
> del draw
> im.save('font.png', "PNG")
> im.show()
>
>
> And attached output image file displays 'ಕ್ಕಾ'  by splitting  
> it, but what i want is to display ಕ್ಕಾ  as it is.
> Please suggest me where i went wrong.
>
>
> Thanks & Regards
> Shilpa
>
>
>
>
> <font.png>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig


More information about the Image-SIG mailing list