Page 1 of 1

How I can I add text to multiple line with largest possible font size?

Posted: 2016-04-26T13:56:41-07:00
by bikash00789
https://github.com/bikash00789/MyFolder ... ne_fit.php

here I am able to change fontsize which is for single line? can someone help me for multiple line font resize, it should be best possible size according to the box or rectangle height and weight given.

Re: How I can I add text to multiple line with largest possible font size?

Posted: 2016-04-26T14:31:25-07:00
by snibgo
Can you show an example of what you mean? Perhaps you want something like ...
Image
... where each line occupies roughly the same width. In this example, the lines are also squished together.

Re: How I can I add text to multiple line with largest possible font size?

Posted: 2016-04-26T15:59:51-07:00
by fmw42
You are using -annotate, which will only create an image for one line of text per usage of -annotate. If you want to create a text image with multiple lines automatically filling a box with the largest text, then see caption: at http://www.imagemagick.org/Usage/text/ and http://www.imagemagick.org/Usage/text/#caption_bestfit