.TextInterwordSpacing has no effect

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
Posts: 3
Joined: 2017-03-10T12:46:40-07:00
Authentication code: 1151

.TextInterwordSpacing has no effect

Post by pmdpmd » 2017-03-10T12:53:39-07:00


I'm using the Magick.NET-Q8-AnyCPU Nuget package latest version

I'm trying to use the .TextInterwordSpacing feature, but it seems to have no effect.

Reading the forums, I see this stopped working at some point in the command line version and was then fixed. I'm wondering if I need a different version of the Nuget package, or am I doing something wrong? Below is my code, slightly modified from the Drawing demo:

Code: Select all

           using (MagickImage image = new MagickImage(new MagickColor("#ffffff"), 520, 111))
                new Drawables()
                  // Draw text on the image
                  //.StrokeColor(new MagickColor("black"))
                  .TextInterwordSpacing(33) // This has no effect
                  .Text(260, 80, "first second")
                  // Add an ellipse
                  //.StrokeColor(new MagickColor(0, Quantum.Max, 0))
                  //.Ellipse(256, 96, 192, 8, 0, 360)
                pictureBox1.Image = image.ToBitmap();
                pictureBox1.Size = new Size(image.Width, image.Height);
Changing the value I pass to .TextInterwordSpacing has no effect on the spacing between the two words.

I would most appreciate any help.

Thank you, Paul

User avatar
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: .TextInterwordSpacing has no effect

Post by fmw42 » 2017-03-10T15:18:46-07:00

In IM Q16 Mac OSX in the command line, these two commands clearly show a different spacing between the two words.

Code: Select all

magick -size 500x100 xc:white -fill black -font arial -pointsize 24 -gravity center -draw "text 0,0 'Word1 Word2'" -alpha off tmp1.png

magick -size 500x100 xc:white -fill black -font arial -pointsize 24 -interword-spacing 25 -gravity center -draw "text 0,0 'Word1 Word2'" -alpha off tmp2.png
I do not know if there is an issue in Magick.Net

P.S. I have moved this to the Magick.Net Forum.

User avatar
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789

Re: .TextInterwordSpacing has no effect

Post by dlemstra » 2017-03-15T08:13:42-07:00

Can you open an issue on github for this? Only have access to a phone now but I will be able to take a look at this in early april.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

Post Reply