Text drawn with DrawStringWrapped appears in discrete characters for Arabic
When writing a text in arabic the characters are connected as follows :
عبد الفتاح السيسي
When I tried to use DrawStringWrapped it drawn the text in a descrete way, every character is not connected as follows:

The code snippet that generated the text in that image is as follows:
func drawName(dc *gg.Context, name string) {
const height = 250
dc.SetRGB(0, 0, 0)
dc.DrawRectangle(0, HEIGHT-height, WIDTH, height)
dc.Fill()
if err := dc.LoadFontFace("font.ttf", 70); err != nil {
return
}
dc.SetRGB(1, 1, 1)
dc.DrawStringWrapped(name, 100, HEIGHT-height+70, 0, 0, WIDTH-200, 1.5, gg.AlignLeft)
dc.Fill()
}
@nigeltao Is this something I'm doing wrong or does freetype have the same problem?
Freetype-go has the same problem: it does not do text shaping. We'd need the Go equivalent of the Harfbuzz library, but that's a lot of work, and I don't have any spare time. Sorry.
I've created a library to help fixing the text shaping issue for arabic: https://github.com/AbdullahDiaa/ar-golang
I hope it's helpful.