Draw Hebrew on an image (python, PIL)

Possible duplicate:
Drawing Hebrew text and an image using the image module (python)

this is the code:

import Image
import ImageDraw
import ImageFont
import _imaging

a=u'1אריאל' #u'..' converts to unicode
font = ImageFont.truetype('c:/test/Miriam.ttf',24) #standard hebrew font, this line throws the error
im=Image.new('RGB',(200,200),(100,100,100))
d=ImageDraw.Draw(im)
d.text((0,0),a)
im.show()

this is an error: ImportError: _imagingft C module is not installed

What can I do?

thank

+3
source share

Source: https://habr.com/ru/post/1731015/


All Articles