我正在尝试使用Image模块来制作其中包含希伯来字体的位图。当从shell打印(空闲)时,我设法打印希伯来文,但是当试图将文本绘制到位图时,它会绘制一些ascii文字。使用图像模块(python)将希伯来语文本绘制为图像
这是代码:
import Image
import ImageDraw
a = "אריאל" #or any other hebrew string
im=Image.new('RGB',(200,200),(100,100,100)) #type file,size,Background color
d=ImageDraw.Draw(im)
d.text((0,0),a) #should draw the string
im.show()
任何帮助将是非常赞赏。