Page 1 of 1

Adding leading and trailing space to text

Posted: 2011-02-21T07:44:19-07:00
by donnied
I have text that I would like to graphics from.
The basic command is:

Code: Select all

convert -background "#FFCC99" -fill '#993333' -pointsize 11 -font Verdana-Regular -size 200x14  label: "foo" foo.png
I had hoped to adjust the positioning of the text within the field similar to gravity but with explicit instructions e.g. shift right this number of points and shift up this number of points.

I thought possibly with the geometry offset option; however, I didn't have much success with that.

I would like to specify leading points. How can I do that?

Thank you.

Re: Adding leading and trailing space to text

Posted: 2011-02-21T11:44:05-07:00
by fmw42
see http://www.imagemagick.org/Usage/text/#attributes

for kerning, interword spacing, etc

Re: Adding leading and trailing space to text

Posted: 2011-02-21T18:04:24-07:00
by anthony
Try creating a label of the point size wanted without any size. Now Extent the image appropriately

Two ways. Set a virtual canvas size and offset wanted, then use -flatten

Code: Select all

convert label:Anthony -repage 100x100+20+20 -flatten show:
The other is use -extent but with a negative offset (gravity can also be used)

Code: Select all

   convert label:Anthony   -extent 100x100-20-20  show: