Skip to content

Instantly share code, notes, and snippets.

View farzad-ziaie's full-sized avatar

Farzad Ziaie Nezhad farzad-ziaie

  • Ernst Strüngmann Institut
  • Frankfurt
View GitHub Profile
@amrza
amrza / run.py
Last active September 13, 2024 01:30
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