draw.text_encoding = 'utf-8'
draw.text_kerning = 0.0
for i in range(len(fonts)):
    font = fonts[i]
draw.font = font
draw.font_size = 40
draw.text(img.width / 2, 40 + i * 60, artext)
print(draw.get_font_metrics(img, artext))
draw(img)
draw.text(img.width / 2, 40 + (i + 1) * 60, '\u0646\u0627\u0635\u0631 test')
draw(img)
img.save(filename='C:\\PATH\\OUTPUT\\arabictest.png'.format(r))
wdiplay(img)
Printing Bidi text to an image