Im using GraphicsMagick for the node and trying to draw text in “Urdu / Arabic Language” for that text “السلام عليكم”, the text is drawn in the output image, but it is drawn “left to right” while it should be “right to left”, since Arabic / Urdu are right-to-left languages.
gm("/file.png") .fill('#FF0066') .drawText(100, -150, "السلام عليكم", 'Center') .font("/alvi_Nastaleeq.ttf") .fontSize('38px') .encoding('Unicode')
Output Image:

If Im trying to use the inverse urdu "مكيلع مالسلا", even if the text is not drawn correctly.

What am I doing wrong? How can i fix this?
Thanks,
source share