Page 1 of 1

Spaces at beginning of label: disappear...

Posted: 2016-09-02T09:05:03-07:00
by GeeMack
I copied this over from a discussion in the "Users" section of the forum...
==============================
tunezio wrote:I try to create an image with text and border around the image with a background texture. my problem is that the text is pasted to the edge to the left, and when I try to add a "space" before the text that is ignored but if I add a "space" in the end it works
This is an issue even with a current release ImageMagick 7.0.2-10 running on Windows 10 64. When I run this command to test several labels...

Code: Select all

magick -pointsize 48 ^
   label:"My Text 1 2 3" ^
   label:" My Text 1 2 3 " ^
   label:"\ My Text 1 2 3 " ^
   label:"     My Text 1 2 3     " ^
   label:"\     My Text 1 2 3     " ^
   -bordercolor gray -background gray -border 10x10 -append output.png
... you can see how all the spaces at the beginning of the text string in a "label:" get removed if the first one isn't escaped with a backslash "\".

Image

This may be a bug that needs to be addressed by the developers, or it may just be if a space is the first character in the "label" it needs to be escaped to make it work.
==============================

Re: Spaces at beginning of label: disappear...

Posted: 2016-09-02T14:14:37-07:00
by snibgo
This is a change of behaviour. In v6.9.5-5, I get the same bad result as GeeMack. I call it a bug, because there seems no good reason for the change.

Under v6.9.2-5, I get the correct behaviour:
Image