-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
What did you do?
I'm trying to put text on top of an image and I also set the direction to RTL when doing this before I used to get some library not installed called libraqm but no with it install it still doesn't work I'm testing with the Arabic language
What did you expect to happen?
the text goes RTL
What actually happened?
the text went LTR
What are your OS, Python and Pillow versions?
- OS: Ubuntu 18
- Python: 3.6
- Pillow: latest version
def PhotoAlterer(name):
image = Image.open('check.jpeg')
draw = ImageDraw.Draw(image)
font = ImageFont.truetype('din-next-lt-w23-medium.ttf', size=60)
text_to_be_reshaped = '%s' % name
reshaped_text = arabic_reshaper.reshape(text_to_be_reshaped)
(x, y) = (1050, 427)
color = 'rgb(255, 255, 255)' # white color
draw.text((x, y), reshaped_text , fill=color, font=font, direction="rtl")
image.save('pImg/%s.png' % name)Metadata
Metadata
Assignees
Labels
No labels