Page 1 of 1

.TextInterwordSpacing has no effect

Posted: 2017-03-10T12:53:39-07:00
by pmdpmd
Hi,

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

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
                  .FontPointSize(70)
                  .Font("Arial")
                  //.StrokeColor(new MagickColor("black"))
                  .FillColor(MagickColors.Black)
                  .TextAlignment(TextAlignment.Center)
                  .TextInterwordSpacing(33) // This has no effect
                  .Text(260, 80, "first second")
                  // Add an ellipse
                  //.StrokeColor(new MagickColor(0, Quantum.Max, 0))
                  //.FillColor(MagickColors.SaddleBrown)
                  //.Ellipse(256, 96, 192, 8, 0, 360)
                  .Draw(image);
                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

Re: .TextInterwordSpacing has no effect

Posted: 2017-03-10T15:18:46-07:00
by fmw42
In IM 7.0.5.1 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.

Re: .TextInterwordSpacing has no effect

Posted: 2017-03-15T08:13:42-07:00
by dlemstra
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.