Page 1 of 1
Image Size and Font Size
Posted: Wed Oct 10, 2007 6:38 am
by rajan
I want an option that user can enter text and height or width of the image. On the basis of height/width and no of characters of text I want to calculate width/height of the image and font size which fits in this dimension of image. How can we do this?
Posted: Wed Oct 10, 2007 9:54 am
by pickle
There are GD functions you can use to determine the width of a string of text.
Posted: Sat Oct 13, 2007 5:03 am
by rajan
How can I do this? I have only image width, font file and text . Using this I have to calculate image height and font size. imagefontwidth() and imagefontheight() take fontsize as paramater and value must be between 1-5 and I have to calculate fontsize. Can somebody tell me how can I do this?
Posted: Sat Oct 13, 2007 7:50 am
by feyd
imagettfbbox() may be of interest.