groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/08: [build]: Don't treat Ghostscript fonts as URW.


From: G. Branden Robinson
Subject: [groff] 03/08: [build]: Don't treat Ghostscript fonts as URW.
Date: Sat, 25 Feb 2023 06:57:29 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit b379382ea6f91dc2408973db8eb284d56255580b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Feb 24 08:42:46 2023 -0600

    [build]: Don't treat Ghostscript fonts as URW.
    
    [build]: Stop scraping output of Ghostscript executable with "-h" option
    to attempt to find URW fonts.  Fonts that ship with Ghostscript are
    regarded as the "default" foundry, not the URW foundry (though they
    often ultimately originate with URW fonts).  They are often missing
    Adobe Font Metric (AFM) files, so it is impossible for groff to generate
    font description files for them at build time.
    
    * m4/groff.m4 (GROFF_URW_FONTS_CHECK): Drop `AC_REQUIRE` on
      `GROFF_AWK_PATH`.  Drop awk-based scraping of Ghostscript "-h" output.
      Annotate need for sync between this list of characteristic font file
      names and the one in BuildFoundries.
    
    Thanks to Deri James for the ongoing discussions.
---
 ChangeLog   | 17 +++++++++++++++++
 m4/groff.m4 | 20 +++++++++-----------
 2 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c387e885b..9b8ecccc3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [build]: Stop scraping output of Ghostscript executable with
+       "-h" option to attempt to find URW fonts.  Fonts that ship with
+       Ghostscript are regarded as the "default" foundry, not the URW
+       foundry (though they often ultimately originate with URW fonts).
+       They are often missing Adobe Font Metric (AFM) files, so it is
+       impossible for groff to generate font description files for them
+       at build time.
+
+       * m4/groff.m4 (GROFF_URW_FONTS_CHECK): Drop `AC_REQUIRE` on
+       `GROFF_AWK_PATH`.  Drop awk-based scraping of Ghostscript "-h"
+       output.  Annotate need for sync between this list of
+       characteristic font file names and the one in BuildFoundries.
+
+       Thanks to Deri James for the ongoing discussions.
+
 2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * configure.ac: Drop now-redundant explicit
diff --git a/m4/groff.m4 b/m4/groff.m4
index 294817544..06b32e159 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -348,25 +348,21 @@ AC_DEFUN([GROFF_URW_FONTS_PATH], [
 ])
 
 # Check for availability of URW fonts in the directory specified by the
-# user (see GROFF_URW_FONTS_PATH above); alternatively, use the search
-# path given by 'gs -h' (if possible) supplemented with the paths where
-# font/devpdf/Foundry.in expects them.
+# user (see GROFF_URW_FONTS_PATH above).  We do NOT search the path of
+# directories built into Ghostscript because those fonts lack the
+# corresponding AFM files we need to generate groff font description
+# files; see afmtodit(1).  Ghostscript's own fonts are treated as the
+# "default foundry" and we already provide descriptions of them in
+# font/devpdf (along with groff's EURO font).
 
 AC_DEFUN([GROFF_URW_FONTS_CHECK], [
   AC_REQUIRE([GROFF_URW_FONTS_PATH])
-  AC_REQUIRE([GROFF_AWK_PATH])
   AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
   groff_have_urw_fonts=no
   AC_MSG_CHECKING([for URW fonts in Type 1/PFB format])
-  _list_paths=
-
-  if test "$AWK" != missing && test "$GHOSTSCRIPT" != missing
-  then
-    _list_paths=`$GHOSTSCRIPT -h | $AWK 'BEGIN { found = 0 } /Search path:/ { 
found = 1 } /^[ ]*\// { print $'0' }'| tr : ' '`
-  fi
 
 dnl Keep this list in sync with font/devpdf/Foundry.in.
-  _list_paths="$_list_paths \
+  _list_paths="\
     /usr/share/fonts/type1/gsfonts/ \
     /usr/share/fonts/default/Type1/ \
     /usr/share/fonts/default/Type1/adobestd35/ \
@@ -379,6 +375,8 @@ dnl Keep this list in sync with font/devpdf/Foundry.in.
     _list_paths="$urwfontsdir"
   fi
 
+dnl Keep this list of font file names in sync with the corresponding
+dnl entry in font/devpdf/util/BuildFoundries.pl.
   for k in $_list_paths
   do
     for _font_file in \



reply via email to

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