I am trying to annotate an image with Arabic text, but unfortunately, the letters are shown disconnected. I tried changing the text encoding, but the result does not change. Also, the text direction did not work with me when I tried setting it to "TextDirection.RightToLeft".
The text still shows from left to right which is not correct in Arabic language.
However, when I use the Graphics class and DrawString method (in native ASP.NET), I get Arabic text correctly with no issues in encoding. But the issue with this approach is that I lose the image resolution and sometimes I get an image double the size of its
I would really appreciate if you could help me in resolving this encoding issue in Magick.NET.
I am using the code shown below.
using (MagickImageCollection images = new MagickImageCollection())
MagickImage logo = new MagickImage("logo:");
MagickImage label = new MagickImage();
label.BackgroundColor = Color.Black;
label.TextDirection = TextDirection.RightToLeft;
label.TextGravity = Gravity.East;
label.TextEncoding = Encoding.Unicode;
label.Read("label:" + "مرحبا بكم");
label.Extent(logo.Width, label.Height, Gravity.East);
using (MagickImage output = images.AppendVertically())