Set font size
Set font size
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.
Re: Set font size
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.
Mikko Koppanen
My blog: http://valokuva.org
My blog: http://valokuva.org
Re: Set font size
I was trying to use this method queryFontMetrics(). It gives me Fatal error: Call to undefined method Imagick::QueryFontMetrics()
Re: Set font size
Either you are running a very old version of Imagick or you have a typo somewhere.
Mikko Koppanen
My blog: http://valokuva.org
My blog: http://valokuva.org