Patch for Font::AFM ($Id: AFM.pm,v 1.17 1998/03/25 12:47:28 aas Exp $)?

Brian Strand (bstrand@carclub.com)
Mon, 09 Nov 1998 09:22:42 -0800


Looks like my first post hit the bit bucket (probably due to Friday
afternoon brain death on my part), so here goes again:

I suspect there is a bug in Font::AFM.  It looks like the extension
"<any character>amf" is being stripped and replaced with '.afm'.  It
makes more sense to me to strip '.amf' and then put it back on.  I
apologize if this is not the right place to post about Font::AFM, but it
was originally part of libwww and I didn't see any other forum to report
bugs/patches in the Font::AFM README (other than aas, whose work on
LWPng I don't want to disturb :) ).

bash$ diff -c AFM.pm.orig AFM.pm
*** AFM.pm.orig Fri Nov  6 15:49:09 1998
--- AFM.pm      Fri Nov  6 15:49:38 1998
***************
*** 238,244 ****
  {
     my($class, $fontname) = @_;
     my $file;
!    $fontname =~ s/.amf$//;
     if ($^O eq 'VMS') {
         $file = "sys\$ps_font_metrics:$fontname.afm";
     } else {
--- 238,244 ----
  {
     my($class, $fontname) = @_;
     my $file;
!    $fontname =~ s/\.afm$//;
     if ($^O eq 'VMS') {
         $file = "sys\$ps_font_metrics:$fontname.afm";
     } else {