'how can I type persian text in pillow library
How can I write Persian text on photos with the help of Pillow Library in Python? When I try to write text, the letters of the word are written from the end to the beginning.
For example, when I want to write "Hello World" in Persian, it becomes "dolW olleH" on the photo.
pillow persian writing problem:
from PIL import Image, ImageDraw, ImageFont
a = Image.open('1.jpg')
draw = ImageDraw.Draw(a)
font = ImageFont.truetype('Dana.ttf', size=200)
draw.text((100, 200), 'سلام دنیا', font=font, fill=(255, 255, 255))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
