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