Page 1 of 1

Label best fit

Posted: 2013-04-13T17:40:44-07:00
by emontezuma
Hi imagemagicker people.
I have te next string "MY NAME IS ELVIS MONTEZUMA" and I would like to generate a best fit pointsize with "Tahoma" font and size 100x100 but I cant.
I have read about the best fit label article but it seems work only with a single word label, for instance "Anthony", my label has several words.

Can anyone help me please?

Best regards.

Re: Label best fit

Posted: 2013-04-13T18:19:49-07:00
by fmw42
To use the best fit, you should not specify both width and height, but just one, say height and let it find the width to fit. Be sure the put quotes around your text

convert -size x100 -background lightblue -fill black -font tahoma label:"MY NAME IS ELVIS MONTEZUMA" result.gif

However, I am finding that there appears to be a bug, since it is not filling the height but some width at a default font size

see bug report at viewtopic.php?f=3&t=23184