3 # Get the width of a PostScript string in font units
4 # (1000 font units == the font point height) given a set of
5 # font metrics and an encoding vector.
8 my($str, $met, $encoding) = @_;
14 for ( $i = 0 ; $i < $l ; $i++ ) {
15 $c = substr($str,$i,1);
16 $w += $$met{widths
}{$encoding->[ord($c)]};
17 # The standard PostScript "show" operator doesn't do kerning.
18 # $w += $$met{kern}{$p.$c};