A
Anonymous
Guest
how do you center text in an image? i'm trying to have a form where a user types in a text string, font size, and font color, and have php output it to a file with the text centered. for the x-axis this seemed to work: (($width-(strlen($text))*($fontSize + 4))/2)+1, but what about the y-axis? I couldn't get ANYTHIN to work. and how to you use other fonts? how would you detect the width and height of a string of text in a non-fixed-width font?