I've done something like this using Image::Magick, which lends itself better to server-side CGIs, but I recommend you learn (much) about CSS, where you can set the width of elements in em, which is some character length depending on the font size.
If you still think you really need to know the "pixel size" of the rendered HTML, I suggest that you convert your text into images of differing width and calculate from there.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
In reply to Re: Font size by pixels.
by Corion
in thread Font size by pixels.
by the_0ne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |