groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 22/37: [afmtodit]: Fix Savannah #62150.


From: G. Branden Robinson
Subject: [groff] 22/37: [afmtodit]: Fix Savannah #62150.
Date: Mon, 14 Mar 2022 01:59:10 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 9c46247e568d15f7badaed7774af8c2673bdc1ea
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Mar 9 12:09:15 2022 +1100

    [afmtodit]: Fix Savannah #62150.
    
    * src/utils/afmtodit/afmtodit.pl: Stop writing full file name to the
      generated font description file as the "name" (i.e., don't include
      directory components).
    
    Fixes <https://savannah.gnu.org/bugs/?62150>.  Thanks to Dave Kemper for
    the discussion and code review.
---
 ChangeLog                      | 9 +++++++++
 src/utils/afmtodit/afmtodit.pl | 9 ++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0ba62d5a..1b381794 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-03-09  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/utils/afmtodit/afmtodit.pl: Stop writing full file name to
+       the generated font description file as the "name" (i.e., don't
+       include directory components).
+
+       Fixes <https://savannah.gnu.org/bugs/?62150>.  Thanks to Dave
+       Kemper for the discussion and code review.
+
 2022-03-08  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/utils/afmtodit/afmtodit.1.man:
diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl
index 73ae7c65..afaabc21 100644
--- a/src/utils/afmtodit/afmtodit.pl
+++ b/src/utils/afmtodit/afmtodit.pl
@@ -48,8 +48,8 @@ if ($#ARGV != 2) {
 
 my $afm = $ARGV[0];
 my $map = $ARGV[1];
-my $font = $ARGV[2];
-my $outfile = $opt_o || $font;
+my $fontfile = $ARGV[2];
+my $outfile = $opt_o || $fontfile;
 my $desc = $opt_d || "DESC";
 my $sys_map = $groff_sys_fontdir . "/devps/generate/" . $map;
 my $sys_desc = $groff_sys_fontdir . "/devps/" . $desc;
@@ -445,7 +445,10 @@ if ($opt_c) {
 
 print("\n");
 
-print("name $font\n");
+my $name = $fontfile;
+$name =~ s@.*/@@;
+
+print("name $name\n");
 print("internalname $psname\n") if $psname;
 print("special\n") if $opt_s;
 printf("slant %g\n", $italic_angle) if $italic_angle != 0;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]