I am placing text on an image using GD. GD places text on the baseline. I am using ImageTTFBBox to get the height of the box and am able to calculate where the bottom of the text is. But since gd uses the baseline to place text. How can I figure out where the baseline is? The text and placement and size is all dynamic.
I am using giddyup 52px font and placing it in the top left corner, no margins/padding, for example. I get the text height using ImageTTFBBox and it is 54px. So I place the text at 0,54px using imagettftext().
The text is going to be about 12px too far down, because the baseline of the text box is at 54 px not the bottom of the text which ends up being at about 66px.
Thank you for your time,
Todd