fseeker
03-11-2007, 01:45 AM
Hello!
I'm working at a PHP script that has to obfuscate an e-mail address into a GIF generated with GD.
I use an Arial font of 10 points (since GD2 takes values in points) and guessing that one average letter is 7.5 pixels this almost does the job. However, if the string I'm trying to obfuscate is composed of many "m"s or "w"s the generated text's width exceeds the image width.
Is there any way to calculate the width of the image relative to the text?
Is there any formula between pixels and points?
I'm working at a PHP script that has to obfuscate an e-mail address into a GIF generated with GD.
I use an Arial font of 10 points (since GD2 takes values in points) and guessing that one average letter is 7.5 pixels this almost does the job. However, if the string I'm trying to obfuscate is composed of many "m"s or "w"s the generated text's width exceeds the image width.
Is there any way to calculate the width of the image relative to the text?
Is there any formula between pixels and points?