Bug: Characters get jumbled when printing/compiling into a PDF in RTL(Arabic) Languages

Bug description:
The diacritics(small marks) on top of the characters and the characters themselves get jumbled when printing the document to a pdf. Compiling/printing to an html file seems fine. This was done using the Arabic language.

Steps to reproduce:

  1. Write a document in Arabic with any 2 or more diacritic combination.
    2 ) Compile/Print/Export to PDF.
  2. View PDF and you will see characters with the diacritics are jumbled.

Additional comments:
If you need any help please do ask. I can send the document I used or a 1-min video showing the problem.

Do keep up the great work !

Sincerely,
Mohamed Al Junaidy

The editor display of the letters: [attachment=2]No problem display .jpg[/attachment]
The html file display after compiling: [attachment=1]html compiled.jpg[/attachment]
The print preview is fine:[attachment=0]print preview is fine.jpg[/attachment]

The compiled PDF messes up diacritics: [attachment=1]pdf print compile pic.jpg[/attachment]
The export to PDF also messes it up even more: [attachment=0]export pdf picture.jpg[/attachment]

I tried multiple PDF printers(Adobe, Foxit, Microsoft) and they all seem to give the same results. The PDF printers works fine on LibreOffice Writer and when using XeLatex.
If there is anything I can help with to solve this bug, I would gladly oblige. Thanks.

Sorry for the double post. I just noticed this is the bug hunting forum while the other is the testing.