Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have a datafeed that needs to truncate the input lines so that they don't break in a specific width table.

Other than dumping the font metrics to a table (the designers are using a single Web-ish true-type font), how can I determine the string width, accounting for paired kerning?

I have various modules from CPAN for getting TTF metrics, but have yet to find an example of what I suspect is a common problem.

  • Comment on How can I find the size of a string as rendered in a browser?