python - trouble about using pil 1.1.7 ImageFont with ttc font file -


i want use notosanscjk fonts unicode characters, choose font files notosanscjk-[wiehgt].ttc instead of ttf files languages.

from pil import image, imagedraw, imagefont font = imagefont.truetype('notosanscjk.ttc', size=20) # font = imagefont.truetype('notoserifcjk.ttc', size=20) im = image.new('rgba', (1024, 1024), color=(0,0,0,0))  im_draw = imagedraw.draw(im) text = u'\u0e16\u0e12\u0e2c\u0e28\u0e0b\u0e1b\u0e01\u0e02\u0e0f\u0e17\u0e2b\u0e1f  \xe7in ger\xe7ek ki\u015fili\u011finizi ke\u015f1' im_draw.text((0, 0), text, font=font)  im.save('test.jpg') 

but code can not draw unicode characters although there glyphs in ttc font file.

what's problem? , how can fix it...?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -