Is there a way to keep the caption formatting (ie. kerning, interline-spacing) as well as the page size (ie.500x400) but allow the font to automatically resize so that word wrap does not cut off the text at the bottom?
Also, is it possible to set a certain pointsize if no overflow happens and allow automatic pointsize adjustments when the texts do not fit in the image?
Thanks!
Automatically resize caption font size
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Automatically resize caption font size
Yes specify the height as well as the normal width of the caption.
Without a pointsize being set (use +pointsize to unset if you already set it previously) caption (like lables) will resize.
See IM examples, Text to Image, Caption, Best Fit Caption
http://www.imagemagick.org/Usage//text/#caption_bestfit
NOTE: label and caption resize is slower as internally IM does a trial and error match to find a pointsize that fits (according to the font information).
PS: currently gravity is used for justification! I hope to get gravity and justification separated in IMv7
Without a pointsize being set (use +pointsize to unset if you already set it previously) caption (like lables) will resize.
See IM examples, Text to Image, Caption, Best Fit Caption
http://www.imagemagick.org/Usage//text/#caption_bestfit
NOTE: label and caption resize is slower as internally IM does a trial and error match to find a pointsize that fits (according to the font information).
PS: currently gravity is used for justification! I hope to get gravity and justification separated in IMv7
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/