[Top][All Lists]

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

[bug #63808] configure gives incorrect information regarding pdf generat

From: G. Branden Robinson
Subject: [bug #63808] configure gives incorrect information regarding pdf generation
Date: Fri, 24 Feb 2023 10:01:39 -0500 (EST)

Follow-up Comment #62, bug #63808 (project groff):

Okay.  I changed _nothing_ about my test environment (outside of the home
directory I use to house the build tree).

I changed groff code as follows.

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_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.
+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
     for _font_file in \

I was tempted to edit the hard-coded list of directories, but did not because
on my Debian system was _no_ overlap with the directories reported by "gs -h".
 I therefore reason that the directories listed above have all been used at
one time or another for add-on fonts to a Ghostscript installation, and we can
reasonably expect AFM files to be present there.

> A message from configure the URW fonts are not found.


> No warnings from BuildFoundries.


> Only the default foundry groff fonts (base-35 plus EURO).

$ ls font/devpdf/
AB   AR    BMI  CBI  DESC     Foundry     HBI  HNBI  HR   NI  PBI  S    TI   
ZD         enc    tests
ABI  BMB   BMR  CI   DESC.in  Foundry.in  HI   HNI   NB   NR  PI   TB   TR   
devpdf.am  map    util
AI   BMBI  CB   CR   EURO     HB          HNB  HNR   NBI  PB  PR   TBI  ZCMI 
download   stamp

> check-default-foundry has passed.


> check-urw-foundry is not run/skipped.


But I expected that, and our "configure" message warns of it.

configure: URW fonts in Type 1/PFB format were not found.

  groff font description files for the URW fonts, used by the 'gropdf'
  output driver, will not be available.  Use and embedding of fonts from
  the 'U' foundry in PDF documents generated by groff will not be

  If you run "make check", an automated test for 'gropdf' will fail.


> All pdf docs produced with no unexpected warnings.


In fact, the only warnings I got from the whole build were the PDF version of
groff_char(7) whinging about missing special characters.  This is a well-known
expected problem.

This is good enough for me, but I have an idea.  I'll put it in the next


Reply to this item at:


Message sent via Savannah

reply via email to

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