Right To Left Text Rendering

Hi,
For right to left languages like farsi ( persian language ) this address
gives correct text rendering to me:
View Adobe® Photoshop® Files | PSD & PSB Viewer App
here is the correct output:
image.png (46.6 KB)

but when I use the source code from:

I can’t get the correct rendering for persian texts.

I get this output (with seperated persian letters):
image.png (33.5 KB)

I think there must be a settings that I don’t apply.

I would appreciate your help.

Thanks.

@mansur.nurani

Can you please share the source file along with generated output that is reproducing the issue on your end.