Set font size
Posted: 2007-09-19T01:35:38-07:00
I want to set font size automatically. It depends on text length and image height and width. How can I calculate font size like this so that text will be best fit in image.
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=9721
Take a look at the Imagick::queryFontMetrics method.niketa wrote:I want to set font size automatically. It depends on text length and image height and width. How can I calculate font size like this so that text will be best fit in image.