Page 1 of 1
[SOLVED] Stretch text to fit text box
Posted: 2015-06-29T17:27:26-07:00
by iltomma
Ciao,
how can I stretch a text to fit in a box both with width and height automatic values?
I use windows command scripts
Thanks
Marco
Re: Stretch text to fit text box
Posted: 2015-06-29T18:06:14-07:00
by fmw42
Re: Stretch text to fit text box
Posted: 2015-06-30T00:54:09-07:00
by iltomma
thanks for reply, but with Label and Caption if I use "-size 200x" and I have the text box 200x400, the font change only the widht and not the height.
examples:
my text box is 300x50
my text it "first test"
if I use "-size 300x" the width is automatically stretch to 300 but not for the height
if I use "-size x50" the height is automatically stretch to 50 but the width no, it's shorter
Maybe another possibility is to generate a text image and then resize the image and composite with the background image, but I don't know if the quality is ok
grazie
marco
Re: Stretch text to fit text box
Posted: 2015-06-30T01:31:53-07:00
by snibgo
I don't understand what you want to do.
Perhaps you want to make some text exactly fill a given height and width.
If so, then make the text too large, then resize to exactly those dimensions.
Re: Stretch text to fit text box
Posted: 2015-06-30T02:33:10-07:00
by iltomma
Ciao,
I need to stretch both widht and height at the same time, and discard the text aspect ratio
I uploaded a image of what I need
http://imageshack.com/a/img673/2692/fgLwQn.png
thanks
Marco
Re: Stretch text to fit text box
Posted: 2015-06-30T03:19:56-07:00
by snibgo
Code: Select all
convert -pointsize 100 label:"TEXT TO FIT" -trim +repage -resize 200x50! x.png
Is that what you want?
Re: Stretch text to fit text box
Posted: 2015-06-30T03:29:35-07:00
by iltomma
yessssss!!!!!
Thankyou very much!!
Marco