I'm creating an image using PHP GD using imagettftext()
. I need, dynamically, determine the font size according to the image's width and height to keep a short text (it is Captcha code) in the visible area of the image.
I tried to examine the information in this page: http://www.pearsonified.com/2011/12/golden-ratio-typography.php but I could not find what I need.