http://qs321.pair.com?node_id=779235

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

I am writing a Perl program that generates HTML that needs to be explicitly formatted (it is a playoff bracket). In order to generate the right number of characters, I can either used a fixed-width font (e.g. Courier New) which I much prefer not to do, or have some way of counting the pixel length of characters and/or strings. I researched this a few months back and thought I had found an appropriate library call that supported this, but I evidently didn't save the link and can't seem to find it again. Any help in finding a perl function that will return the pixel length given a font, font size and string would be much appreciated.