Skip to content

Instantly share code, notes, and snippets.

@amrza
amrza / run.py
Last active July 8, 2024 08:13
How to write RTL(Arabic/Persian) text on images in python.
# Tested on Python 3.6.1
# install: pip install --upgrade arabic-reshaper
import arabic_reshaper
# install: pip install python-bidi
from bidi.algorithm import get_display
# install: pip install Pillow
from PIL import ImageFont