Like FreeType, T1Lib supports bounding boxes
Bounding Boxes for a given PostScript string/font is done using the imagepsbbox() function.
imagepsbbox($string, $font_r, $size [, $spacing, $char_spacing, $angle]);
This function will provide an array indicating the coordinates of the lower-left and upper-right
corners of the bounding box.
<?php
$font = imagepsloadfont('/usr/share/fonts/default/Type1/n019003l.pfb');
$text = "PHP Developer's Handbook";
$size = 10;
echo "<PRE>";
print_r(imagepsbbox($text, $font, $size));
echo "</PRE>";
imagepsfreefont($font);
?>
Output