title: Any way to calculate the pixel length of a string?
body: <p>I'm using the GD library for PHP, and using functions like imagestring() and imagestringup() to add text to pictures.  I am using the built-in fonts with latin2 encoding.  Is there a way, with a given string, to calculate the length (in pixels) of the string?  </p>
  
  <p>I want to calculate the length in pixels of the strings because the strings are variable and I want to make sure the string doesn't overflow the area I want to put it in.</p>
  
  <p>Thanks for your help.</p>