jung-kurt / gofpdf

A PDF document generator with high level support for text, drawing and images
http://godoc.org/github.com/jung-kurt/gofpdf
MIT License
4.33k stars 782 forks source link

Arabic characters are not connected #329

Open HishamRamadan opened 4 years ago

HishamRamadan commented 4 years ago

Hello, First of all, thanks so much for the great library, it's awesome!

Currently I am using this font (https://fonts.google.com/specimen/Tajawal?selection.family=Tajawal). I downloaded the ".ttf" file, and use it as follows:

pdf.RTL() pdf.AddUTF8Font("tajawal", "", "Tajawal-Regular.ttf")

The result is: ب س م ا ل ل ه ا ل ر ح م ن ا ل رح ي م While it should be: بسم الله الرحمن الرحيم

Is there anything else I can do to be able to generate Arabic text? By the way, the Arabic text in the test-case _ExampleFpdfAddUTF8Font are generated in the same way (not connected), and I also tried different fonts, all lead to the same result.

jung-kurt commented 4 years ago

Is there anything else I can do to be able to generate Arabic text?

Unfortunately, I am out of my league here. @ArtemKor, do you have any insights?

HishamRamadan commented 4 years ago

Thanks @jung-kurt for your reply. @ArtemKor; Your kind help is really appreciated.