Page 1 of 1

TextDirection doesn't work

Posted: 2019-11-05T02:38:15-07:00
by Eilonitis
According to the website Magick.NET supposed to have bidirectional text support, but It doesn't work for me.
All I need is to create a simple rectangle with text on it.

This is my code -

Code: Select all

using (MagickImage image = new MagickImage(new MagickColor(0, 0, 255), 500, 200))
    new Drawables()
      .StrokeColor(new MagickColor("white"))
      .Text(500, 30, text)
The problem is if the text contains right to left language, it write it in the opposite direction.
For example the word שלום will be written like this - םולש.

What am I doing wrong? Do I need to add another package to my project?

Re: TextDirection doesn't work

Posted: 2019-11-06T15:05:15-07:00
by dlemstra
It looks like the text is written correctly? Dont understand why it is incorrect.

Re: TextDirection doesn't work

Posted: 2019-11-07T02:58:31-07:00
by Eilonitis
The problem is the order of the letters.
I know the example I gave is in Hebrew and you probably can't read it but the order of the letters is wrong, the letters are being typed from left to right instead of right to left.
I thought that the TextDirection supposed to fix it but it doesn't make a different, all of the text is being typed from left to right.

Think of that in a completely opposite situation, if all of the text would be from right to left, English word like "Hello" would be "olleH".