Open wallid opened 2 years ago
You can use arabic-reshaper
and python-bidi
to display an Arabic text
import arabic_reshaper # pip install arabic-reshaper
from bidi.algorithm import get_display # pip install python-bidi
text = 'مهدي نسيم'
reshaped_text = arabic_reshaper.reshape(text) # correct its shape
bidi_text = get_display(reshaped_text) # correct its direction
print(bidi_text)
TextClip(bidi_text, font="Arial", fontsize=50, color='black')
I've tried using generating text clips with Arabic text and it results in the letters come out separated and mirrored. Support for RTL languages would be highly appreciated.