If I know the font size (12) and the font family (calibri), is there a way to determine the length (in pixels) a given string will take after it will be rendered? I am absol
You could use PHP GD to render out the string as a image and get the size of the resulting image.
If you use this, it should work:
list($left,, $right) = imageftbbox( 12, 0, "arial.ttf", "Hello World"); $width = $right - $left;