Page 1 of 1

Possible bug with -interword-spacing in IM7

Posted: 2016-01-14T10:03:12-07:00
by GeeMack
There seems to be a problem with the "-interword-spacing" operator in my current version of IM7 under Windows 7 Pro 64. Below are some commands to compare. (Note: I have it set up so when I run the "convert" command on my system it uses my IM6, and when I run "magick" it uses my IM7.)

Using this "convert" command with version "ImageMagick 6.9.2-8 Q16 x64 2015-12-05"...

Code: Select all

convert ^
   -pointsize 36 ^
   label:"THIS IS A TEST OF THE INTERWORD SPACING" ^
   -interword-spacing 20 ^
   label:"THIS IS A TEST OF THE INTERWORD SPACING" ^
   -append ^
      testIM6.png
The second line of text, as expected, has wider spaces between words than the first line. But, using the same command with "magick" and version "ImageMagick 7.0.0-0 Q16 x64 2016-01-09"...

Code: Select all

magick ^
   -pointsize 36 ^
   label:"THIS IS A TEST OF THE INTERWORD SPACING" ^
   -interword-spacing 20 ^
   label:"THIS IS A TEST OF THE INTERWORD SPACING" ^
   -append ^
      testIM7.png
The second line of text is exactly the same width as the first. Apparently the "-interword-spacing" operator is not acting as expected here. I have tried it with different fonts, different point sizes, and with "caption:", "label:", and "-annotate". For example, the following command should make two lines of text, the second being wider than the first. With my IM6 it produces the expected result. If I change only the command "convert" from IM6 to "magick" from IM7, the spaces in the two lines of text are the same width.

Code: Select all

convert ^
   -size 1000x100 ^
   canvas:white ^
   -fill black ^
   -gravity center ^
   -pointsize 36 ^
   -annotate +0-20 "THIS IS A TEST OF THE INTERWORD SPACING" ^
   -interword-spacing 20 ^
   -annotate +0+20 "THIS IS A TEST OF THE INTERWORD SPACING" ^
      testing.png
If there's anything else you need to know about my set-up or other testing commands, I'll be glad to help.

Re: Possible bug with -interword-spacing in IM7

Posted: 2016-01-19T07:53:41-07:00
by GeeMack
Now it appears the behavior of the "-interword-spacing" has also changed between the Windows versions IM 6.9.2-8 Q16 x64 and IM 6.9.3-1 Q16 x64.

There is a clear difference in spacing between words when running these two commands using IM 6.9.2-8 Q16 x64...

Code: Select all

convert -pointsize 36 label:"This is a test." test1.png

Code: Select all

convert -pointsize 36 -interword-spacing 30 label:"This is a test." test2.png
When running the same commands using IM 6.9.3-1 Q16 x64, the two files appear exactly the same. The addition of the "-interword-spacing" operator seems to have no effect on the spacing with the newer releases of IM.

Re: Possible bug with -interword-spacing in IM7

Posted: 2016-02-04T22:24:19-07:00
by GeeMack
The "-interword-spacing" operator still seems to have no effect in Windows binary beta version "ImageMagick 7.0.0-0 Q16 x64 2016-01-31", downloaded and installed from the file "ImageMagick-7.0.0-0~beta20160203-Q16-HDRI-x64-static.exe".

Re: Possible bug with -interword-spacing in IM7

Posted: 2016-02-05T13:39:15-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

Re: Possible bug with -interword-spacing in IM7

Posted: 2016-02-08T18:26:24-07:00
by GeeMack
I have now made several tests with "ImageMagick-7.0.0-0~beta20160207-Q16-HDRI-x64-static.exe", and the problem with the "-interword-spacing" operator appears to be resolved. Thanks again to everyone whose hard work makes this piece of software possible.