I have a script that creates a PNG on the fly. The TEXT, FONT, COLOR, SIZE (print out size in inches) are all dynamically supplied from a form.
I need to know how to calculate the width of a string of text.
ie... "TTTT" is wider than "iiii" :::: How do I calculate the different widths in this example?
In the command
$image = imagecreate($width, $height);
I need height and width. If the $height was constant what will be the width of the text string?
I need this to figure in pixels for the online application of this program and how to figure out the width in inches when used in a printing application offline. All derived from a variable text string.
I hope that this is clearer than MUD....
😕