bugGNU roff - Bugs: bug #63808, configure gives incorrect...

 
 

bug #63808: configure gives incorrect information regarding pdf generation

Submitter:  Deri James <deri>
Submitted:  Wed 15 Feb 2023 04:34:40 PM UTC
   
 
Category:  General Severity:  3 - Normal
Item Group:  Build/Installation Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 09 Mar 2023 06:50:03 PM UTC, comment #75: 


comment #74:

> > 1.  Have you been able to retrieve this file (libgs.so.9.15-solaris10)?  I need to free up some space in my Dropbox.
>
> Yes, I have it tucked away, initial view is "its a lot of work". I was hoping to discover type 1 files embedded, but I think it only contains sufficient data to generate type 1c files, which is what gs uses when it subsets the type 1 fonts. So not worth pursueing, but see my thoughts in email to be written next.
>
> > 2.  Are you satisfied with the status quo regarding configuration and testing of fonts used by gropdf?  I realize it's not perfect, but I think they are immensely improved over previous groff releases and we'll have happier users.
>
> It is "good enough". Also see my thoughts in forthcoming email.



Cool, thank you.  I'll scotch the libgs9-common file and regard this Savannah ticket as really resolved.

We can always start a new epic with a fresh bug number tomorrow!  :D

G. Branden Robinson <gbranden>
Group administrator
Thu 09 Mar 2023 06:42:06 PM UTC, comment #74: 

comment #73:

> comment #71:
> > Hello again Deri,
> >
> > You can find it in this folder:
> >
> > https://www.dropbox.com/sh/17ftu3z31couf07/AAC_9kq0ZA-Ra2ZhmZFWlLuva?dl=0
>
> Hi Deri,
>
> 2 questions:
>
> 1.  Have you been able to retrieve this file (libgs.so.9.15-solaris10)?  I need to free up some space in my Dropbox.


Yes, I have it tucked away, initial view is "its a lot of work". I was hoping to discover type 1 files embedded, but I think it only contains sufficient data to generate type 1c files, which is what gs uses when it subsets the type 1 fonts. So not worth pursueing, but see my thoughts in email to be written next.

> 2.  Are you satisfied with the status quo regarding configuration and testing of fonts used by gropdf?  I realize it's not perfect, but I think they are immensely improved over previous groff releases and we'll have happier users.


It is "good enough". Also see my thoughts in forthcoming email.

Deri James <deri>
Group Member
Thu 09 Mar 2023 06:24:40 PM UTC, comment #73: 

comment #71:

> Hello again Deri,
>
> You can find it in this folder:
>
> https://www.dropbox.com/sh/17ftu3z31couf07/AAC_9kq0ZA-Ra2ZhmZFWlLuva?dl=0


Hi Deri,

2 questions:

1.  Have you been able to retrieve this file (libgs.so.9.15-solaris10)?  I need to free up some space in my Dropbox.

2.  Are you satisfied with the status quo regarding configuration and testing of fonts used by gropdf?  I realize it's not perfect, but I think they are immensely improved over previous groff releases and we'll have happier users.

G. Branden Robinson <gbranden>
Group administrator
Tue 28 Feb 2023 03:08:31 PM UTC, comment #72: 

comment #68:

> comment #64:
> >
> > ...things look much better in the contrived "scenario 01" (gs present, urw absent).
> It is only contrived for debian based distros, others include the ghostscript fonts as supplied from github.


Well, Solaris 10 and 11 don't supply them in the file system and they fail the check-default-foundry.sh test as well.


$ PATH=/usr/xpg4/bin:$PATH ./configure --prefix=$HOME --with-gs=/opt/csw/bin/gs
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
...
checking for gs version with good left sidebearing handling... got 9.15 (buggy)
checking whether we are using the GNU C Library >= 2.1 or uClibc... (cached) no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating test-groff
config.status: creating src/include/config.h
config.status: executing depfiles commands

GNU roff version 1.23.0.rc3.30-168d5
----------------------------------------------------------------------
 installation directory prefix    : /export/home/gbranden
 command name prefix              : g
 prefix used for macro packages   :  an an.ja an.ja_JP.PCK an.ja_JP.UTF-8 ansun ansun.ja ansun.ja_JP.PCK ansun.ja_JP.UTF-8 bib m s v vgrind
 C++ compiler and options         : g++ -g -O2
 use libgroff's memory allocator  : no
 C compiler and options           : gcc -g -O2
 Perl interpreter version         : 5.12.5
 X11 support                      : disabled
 'groff -l' uses print spooler    : no
 use URW fonts for PDF output     : no
 preconv can use uchardet library : no
 can build groff.dvi, groff.pdf   : no
 tests can use poppler PDF tools  : no
----------------------------------------------------------------------
configure: Buggy version of Ghostscript detected.

  Ghostscript versions 9.00 <= x < 9.54 suffer from a rendering glitch
  that affects the AT&T troff (and groff) special character '\(lh'; see
  <https://bugs.ghostscript.com/show_bug.cgi?id=703187>.  If your
  version of Ghostscript has not been patched to fix this problem, you
  may need to work around it in groff documents you render for the
  PostScript (and, for tbl(1) tables, HTML) output devices.

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
  possible.

  You can obtain the URW base 35 fonts from their GitHub project.  As of
  this writing (2023-02-15), you can find them in the 'fonts' directory
  of the following archives (choose one).

    https://github.com/ArtifexSoftware/urw-base35-fonts/archive/refs/
      tags/20200910.zip
    https://github.com/ArtifexSoftware/urw-base35-fonts/archive/refs/
      tags/20200910.tar.gz

  You may wish to check for a newer release.

    https://github.com/ArtifexSoftware/urw-base35-fonts/releases

  By default, groff will look for these fonts in the search path shown
  by the 'gs -h' command (if available) and in several directories
  specified in font/devpdf/Foundry.in).  You will need to 'make
  distclean' and re-run the 'configure' script after installing these
  fonts.

  Alternatively, you can pass the option '--with-urw-fonts-dir=DIR'
  to 'configure' to look for them in the directory DIR you specify.
  If found, the 'U' foundry will be available via the '-y' option to
  'gropdf' (accessed via the 'groff' command with the option '-P -y').

configure: The uchardet library was not found.
...
  GEN      font/devpdf/util/BuildFoundries
  GEN      font/devpdf/download
BuildFoundries: warning: line 33: groff font 'AB' will not be available for PDF output; unable to locate font file(s): URWGothic-Demi.t1, URWGothic-Demi, URWGothicL-Demi, a010015l.pfb
BuildFoundries: warning: line 34: groff font 'ABI' will not be available for PDF output; unable to locate font file(s): URWGothic-DemiOblique.t1, URWGothic-DemiOblique, URWGothicL-DemiObli, a010035l.pfb
BuildFoundries: warning: line 35: groff font 'AI' will not be available for PDF output; unable to locate font file(s): URWGothic-BookOblique.t1, URWGothic-BookOblique, URWGothicL-BookObli, a010033l.pfb
BuildFoundries: warning: line 36: groff font 'AR' will not be available for PDF output; unable to locate font file(s): URWGothic-Book.t1, URWGothic-Book, URWGothicL-Book, a010013l.pfb
BuildFoundries: warning: line 37: groff font 'BMB' will not be available for PDF output; unable to locate font file(s): URWBookman-Demi.t1, URWBookman-Demi, URWBookmanL-DemiBold, b018015l.pfb
BuildFoundries: warning: line 38: groff font 'BMBI' will not be available for PDF output; unable to locate font file(s): URWBookman-DemiItalic.t1, URWBookman-DemiItalic, URWBookmanL-DemiBoldItal, b018035l.pfb
BuildFoundries: warning: line 39: groff font 'BMI' will not be available for PDF output; unable to locate font file(s): URWBookman-LightItalic.t1, URWBookman-LightItalic, URWBookmanL-LighItal, b018032l.pfb
BuildFoundries: warning: line 40: groff font 'BMR' will not be available for PDF output; unable to locate font file(s): URWBookman-Light.t1, URWBookman-Light, URWBookmanL-Ligh, b018012l.pfb
BuildFoundries: notice: copied grops font CB
BuildFoundries: notice: copied grops font CBI
BuildFoundries: notice: copied grops font CI
BuildFoundries: notice: copied grops font CR
BuildFoundries: notice: copied grops font HB
BuildFoundries: notice: copied grops font HBI
BuildFoundries: notice: copied grops font HI
BuildFoundries: warning: line 48: groff font 'HNB' will not be available for PDF output; unable to locate font file(s): NimbusSansNarrow-Bold.t1, NimbusSansNarrow-Bold, NimbusSanL-BoldCond, n019044l.pfb
BuildFoundries: warning: line 49: groff font 'HNBI' will not be available for PDF output; unable to locate font file(s): NimbusSansNarrow-BoldOblique.t1, NimbusSansNarrow-BoldOblique, NimbusSansNarrow-BdOblique, NimbusSanL-BoldCondItal.t1, NimbusSanL-BoldCondItal, n019064l.pfb
BuildFoundries: warning: line 50: groff font 'HNI' will not be available for PDF output; unable to locate font file(s): NimbusSansNarrow-Oblique.t1, NimbusSansNarrow-Oblique, NimbusSanL-ReguCondItal, n019063l.pfb
BuildFoundries: warning: line 51: groff font 'HNR' will not be available for PDF output; unable to locate font file(s): NimbusSansNarrow-Regular.t1, NimbusSansNarrow-Regular, NimbusSanL-ReguCond, n019043l.pfb
BuildFoundries: notice: copied grops font HR
BuildFoundries: warning: line 53: groff font 'NB' will not be available for PDF output; unable to locate font file(s): C059-Bold.t1, C059-Bold, CenturySchL-Bold, c059016l.pfb
BuildFoundries: warning: line 54: groff font 'NBI' will not be available for PDF output; unable to locate font file(s): C059-BdIta.t1, C059-BdIta, CenturySchL-BoldItal, c059036l.pfb
BuildFoundries: warning: line 55: groff font 'NI' will not be available for PDF output; unable to locate font file(s): C059-Italic.t1, C059-Italic, CenturySchL-Ital, c059033l.pfb
BuildFoundries: warning: line 56: groff font 'NR' will not be available for PDF output; unable to locate font file(s): C059-Roman.t1, C059-Roman, CenturySchL-Roma, c059013l.pfb
BuildFoundries: warning: line 57: groff font 'PB' will not be available for PDF output; unable to locate font file(s): P052-Bold.t1, P052-Bold, URWPalladioL-Bold, p052004l.pfb
BuildFoundries: warning: line 58: groff font 'PBI' will not be available for PDF output; unable to locate font file(s): P052-BoldItalic.t1, P052-BoldItalic, URWPalladioL-BoldItal, p052024l.pfb
BuildFoundries: warning: line 59: groff font 'PI' will not be available for PDF output; unable to locate font file(s): P052-Italic.t1, P052-Italic, URWPalladioL-Ital, p052023l.pfb
BuildFoundries: warning: line 60: groff font 'PR' will not be available for PDF output; unable to locate font file(s): P052-Roman.t1, P052-Roman, URWPalladioL-Roma, p052003l.pfb
BuildFoundries: notice: copied grops font S
BuildFoundries: notice: copied grops font TB
BuildFoundries: notice: copied grops font TBI
BuildFoundries: notice: copied grops font TI
BuildFoundries: notice: copied grops font TR
BuildFoundries: warning: line 66: groff font 'ZCMI' will not be available for PDF output; unable to locate font file(s): Z003-MediumItalic.t1, Z003-MediumItalic, URWChanceryL-MediItal, z003034l.pfb
BuildFoundries: notice: copied grops font ZD
BuildFoundries: notice: copied grops font EURO
BuildFoundries: warning: line 69:
The path(s) used for searching:
@urwfontsdir@:%rom%Resource/Init:%rom%lib:/opt/csw/share/ghostscript/9.15/Resource/Init:/opt/csw/share/ghostscript/9.15/lib:/opt/csw/share/ghostscript/9.15/Resource/Font:/opt/csw/share/ghostscript/fonts:/opt/csw/share/ghostscript/fonts:/usr/share/fonts/type1/gsfonts:/usr/share/fonts/default/Type1:/usr/share/fonts/default/Type1/adobestd35:/usr/share/fonts/type1/urw-base35:/opt/local/share/fonts/urw-fonts:/usr/local/share/fonts/ghostscript:/export/home/gbranden/groff-1.23.0.rc3.30-168d5-sol11/font/devps:/export/home/gbranden/groff-1.23.0.rc3.30-168d5-sol11/font/devps

  GROFF    doc/automake.pdf
...
PASS: contrib/rfc1345/tests/rfc1345-smoke-test.sh
  GEN      font/devpdf/tests/check-default-foundry.sh
FAIL: font/devpdf/tests/check-default-foundry.sh
  GEN      font/devpdf/tests/check-urw-foundry.sh
SKIP: font/devpdf/tests/check-urw-foundry.sh
PASS: src/devices/grotty/tests/basic_latin_glyphs_map_correctly.sh
...
============================================================================
Testsuite summary for GNU roff 1.23.0.rc3.30-168d5
============================================================================
# TOTAL: 163
# PASS:  155
# SKIP:  5
# XFAIL: 2
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to http://savannah.gnu.org/bugs/?group=groff
============================================================================
...
$ cat font/devpdf/tests/check-default-foundry.sh
#!/bin/sh
#
# Copyright (C) 2022-2023 Free Software Foundation, Inc.
...
#

devpdf_fontbuilddir="${abs_top_builddir:-.}"/font/devpdf
ghostscript=/opt/csw/bin/gs

wail () {
    echo ...FAILED >&2
    fail=yes
}
...
for f in $mandatory_fonts
do
    printf "checking for font description %s...\n" "$f" >&2
    test -f "$devpdf_fontbuilddir"/"$f" || wail
done

if [ "$ghostscript" = no ] || [ "$ghostscript" = missing ]
then
    echo "Ghostscript not available; skipping check for any further" \
         "fonts in the default foundry" >&2
    exit 77 # skip
fi

for f in $supplementary_fonts
do
    printf "checking for font description %s...\n" "$f" >&2
    test -f "$devpdf_fontbuilddir"/"$f" || wail
done

test -z "$fail"

# vim:set ai et sw=4 ts=4 tw=72:
$ cat font/devpdf/tests/check-default-foundry.sh.log
checking for font description CB...
checking for font description CBI...
checking for font description CI...
checking for font description CR...
checking for font description HB...
checking for font description HBI...
checking for font description HI...
checking for font description HR...
checking for font description S...
checking for font description TB...
checking for font description TBI...
checking for font description TI...
checking for font description TR...
checking for font description ZD...
checking for font description AB...
...FAILED
checking for font description ABI...
...FAILED
checking for font description AI...
...FAILED
checking for font description AR...
...FAILED
...


This check fails and I think we can expect it to fail because BuildFoundries doesn't yet know how to determine what fonts Ghostscript has in its %rom%.  I guess what is happening is that if the fonts are not found, BuildFoundries refuses to assume that the groff font descriptions of the beyond-base-14 fonts are reliable (and moreover, if a document actually used such fonts, the PDF standard requires that they be embedded).

> As you stated this was a test for scenario 01 (gropdf in standard mode) I would expect a complete default foundry and that check-default-foundry.sh would pass but it looks like it was skipped.


I'll return to that issue in a separate comment as it affects my contrived Debian scenario specifically.
 

> Another issue is the configure missing urw-fonts message mentions that the paths mentioned in gs -h are searched but I believe you have now removed this from configure (correctly).


Well, the message produced by 'configure' is vague.  It says that "groff" looks for font files in the path reported by "gs -h".  Really it is only gropdf that looks for them there, and that only of Ghostscript is installed.  It was true until last week that the configure script scraped "gs -h" output as well.  It no longer does.

https://git.savannah.gnu.org/cgit/groff.git/commit/?id=b379382ea6f91dc2408973db8eb284d56255580b

Further, the name of the Ghostscript interpreter is parameterized, so I should probably make the message respect other 'configure'd information accordingly.

I don't feel these issues should gate 1.23.0 but they'd be nice to get in for a 1.23.1.

G. Branden Robinson <gbranden>
Group administrator
Tue 28 Feb 2023 02:37:49 PM UTC, comment #71: 

Hello again Deri,

You can find it in this folder:

https://www.dropbox.com/sh/17ftu3z31couf07/AAC_9kq0ZA-Ra2ZhmZFWlLuva?dl=0

G. Branden Robinson <gbranden>
Group administrator
Tue 28 Feb 2023 02:35:11 PM UTC, comment #70: 

comment #69:

> Ooh excitng. Please could you email to -email is unavailable- (note not my usual addy, its my work address which should accept large attachments).


Hi Deri,

This didn't work:

> The response from the remote server was:


> 552 5.3.4 Message size exceeds fixed limit


I'll make some space in my Dropbox and put it up there.

G. Branden Robinson <gbranden>
Group administrator
Sun 26 Feb 2023 05:58:38 PM UTC, comment #69: 

comment #67:

> Hi Deri,
>
> Regarding the %rom% issue, it looks likely to me that the "rom filesystem built into the executable" isn't really in the executable, but in the libgs9 dynamic shared object instead.  At 20 MB it's way too big to attach on Savannah.
>


> $ size ~/tmp/gs-solaris10 ~/tmp/libgs.so.9.15-solaris10
>    text    data     bss     dec     hex filename
>    3025     236     328    3589     e05 /home/branden/tmp/gs-solaris10
> 4760075 14791376           3368 19554819        12a6203 /home/branden/tmp/libgs.so.9.15-solaris10
> $ objdump -x ~/tmp/libgs.so.9.15-solaris10|grep -F .data|grep gs_romfs
> 00a0cb34 g     O .data  00000004              gs_romfs_buildtime
> 00a16ad8 g     O .data.rel.local        000003f8              gs_romfs
> $ objdump -x /usr/lib/x86_64-linux-gnu/libgs.so.9.53|grep -F .data|grep gs_romfs || echo NO MATCHES
> NO MATCHES
> $ size /usr/lib/x86_64-linux-gnu/libgs.so.9.53
>    text    data     bss     dec     hex filename
> 5936697 10509080           3808 16449585         fb0031 /usr/lib/x86_64-linux-gnu/libgs.so.9.53


>
> So that's 14MB of data in the Solaris library, and 10MB in the Debian one.
>
> 4.3MB happens to be the size of the gs-fonts.tgz file you put up.
>
> Coincidence?

Ooh excitng. Please could you email to -email is unavailable- (note not my usual addy, its my work address which should accept large attachments).

> Is there anything I can do to help you root out the data you're looking for?

Deri James <deri>
Group Member
Sun 26 Feb 2023 05:43:28 PM UTC, comment #68: 

comment #64:

>
> ...things look much better in the contrived "scenario 01" (gs present, urw absent).

It is only contrived for debian based distros, others include the ghostscript fonts as supplied from github.

I think you may have missed the minor issue below.

> $ ./configure --prefix=$HOME
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> ...
> checking for gs... gs
> checking for pnmcrop... found
> checking for pnmcut... found
> checking for pnmtopng... found
> checking for pnmtops... found
> checking for psselect... missing
> checking for URW fonts in Type 1/PFB format... none found
> checking whether pnmtops accepts the '-nosetpage' option... yes
> checking whether make defines 'RM'... yes
> checking for a diff program that supports option -D... yes
> checking whether test supports option -ef... yes
> checking for bash... /usr/bin/bash
> checking for gs version with good left sidebearing handling... got 9.53.3 (buggy)
> checking whether we are using the GNU C Library >= 2.1 or uClibc... (cached) yes
> checking that generated files are newer than configure... done
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating test-groff
> config.status: creating src/include/config.h
> config.status: executing depfiles commands
>
> GNU roff version 1.23.0.rc3.29-34dd52
> ----------------------------------------------------------------------
>  installation directory prefix    : /home/branden
>  C++ compiler and options         : g++ -g -O2
>  use libgroff's memory allocator  : no
>  C compiler and options           : gcc -g -O2
>  Perl interpreter version         : 5.32.1
>  X11 support                      : disabled
>  'groff -l' uses print spooler    : no
>  use URW fonts for PDF output     : no
>  preconv can use uchardet library : no
>  can build groff.dvi, groff.pdf   : no
>  tests can use poppler PDF tools  : no
> ----------------------------------------------------------------------
> configure: Buggy version of Ghostscript detected.
>
>   Ghostscript versions 9.00 <= x < 9.54 suffer from a rendering glitch
>   that affects the AT&T troff (and groff) special character '\(lh'; see
>   <https://bugs.ghostscript.com/show_bug.cgi?id=703187>.  If your
>   version of Ghostscript has not been patched to fix this problem, you
>   may need to work around it in groff documents you render for the
>   PostScript (and, for tbl(1) tables, HTML) output devices.
>
> 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
>   possible.
>
>   You can obtain the URW base 35 fonts from their GitHub project.  As of
>   this writing (2023-02-15), you can find them in the 'fonts' directory
>   of the following archives (choose one).
>
>     https://github.com/ArtifexSoftware/urw-base35-fonts/archive/refs/
>       tags/20200910.zip
>     https://github.com/ArtifexSoftware/urw-base35-fonts/archive/refs/
>       tags/20200910.tar.gz
>
>   You may wish to check for a newer release.
>
>     https://github.com/ArtifexSoftware/urw-base35-fonts/releases
>
>   By default, groff will look for these fonts in the search path shown
>   by the 'gs -h' command (if available) and in several directories
>   specified in font/devpdf/Foundry.in).  You will need to 'make
>   distclean' and re-run the 'configure' script after installing these
>   fonts.
>
>   Alternatively, you can pass the option '--with-urw-fonts-dir=DIR'
>   to 'configure' to look for them in the directory DIR you specify.
>   If found, the 'U' foundry will be available via the '-y' option to
>   'gropdf' (accessed via the 'groff' command with the option '-P -y').
>
> configure: The uchardet library was not found.
>
>   The 'preconv' preprocessor program will be unable to attempt automatic
>   inference of an input file's character encoding.  See the preconv(1)
>   man page.
>
> configure: The program 'psselect' was not found in $PATH.
>
>   Consequently, groff's HTML output driver, 'grohtml', will not work
>   properly.  It will not be possible to prepare or install
>   groff-generated documentation in HTML format.
>
> $ make check
>   GEN      lib/alloca.h
>   GEN      lib/inttypes.h
>   GEN      lib/limits.h
> ...
> PASS: contrib/rfc1345/tests/rfc1345-smoke-test.sh
>   GEN      font/devpdf/tests/check-default-foundry.sh
> SKIP: font/devpdf/tests/check-default-foundry.sh

As you stated this was a test for scenario 01 (gropdf in standard mode) I would expect a complete default foundry and that check-default-foundry.sh would pass but it looks like it was skipped.

Another issue is the configure missing urw-fonts message mentions that the paths mentioned in gs -h are searched but I believe you have now removed this from configure (correctly).

>   GEN      font/devpdf/tests/check-urw-foundry.sh
> SKIP: font/devpdf/tests/check-urw-foundry.sh
> SKIP: src/devices/grotty/tests/basic_latin_glyphs_map_correctly.sh
> PASS: src/devices/grotty/tests/osc8_works.sh
> ...
> ============================================================================
> Testsuite summary for GNU roff 1.23.0.rc3.29-34dd52
> ============================================================================
> # TOTAL: 163
> # PASS:  153
> # SKIP:  8
> # XFAIL: 2
> # FAIL:  0
> # XPASS: 0
> # ERROR: 0
> ============================================================================


Deri James <deri>
Group Member
Sat 25 Feb 2023 08:36:46 PM UTC, comment #67: 

Hi Deri,

Regarding the %rom% issue, it looks likely to me that the "rom filesystem built into the executable" isn't really in the executable, but in the libgs9 dynamic shared object instead.  At 20 MB it's way too big to attach on Savannah.


$ size ~/tmp/gs-solaris10 ~/tmp/libgs.so.9.15-solaris10
   text    data     bss     dec     hex filename
   3025     236     328    3589     e05 /home/branden/tmp/gs-solaris10
4760075 14791376           3368 19554819        12a6203 /home/branden/tmp/libgs.so.9.15-solaris10
$ objdump -x ~/tmp/libgs.so.9.15-solaris10|grep -F .data|grep gs_romfs
00a0cb34 g     O .data  00000004              gs_romfs_buildtime
00a16ad8 g     O .data.rel.local        000003f8              gs_romfs
$ objdump -x /usr/lib/x86_64-linux-gnu/libgs.so.9.53|grep -F .data|grep gs_romfs || echo NO MATCHES
NO MATCHES
$ size /usr/lib/x86_64-linux-gnu/libgs.so.9.53
   text    data     bss     dec     hex filename
5936697 10509080           3808 16449585         fb0031 /usr/lib/x86_64-linux-gnu/libgs.so.9.53


So that's 14MB of data in the Solaris library, and 10MB in the Debian one.

4.3MB happens to be the size of the gs-fonts.tgz file you put up.

Coincidence?

Is there anything I can do to help you root out the data you're looking for?

G. Branden Robinson <gbranden>
Group administrator
Sat 25 Feb 2023 11:56:40 AM UTC, comment #66: 

macOS looks good.

Solaris 10 and 11 are kind of meh.

Everything is fine except the check-default-foundry.sh test, which fails.  But this was already raised in comment #43.

Apparently the problem is the use of %rom%.  The font files are hidden away where our configure script and BuildFoundries can't get to them.  At least not yet.

On the system to which I have access, the Ghostscript installation is also geriatric.  9.15.

I'm not regarding this as a release blocker.


GPL Ghostscript 9.15 (2014-09-22)
Copyright (C) 2014 Artifex Software, Inc.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
 -dNOPAUSE           no pause after page   | -q       `quiet', fewer messages
 -g<width>x<height>  page size in pixels   | -r<res>  pixels/inch resolution
 -sDEVICE=<devname>  select device         | -dBATCH  exit after last file
 -sOutputFile=<file> select output file: - for stdout, |command for pipe,
                                         embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF
Default output device: x11alpha
Available devices:
   alc1900 alc2000 alc4000 alc4100 alc8500 alc8600 alc9100 ap3250 appledmp
   atx23 atx24 atx38 bbox bit bitcmyk bitrgb bitrgbtags bj10e bj10v bj10vh
   bj200 bjc600 bjc800 bjc880j bjccmyk bjccolor bjcgray bjcmono bmp16 bmp16m
   bmp256 bmp32b bmpgray bmpmono bmpsep1 bmpsep8 ccr cdeskjet cdj1600 cdj500
   cdj550 cdj670 cdj850 cdj880 cdj890 cdj970 cdjcolor cdjmono cdnj500 cfax
   chp2200 cif cljet5 cljet5c cljet5pr coslw2p coslwxl cp50 cups declj250
   deskjet devicen dfaxhigh dfaxlow dj505j djet500 djet500c dl2100 dnj650c
   epl2050 epl2050p epl2120 epl2500 epl2750 epl5800 epl5900 epl6100 epl6200
   eplcolor eplmono eps2write eps9high eps9mid epson epsonc escp escpage
   faxg3 faxg32d faxg4 fmlbp fmpr fpng fs600 gdi hl1240 hl1250 hl7x0
   hpdj1120c hpdj310 hpdj320 hpdj340 hpdj400 hpdj500 hpdj500c hpdj510
   hpdj520 hpdj540 hpdj550c hpdj560c hpdj600 hpdj660c hpdj670c hpdj680c
   hpdj690c hpdj850c hpdj855c hpdj870c hpdj890c hpdjplus hpdjportable ibmpro
   ijs imagen inferno ink_cov inkcov itk24i itk38 iwhi iwlo iwlq jetp3852
   jj100 jpeg jpegcmyk jpeggray la50 la70 la75 la75plus laserjet lbp310
   lbp320 lbp8 lex2050 lex3200 lex5700 lex7000 lips2p lips3 lips4 lips4v
   lj250 lj3100sw lj4dith lj4dithp lj5gray lj5mono ljet2p ljet3 ljet3d ljet4
   ljet4d ljet4pjl ljetplus ln03 lp1800 lp1900 lp2000 lp2200 lp2400 lp2500
   lp2563 lp3000c lp7500 lp7700 lp7900 lp8000 lp8000c lp8100 lp8200c lp8300c
   lp8300f lp8400f lp8500c lp8600 lp8600f lp8700 lp8800c lp8900 lp9000b
   lp9000c lp9100 lp9200b lp9200c lp9300 lp9400 lp9500c lp9600 lp9600s
   lp9800c lps4500 lps6500 lq850 lxm3200 lxm5700m m8510 mag16 mag256
   md1xMono md2k md50Eco md50Mono md5k mgr4 mgr8 mgrgray2 mgrgray4 mgrgray8
   mgrmono miff24 mj500c mj6000c mj700v2c mj8000c ml600 necp6 npdl nullpage
   oce9050 oki182 oki4w okiibm oprp opvp paintjet pam pamcmyk32 pamcmyk4 pbm
   pbmraw pcl3 pcx16 pcx24b pcx256 pcx256 pcx2up pcxcmyk pcxgray pcxmono
   pdfwrite pdfwrite pdfwrite pgm pgmraw pgnm pgnmraw photoex picty180 pj
   pjetxl pjxl pjxl300 pkm pkmraw pksm pksmraw plan plan9bm planc plang
   plank planm png16 png16m png256 png48 pngalpha pnggray pngmono pnm pnmraw
   ppm ppmraw pr1000 pr1000_4 pr150 pr201 ps2write psdcmyk psdcmykog psdrgb
   pwgraster pxlcolor pxlmono r4081 rinkj rpdl samsunggdi sgirgb sj48
   spotcmyk st800 stcolor sunhmono t4693d2 t4693d4 t4693d8 tek4696 tiff12nc
   tiff24nc tiff32nc tiff48nc tiff64nc tiffcrle tiffg3 tiffg32d tiffg4
   tiffgray tifflzw tiffpack tiffscaled tiffsep tiffsep1 txtwrite uniprint
   x11 x11alpha x11cmyk x11cmyk2 x11cmyk4 x11cmyk8 x11gray2 x11gray4 x11mono
   x11rg16x x11rg32x xcf xes xpswrite
Search path:
   %rom%Resource/Init/ : %rom%lib/ :
   /opt/csw/share/ghostscript/9.15/Resource/Init :
   /opt/csw/share/ghostscript/9.15/lib :
   /opt/csw/share/ghostscript/9.15/Resource/Font :
   /opt/csw/share/ghostscript/fonts : /opt/csw/share/ghostscript/fonts
Ghostscript is also using fontconfig to search for font files
Initialization files are compiled into the executable.
For more information, see /opt/csw/share/ghostscript/9.15/doc/Use.htm.
Please report bugs to bugs.ghostscript.com.



G. Branden Robinson <gbranden>
Group administrator
Sat 25 Feb 2023 08:50:09 AM UTC, comment #65: 

Things are looking good on Debian bullseye

Here's the revised last commit, with ChangeLog and proper commit message.


commit a887a4eda48d0b90a0203355497faa9f9f83cc6d (HEAD -> master)
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 25 02:08:57 2023 -0600

    [devpdf]: Revise tests.

    * font/devpdf/tests/check-default-foundry.sh.in: Test only the base 14
      fonts of the PDF standard unconditionally.  Test the remainder from
      the set of 35 commonly distributed only if a Ghostscript interpreter
      was detected at configuration time, because the latter fonts _must_ be
      embedded in PDF documents.  If they're not present, skip the test
      rather than failing it.
    * font/devpdf/tests/check-urw-foundry.sh.in: Skip test if no URW fonts
      detected at configuration time, rather than failing it.
    * m4/groff.m4 (GROFF_GROPDF_PROGRAM_NOTICE, GROFF_URW_FONTS_NOTICE):
      Drop warnings of expected test failures.  The tests no longer fail in
      the anticipated circumstances.

diff --git a/ChangeLog b/ChangeLog
index 0323d7c99..738f0bc51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2023-02-25  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [devpdf]: Revise tests.
+
+       * font/devpdf/tests/check-default-foundry.sh.in: Test only the
+       base 14 fonts of the PDF standard unconditionally.  Test the
+       remainder from the set of 35 commonly distributed only if a
+       Ghostscript interpreter was detected at configuration time,
+       because the latter fonts _must_ be embedded in PDF documents.
+       If they're not present, skip the test rather than failing it.
+       * font/devpdf/tests/check-urw-foundry.sh.in: Skip test if no URW
+       fonts detected at configuration time, rather than failing it.
+       * m4/groff.m4 (GROFF_GROPDF_PROGRAM_NOTICE)
+       (GROFF_URW_FONTS_NOTICE): Drop warnings of expected test
+       failures.  The tests no longer fail in the anticipated
+       circumstances.
+
 2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>

        [devpdf]: Generate tests from template files, so we can populate
diff --git a/font/devpdf/tests/check-default-foundry.sh.in b/font/devpdf/tests/check-default-foundry.sh.in
index 1ddd83d0b..026cc012a 100755
--- a/font/devpdf/tests/check-default-foundry.sh.in
+++ b/font/devpdf/tests/check-default-foundry.sh.in
@@ -18,19 +18,42 @@
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 #

-# Ensure that groff's PDF device has font description files for the
-# default (unnamed) foundry's PostScript Level 2 base 35 fonts, plus
-# groff's EURO.
-#
-# These font descriptions should be available in any gropdf
-# configuration because they can be copied from the devps font
-# descriptions even if the URW fonts are not available.
-#
-# Another test script checks the "U" (URW) foundry.
-
 devpdf_fontbuilddir="${abs_top_builddir:-.}"/font/devpdf
+ghostscript=@GHOSTSCRIPT@
+
+wail () {
+    echo ...FAILED >&2
+    fail=yes
+}
+
+fail=
+
+# The are the base 14 fonts required by the PDF standard.  They should
+# _always_ be present and supported.  If their corresponding Type 1 font
+# files are available, they too can be embedded in a PDF using gropdf's
+# "-e" option.  groff's "EURO" font is always available; we ship it.
+mandatory_fonts='CB
+CBI
+CI
+CR
+HB
+HBI
+HI
+HR
+S
+TB
+TBI
+TI
+TR
+ZD'

-fonts='AB
+# These fonts are commonly, but not universally, available; if used,
+# their corresponding Type 1 font files must be embedded in a document.
+#
+# Their groff font descriptions will always be available: we ship them.
+# But they are not usable with gropdf(1) if the Type 1 files are absent.
+# We thus will not test them if they are not expected to work.
+supplementary_fonts='AB
 ABI
 AI
 AR
@@ -38,19 +61,10 @@ BMB
 BMBI
 BMI
 BMR
-CB
-CBI
-CI
-CR
-EURO
-HB
-HBI
-HI
 HNB
 HNBI
 HNI
 HNR
-HR
 NB
 NBI
 NI
@@ -59,24 +73,25 @@ PB
 PBI
 PI
 PR
-S
-TB
-TBI
-TI
-TR
-ZCMI
-ZD'
+ZCMI'

-fail=
+for f in $mandatory_fonts
+do
+    printf "checking for font description %s...\n" "$f" >&2
+    test -f "$devpdf_fontbuilddir"/"$f" || wail
+done
+
+if [ "$ghostscript" = no ] || [ "$ghostscript" = missing ]
+then
+    echo "Ghostscript not available; skipping check for any further" \
+         "fonts in the default foundry" >&2
+    exit 77 # skip
+fi

-for f in $fonts
+for f in $supplementary_fonts
 do
     printf "checking for font description %s...\n" "$f" >&2
-    if ! [ -f "$devpdf_fontbuilddir"/"$f" ]
-    then
-        echo FAILED >&2
-        fail=yes
-    fi
+    test -f "$devpdf_fontbuilddir"/"$f" || wail
 done

 test -z "$fail"
diff --git a/font/devpdf/tests/check-urw-foundry.sh.in b/font/devpdf/tests/check-urw-foundry.sh.in
index 9d4e514bf..d31b3aa3e 100755
--- a/font/devpdf/tests/check-urw-foundry.sh.in
+++ b/font/devpdf/tests/check-urw-foundry.sh.in
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2022 Free Software Foundation, Inc.
+# Copyright (C) 2022-2023 Free Software Foundation, Inc.
 #
 # This file is part of groff.
 #
@@ -19,8 +19,17 @@
 #

 # Ensure that groff's PDF device has URW font descriptions it expects.
+# These are generated at build time by afmtodit(1) if a URW font
+# directory was discovered at configuration time.

 devpdf_fontbuilddir="${abs_top_builddir:-.}"/font/devpdf
+urwfontsdir=@urwfontsdir@
+
+if [ -z "$urwfontsdir" ]
+then
+    echo "URW fonts not found at configuration time; skipping" >&2
+    exit 77 # skip
+fi

 fonts='AB
 ABI
@@ -67,7 +76,7 @@ do
     if ! test -f "$devpdf_fontbuilddir"/$f
     then
         echo test -f "$devpdf_fontbuilddir"/$f
-        echo FAILED >&2
+        echo ...FAILED >&2
         fail=yes
     fi
 done
diff --git a/m4/groff.m4 b/m4/groff.m4
index 06b32e159..617e16394 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -332,8 +332,6 @@ AC_DEFUN([GROFF_GROPDF_PROGRAM_NOTICE], [
   base 14 fonts, plus the 'EURO' font groff supplies, and font embedding
   with its '-e' option (accessed via the 'groff' command with the option
   '-P -e') will not be possible.
-
-  If you run "make check", an automated test for 'gropdf' will fail.
 ])
   fi
 ])
@@ -416,8 +414,6 @@ AC_DEFUN([GROFF_URW_FONTS_NOTICE], [
   the 'U' foundry in PDF documents generated by groff will not be
   possible.

-  If you run "make check", an automated test for 'gropdf' will fail.
-
   You can obtain the URW base 35 fonts from their GitHub project.  As of
   this writing (2023-02-15), you can find them in the 'fonts' directory
   of the following archives (choose one).


Attaching typescript of 3 build configurations in Debian bullseye chroot.

(file #54394)

G. Branden Robinson <gbranden>
Group administrator
Sat 25 Feb 2023 07:53:16 AM UTC, comment #64: 

With the changes discussed in comment #63...


$ git show --reverse origin..HEAD
commit 5b1d47e4fe4f15fc2b7249b34d1e94d190a1539f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Feb 24 06:37:19 2023 -0600

    m4/groff.m4: Improve URW font check.

    * m4/groff.m4 (GROFF_URW_FONTS_CHECK): When looking for a characteristic
      URW font by its file name, also check for "URWGothic-Book" with no
      file extension.  Avoids false negatives in URW Type 1 font detection
      when using Ghostscript 9.53.3.  Thanks to Deri James for suggesting
      the test procedure that uncovered this flaw.

diff --git a/ChangeLog b/ChangeLog
index 931717f64..fce638f5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * m4/groff.m4 (GROFF_URW_FONTS_CHECK): When looking for a
+       characteristic URW font by its file name, also check for
+       "URWGothic-Book" with no file extension.  Avoids false negatives
+       in URW Type 1 font detection when using Ghostscript 9.53.3.
+       Thanks to Deri James for suggesting the test procedure that
+       uncovered this flaw.
+
 2023-02-22  G. Branden Robinson <g.branden.robinson@gmail.com>

        * Makefile.am (uninstall_groffdirs): Remove "html.mono" and
diff --git a/m4/groff.m4 b/m4/groff.m4
index b6c5535be..294817544 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -382,6 +382,7 @@ dnl Keep this list in sync with font/devpdf/Foundry.in.
   for k in $_list_paths
   do
     for _font_file in \
+      URWGothic-Book \
       URWGothic-Book.t1 \
       URWGothic-Book.pfb \
       URWGothicL-Book.pfb \

commit 763f3ae170a01b9c1c03d86552b98c0dc59cefe2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Feb 24 06:49:07 2023 -0600

    configure.ac: Drop now-redundant explicit check.

    * configure.ac: Drop now-redundant explicit `GROFF_URW_FONTS_CHECK`.
      `GROFF_GROPDF_DEPENDENCIES_CHECK` `AC_REQUIRE`s it as of commit
      ec001d2a23, 18 February.

diff --git a/ChangeLog b/ChangeLog
index fce638f5a..c387e885b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * configure.ac: Drop now-redundant explicit
+       `GROFF_URW_FONTS_CHECK`.  `GROFF_GROPDF_DEPENDENCIES_CHECK`
+       `AC_REQUIRE`s it as of commit ec001d2a23, 18 February.
+
 2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>

        * m4/groff.m4 (GROFF_URW_FONTS_CHECK): When looking for a
diff --git a/configure.ac b/configure.ac
index b4e992162..fa38baba9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,10 +179,6 @@ GROFF_GHOSTSCRIPT_VERSION_CHECK
 gl_GLIBC21
 gl_LOCALCHARSET

-# Check for presence of URW fonts (these require Ghostscript, which is
-# checked for by GROFF_CHECK_GROHTML_PROGRAMS).
-GROFF_URW_FONTS_CHECK
-
 AM_CONDITIONAL([BUILD_WINSCRIPTS], [test -n "$make_winscripts"])

 # If X11 is not available, don't build:

commit 4b6710a750012b6ffcc7ae6fef30013354583307
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   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.

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 \

commit 335b911faaafae94f1a8f5f68e2784a86cfc0ced
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Feb 24 09:30:43 2023 -0600

    [devpdf]: Trivially refactor.

    Rename sed-substitutum [Lat.] from "@GROFF_GHOSTSCRIPT_INTERPRETERS@" to
    "@GHOSTSCRIPT@" for clarity and brevity; this is a scalar value
    containing the Autoconf-determined name of the Ghostscript interpreter.
    It is not the same as the replacement that occurs in contrib/pdfmark.

    * font/devpdf/devpdf.am:
    * font/devpdf/util/BuildFoundries.pl: Do it.

diff --git a/ChangeLog b/ChangeLog
index 9b8ecccc3..a02f60d73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [devpdf]: Trivially refactor.  Rename sed-substitutum [Lat.]
+       from "@GROFF_GHOSTSCRIPT_INTERPRETERS@" to "@GHOSTSCRIPT@" for
+       clarity and brevity; this is a scalar value containing the
+       Autoconf-determined name of the Ghostscript interpreter.  It is
+       not the same as the replacement that occurs in contrib/pdfmark.
+
+       * font/devpdf/devpdf.am:
+       * font/devpdf/util/BuildFoundries.pl: Do it.
+
 2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>

        [build]: Stop scraping output of Ghostscript executable with
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
index 4b872182d..4f9923a9f 100644
--- a/font/devpdf/devpdf.am
+++ b/font/devpdf/devpdf.am
@@ -71,7 +71,7 @@ font/devpdf/util/BuildFoundries: \
        && if test -n "$(PERL)"; then \
             sed -f $(SH_DEPS_SED_SCRIPT) \
                 -e "s|/usr/bin/perl|$(PERL)|" \
-                -e "s|[@]GROFF_GHOSTSCRIPT_INTERPRETERS[@]|$(GHOSTSCRIPT)|" \
+                -e "s|[@]GHOSTSCRIPT[@]|$(GHOSTSCRIPT)|" \
                 -e "s|[@]PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|" \
                 -e "s|[@]VERSION[@]|$(VERSION)|" \
                 -e "s|[@]GROFF_FONT_DIR[@]|$(fontdir)|" \
diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl
index b22925a89..2815c379e 100644
--- a/font/devpdf/util/BuildFoundries.pl
+++ b/font/devpdf/util/BuildFoundries.pl
@@ -331,7 +331,7 @@ sub LocateFile

 sub FindGSpath
 {
-    my (@res)=`@GROFF_GHOSTSCRIPT_INTERPRETERS@ -h 2>/dev/null`;
+    my (@res)=`@GHOSTSCRIPT@ -h 2>/dev/null`;
     return [] if $?;
     my $buildpath=[];
     my $stg=1;

commit 3c4b49e0043eaa6df23d711c0256dd8dbf529d0d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Feb 24 09:46:51 2023 -0600

    [devpdf]: Generate tests from template files.

    [devpdf]: Generate tests from template files, so we can populate the
    test scripts with information determined at configuration.  The default
    foundry test depends on $GHOSTSCRIPT, and the URW foundry test on
    $urwfontsdir.

    * font/devpdf/tests/check-default-foundry.sh:
    * font/devpdf/tests/check-urw-foundry.sh: Rename these...
    * font/devpdf/tests/check-default-foundry.sh.in:
    * font/devpdf/tests/check-urw-foundry.sh.in: ...to these.

    * font/devpdf/devpdf.am (font_devpdf_default_test)
      (font_devpdf_urw_test): New variables store names of generated test
      scripts.
      (font/devpdf/tests/check-default-foundry.sh):
      (font/devpdf/tests/check-urw-foundry.sh): New targets produce test
      scripts from corresponding .in files.

diff --git a/ChangeLog b/ChangeLog
index a02f60d73..0323d7c99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [devpdf]: Generate tests from template files, so we can populate
+       the test scripts with information determined at configuration.
+       The default foundry test depends on $GHOSTSCRIPT, and the URW
+       foundry test on $urwfontsdir.
+
+       * font/devpdf/tests/check-default-foundry.sh:
+       * font/devpdf/tests/check-urw-foundry.sh: Rename these...
+       * font/devpdf/tests/check-default-foundry.sh.in:
+       * font/devpdf/tests/check-urw-foundry.sh.in: ...to these.
+
+       * font/devpdf/devpdf.am (font_devpdf_default_test)
+       (font_devpdf_urw_test): New variables store names of generated
+       test scripts.
+       (font/devpdf/tests/check-default-foundry.sh):
+       (font/devpdf/tests/check-urw-foundry.sh): New targets produce
+       test scripts from corresponding .in files.
+
 2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>

        [devpdf]: Trivially refactor.  Rename sed-substitutum [Lat.]
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
index 4f9923a9f..edce36575 100644
--- a/font/devpdf/devpdf.am
+++ b/font/devpdf/devpdf.am
@@ -178,12 +178,30 @@ uninstall_devpdf:
          rmdir $(DESTDIR)$(devpdffontdir); \
        fi

+font_devpdf_default_test=\
+  $(devpdf_srcdir)/tests/check-default-foundry.sh.in
+font_devpdf_urw_test=$(devpdf_srcdir)/tests/check-urw-foundry.sh.in
+
+font/devpdf/tests/check-default-foundry.sh: $(font_devpdf_default_test)
+       $(AM_V_GEN)$(MKDIR_P) `dirname $@` \
+       && sed -e "s|[@]GHOSTSCRIPT[@]|$(GHOSTSCRIPT)|g" \
+         $(font_devpdf_default_test) > $@ \
+       && chmod +x $@
+
+font/devpdf/tests/check-urw-foundry.sh: $(font_devpdf_urw_test)
+       $(AM_V_GEN)$(MKDIR_P) `dirname $@` \
+       && sed -e "s|[@]urwfontsdir[@]|$(urwfontsdir)|g" \
+         $(font_devpdf_urw_test) > $@ \
+       && chmod +x $@
+
 font_devpdf_TESTS = \
   font/devpdf/tests/check-default-foundry.sh \
   font/devpdf/tests/check-urw-foundry.sh

 TESTS += $(font_devpdf_TESTS)
-EXTRA_DIST += $(font_devpdf_TESTS)
+MOSTLYCLEANFILES += $(font_devpdf_TESTS)
+EXTRA_DIST += $(font_devpdf_default_test) $(font_devpdf_urw_test)
+

 # Local Variables:
 # mode: makefile-automake
diff --git a/font/devpdf/tests/check-default-foundry.sh b/font/devpdf/tests/check-default-foundry.sh.in
similarity index 100%
rename from font/devpdf/tests/check-default-foundry.sh
rename to font/devpdf/tests/check-default-foundry.sh.in
diff --git a/font/devpdf/tests/check-urw-foundry.sh b/font/devpdf/tests/check-urw-foundry.sh.in
similarity index 100%
rename from font/devpdf/tests/check-urw-foundry.sh
rename to font/devpdf/tests/check-urw-foundry.sh.in

commit 34dd527e49e08209286438573b7cf4dcc1241c79 (HEAD -> master)
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Feb 24 18:07:45 2023 -0600

    XXX devpdf test rejigger

diff --git a/font/devpdf/tests/check-default-foundry.sh.in b/font/devpdf/tests/check-default-foundry.sh.in
index 1ddd83d0b..d5e401df9 100755
--- a/font/devpdf/tests/check-default-foundry.sh.in
+++ b/font/devpdf/tests/check-default-foundry.sh.in
@@ -18,19 +18,42 @@
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 #

-# Ensure that groff's PDF device has font description files for the
-# default (unnamed) foundry's PostScript Level 2 base 35 fonts, plus
-# groff's EURO.
-#
-# These font descriptions should be available in any gropdf
-# configuration because they can be copied from the devps font
-# descriptions even if the URW fonts are not available.
-#
-# Another test script checks the "U" (URW) foundry.
-
 devpdf_fontbuilddir="${abs_top_builddir:-.}"/font/devpdf
+ghostscript=@GHOSTSCRIPT@
+
+wail () {
+    echo ...FAILED >&2
+    fail=yes
+}
+
+fail=
+
+# The are the base 14 fonts required by the PDF standard.  They should
+# _always_ be present and supported.  If their corresponding Type 1 font
+# files are available, they too can be embedded in a PDF using gropdf's
+# "-e" option.  groff's "EURO" font is always available; we ship it.
+mandatory_fonts='CB
+CBI
+CI
+CR
+HB
+HBI
+HI
+HR
+S
+TB
+TBI
+TI
+TR
+ZD'

-fonts='AB
+# These fonts are commonly, but not universally, available; if used,
+# their corresponding Type 1 font files must be embedded in a document.
+#
+# Their groff font descriptions will always be available: we ship them.
+# But they are not usable with gropdf(1) if the Type 1 files are absent.
+# We thus will not test them if they are not expected to work.
+supplementary_fonts='AB
 ABI
 AI
 AR
@@ -38,19 +61,10 @@ BMB
 BMBI
 BMI
 BMR
-CB
-CBI
-CI
-CR
-EURO
-HB
-HBI
-HI
 HNB
 HNBI
 HNI
 HNR
-HR
 NB
 NBI
 NI
@@ -59,24 +73,25 @@ PB
 PBI
 PI
 PR
-S
-TB
-TBI
-TI
-TR
-ZCMI
-ZD'
+ZCMI'

-fail=
+for f in $mandatory_fonts
+do
+    printf "checking for font description %s...\n" "$f" >&2
+    test -f "$devpdf_fontbuilddir"/"$f" || wail
+done
+
+if [ "$ghostscript" != no ] && [ "$ghostscript" != missing ]
+then
+    echo "Ghostscript not available; skipping check for any further" \
+         "fonts in the default foundry" >&2
+    exit 77 # skip
+fi

-for f in $fonts
+for f in $supplementary_fonts
 do
     printf "checking for font description %s...\n" "$f" >&2
-    if ! [ -f "$devpdf_fontbuilddir"/"$f" ]
-    then
-        echo FAILED >&2
-        fail=yes
-    fi
+    test -f "$devpdf_fontbuilddir"/"$f" || wail
 done

 test -z "$fail"
diff --git a/font/devpdf/tests/check-urw-foundry.sh.in b/font/devpdf/tests/check-urw-foundry.sh.in
index 9d4e514bf..d31b3aa3e 100755
--- a/font/devpdf/tests/check-urw-foundry.sh.in
+++ b/font/devpdf/tests/check-urw-foundry.sh.in
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2022 Free Software Foundation, Inc.
+# Copyright (C) 2022-2023 Free Software Foundation, Inc.
 #
 # This file is part of groff.
 #
@@ -19,8 +19,17 @@
 #

 # Ensure that groff's PDF device has URW font descriptions it expects.
+# These are generated at build time by afmtodit(1) if a URW font
+# directory was discovered at configuration time.

 devpdf_fontbuilddir="${abs_top_builddir:-.}"/font/devpdf

 devpdf_fontbuilddir="${abs_top_builddir:-.}"/font/devpdf
+urwfontsdir=@urwfontsdir@
+
+if [ -z "$urwfontsdir" ]
+then
+    echo "URW fonts not found at configuration time; skipping" >&2
+    exit 77 # skip
+fi

 fonts='AB
 ABI
@@ -67,7 +76,7 @@ do
     if ! test -f "$devpdf_fontbuilddir"/$f
     then
         echo test -f "$devpdf_fontbuilddir"/$f
-        echo FAILED >&2
+        echo ...FAILED >&2
         fail=yes
     fi
 done
diff --git a/m4/groff.m4 b/m4/groff.m4
index 06b32e159..617e16394 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -332,8 +332,6 @@ AC_DEFUN([GROFF_GROPDF_PROGRAM_NOTICE], [
   base 14 fonts, plus the 'EURO' font groff supplies, and font embedding
   with its '-e' option (accessed via the 'groff' command with the option
   '-P -e') will not be possible.
-
-  If you run "make check", an automated test for 'gropdf' will fail.
 ])
   fi
 ])
@@ -416,8 +414,6 @@ AC_DEFUN([GROFF_URW_FONTS_NOTICE], [
   the 'U' foundry in PDF documents generated by groff will not be
   possible.

-  If you run "make check", an automated test for 'gropdf' will fail.
-
   You can obtain the URW base 35 fonts from their GitHub project.  As of
   this writing (2023-02-15), you can find them in the 'fonts' directory
   of the following archives (choose one).


...things look much better in the contrived "scenario 01" (gs present, urw absent).


$ ./configure --prefix=$HOME
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
...
checking for gs... gs
checking for pnmcrop... found
checking for pnmcut... found
checking for pnmtopng... found
checking for pnmtops... found
checking for psselect... missing
checking for URW fonts in Type 1/PFB format... none found
checking whether pnmtops accepts the '-nosetpage' option... yes
checking whether make defines 'RM'... yes
checking for a diff program that supports option -D... yes
checking whether test supports option -ef... yes
checking for bash... /usr/bin/bash
checking for gs version with good left sidebearing handling... got 9.53.3 (buggy)
checking whether we are using the GNU C Library >= 2.1 or uClibc... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating test-groff
config.status: creating src/include/config.h
config.status: executing depfiles commands

GNU roff version 1.23.0.rc3.29-34dd52
----------------------------------------------------------------------
 installation directory prefix    : /home/branden
 C++ compiler and options         : g++ -g -O2
 use libgroff's memory allocator  : no
 C compiler and options           : gcc -g -O2
 Perl interpreter version         : 5.32.1
 X11 support                      : disabled
 'groff -l' uses print spooler    : no
 use URW fonts for PDF output     : no
 preconv can use uchardet library : no
 can build groff.dvi, groff.pdf   : no
 tests can use poppler PDF tools  : no
----------------------------------------------------------------------
configure: Buggy version of Ghostscript detected.

  Ghostscript versions 9.00 <= x < 9.54 suffer from a rendering glitch
  that affects the AT&T troff (and groff) special character '\(lh'; see
  <https://bugs.ghostscript.com/show_bug.cgi?id=703187>.  If your
  version of Ghostscript has not been patched to fix this problem, you
  may need to work around it in groff documents you render for the
  PostScript (and, for tbl(1) tables, HTML) output devices.

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
  possible.

  You can obtain the URW base 35 fonts from their GitHub project.  As of
  this writing (2023-02-15), you can find them in the 'fonts' directory
  of the following archives (choose one).

    https://github.com/ArtifexSoftware/urw-base35-fonts/archive/refs/
      tags/20200910.zip
    https://github.com/ArtifexSoftware/urw-base35-fonts/archive/refs/
      tags/20200910.tar.gz

  You may wish to check for a newer release.

    https://github.com/ArtifexSoftware/urw-base35-fonts/releases

  By default, groff will look for these fonts in the search path shown
  by the 'gs -h' command (if available) and in several directories
  specified in font/devpdf/Foundry.in).  You will need to 'make
  distclean' and re-run the 'configure' script after installing these
  fonts.

  Alternatively, you can pass the option '--with-urw-fonts-dir=DIR'
  to 'configure' to look for them in the directory DIR you specify.
  If found, the 'U' foundry will be available via the '-y' option to
  'gropdf' (accessed via the 'groff' command with the option '-P -y').

configure: The uchardet library was not found.

  The 'preconv' preprocessor program will be unable to attempt automatic
  inference of an input file's character encoding.  See the preconv(1)
  man page.

configure: The program 'psselect' was not found in $PATH.

  Consequently, groff's HTML output driver, 'grohtml', will not work
  properly.  It will not be possible to prepare or install
  groff-generated documentation in HTML format.

$ make check
  GEN      lib/alloca.h
  GEN      lib/inttypes.h
  GEN      lib/limits.h
...
PASS: contrib/rfc1345/tests/rfc1345-smoke-test.sh
  GEN      font/devpdf/tests/check-default-foundry.sh
SKIP: font/devpdf/tests/check-default-foundry.sh
  GEN      font/devpdf/tests/check-urw-foundry.sh
SKIP: font/devpdf/tests/check-urw-foundry.sh
SKIP: src/devices/grotty/tests/basic_latin_glyphs_map_correctly.sh
PASS: src/devices/grotty/tests/osc8_works.sh
...
============================================================================
Testsuite summary for GNU roff 1.23.0.rc3.29-34dd52
============================================================================
# TOTAL: 163
# PASS:  153
# SKIP:  8
# XFAIL: 2
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================


I'll check out the other 3 configurations in my Debian bullseye chroot, then do builds on macOS, Solaris 10, and Solaris 11.

If all that works out, I'll write a proper commit message for that last commit, and push.

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 03:23:49 PM UTC, comment #63: 

I think a see a way now to produce gropdf tests that can be skipped depending on parameters determined at configuration time.

We can use the existing AC_SUBSTed "$GHOSTSCRIPT" and "$urwfontsdir" shell variables to generate the two test scripts from .in files with the usual sed-based @REPLACEMENT@ trick, and perform tests upon these variables.

So check-default-foundry.sh would do something like this:


if [ "$GHOSTSCRIPT" = no ] || [ "$GHOSTSCRIPT" = missing ]
then
  exit 77
fi


...and check-urw-foundry.sh something like this:


if [ -z "$urwfontsdir" ]
then
  exit 77
fi


I'll throw in messages about why skipping is happening, of course.

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 03:01:38 PM UTC, comment #62: 

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_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 \


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.


PASS

> No warnings from BuildFoundries.


PASS

> 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.


PASS

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


FAIL

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
  possible.

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

...


> All pdf docs produced with no unexpected warnings.


PASS

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 comment.

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 02:27:45 PM UTC, comment #61: 

comment #58:

> A message from configure the URW fonts are not found.
> No warnings from BuildFoundries.
> Only the default foundry groff fonts (base-35 plus EURO).
> check-default-foundry has passed.
> check-urw-foundry is not run/skipped.
> All pdf docs produced with no unexpected warnings.
>
> If all the above then it is a successful run,


What this means is that comment #54 doesn't look so good after all.

From my re-contrived build, with urw-base35 installed but moved aside, and Ghostscript's Resource/Font also moved aside, but replaced with your font archive from comment #41, I have the following.


$ ls -l /usr/share/ghostscript/9.53.3/Resource/Font~
total 24
lrwxrwxrwx 1 root root 48 Jan  4  2022 C059-BdIta -> ../../../../fonts/type1/urw-base35/C059-BdIta.t1
lrwxrwxrwx 1 root root 47 Jan  4  2022 C059-Bold -> ../../../../fonts/type1/urw-base35/C059-Bold.t1
lrwxrwxrwx 1 root root 49 Jan  4  2022 C059-Italic -> ../../../../fonts/type1/urw-base35/C059-Italic.t1
lrwxrwxrwx 1 root root 48 Jan  4  2022 C059-Roman -> ../../../../fonts/type1/urw-base35/C059-Roman.t1
lrwxrwxrwx 1 root root 46 Jan  4  2022 D050000L -> ../../../../fonts/type1/urw-base35/D050000L.t1
...
$ ls -l /usr/share/ghostscript/9.53.3/Resource/Font
total 4448
-rw-r--r-- 1 root root 152585 May 10  2022 C059-BdIta
-rw-r--r-- 1 root root 146014 May 10  2022 C059-Bold
-rw-r--r-- 1 root root 148928 May 10  2022 C059-Italic
-rw-r--r-- 1 root root 145084 May 10  2022 C059-Roman
-rw-r--r-- 1 root root  43343 May 10  2022 D050000L
...
$ ls -dl /usr/share/fonts/type1/urw-base35{~,}
ls: cannot access '/usr/share/fonts/type1/urw-base35': No such file or directory
drwxr-xr-x 2 root root 4096 Feb 24 14:15 /usr/share/fonts/type1/urw-base35~
$ ./configure --prefix=$HOME
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
...
checking for gs... gs
checking for pnmcrop... found
checking for pnmcut... found
checking for pnmtopng... found
checking for pnmtops... found
checking for psselect... missing
checking for URW fonts in Type 1/PFB format... found in /usr/share/ghostscript/9.53.3/Resource/Font
checking whether pnmtops accepts the '-nosetpage' option... yes
checking whether make defines 'RM'... yes
checking for a diff program that supports option -D... yes
checking whether test supports option -ef... yes
checking for bash... /usr/bin/bash
checking for gs version with good left sidebearing handling... got 9.53.3 (buggy)
checking whether we are using the GNU C Library >= 2.1 or uClibc... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating test-groff
config.status: creating src/include/config.h
config.status: src/include/config.h is unchanged
config.status: executing depfiles commands

GNU roff version 1.23.0.rc3.25-fc35
----------------------------------------------------------------------
 installation directory prefix    : /home/branden
 C++ compiler and options         : g++ -g -O2
 use libgroff's memory allocator  : no
 C compiler and options           : gcc -g -O2
 Perl interpreter version         : 5.32.1
 X11 support                      : disabled
 'groff -l' uses print spooler    : no
 use URW fonts for PDF output     : yes
 URW fonts directory              : /usr/share/ghostscript/9.53.3/Resource/Font
 preconv can use uchardet library : no
 can build groff.dvi, groff.pdf   : no
 tests can use poppler PDF tools  : no
----------------------------------------------------------------------
configure: Buggy version of Ghostscript detected.

  Ghostscript versions 9.00 <= x < 9.54 suffer from a rendering glitch
  that affects the AT&T troff (and groff) special character '\(lh'; see
  <https://bugs.ghostscript.com/show_bug.cgi?id=703187>.  If your
  version of Ghostscript has not been patched to fix this problem, you
  may need to work around it in groff documents you render for the
  PostScript (and, for tbl(1) tables, HTML) output devices.

configure: The uchardet library was not found.

  The 'preconv' preprocessor program will be unable to attempt automatic
  inference of an input file's character encoding.  See the preconv(1)
  man page.

configure: The program 'psselect' was not found in $PATH.

  Consequently, groff's HTML output driver, 'grohtml', will not work
  properly.  It will not be possible to prepare or install
  groff-generated documentation in HTML format.

$


And the build goes wrong.


$ make
  GEN      lib/alloca.h
  GEN      lib/inttypes.h
  GEN      lib/limits.h
  GEN      lib/math.h
  GEN      lib/stdio.h
  GEN      lib/stdlib.h
  GEN      lib/string.h
  GEN      lib/sys/types.h
  GEN      lib/unistd.h
  GEN      lib/unitypes.h
  GEN      lib/uniwidth.h
  GEN      lib/wchar.h
  GEN      lib/wctype.h
  GEN      contrib/chem/README
  GEN      font/devpdf/DESC
  GEN      font/devpdf/Foundry
  GEN      shdeps.sed
  GEN      afmtodit
  GEN      font/devpdf/util/BuildFoundries
  GEN      font/devpdf/download
BuildFoundries: notice: copied grops font AB
BuildFoundries: notice: copied grops font ABI
BuildFoundries: notice: copied grops font AI
BuildFoundries: notice: copied grops font AR
BuildFoundries: notice: copied grops font BMB
BuildFoundries: notice: copied grops font BMBI
BuildFoundries: notice: copied grops font BMI
BuildFoundries: notice: copied grops font BMR
BuildFoundries: notice: copied grops font CB
BuildFoundries: notice: copied grops font CBI
BuildFoundries: notice: copied grops font CI
BuildFoundries: notice: copied grops font CR
BuildFoundries: notice: copied grops font HB
BuildFoundries: notice: copied grops font HBI
BuildFoundries: notice: copied grops font HI
BuildFoundries: notice: copied grops font HNB
BuildFoundries: notice: copied grops font HNBI
BuildFoundries: notice: copied grops font HNI
BuildFoundries: notice: copied grops font HNR
BuildFoundries: notice: copied grops font HR
BuildFoundries: notice: copied grops font NB
BuildFoundries: notice: copied grops font NBI
BuildFoundries: notice: copied grops font NI
BuildFoundries: notice: copied grops font NR
BuildFoundries: notice: copied grops font PB
BuildFoundries: notice: copied grops font PBI
BuildFoundries: notice: copied grops font PI
BuildFoundries: notice: copied grops font PR
BuildFoundries: notice: copied grops font S
BuildFoundries: notice: copied grops font TB
BuildFoundries: notice: copied grops font TBI
BuildFoundries: notice: copied grops font TI
BuildFoundries: notice: copied grops font TR
BuildFoundries: notice: copied grops font ZCMI
BuildFoundries: notice: copied grops font ZD
BuildFoundries: notice: copied grops font EURO
BuildFoundries: error: cannot locate AFM file for font 'U-AB'
make: *** [Makefile:14915: font/devpdf/download] Error 2


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


FAIL

> No warnings from BuildFoundries.


FAIL

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


Success, but only because BuildFoundries bombed when it tried to generate the URW font descriptions, which it should not have tried to do.

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

> check-default-foundry has passed.


Didn't get that far.

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


Didn't get that far.

> All pdf docs produced with no unexpected warnings.


Didn't get that far.

So what I will do is drop the "gs -h" scraping from our Autoconf macro GROFF_URW_FONTS_CHECK, and see what happens then.

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 02:06:39 PM UTC, comment #60: 


comment #57:

>
> comment #56:
> > Deri,
> >
> > What should we do about this?  Is it worth gating 1.23.0 final over?
>
> I note that if I un-contrive the test scenario and put things back the way Debian had them, I get a successful build.
>


We know that! It is a scenario 1x, you are meant to be testing scenario 01 because you falsely claimed I did not support it.

Go back to the system as at comment #52, stop configure looking in ghostscript directories, and run make.

> So I am not alarmed.


Deri James <deri>
Group Member
Fri 24 Feb 2023 02:04:35 PM UTC, comment #59: 

comment #58:

> Your first attempt has the correct configure messages, this one is wrong.


So comment #54 looks good and comment #57 does not.

> In scenario 01 (ghostscript only) gropdf will be in standard mode with the default foundry only populated, so it is correct to say that the U- foundry will not be available in a configure message. If you undo whatever you changed for the second run


That would mean "re-contriving" the test failure scenario.  I can do that.

You may have noticed the changing version number.  I will assume you don't think either of these is a bad idea.


commit fc350c6b7b62ecc1ef4b4aba1568b14b66526e46 (HEAD -> master)
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Feb 24 06:49:07 2023 -0600
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Fri Feb 24 06:49:07 2023 -0600

    configure.ac: Drop now-redundant explicit check.

    * configure.ac: Drop now-redundant explicit `GROFF_URW_FONTS_CHECK`.
      `GROFF_GROPDF_DEPENDENCIES_CHECK` `AC_REQUIRE`s it as of commit
      ec001d2a23, 18 February.

diff --git a/ChangeLog b/ChangeLog
index 636f69557..9b0eb7b8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * configure.ac: Drop now-redundant explicit
+       `GROFF_URW_FONTS_CHECK`.  `GROFF_GROPDF_DEPENDENCIES_CHECK`
+       `AC_REQUIRE`s it as of commit ec001d2a23, 18 February.
+
 2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>

        * m4/groff.m4 (GROFF_URW_FONTS_CHECK): When looking for a
diff --git a/configure.ac b/configure.ac
index b4e992162..fa38baba9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,10 +179,6 @@ GROFF_GHOSTSCRIPT_VERSION_CHECK
 gl_GLIBC21
 gl_LOCALCHARSET

-# Check for presence of URW fonts (these require Ghostscript, which is
-# checked for by GROFF_CHECK_GROHTML_PROGRAMS).
-GROFF_URW_FONTS_CHECK
-
 AM_CONDITIONAL([BUILD_WINSCRIPTS], [test -n "$make_winscripts"])

 # If X11 is not available, don't build:

commit d06b69ef2632f6c649a754f068f57f671f2d93ed
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Feb 24 06:37:19 2023 -0600
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Fri Feb 24 06:37:19 2023 -0600

    m4/groff.m4: Improve URW font check.

    * m4/groff.m4 (GROFF_URW_FONTS_CHECK): When looking for a characteristic
      URW font by its file name, also check for "URWGothic-Bold" with no
      file extension.  Avoids false negatives in URW Type 1 font detection
      when using Ghostscript 9.53.3.  Thanks to Deri James for suggesting
      the test procedure that uncovered this flaw.

diff --git a/ChangeLog b/ChangeLog
index 931717f64..636f69557 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * m4/groff.m4 (GROFF_URW_FONTS_CHECK): When looking for a
+       characteristic URW font by its file name, also check for
+       "URWGothic-Bold" with no file extension.  Avoids false negatives
+       in URW Type 1 font detection when using Ghostscript 9.53.3.
+       Thanks to Deri James for suggesting the test procedure that
+       uncovered this flaw.
+
 2023-02-22  G. Branden Robinson <g.branden.robinson@gmail.com>

        * Makefile.am (uninstall_groffdirs): Remove "html.mono" and
diff --git a/m4/groff.m4 b/m4/groff.m4
index b6c5535be..294817544 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -382,6 +382,7 @@ dnl Keep this list in sync with font/devpdf/Foundry.in.
   for k in $_list_paths
   do
     for _font_file in \
+      URWGothic-Book \
       URWGothic-Book.t1 \
       URWGothic-Book.pfb \
       URWGothicL-Book.pfb \


The last wasn't really a "change", in comment #54, I hand-patched m4/groff.m4 with this same change as an experiment.  Thus the ringing bell.

> and run make, you should be looking for these things:-
>
> A message from configure the URW fonts are not found.
> No warnings from BuildFoundries.
> Only the default foundry groff fonts (base-35 plus EURO).
> check-default-foundry has passed.
> check-urw-foundry is not run/skipped.
> All pdf docs produced with no unexpected warnings.


Okay, I'll re-contrive and look for all of these.

> If all the above then it is a successful run,
>
> It really concerns me that I see configure is looking in the ghostscript directory for urw-fonts, it must not.


Hmmm.  It's been doing that for quite a while.


commit 2b5a438e0c205a5f118b456db7438e35dab50e09 (HEAD)
Author: Bertrand Garrigues <bertrand.garrigues@laposte.net>
Date:   Mon May 8 21:46:03 2017 +0200

    Package `ghostscript' 9.21 renamed some fonts installed in
    `/usr/share/ghostscript/9.21/Resource/Font', e.g. URWGothicL-Demi
    renamed to URWGothic-Demi, and droped the installation of URW
    fonts in `/usr/share/fonts/type1/gsfonts/', breaking font
    generation in `font/devpdf/util/BuildFoundries.pl'.

    * m4/groff.m4 (GROFF_URW_FONTS_PATH): New option
    `--with-urw-fonts-dir' to pass a custom path to URW fonts.
    (GROFF_URW_FONTS): search the presence of URW fonts by checking if
    file `a010013l.pfb' exists in the paths given by `gs -h', in the
    default paths used in `Foundry.in' and in the path given with
    option `--with-urw-fonts-dir'.
    (GROFF_URW_FONTS_CHECK): print a warning at the end of the
    configuration phase if no URW fonts were found.

    * configure.ac: call new macros `GROFF_URW_FONTS_PATH',
    `GROFF_URW_FONTS' and `GROFF_URW_FONTS_CHECK'.

    * font/devpdf/Foundry.in: add new basic fonts names and pass
    custom URW fonts path `urwfontsdir'.

    * font/devpdf/devpdf.am: subsitute `urwfontsdir' in `Foundry'
    generation.

    Fixes https://savannah.gnu.org/bugs/?50786
...
+# Check if URW fonts are available, either in the paths given by `gs
+# -h', in /usr/share/fonts/type1/gsfonts/ ,
+# /opt/local/share/fonts/urw-fonts (where font/devpdf/Foundry.in
+# expect them), or in the custom path passed to configure.
+AC_DEFUN([GROFF_URW_FONTS],
+  [AC_MSG_CHECKING([whether URW fonts in pfb format are available])
+  _list_paths=`gs -h | grep -A 16 "Search path" | grep "^[ ]" | tr : ' ' `
+  _list_paths="$_list_paths /usr/share/fonts/type1/gsfonts/ \
+               /opt/local/share/fonts/urw-fonts/"
+  if test -n "$urwfontsdir"; then
+    _list_paths="$ _list_paths $urwfontsdir"
+  fi
+  groff_have_urw_fonts=no
+  for k in $_list_paths; do
+    if test -f $k/a010013l.pfb; then
+      AC_MSG_RESULT([found in $k])
+      groff_have_urw_fonts=yes
+      break
+    fi
+  done
+  if test $groff_have_urw_fonts = no; then
+    AC_MSG_RESULT([no])
+  fi
+  ])

 

> Any fonts supplied by ghostscript do not include .afm files


I noticed that too.

> so the U- foundry can't be built, and the missing URW fonts message should be output and @urwfontsdir@ should definitely not be set.


Okay.

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 01:44:53 PM UTC, comment #58: 

Your first attempt has the correct configure messages, this one is wrong. In scenario 01 (ghostscript only) gropdf will be in standard mode with the default foundry only populated, so it is correct to say that the U- foundry will not be available in a configure message. If you undo whatever you changed for the second run and run make, you should be looking for these things:-

A message from configure the URW fonts are not found.
No warnings from BuildFoundries.
Only the default foundry groff fonts (base-35 plus EURO).
check-default-foundry has passed.
check-urw-foundry is not run/skipped.
All pdf docs produced with no unexpected warnings.

If all the above then it is a successful run,

It really concerns me that I see configure is looking in the ghostscript directory for urw-fonts, it must not.

Any fonts supplied by ghostscript do not include .afm files so the U- foundry can't be built, and the missing URW fonts message should be output and @urwfontsdir@ should definitely not be set.

Deri James <deri>
Group Member
Fri 24 Feb 2023 01:08:04 PM UTC, comment #57: 


comment #56:

> Deri,
>
> What should we do about this?  Is it worth gating 1.23.0 final over?


I note that if I un-contrive the test scenario and put things back the way Debian had them, I get a successful build.


checking for URW fonts in Type 1/PFB format... found in /usr/share/ghostscript/9.53.3/Resource/Font
GNU roff version 1.23.0.rc3.25-fc35
----------------------------------------------------------------------
 installation directory prefix    : /home/branden
 C++ compiler and options         : g++ -g -O2
 use libgroff's memory allocator  : no
 C compiler and options           : gcc -g -O2
 Perl interpreter version         : 5.32.1
 X11 support                      : disabled
 'groff -l' uses print spooler    : no
 use URW fonts for PDF output     : yes
 URW fonts directory              : /usr/share/ghostscript/9.53.3/Resource/Font
 preconv can use uchardet library : no
 can build groff.dvi, groff.pdf   : no
 tests can use poppler PDF tools  : no
----------------------------------------------------------------------
...
BuildFoundries: notice: copied grops font ZD
BuildFoundries: notice: copied grops font EURO
  CXXLD    grodvi
  CXXLD    addftinfo
  CXXLD    pfbtops
  CXXLD    grolj4
/home/branden/BUILD/groff-1.23.0.rc3.25-fc35/afmtodit: AGL name 'Delta' already mapped to groff name '*D'; ignoring AGL name 'uni0394'
...
============================================================================
Testsuite summary for GNU roff 1.23.0.rc3.25-fc35
============================================================================
# TOTAL: 163
# PASS:  155
# SKIP:  6
# XFAIL: 2
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/home/branden/BUILD/groff-1.23.0.rc3.25-fc35'
make[2]: Leaving directory '/home/branden/BUILD/groff-1.23.0.rc3.25-fc35'
make[1]: Leaving directory '/home/branden/BUILD/groff-1.23.0.rc3.25-fc35'


So I am not alarmed.

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 01:03:13 PM UTC, comment #56: 

Deri,

What should we do about this?  Is it worth gating 1.23.0 final over?

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 01:01:24 PM UTC, comment #55: 

However the build later fails...


BuildFoundries: notice: copied grops font EURO
BuildFoundries: error: cannot locate AFM file for font 'U-AB'
make[1]: *** [Makefile:14915: font/devpdf/download] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/branden/BUILD/groff-1.23.0.rc3.25-fc35'
make: *** [Makefile:11900: check] Error 2


G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 12:30:53 PM UTC, comment #54: 

ding ding ding ding ding ding ding ding


checking for URW fonts in Type 1/PFB format... found in /usr/share/ghostscript/9.53.3/Resource/Font
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating test-groff
config.status: creating src/include/config.h
config.status: executing depfiles commands

GNU roff version 1.23.0.rc3.23-5712
----------------------------------------------------------------------
 installation directory prefix    : /home/branden
 C++ compiler and options         : g++ -g -O2
 use libgroff's memory allocator  : no
 C compiler and options           : gcc -g -O2
 Perl interpreter version         : 5.32.1
 X11 support                      : disabled
 'groff -l' uses print spooler    : no
 use URW fonts for PDF output     : yes
 URW fonts directory              : /usr/share/ghostscript/9.53.3/Resource/Font
 preconv can use uchardet library : no
 can build groff.dvi, groff.pdf   : no
 tests can use poppler PDF tools  : no
----------------------------------------------------------------------


G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 12:29:11 PM UTC, comment #53: 


> But the search failed anyway.  I'm not sure why.  I'll instrument the macro in m4/groff.m4 that searches and see if I can turn something up.  I'm open to your suggestions as well.


Hold the phone.  This looks straightforward.


    for _font_file in \
      URWGothic-Book.t1 \
      URWGothic-Book.pfb \
      URWGothicL-Book.pfb \
      a010013l.pfb


We don't actually look for "URWGothic-Book" with no extension.

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 12:26:23 PM UTC, comment #52: 

Done.  It appears that the search still fails.


checking for URW fonts in Type 1/PFB format... none found
[...]
GNU roff version 1.23.0.rc3.23-5712
----------------------------------------------------------------------
 installation directory prefix    : /home/branden
 C++ compiler and options         : g++ -g -O2
 use libgroff's memory allocator  : no
 C compiler and options           : gcc -g -O2
 Perl interpreter version         : 5.32.1
 X11 support                      : disabled
 'groff -l' uses print spooler    : no
 use URW fonts for PDF output     : no
 preconv can use uchardet library : no
 can build groff.dvi, groff.pdf   : no
 tests can use poppler PDF tools  : no
----------------------------------------------------------------------
configure: Buggy version of Ghostscript detected.

  Ghostscript versions 9.00 <= x < 9.54 suffer from a rendering glitch
  that affects the AT&T troff (and groff) special character '\(lh'; see
  <https://bugs.ghostscript.com/show_bug.cgi?id=703187>.  If your
  version of Ghostscript has not been patched to fix this problem, you
  may need to work around it in groff documents you render for the
  PostScript (and, for tbl(1) tables, HTML) output devices.

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
  possible.
[...]
$ ls -l /usr/share/ghostscript/9.53.3/Resource
total 40
drwxr-xr-x 2 root root 4096 Feb 16 03:47 CIDFSubst
drwxr-xr-x 2 root root 4096 Feb 16 03:47 CIDFont
lrwxrwxrwx 1 root root   25 Jan  4  2022 CMap -> /var/lib/ghostscript/CMap
drwxr-xr-x 2 root root 4096 Feb 16 03:47 ColorSpace
drwxr-xr-x 2 root root 4096 Feb 16 03:47 Decoding
drwxr-xr-x 2 root root 4096 Feb 16 03:47 Encoding
drwxr-xr-x 2 root root 4096 May 25  2022 Font
drwxr-xr-x 2 root root 4096 Feb 16 03:47 Font~
drwxr-xr-x 2 root root 4096 Feb 16 03:47 IdiomSet
drwxr-xr-x 2 root root 4096 Feb 16 03:47 Init
drwxr-xr-x 2 root root 4096 Feb 16 03:47 SubstCID
$ ls -l /usr/share/ghostscript/9.53.3/Resource/Font~| head -n 3
total 24
lrwxrwxrwx 1 root root 48 Jan  4  2022 C059-BdIta -> ../../../../fonts/type1/urw-base35/C059-BdIta.t1
lrwxrwxrwx 1 root root 47 Jan  4  2022 C059-Bold -> ../../../../fonts/type1/urw-base35/C059-Bold.t1
$ ls -l /usr/share/ghostscript/9.53.3/Resource/Font | head -n 3
total 4448
-rw-r--r-- 1 root root 152585 May 10  2022 C059-BdIta
-rw-r--r-- 1 root root 146014 May 10  2022 C059-Bold


I chrooted anyway.

But the search failed anyway.  I'm not sure why.  I'll instrument the macro in m4/groff.m4 that searches and see if I can turn something up.  I'm open to your suggestions as well.

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 12:12:52 PM UTC, comment #51: 

Hi Branden,

comment #48:

> Hi Deri,
>

[...]

> On Debian, the libgs9-common package ships this empty directory:
>
> /usr/share/ghostscript/9.53.3/Resource/Font
>
> Your suggestion is I think to dump the fonts from the git repo URL above into that directory.
>
> Is that correct?


First move the current .../Font (with the dangling links, because the urw-fonts directory has been "hidden"), then populate Font with the fonts from the ghostscript git.

This should be sufficient to test. I don't think you need to use chroot since the above is easy to undo afterwards.

> I will try that experiment, but if I have misunderstood your procedure, my results will be invalid.


It will only be invalid if the experiment fails. :-)

> I'll let you know.
>
>

Deri James <deri>
Group Member
Fri 24 Feb 2023 12:07:13 PM UTC, comment #50: 

comment #49:

>
> comment #41:
> > Savannah won't upload the fonts archive, so I have put it here:-
> >
> > http://chuzzlewit.co.uk/gs-fonts.tgz
>
> The size limit is meant to be 16mb for an attachment, but it seems to be lower. Unless it is simplistic virus checker which is unable to verify the contents so ignores it.


You might report this issue to savannah-hackers-public at gnu dot org.

I've got the archive, and will start a test in Debian bullseye chroot, with the hacky "defeat" of gs and URW font location in place, shortly.

And thank you--I overlooked comment #41 utterly.

G. Branden Robinson <gbranden>
Group administrator
Fri 24 Feb 2023 11:53:06 AM UTC, comment #49: 


comment #41:

> Savannah won't upload the fonts archive, so I have put it here:-
>
> http://chuzzlewit.co.uk/gs-fonts.tgz


The size limit is meant to be 16mb for an attachment, but it seems to be lower. Unless it is simplistic virus checker which is unable to verify the contents so ignores it.

Deri James <deri>
Group Member
Fri 24 Feb 2023 03:10:16 AM UTC, comment #48: 

Hi Deri,

comment #40:

> > The question I was trying to ask was, "how do I simulate the scenario of URW fonts being absent and Ghostscript being present on the Debian system I'm using for testing?"
> Now, this a good question. So you have hidden your urw-fonts and you now have dangly bits in ghostscript Font directory. cd /usr/share/ghostscript/9.53.3/Resource and rename Font to oFont.Unpack the file gs-fonts.tgz, which I have attached. This will recreate the Font directory with the correct ghostscript supplied fonts (see https://git.ghostscript.com/?p=ghostpdl.git;a=tree;f=Resource/Font;h=6e8be73a12fad07729f5e4a3f7c069d159ad6bfd;hb=HEAD) which are the official ghostscript supplied versions, which debian ignores to save about 5mb of disk space!


Unfortunately there is no such attachment to the bug.  Savannah may have silently thrown it away as it did my attachment to comment #46.

But I can pull the files from https://git.ghostscript.com/?p=ghostpdl.git;a=tree;f=Resource/Font;h=6e8be73a12fad07729f5e4a3f7c069d159ad6bfd and dump them somewhere in a deliberately mangled Debian chroot.

On Debian, the libgs9-common package ships this empty directory:

/usr/share/ghostscript/9.53.3/Resource/Font

Your suggestion is I think to dump the fonts from the git repo URL above into that directory.

Is that correct?

I will try that experiment, but if I have misunderstood your procedure, my results will be invalid.

I'll let you know.


G. Branden Robinson <gbranden>
Group administrator
Wed 22 Feb 2023 12:47:39 AM UTC, comment #47: 

Nope, looks like my attachment was rejected (with no diagnostic).

You can find it at a Dropbox folder of mine, temporarily, under the name "groff-man-pages-1.23.0.rc3-solaris10.pdf".

https://www.dropbox.com/sh/17ftu3z31couf07/AAC_9kq0ZA-Ra2ZhmZFWlLuva?dl=0

G. Branden Robinson <gbranden>
Group administrator
Wed 22 Feb 2023 12:44:29 AM UTC, comment #46: 


comment #44:

> Many thanks for the typescript. It looks like a successful groff build, make succeeded and make check successfully reported that ghostscript fonts were not found. Can you tell whether the groff-man-pages.pdf was Ok, apart from the missing fonts.


Seems fine to me.  I usually check 3 man pages:

grops(1), to see if the typefaces list serves as a demonstration of the fonts named;
gropdf(1), for the same reason;
groff_char(7), to see if there are any unexpected gaps in the glyph list.  (The ones we always warn about, like lunate epison, and the dotless j, which I'd like us to have fallbacks for, are expected.)

Let me see if Savannah will let me attach the PDF.  It is interesting to me that it is about the same size without any embedded fonts, but also without compression--


/export/home/gbranden/groff-1.23.0.rc3-sol10/gropdf: warning: Perl module 'Compress::Zlib' not available; cannot compress this PDF


--as it is with all the fonts found and embedded.

G. Branden Robinson <gbranden>
Group administrator
Tue 21 Feb 2023 06:30:17 PM UTC, comment #45: 


comment #44:

> I would be very interested in receiving a copy of the gs executable from Solaris, even though it is over 9 years out of date.


Sure, why not?  It's under the GPL.  Since this is for forensic purposes, I trust I will be excused from my obligation to provide complete corresponding source code for this executable.  I don't even know if it exists on the host.  If it doesn't, then Oracle has the responsibility under the GPL to provide such source code to any third party.

Attached.

That out of the way, the gs executable is only 10 kB, which seems shockingly lean even if it didn't embed any fonts.  I guess it dlopen()s some stuff?

> There is a slim chance I may be able to extract the fonts and put them in devpdf directory. Worth a look.


Oooh, sneaky.  3:)

> Now the pressure is off for rc3, I hope you can do a proper ghostscript only test on your debian system and report the results.


I'll return to this, but for the moment I have other fires to put out (that I set for myself, sadly).

(file #54388)

G. Branden Robinson <gbranden>
Group administrator
Tue 21 Feb 2023 04:23:52 PM UTC, comment #44: 

Many thanks for the typescript. It looks like a successful groff build, make succeeded and make check successfully reported that ghostscript fonts were not found. Can you tell whether the groff-man-pages.pdf was Ok, apart from the missing fonts.

Can we improve this?

You could test if the fonts are likely to be "in built" by looking for the line:-

"Initialization files are compiled into the executable."

In the output of gs -h, and warn gropdf will be in restricted mode (if additionally URW fonts are not found as well). The same message as used for scenario 00.

Another improvement would be drop the -P-e if we know we are in scenario 00, but still attempt to produce the pdf documentation, this will remove the warnings about failing to embed fonts in the build.

I would be very interested in receiving a copy of the gs executable from Solaris, even though it is over 9 years out of date. There is a slim chance I may be able to extract the fonts and put them in devpdf directory. Worth a look.

Now the pressure is off for rc3, I hope you can do a proper ghostscript only test on your debian system and report the results.

Now back to the logic games!

> > > Then you are saying "urw absent, gs present" is not a supported groff configuration scenario.
> >
> > No I am certainly not! Maybe representing the logic as a truth table may help you:-


> > *Detab gropdf-font-checks
> > C Is Ghostscript available      Y  -
> >   Are URW fonts available       -  Y
> > A Run check-default-foundry.sh  X  X
> >   Run check-urw-foundry.sh      -  X


> It does not, for reasons I'll get to below.

[...]

> I was thinking that because URW donated some fonts to Ghostscript, they should always be available on a Ghostscript installation, though the user may have an alternative/forked/more-up-to-date URW font collection that they would prefer to use.  This makes for two separate dependencies, so 2^2 configuration combinations.

You are perfectly correct there are 4 input scenarios but they produce just 3 results (standard/enhanced/restricted gropdf), and so we have 3 corresponding test scenarios:-

If standard mode expected - scenario 01 (run check-default-foundry.sh)
If enhanced mode expected - scenario 1x (run check-default-foundry.sh AND check-urw-foundry.sh)
If restricted mode expected - scenario 00 (no check required because the base 14 fonts are always available to gropdf).



Deri James <deri>
Group Member
Mon 20 Feb 2023 01:27:35 AM UTC, comment #43: 

Hello again Deri,

Here's the typescript.  Slightly edited to remove irrelevancies, but still has hard CRs on every line and SGR escape sequences from Automake's colorful "autotest" output.

I think you might need to reset your %rom% clock, FWIW...

(file #54382)

G. Branden Robinson <gbranden>
Group administrator
Mon 20 Feb 2023 01:08:24 AM UTC, comment #42: 

comment #40:

> > Then you are saying "urw absent, gs present" is not a supported groff configuration scenario.
>
> No I am certainly not! Maybe representing the logic as a truth table may help you:-


> *Detab gropdf-font-checks
> C Is Ghostscript available      Y  -
>   Are URW fonts available       -  Y
> A Run check-default-foundry.sh  X  X
>   Run check-urw-foundry.sh      -  X


It does not, for reasons I'll get to below.

> From this you can see the default foundry is expected and should be checked if ghostscript is present and if URW fonts are found. If URW fonts are found the U- foundry should be checked as well. How do you get from this logic to gs only not being supported?


I was thinking that because URW donated some fonts to Ghostscript, they should always be available on a Ghostscript installation, though the user may have an alternative/forked/more-up-to-date URW font collection that they would prefer to use.  This makes for two separate dependencies, so 2^2 configuration combinations.

> > The question I was trying to ask was, "how do I simulate the scenario of URW fonts being absent and Ghostscript being present on the Debian system I'm using for testing?"
> Now, this a good question. So you have hidden your urw-fonts and you now have dangly bits in ghostscript Font directory. cd /usr/share/ghostscript/9.53.3/Resource and rename Font to oFont.Unpack the file gs-fonts.tgz, which I have attached. This will recreate the Font directory with the correct ghostscript supplied fonts (see https://git.ghostscript.com/?p=ghostpdl.git;a=tree;f=Resource/Font;h=6e8be73a12fad07729f5e4a3f7c069d159ad6bfd;hb=HEAD) which are the official ghostscript supplied versions, which debian ignores to save about 5mb of disk space!


Let me postpone this for a moment because I found another scenario that exercises the case in question, with NO CONTRIVANCE from me.

That would be the Solaris 11 installation at gcc211.fsffrance.org.

https://cfarm.tetaneutral.net/machines/list/

Ghostscript is present, but no fonts are found, and "gs -h" reports a bunch of directories in which the font files we seek plainly are not present.

> > It sounds now like I actually did manage to do so with my brutal "let the symlinks dangle" technique.
> I'm afraid not, you managed to have a restricted base-14 gropdf, because although you had ghostscript its fonts had been hidden by you.


Well, maybe.  My contrived Debian-based simulation might have been faulty, though I am not yet convinced, but the Solaris 11 case is certainly valid, barring some rogue act of maladministration by whoever has superuser rights on the machine.  I consider the latter unlikely.

> > And moreover the tree as of commit https://git.savannah.gnu.org/cgit/groff.git/commit/?id=206dcc0806b4da9d9d197540f4fa3aa86274d28b did in fact produce the outcome from this scenario (and the other 3 states of urw, gs bits) that you anticipated.
> See above


Again, I think this conclusion must be held in abeyance due to Solaris 11.

> > What was not clear to me at all was that you did not intend for "urw absent, gs present" to be a supported scenario.  (If grubbing through "gs -h" output discovers URW fonts, or finding them in any other way succeeds, it doesn't fall within this configuration.)  Meaning that we expect the automated test suite to fail in that case, and succeed in the other three.
> This is your incorrect assumption (that I don't expect scenario 01 to be supported). It always has been and always works, apart from if you do something which would stop ghostscript from working, by replacing the fonts ghostscript needs with dangles! Even that is supported, but the check will fail and you have a restricted gropdf, but that is still support.


I am prepared to build an older version of groff on Solaris 11 if necessary to explore this claim.
 

> The two tests should never fail in scenarios 01 10 11, and we agreed no test necessary for 00.
> > Somehow that criterion didn't percolate into my brain through the ~38 previous comments to the bug.
> I would change whatever brand of coffee you are drinking since there is a lot of bad steam in your percolating. (It's not a herbal blend, is it?)


It's a brand called "deadline pressure".  I prefer to work without it.

> > I guess I did not say outright that I am only trying to explore the space of supported groff configurations, which is plenty large enough.  The space of unsupported configurations is not interesting to me except insofar as points in it arise in practice often enough to require documentation for our users.
> The space of supported configurations is everything,


Certainly not.  grep the m4/groff.m4 file for AC_MSG_ERROR.  We fail hard in every one of those cases and refuse to even attempt to build groff.

> if you run make you will have a working -T pdf, gropdf will be in one of three modes.
> > I will therefore revert the commit currently at HEAD.  Can I then regard this issue as resolved?  Will you join me in leaving what hairs remain on our scalps intact?  ;-)
> Thank you, I have run a ghostscript only test and the check-default-foundry.sh test ran and passed, all fonts correctly embedded in the groff_man_pages book. Beautiful. Please can you attempt a ghostscript only run with my instructions above, using the official ghostscript font versions, undoing debian's fudge, and report back.


I'm glad you're happy.  I will return momentarily with a typescript of a Solaris 11 build, a test failure report, and some shell commands exploring the Ghostscript installation.

> I'm sure my wife will find alternative ways to foster follicle depillation, so you can stand down.


A romantic partner is like a slug of good whiskey!

G. Branden Robinson <gbranden>
Group administrator
Mon 20 Feb 2023 12:30:54 AM UTC, comment #41: 

Savannah won't upload the fonts archive, so I have put it here:-

http://chuzzlewit.co.uk/gs-fonts.tgz

Deri James <deri>
Group Member
Mon 20 Feb 2023 12:21:05 AM UTC, comment #40: 


> Then you are saying "urw absent, gs present" is not a supported groff configuration scenario.


No I am certainly not! Maybe representing the logic as a truth table may help you:-

*Detab gropdf-font-checks
C Is Ghostscript available      Y  -
  Are URW fonts available       -  Y
A Run check-default-foundry.sh  X  X
  Run check-urw-foundry.sh      -  X

From this you can see the default foundry is expected and should be checked if ghostscript is present and if URW fonts are found. If URW fonts are found the U- foundry should be checked as well. How do you get from this logic to gs only not being supported?

> The question I was trying to ask was, "how do I simulate the scenario of URW fonts being absent and Ghostscript being present on the Debian system I'm using for testing?"

Now, this a good question. So you have hidden your urw-fonts and you now have dangly bits in ghostscript Font directory. cd /usr/share/ghostscript/9.53.3/Resource and rename Font to oFont.Unpack the file gs-fonts.tgz, which I have attached. This will recreate the Font directory with the correct ghostscript supplied fonts (see https://git.ghostscript.com/?p=ghostpdl.git;a=tree;f=Resource/Font;h=6e8be73a12fad07729f5e4a3f7c069d159ad6bfd;hb=HEAD) which are the official ghostscript supplied versions, which debian ignores to save about 5mb of disk space!

> It sounds now like I actually did manage to do so with my brutal "let the symlinks dangle" technique.

I'm afraid not, you managed to have a restricted base-14 gropdf, because although you had ghostscript its fonts had been hidden by you.

> And moreover the tree as of commit https://git.savannah.gnu.org/cgit/groff.git/commit/?id=206dcc0806b4da9d9d197540f4fa3aa86274d28b did in fact produce the outcome from this scenario (and the other 3 states of urw, gs bits) that you anticipated.

See above

> What was not clear to me at all was that you did not intend for "urw absent, gs present" to be a supported scenario.  (If grubbing through "gs -h" output discovers URW fonts, or finding them in any other way succeeds, it doesn't fall within this configuration.)  Meaning that we expect the automated test suite to fail in that case, and succeed in the other three.

This is your incorrect assumption (that I don't expect scenario 01 to be supported). It always has been and always works, apart from if you do something which would stop ghostscript from working, by replacing the fonts ghostscript needs with dangles! Even that is supported, but the check will fail and you have a restricted gropdf, but that is still support.

The two tests should never fail in scenarios 01 10 11, and we agreed no test necessary for 00.

> Somehow that criterion didn't percolate into my brain through the ~38 previous comments to the bug.

I would change whatever brand of coffee you are drinking since there is a lot of bad steam in your percolating. (It's not a herbal blend, is it?)

> I guess I did not say outright that I am only trying to explore the space of supported groff configurations, which is plenty large enough.  The space of unsupported configurations is not interesting to me except insofar as points in it arise in practice often enough to require documentation for our users.

The space of supported configurations is everything, if you run make you will have a working -T pdf, gropdf will be in one of three modes.

> I will therefore revert the commit currently at HEAD.  Can I then regard this issue as resolved?  Will you join me in leaving what hairs remain on our scalps intact?  ;-)

Thank you, I have run a ghostscript only test and the check-default-foundry.sh test ran and passed, all fonts correctly embedded in the groff_man_pages book. Beautiful. Please can you attempt a ghostscript only run with my instructions above, using the official ghostscript font versions, undoing debian's fudge, and report back.

I'm sure my wife will find alternative ways to foster follicle depillation, so you can stand down.

Deri James <deri>
Group Member
Sun 19 Feb 2023 05:11:26 PM UTC, comment #39: 


commit 3cf8b8fde598eba34537d71723325bb2f59d09c5
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Feb 19 10:22:10 2023 -0600

    Revert "[gropdf]: Bifurcate test of font availability."

    This reverts commit 6e001a7f397438d7f09e97155b3c1ec89c1fc855.

    Per Deri James, having a Ghostscript executable installed but not a full
    set of PostScript level 2 font files installed (the "base 35" plus
    groff's "EURO") in discoverable places is _not_ a supported groff
    configuration scenario as far as gropdf is concerned.

    A test failure is therefore expected in that case.


G. Branden Robinson <gbranden>
Group administrator
Sun 19 Feb 2023 04:14:45 PM UTC, comment #38: 

comment #37:

> > Here's what I need to know.
>
> > A) Is it even valid to try to test gropdf with 'gs' available but "no URW fonts"?  You explained in comment #7 that URW fonts were donated to Ghostscript.  That they might be forked or separately maintained in variant forms is not strongly relevant, except for the file name and directory changes that have proven otherwise frustrating.
>
> Definitely. Although in debian the fonts associated with ghostscript are the same files as you would get if you installed the URW fonts as a separate package without ghostscript, in other linux distros such as the one I use, they are different versions. You can just install ghostscript and the fonts are available, without the relevent afm files, no symlinks. So anyone using a distro like mine who installs ghostscript (common) will be able to have standard gropdf. On your system (debian) if ghostscript is installed you will always get extended gropdf, so I understand your question, but we have to cater for distros which don't follow the debian way.


I agree.  That leads to the question I didn't ask quite clearly...
 

> Version could be relevant if glyph coverage is different.


(Quite so.)
 

> > B) If it is, what does that test scenario look like?
>
> As in comment #3, but I will update it to current nomenclature.


> if gs or urw
>     run check-default-foundry.sh
>     if urw
>         run check-urw-foundry.sh
>     end
> end


> In both cases you are looking for the 35 groff fonts, and additionally EURO in the default foundry. If any are not found then the test fails.


Then you are saying "urw absent, gs present" is not a supported groff configuration scenario.

The question I was trying to ask was, "how do I simulate the scenario of URW fonts being absent and Ghostscript being present on the Debian system I'm using for testing?"

It sounds now like I actually did manage to do so with my brutal "let the symlinks dangle" technique.

And moreover the tree as of commit https://git.savannah.gnu.org/cgit/groff.git/commit/?id=206dcc0806b4da9d9d197540f4fa3aa86274d28b did in fact produce the outcome from this scenario (and the other 3 states of urw, gs bits) that you anticipated.

What was not clear to me at all was that you did not intend for "urw absent, gs present" to be a supported scenario.  (If grubbing through "gs -h" output discovers URW fonts, or finding them in any other way succeeds, it doesn't fall within this configuration.)  Meaning that we expect the automated test suite to fail in that case, and succeed in the other three.

Somehow that criterion didn't percolate into my brain through the ~38 previous comments to the bug.

I guess I did not say outright that I am only trying to explore the space of supported groff configurations, which is plenty large enough.  The space of unsupported configurations is not interesting to me except insofar as points in it arise in practice often enough to require documentation for our users.

I will therefore revert the commit currently at HEAD.  Can I then regard this issue as resolved?  Will you join me in leaving what hairs remain on our scalps intact?  ;-)

G. Branden Robinson <gbranden>
Group administrator
Sun 19 Feb 2023 02:02:05 PM UTC, comment #37: 


> Here's what I need to know.


> A) Is it even valid to try to test gropdf with 'gs' available but "no URW fonts"?  You explained in comment #7 that URW fonts were donated to Ghostscript.  That they might be forked or separately maintained in variant forms is not strongly relevant, except for the file name and directory changes that have proven otherwise frustrating.


Definitely. Although in debian the fonts associated with ghostscript are the same files as you would get if you installed the URW fonts as a separate package without ghostscript, in other linux distros such as the one I use, they are different versions. You can just install ghostscript and the fonts are available, without the relevent afm files, no symlinks. So anyone using a distro like mine who installs ghostscript (common) will be able to have standard gropdf. On your system (debian) if ghostscript is installed you will always get extended gropdf, so I understand your question, but we have to cater for distros which don't follow the debian way.

Version could be relevant if glyph coverage is different.

> B) If it is, what does that test scenario look like?


As in comment #3, but I will update it to current nomenclature.

if gs or urw
    run check-default-foundry.sh
    if urw
        run check-urw-foundry.sh
    end
end

In both cases you are looking for the 35 groff fonts, and additionally EURO in the default foundry. If any are not found then the test fails.

Deri James <deri>
Group Member
Sun 19 Feb 2023 05:00:48 AM UTC, comment #36: 

Hi Deri,

comment #35:

> comment #29:
> I referred to this in comment #12, you hobbled your test to make it pass! And now you want to hobble it again:-
>
> > So I guess this means that maybe the check-default-foundry.sh test needs to be re-hobbled.
>
> Wow!! Aren't you interested to work out why it only fails on your system?


I believe I figured that out when I discovered the broken symlinks

> I would guess it may be to do with you making the urw-fonts ”unavailable" to do a ghostscript only run, thus making your links dangle, rather than a foul debian plot!
>
> If I look at libgs9-common it has fonts-urw-base35 as a dependency:-


> dietpi@tvhnew:~ $ apt show libgs9-common
> Package: libgs9-common
> Version: 9.53.3~dfsg-7+deb11u2
> Priority: optional
> Section: libs
> Source: ghostscript
> Maintainer: Debian Printing Team <debian-printing@lists.debian.org>
> Installed-Size: 3,108 kB
> Depends: fonts-urw-base35 (>= 20200910)
> Recommends: fonts-droid-fallback
> Homepage: https://www.ghostscript.com/
> Tag: role::shared-lib
> Download-Size: 734 kB
> APT-Manual-Installed: no
> APT-Sources: https://deb.debian.org/debian bullseye/main arm64 Packages
> Description: interpreter for the PostScript language and for PDF - common files


I agree that Debian's not doing anything crazy here.  I did something fairly brutal to construct a test scenario: "urw absent, gs present".

> Did you think it was? No, it has always been a way of harvesting paths which may contain suitable fonts.


I agree that it may be useful for that purpose.

> > Distributors like Debian go out of their way to ensure that you can have that executable on the system without the fonts being present.
>
> I have seen evidence to the contrary, debian make the fonts a dependency of ghostscript. Due to your testing methodology, you divorced the fonts from ghostscript.


You are correct here; I forgot to check the package dependencies.  The last time I did a lot of chrooted builds, last summer, I did use the package removal and re-installation approach.

I didn't this time for one not-so-good reason and one better one.

The not-so-good reason is that I am working under time pressure.  Bertrand is not available all the time so I feel I have to get things suitable for RC tagging when he is.

The better reason, I'll get to below.

> > And if the fonts are built into the executable--if I remember correctly, this is the %rom% thing--then we don't have a good way of knowing whether this is the case.  Not without writing a much more elaborate Autoconf test that really uses Ghostscript to generate a PostScript document and then parses it, perhaps.
>
> I don't think I've seen the %rom% for 20 years and with the speed of modern SSDs I can't really see anyone resurrecting it.


Okay.

> I don't see how you you could determine whether the original source of a font came from accessing a file or internally by parsing postscript!


I wasn't sure either; I don't know PostScript, but it occurs to me that Ghostscript could, were it written to do so, leave comments in resource inclusions or requirement statements disclosing their provenance.

> This does not make any sense you are hobbling check-default-foundry.sh, so that it does not fail if someone deletes/renames their fonts. If they do that it should fail. As I say to all passing dogs: "Don't bifurcate on my lawn!".


Dogs will have no trouble honoring this prohibition.  Amebas, on the other hand...
 

> Here's the listing of the ghostscript font directory on my system (non-debian, real maniy files, no soft links here):-


> [derij@pip build (master)]$ ll /usr/share/ghostscript/9.53.3/Resource/Font/
> total 4448
> -rw-r--r-- 1 root root 152585 May 10  2022 C059-BdIta
> -rw-r--r-- 1 root root 146014 May 10  2022 C059-Bold
> -rw-r--r-- 1 root root 148928 May 10  2022 C059-Italic
> -rw-r--r-- 1 root root 145084 May 10  2022 C059-Roman
> -rw-r--r-- 1 root root  43343 May 10  2022 D050000L
> -rw-r--r-- 1 root root 155992 May 10  2022 NimbusMonoPS-Bold
> -rw-r--r-- 1 root root 154177 May 10  2022 NimbusMonoPS-BoldItalic
> -rw-r--r-- 1 root root 142983 May 10  2022 NimbusMonoPS-Italic
> -rw-r--r-- 1 root root 140353 May 10  2022 NimbusMonoPS-Regular
> -rw-r--r-- 1 root root 133004 May 10  2022 NimbusRoman-Bold
> -rw-r--r-- 1 root root 140953 May 10  2022 NimbusRoman-BoldItalic
> -rw-r--r-- 1 root root 142085 May 10  2022 NimbusRoman-Italic
> -rw-r--r-- 1 root root 133527 May 10  2022 NimbusRoman-Regular
> -rw-r--r-- 1 root root 107795 May 10  2022 NimbusSans-Bold
> -rw-r--r-- 1 root root 123308 May 10  2022 NimbusSans-BoldItalic
> -rw-r--r-- 1 root root 120927 May 10  2022 NimbusSans-Italic
> -rw-r--r-- 1 root root 106239 May 10  2022 NimbusSansNarrow-Bold
> -rw-r--r-- 1 root root 109815 May 10  2022 NimbusSansNarrow-BoldOblique
> -rw-r--r-- 1 root root 107359 May 10  2022 NimbusSansNarrow-Oblique
> -rw-r--r-- 1 root root 104252 May 10  2022 NimbusSansNarrow-Regular
> -rw-r--r-- 1 root root 104001 May 10  2022 NimbusSans-Regular
> -rw-r--r-- 1 root root 162196 May 10  2022 P052-Bold
> -rw-r--r-- 1 root root 163906 May 10  2022 P052-BoldItalic
> -rw-r--r-- 1 root root 161531 May 10  2022 P052-Italic
> -rw-r--r-- 1 root root 159843 May 10  2022 P052-Roman
> -rw-r--r-- 1 root root  31444 May 10  2022 StandardSymbolsPS
> -rw-r--r-- 1 root root 137163 May 10  2022 URWBookman-Demi
> -rw-r--r-- 1 root root 142686 May 10  2022 URWBookman-DemiItalic
> -rw-r--r-- 1 root root 137614 May 10  2022 URWBookman-Light
> -rw-r--r-- 1 root root 143233 May 10  2022 URWBookman-LightItalic
> -rw-r--r-- 1 root root 100637 May 10  2022 URWGothic-Book
> -rw-r--r-- 1 root root 102403 May 10  2022 URWGothic-BookOblique
> -rw-r--r-- 1 root root 103428 May 10  2022 URWGothic-Demi
> -rw-r--r-- 1 root root 105110 May 10  2022 URWGothic-DemiOblique
> -rw-r--r-- 1 root root 166540 May 10  2022 Z003-MediumItalic


> Thanks for your help, almost there, just un-bifurcate the check.


Here's what I need to know.

A) Is it even valid to try to test gropdf with 'gs' available but "no URW fonts"?  You explained in comment #7 that URW fonts were donated to Ghostscript.  That they might be forked or separately maintained in variant forms is not strongly relevant, except for the file name and directory changes that have proven otherwise frustrating.

B) If it is, what does that test scenario look like?

G. Branden Robinson <gbranden>
Group administrator
Sun 19 Feb 2023 02:52:47 AM UTC, comment #35: 

comment #29:

> Hi Deri,
>
> My diagnosis in comment #28 appears to have been correct.
>
> There is a problem with checking all 35 fonts in the default foundry for gropdf in the "urw absent, gs present" scenario.
>
> It seems the non-base-14 font descriptions are not being copied to font/devpdf/


I referred to this in comment #12, you hobbled your test to make it pass! And now you want to hobble it again:-

> So I guess this means that maybe the check-default-foundry.sh test needs to be re-hobbled.


Wow!! Aren't you interested to work out why it only fails on your system? I would guess it may be to do with you making the urw-fonts ”unavailable" to do a ghostscript only run, thus making your links dangle, rather than a foul debian plot!

If I look at libgs9-common it has fonts-urw-base35 as a dependency:-

dietpi@tvhnew:~ $ apt show libgs9-common
Package: libgs9-common
Version: 9.53.3~dfsg-7+deb11u2
Priority: optional
Section: libs
Source: ghostscript
Maintainer: Debian Printing Team <debian-printing@lists.debian.org>
Installed-Size: 3,108 kB
Depends: fonts-urw-base35 (>= 20200910)
Recommends: fonts-droid-fallback
Homepage: https://www.ghostscript.com/
Tag: role::shared-lib
Download-Size: 734 kB
APT-Manual-Installed: no
APT-Sources: https://deb.debian.org/debian bullseye/main arm64 Packages
Description: interpreter for the PostScript language and for PDF - common files


> I think what this is is establishing is that the presence of the "gs" command is a bad proxy for the presence of downloadable font file.


Did you think it was? No, it has always been a way of harvesting paths which may contain suitable fonts.

> Distributors like Debian go out of their way to ensure that you can have that executable on the system without the fonts being present.


I have seen evidence to the contrary, debian make the fonts a dependency of ghostscript. Due to your testing methodology, you divorced the fonts from ghostscript.

> And if the fonts are built into the executable--if I remember correctly, this is the %rom% thing--then we don't have a good way of knowing whether this is the case.  Not without writing a much more elaborate Autoconf test that really uses Ghostscript to generate a PostScript document and then parses it, perhaps.


I don't think I've seen the %rom% for 20 years and with the speed of modern SSDs I can't really see anyone resurrecting it. I don't see how you you could determine whether the original source of a font came from accessing a file or internally by parsing postscript!

> Bertrand said he's available to tag RC3 tomorrow so what I think I will do is internally modify check-default-foundry.sh to have two tests: one for the base 14+EURO and one for the rest.  The test will be skipped if the remainder are missing.  Maybe that will be enough of a clue to check things out for the user who goes to the trouble of running "make check" at all.


This does not make any sense you are hobbling check-default-foundry.sh, so that it does not fail if someone deletes/renames their fonts. If they do that it should fail. As I say to all passing dogs: "Don't bifurcate on my lawn!".

Here's the listing of the ghostscript font directory on my system (non-debian, real maniy files, no soft links here):-

[derij@pip build (master)]$ ll /usr/share/ghostscript/9.53.3/Resource/Font/
total 4448
-rw-r--r-- 1 root root 152585 May 10  2022 C059-BdIta
-rw-r--r-- 1 root root 146014 May 10  2022 C059-Bold
-rw-r--r-- 1 root root 148928 May 10  2022 C059-Italic
-rw-r--r-- 1 root root 145084 May 10  2022 C059-Roman
-rw-r--r-- 1 root root  43343 May 10  2022 D050000L
-rw-r--r-- 1 root root 155992 May 10  2022 NimbusMonoPS-Bold
-rw-r--r-- 1 root root 154177 May 10  2022 NimbusMonoPS-BoldItalic
-rw-r--r-- 1 root root 142983 May 10  2022 NimbusMonoPS-Italic
-rw-r--r-- 1 root root 140353 May 10  2022 NimbusMonoPS-Regular
-rw-r--r-- 1 root root 133004 May 10  2022 NimbusRoman-Bold
-rw-r--r-- 1 root root 140953 May 10  2022 NimbusRoman-BoldItalic
-rw-r--r-- 1 root root 142085 May 10  2022 NimbusRoman-Italic
-rw-r--r-- 1 root root 133527 May 10  2022 NimbusRoman-Regular
-rw-r--r-- 1 root root 107795 May 10  2022 NimbusSans-Bold
-rw-r--r-- 1 root root 123308 May 10  2022 NimbusSans-BoldItalic
-rw-r--r-- 1 root root 120927 May 10  2022 NimbusSans-Italic
-rw-r--r-- 1 root root 106239 May 10  2022 NimbusSansNarrow-Bold
-rw-r--r-- 1 root root 109815 May 10  2022 NimbusSansNarrow-BoldOblique
-rw-r--r-- 1 root root 107359 May 10  2022 NimbusSansNarrow-Oblique
-rw-r--r-- 1 root root 104252 May 10  2022 NimbusSansNarrow-Regular
-rw-r--r-- 1 root root 104001 May 10  2022 NimbusSans-Regular
-rw-r--r-- 1 root root 162196 May 10  2022 P052-Bold
-rw-r--r-- 1 root root 163906 May 10  2022 P052-BoldItalic
-rw-r--r-- 1 root root 161531 May 10  2022 P052-Italic
-rw-r--r-- 1 root root 159843 May 10  2022 P052-Roman
-rw-r--r-- 1 root root  31444 May 10  2022 StandardSymbolsPS
-rw-r--r-- 1 root root 137163 May 10  2022 URWBookman-Demi
-rw-r--r-- 1 root root 142686 May 10  2022 URWBookman-DemiItalic
-rw-r--r-- 1 root root 137614 May 10  2022 URWBookman-Light
-rw-r--r-- 1 root root 143233 May 10  2022 URWBookman-LightItalic
-rw-r--r-- 1 root root 100637 May 10  2022 URWGothic-Book
-rw-r--r-- 1 root root 102403 May 10  2022 URWGothic-BookOblique
-rw-r--r-- 1 root root 103428 May 10  2022 URWGothic-Demi
-rw-r--r-- 1 root root 105110 May 10  2022 URWGothic-DemiOblique
-rw-r--r-- 1 root root 166540 May 10  2022 Z003-MediumItalic

Thanks for your help, almost there, just un-bifurcate the check.

Deri James <deri>
Group Member
Sat 18 Feb 2023 11:04:04 PM UTC, comment #34: 


commit 38570563840748c7ae5a0a5c1514a9f0b1fdf91a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 01:37:28 2023 -0600

    [gropdf]: Revise tests to be foundry-focussed.

    * font/devpdf/tests/basic-fonts-present.sh: Stop trying to match font
      descriptions in the "devps" directory with ones in "devpdf"; instead,
      test whether "BuildFoundries" did its job.  Test for font descriptions
      corresponding to the full 35 PostScript Level 2 font repertoire, plus
      groff's "EURO".

    * font/devpdf/tests/urw-fonts-present.sh: Drop stale comment and rename
      variable for better parallelism with the other test above.

    Continues <https://savannah.gnu.org/bugs/?63808>.  Thanks to Deri James
    for the continued discussion.

commit 00b5b3803332abe0557c54b1cf8f5b78baf1329b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 01:41:29 2023 -0600

    [gropdf]: Rename tests.

    ...to more accurately characterize their purpose.

    * font/devpdf/tests/basic-fonts-present.sh:
    * font/devpdf/tests/urw-fonts-present.sh: Rename these...

    * font/devpdf/tests/check-default-foundry.sh:
    * font/devpdf/tests/check-urw-foundry.sh: ...to these.

    * font/devpdf/devpdf.am (font_devpdf_TESTS): Reflect rename.

commit e3954e5b15ae956c2ee7f98c8f323bfa9172e5a3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 02:04:00 2023 -0600

    [gropdf]: Don't test if hobbled.

    [gropdf]: Don't run automated tests if 'gropdf' will be operating with
    reduced function.  If neither Ghostscript nor the URW fonts are
    available at configuration time, there is no point testing for
ccessful build-time population of the font descriptions for the
    default and URW foundries.

    * font/devpdf/devpdf.am (font_devpdf_TESTS) [USE_GROPDF]: Run
      "check-default-foundry" only if gropdf is fully functional.

      (font_devpdf_TESTS) [USE_GROPDF && HAVE_URW_FONTS]: Run
      "check-urw-foundry" only if the URW fonts were found.

    Continues <https://savannah.gnu.org/bugs/?63808>.  Thanks to Deri James
    for the continued discussion.

commit 03640de878b4b362bce18af6bea008bd4d2bb3be
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 02:50:51 2023 -0600

    [build]: Rename GROFF_CHECK_GROPDF_PROGRAMS macro.

    [build]: Rename `GROFF_CHECK_GROPDF_PROGRAMS` macro to
    `GROFF_GROPDF_DEPENDENCIES_CHECK` to generalize for greater accuracy in
    forthcoming change.

    * configure.ac:
    * m4/groff.m4: Do it.

commit ec001d2a23a3b1740e8d004006c0fc0d7fb6e288
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 02:58:41 2023 -0600

    [build]: Detangle pdfroff, gropdf config (1/2).

    * m4/groff.m4 (GROFF_GROPDF_DEPENDENCIES_CHECK): Add `AC_REQUIRE`ment on
      `GROFF_URW_FONTS_CHECK`.  Per discussion with Deri James, if _either_
      Ghostscript or the URW fonts are avilable, gropdf will be fully
      functional, consequent to commit d5515, 22 June.  Drop dependency on
      awk; it is used only at configuration time (in an Autoconf macro) and
      since Savannah #62775 was resolved (19 September), it has not been
      strictly necessary.  (It is useful for searching more locations for
      URW fonts, but several others are searched even if it is absent.)
      Stop populating notice text here, instead moving it...

      (GROFF_GROPDF_PROGRAM_NOTICE): ...here, since it no longer needs to be
      dynamically constructed.

    Continues <https://savannah.gnu.org/bugs/?63808>.  Thanks to Deri James
    for the continued discussion.

commit 8316578166a73de1db05c555e640e9153ddc8d5d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 11:55:02 2023 -0600

    [build]: Detangle pdfroff, gropdf config (2/2).

    * m4/groff.m4: Give pdfroff its own Autoconf macros to handle dependency
      checking, build objectives, and user notice.

      (GROFF_PDFROFF_DEPENDENCIES_CHECK): New macro requires
      `GROFF_AWK_PATH` and `GROFF_GHOSTSCRIPT_PATH`, determines whether
      pdfroff can be used at build time, and (if not) constructs part of
      message to be shown to user explaining why.

      (GROFF_PDFROFF_PROGRAM_NOTICE): New macro requires
      `GROFF_PDFROFF_DEPENDENCIES_CHECK` and emits message if needed.

      (GROFF_GHOSTSCRIPT_AVAILABILITY_NOTICE): Drop mention of impact on
      pdfroff since its dedicated notice covers this now.

    * configure.ac: Call the new macros at appropriate times.  Produce a new
      Automake macro, `USE_PDFROFF`, to replace inapposite use of
      `USE_GROPDF` in pdfmark.am.

    * contrib/pdfmark/pdfmark.am: Use `USE_PDFROFF` instead of `USE_GROPDF`.

commit 1ebdadc467436efb22ccf3c0dafef6a512a04914
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 13:42:51 2023 -0600

    [build]: Uninstall more fastidiously.

    Try to remove the configured PDF documentation directory in the event it
    is empty, but do not fail if it isn't.  (It can be a directory shared
    with other groff components; we don't know in what order the uninstall
    targets will serialize, but the last one run should succeed.)

    * contrib/mom/mom.am (uninstall_mom):
    * contrib/pdfmark/pdfmark.am (uninstall-pdfmark-hook):
    * contrib/sboxes/sboxes.am (uninstall_sboxes):
    * doc/doc.am (uninstall-pdf): Do it.

commit 206dcc0806b4da9d9d197540f4fa3aa86274d28b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 14:30:45 2023 -0600

    [gropdf]: Recognize more URW file names.

    * font/devpdf/Foundry.in: Recognize URW foundry replacements for
      Helvetica Bold-Oblique and Helvetica Oblique under the file names
      "NimbusSans-BoldItalic.t1" and "NimbusSans-Italic.t1", respectively.

commit 6e001a7f397438d7f09e97155b3c1ec89c1fc855
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 16:44:08 2023 -0600

    [gropdf]: Bifurcate test of font availability.

    * font/devpdf/tests/check-default-foundry.sh: Bifurcate test of font
      availability.  The Ghostscript executable can be present in the host
      environment without any Type 1 fonts.  The PDF standard requires that
      its base 14 be present in the renderer, so groff font descriptions for
      those 14 fonts (plus groff's "EURO" font) should always be available.
      But the remaining fonts from the "Base 35" PostScript level 2 set
      won't necessarily be, and so their font descriptions won't be, either.
      Skip the test rather than failing it in that case, because the
      Ghostscript executable can have any number of fonts built-in (in
      "%rom%" as "gs -h" puts it).  We'll need a more sophisticated Autoconf
      test to discern this scenario from a true failure case.


Typescript of four successful build scenarios (with and without Ghostscript and URW fonts) attached.

(file #54381)

G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 10:30:21 PM UTC, comment #33: 

Oh, and don't worry--I won't commit that "GBR" debugging crap.

G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 10:29:11 PM UTC, comment #32: 

I think what this is is establishing is that the presence of the "gs" command is a bad proxy for the presence of downloadable font file.

Distributors like Debian go out of their way to ensure that you can have that executable on the system without the fonts being present.

And if the fonts are built into the executable--if I remember correctly, this is the %rom% thing--then we don't have a good way of knowing whether this is the case.  Not without writing a much more elaborate Autoconf test that really uses Ghostscript to generate a PostScript document and then parses it, perhaps.

Bertrand said he's available to tag RC3 tomorrow so what I think I will do is internally modify check-default-foundry.sh to have two tests: one for the base 14+EURO and one for the rest.  The test will be skipped if the remainder are missing.  Maybe that will be enough of a clue to check things out for the user who goes to the trouble of running "make check" at all.

There's one more thing before I forget:


BuildFoundries: notice: copied grops font TR
BuildFoundries: GBR: LocateFile("ARRAY(0x55937cdc5598)", "ZCMI", 0)
BuildFoundries: GBR: LocateFile did not return early
BuildFoundries: GBR: LocateFile: checking directory $p="/home/branden/BUILD/groff-1.23.0.rc2.87-206dc/font/devps"
BuildFoundries: GBR: LocateFile: checking file for pathfulness $file="ZCMI"
BuildFoundries: GBR: LocateFile: trying to read $p/$file=/home/branden/BUILD/groff-1.23.0.rc2.87-206dc/font/devps/ZCMI
BuildFoundries: GBR: LocateFile: returning $p/$file=/home/branden/BUILD/groff-1.23.0.rc2.87-206dc/font/devps/ZCMI
BuildFoundries: GBR: LoadFoundry: psfont="ZapfChancery-MediumItalic", gropsfnt="/home/branden/BUILD/groff-1.23.0.rc2.87-206dc/font/devps/ZCMI"

BuildFoundries: GBR: LocatePF: looking for $path="ARRAY(0x55937cdc1cb8)", $file="Z003-MediumItalic.t1!Z003-MediumItalic!URWChanceryL-MediItal!z003034l.pfb"
BuildFoundries: GBR: LocateFile("ARRAY(0x55937cdc1cb8)", "Z003-MediumItalic.t1!Z003-MediumItalic!URWChanceryL-MediItal!z003034l.pfb", 0)
BuildFoundries: GBR: LocateFile did not return early
BuildFoundries: GBR: LocateFile: checking directory $p="@urwfontsdir@"
BuildFoundries: GBR: LocateFile: checking file for pathfulness $file="z003034l.pfb"
BuildFoundries: GBR: LocateFile: trying to read $p/$file=@urwfontsdir@/z003034l.pfb


"@urwfontsdir@" should not be getting left in the Foundry file as a literal.  If its expansion is empty, it (and the path separator after it) should be removed from the generated file.

I don't think this is a big deal, and certainly not release-critical.  But we should tidy it up at some point.

G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 10:19:30 PM UTC, comment #31: 

Ah.  One problem is that the Debian libgs9-common package installs potentially broken symlinks.  (!)


$ dpkg -S /usr/share/ghostscript/9.53.3/Resource/Font/Z003-MediumItalic
libgs9-common: /usr/share/ghostscript/9.53.3/Resource/Font/Z003-MediumItalic
$ ls -l /usr/share/ghostscript/9.53.3/Resource/Font/Z003-MediumItalic
lrwxrwxrwx 1 root root 55 Jan  4  2022 /usr/share/ghostscript/9.53.3/Resource/Font/Z003-MediumItalic -> ../../../../fonts/type1/urw-base35/Z003-MediumItalic.t1
$ cd /usr/share/ghostscript/9.53.3/Resource/Font/
$ ls -l ../../../../fonts/type1/urw-base35/Z003-MediumItalic.t1
ls: cannot access '../../../../fonts/type1/urw-base35/Z003-MediumItalic.t1': No such file or directory


But the Perl logic is written correctly; if (-r) fails.

So I guess this means that maybe the check-default-foundry.sh test needs to be re-hobbled.


$ ls -l /usr/share/ghostscript/9.53.3/Resource/Font/
total 24
lrwxrwxrwx 1 root root 48 Jan  4  2022 C059-BdIta -> ../../../../fonts/type1/urw-base35/C059-BdIta.t1
lrwxrwxrwx 1 root root 47 Jan  4  2022 C059-Bold -> ../../../../fonts/type1/urw-base35/C059-Bold.t1
lrwxrwxrwx 1 root root 49 Jan  4  2022 C059-Italic -> ../../../../fonts/type1/urw-base35/C059-Italic.t1
lrwxrwxrwx 1 root root 48 Jan  4  2022 C059-Roman -> ../../../../fonts/type1/urw-base35/C059-Roman.t1
lrwxrwxrwx 1 root root 46 Jan  4  2022 D050000L -> ../../../../fonts/type1/urw-base35/D050000L.t1
lrwxrwxrwx 1 root root 55 Jan  4  2022 NimbusMonoPS-Bold -> ../../../../fonts/type1/urw-base35/NimbusMonoPS-Bold.t1
lrwxrwxrwx 1 root root 61 Jan  4  2022 NimbusMonoPS-BoldItalic -> ../../../../fonts/type1/urw-base35/NimbusMonoPS-BoldItalic.t1
lrwxrwxrwx 1 root root 57 Jan  4  2022 NimbusMonoPS-Italic -> ../../../../fonts/type1/urw-base35/NimbusMonoPS-Italic.t1
lrwxrwxrwx 1 root root 58 Jan  4  2022 NimbusMonoPS-Regular -> ../../../../fonts/type1/urw-base35/NimbusMonoPS-Regular.t1
lrwxrwxrwx 1 root root 54 Jan  4  2022 NimbusRoman-Bold -> ../../../../fonts/type1/urw-base35/NimbusRoman-Bold.t1
lrwxrwxrwx 1 root root 60 Jan  4  2022 NimbusRoman-BoldItalic -> ../../../../fonts/type1/urw-base35/NimbusRoman-BoldItalic.t1
lrwxrwxrwx 1 root root 56 Jan  4  2022 NimbusRoman-Italic -> ../../../../fonts/type1/urw-base35/NimbusRoman-Italic.t1
lrwxrwxrwx 1 root root 57 Jan  4  2022 NimbusRoman-Regular -> ../../../../fonts/type1/urw-base35/NimbusRoman-Regular.t1
lrwxrwxrwx 1 root root 53 Jan  4  2022 NimbusSans-Bold -> ../../../../fonts/type1/urw-base35/NimbusSans-Bold.t1
lrwxrwxrwx 1 root root 59 Jan  4  2022 NimbusSans-BoldItalic -> ../../../../fonts/type1/urw-base35/NimbusSans-BoldItalic.t1
lrwxrwxrwx 1 root root 55 Jan  4  2022 NimbusSans-Italic -> ../../../../fonts/type1/urw-base35/NimbusSans-Italic.t1
lrwxrwxrwx 1 root root 56 Jan  4  2022 NimbusSans-Regular -> ../../../../fonts/type1/urw-base35/NimbusSans-Regular.t1
lrwxrwxrwx 1 root root 59 Jan  4  2022 NimbusSansNarrow-Bold -> ../../../../fonts/type1/urw-base35/NimbusSansNarrow-Bold.t1
lrwxrwxrwx 1 root root 66 Jan  4  2022 NimbusSansNarrow-BoldOblique -> ../../../../fonts/type1/urw-base35/NimbusSansNarrow-BoldOblique.t1
lrwxrwxrwx 1 root root 62 Jan  4  2022 NimbusSansNarrow-Oblique -> ../../../../fonts/type1/urw-base35/NimbusSansNarrow-Oblique.t1
lrwxrwxrwx 1 root root 62 Jan  4  2022 NimbusSansNarrow-Regular -> ../../../../fonts/type1/urw-base35/NimbusSansNarrow-Regular.t1
lrwxrwxrwx 1 root root 47 Jan  4  2022 P052-Bold -> ../../../../fonts/type1/urw-base35/P052-Bold.t1
lrwxrwxrwx 1 root root 53 Jan  4  2022 P052-BoldItalic -> ../../../../fonts/type1/urw-base35/P052-BoldItalic.t1
lrwxrwxrwx 1 root root 49 Jan  4  2022 P052-Italic -> ../../../../fonts/type1/urw-base35/P052-Italic.t1
lrwxrwxrwx 1 root root 48 Jan  4  2022 P052-Roman -> ../../../../fonts/type1/urw-base35/P052-Roman.t1
lrwxrwxrwx 1 root root 55 Jan  4  2022 StandardSymbolsPS -> ../../../../fonts/type1/urw-base35/StandardSymbolsPS.t1
lrwxrwxrwx 1 root root 53 Jan  4  2022 URWBookman-Demi -> ../../../../fonts/type1/urw-base35/URWBookman-Demi.t1
lrwxrwxrwx 1 root root 59 Jan  4  2022 URWBookman-DemiItalic -> ../../../../fonts/type1/urw-base35/URWBookman-DemiItalic.t1
lrwxrwxrwx 1 root root 54 Jan  4  2022 URWBookman-Light -> ../../../../fonts/type1/urw-base35/URWBookman-Light.t1
lrwxrwxrwx 1 root root 60 Jan  4  2022 URWBookman-LightItalic -> ../../../../fonts/type1/urw-base35/URWBookman-LightItalic.t1
lrwxrwxrwx 1 root root 52 Jan  4  2022 URWGothic-Book -> ../../../../fonts/type1/urw-base35/URWGothic-Book.t1
lrwxrwxrwx 1 root root 59 Jan  4  2022 URWGothic-BookOblique -> ../../../../fonts/type1/urw-base35/URWGothic-BookOblique.t1
lrwxrwxrwx 1 root root 52 Jan  4  2022 URWGothic-Demi -> ../../../../fonts/type1/urw-base35/URWGothic-Demi.t1
lrwxrwxrwx 1 root root 59 Jan  4  2022 URWGothic-DemiOblique -> ../../../../fonts/type1/urw-base35/URWGothic-DemiOblique.t1
lrwxrwxrwx 1 root root 55 Jan  4  2022 Z003-MediumItalic -> ../../../../fonts/type1/urw-base35/Z003-MediumItalic.t1


G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 09:40:45 PM UTC, comment #30: 

This is the really telling part.  BuildFoundries did warn us...


$ cat font/devpdf/download
# foundry       ps-font-name    ps-font-file
# A blank foundry is the default.

        FreeEuro        ../devps/freeeuro.pfa


G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 09:25:23 PM UTC, comment #29: 

Hi Deri,

My diagnosis in comment #28 appears to have been correct.

There is a problem with checking all 35 fonts in the default foundry for gropdf in the "urw absent, gs present" scenario.

It seems the non-base-14 font descriptions are not being copied to font/devpdf/

Here's some post-mortem info.


FAIL: font/devpdf/tests/check-default-foundry.sh
...
============================================================================
Testsuite summary for GNU roff 1.23.0.rc2.87-206dc
============================================================================
# TOTAL: 160
# PASS:  153
# SKIP:  4
# XFAIL: 2
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to http://savannah.gnu.org/bugs/?group=groff
============================================================================
make[3]: *** [Makefile:10433: test-suite.log] Error 1
make[3]: Leaving directory '/home/branden/BUILD/groff-1.23.0.rc2.87-206dc'
make[2]: *** [Makefile:10541: check-TESTS] Error 2
make[2]: Leaving directory '/home/branden/BUILD/groff-1.23.0.rc2.87-206dc'
make[1]: *** [Makefile:11898: check-am] Error 2
make[1]: Leaving directory '/home/branden/BUILD/groff-1.23.0.rc2.87-206dc'
make: *** [Makefile:11900: check] Error 2
uninstall is clean
$ cat font/devpdf/tests/check-default-foundry.sh
#!/bin/sh
#
# Copyright (C) 2022-2023 Free Software Foundation, Inc.
#
# This file is part of groff.
#
# groff is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# groff is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

# Ensure that groff's PDF device has font description files for the
# default (unnamed) foundry's PostScript Level 2 base 35 fonts, plus
# groff's EURO.
#
# These font descriptions should be available in any gropdf
# configuration because they can be copied from the devps font
# descriptions even if the URW fonts are not available.
#
# Another test script checks the "U" (URW) foundry.

devpdf_fontbuilddir="${abs_top_builddir:-.}"/font/devpdf

fonts='AB
ABI
AI
AR
BMB
BMBI
BMI
BMR
CB
CBI
CI
CR
EURO
HB
HBI
HI
HNB
HNBI
HNI
HNR
HR
NB
NBI
NI
NR
PB
PBI
PI
PR
S
TB
TBI
TI
TR
ZCMI
ZD'

fail=

for f in $fonts
do
    printf "checking for font description %s...\n" "$f" >&2
    if ! [ -f "$devpdf_fontbuilddir"/"$f" ]
    then
        echo FAILED >&2
        fail=yes
    fi
done

test -z "$fail"

# vim:set ai et sw=4 ts=4 tw=72:
$ cat font/devpdf/tests/check-default-foundry.sh.log
checking for font description AB...
FAILED
checking for font description ABI...
FAILED
checking for font description AI...
FAILED
checking for font description AR...
FAILED
checking for font description BMB...
FAILED
checking for font description BMBI...
FAILED
checking for font description BMI...
FAILED
checking for font description BMR...
FAILED
checking for font description CB...
checking for font description CBI...
checking for font description CI...
checking for font description CR...
checking for font description EURO...
checking for font description HB...
checking for font description HBI...
checking for font description HI...
checking for font description HNB...
FAILED
checking for font description HNBI...
FAILED
checking for font description HNI...
FAILED
checking for font description HNR...
FAILED
checking for font description HR...
checking for font description NB...
FAILED
checking for font description NBI...
FAILED
checking for font description NI...
FAILED
checking for font description NR...
FAILED
checking for font description PB...
FAILED
checking for font description PBI...
FAILED
checking for font description PI...
FAILED
checking for font description PR...
FAILED
checking for font description S...
checking for font description TB...
checking for font description TBI...
checking for font description TI...
checking for font description TR...
checking for font description ZCMI...
FAILED
checking for font description ZD...
FAIL font/devpdf/tests/check-default-foundry.sh (exit status: 1)
$ rm font/devpdf/Foundry
$ make font/devpdf/Foundry
  GEN      font/devpdf/Foundry
$ rm font/devpdf/download
$ make font/devpdf/download
  GEN      font/devpdf/download
BuildFoundries: warning: line 33: groff font 'AB' will not be available for PDF output; unable to locate font file(s): URWGothic-Demi.t1, URWGothic-Demi, URWGothicL-Demi, a010015l.pfb
BuildFoundries: warning: line 34: groff font 'ABI' will not be available for PDF output; unable to locate font file(s): URWGothic-DemiOblique.t1, URWGothic-DemiOblique, URWGothicL-DemiObli, a010035l.pfb
BuildFoundries: warning: line 35: groff font 'AI' will not be available for PDF output; unable to locate font file(s): URWGothic-BookOblique.t1, URWGothic-BookOblique, URWGothicL-BookObli, a010033l.pfb
BuildFoundries: warning: line 36: groff font 'AR' will not be available for PDF output; unable to locate font file(s): URWGothic-Book.t1, URWGothic-Book, URWGothicL-Book, a010013l.pfb
BuildFoundries: warning: line 37: groff font 'BMB' will not be available for PDF output; unable to locate font file(s): URWBookman-Demi.t1, URWBookman-Demi, URWBookmanL-DemiBold, b018015l.pfb
BuildFoundries: warning: line 38: groff font 'BMBI' will not be available for PDF output; unable to locate font file(s): URWBookman-DemiItalic.t1, URWBookman-DemiItalic, URWBookmanL-DemiBoldItal, b018035l.pfb
BuildFoundries: warning: line 39: groff font 'BMI' will not be available for PDF output; unable to locate font file(s): URWBookman-LightItalic.t1, URWBookman-LightItalic, URWBookmanL-LighItal, b018032l.pfb
BuildFoundries: warning: line 40: groff font 'BMR' will not be available for PDF output; unable to locate font file(s): URWBookman-Light.t1, URWBookman-Light, URWBookmanL-Ligh, b018012l.pfb
BuildFoundries: notice: copied grops font CB
BuildFoundries: notice: copied grops font CBI
BuildFoundries: notice: copied grops font CI
BuildFoundries: notice: copied grops font CR
BuildFoundries: notice: copied grops font HB
BuildFoundries: notice: copied grops font HBI
BuildFoundries: notice: copied grops font HI
BuildFoundries: warning: line 48: groff font 'HNB' will not be available for PDF output; unable to locate font file(s): NimbusSansNarrow-Bold.t1, NimbusSansNarrow-Bold, NimbusSanL-BoldCond, n019044l.pfb
BuildFoundries: warning: line 49: groff font 'HNBI' will not be available for PDF output; unable to locate font file(s): NimbusSansNarrow-BoldOblique.t1, NimbusSansNarrow-BoldOblique, NimbusSansNarrow-BdOblique, NimbusSanL-BoldCondItal.t1, NimbusSanL-BoldCondItal, n019064l.pfb
BuildFoundries: warning: line 50: groff font 'HNI' will not be available for PDF output; unable to locate font file(s): NimbusSansNarrow-Oblique.t1, NimbusSansNarrow-Oblique, NimbusSanL-ReguCondItal, n019063l.pfb
BuildFoundries: warning: line 51: groff font 'HNR' will not be available for PDF output; unable to locate font file(s): NimbusSansNarrow-Regular.t1, NimbusSansNarrow-Regular, NimbusSanL-ReguCond, n019043l.pfb
BuildFoundries: notice: copied grops font HR
BuildFoundries: warning: line 53: groff font 'NB' will not be available for PDF output; unable to locate font file(s): C059-Bold.t1, C059-Bold, CenturySchL-Bold, c059016l.pfb
BuildFoundries: warning: line 54: groff font 'NBI' will not be available for PDF output; unable to locate font file(s): C059-BdIta.t1, C059-BdIta, CenturySchL-BoldItal, c059036l.pfb
BuildFoundries: warning: line 55: groff font 'NI' will not be available for PDF output; unable to locate font file(s): C059-Italic.t1, C059-Italic, CenturySchL-Ital, c059033l.pfb
BuildFoundries: warning: line 56: groff font 'NR' will not be available for PDF output; unable to locate font file(s): C059-Roman.t1, C059-Roman, CenturySchL-Roma, c059013l.pfb
BuildFoundries: warning: line 57: groff font 'PB' will not be available for PDF output; unable to locate font file(s): P052-Bold.t1, P052-Bold, URWPalladioL-Bold, p052004l.pfb
BuildFoundries: warning: line 58: groff font 'PBI' will not be available for PDF output; unable to locate font file(s): P052-BoldItalic.t1, P052-BoldItalic, URWPalladioL-BoldItal, p052024l.pfb
BuildFoundries: warning: line 59: groff font 'PI' will not be available for PDF output; unable to locate font file(s): P052-Italic.t1, P052-Italic, URWPalladioL-Ital, p052023l.pfb
BuildFoundries: warning: line 60: groff font 'PR' will not be available for PDF output; unable to locate font file(s): P052-Roman.t1, P052-Roman, URWPalladioL-Roma, p052003l.pfb
BuildFoundries: notice: copied grops font S
BuildFoundries: notice: copied grops font TB
BuildFoundries: notice: copied grops font TBI
BuildFoundries: notice: copied grops font TI
BuildFoundries: notice: copied grops font TR
BuildFoundries: warning: line 66: groff font 'ZCMI' will not be available for PDF output; unable to locate font file(s): Z003-MediumItalic.t1, Z003-MediumItalic, URWChanceryL-MediItal, z003034l.pfb
BuildFoundries: notice: copied grops font ZD
BuildFoundries: notice: copied grops font EURO
BuildFoundries: warning: line 69:
The path(s) used for searching:
@urwfontsdir@:/usr/share/ghostscript/9.53.3/Resource/Init:/usr/share/ghostscript/9.53.3/lib:/usr/share/ghostscript/9.53.3/Resource/Font:/usr/share/ghostscript/fonts:/var/lib/ghostscript/fonts:/usr/share/cups/fonts:/usr/share/ghostscript/fonts:/usr/local/lib/ghostscript/fonts:/usr/share/fonts:/usr/share/fonts/type1/gsfonts:/usr/share/fonts/default/Type1:/usr/share/fonts/default/Type1/adobestd35:/usr/share/fonts/type1/urw-base35:/opt/local/share/fonts/urw-fonts:/usr/local/share/fonts/ghostscript:/home/branden/BUILD/groff-1.23.0.rc2.87-206dc/font/devps:/home/branden/BUILD/groff-1.23.0.rc2.87-206dc/font/devps

$ gs -h
GPL Ghostscript 9.53.3 (2020-10-01)
Copyright (C) 2020 Artifex Software, Inc.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
 -dNOPAUSE           no pause after page   | -q       `quiet', fewer messages
 -g<width>x<height>  page size in pixels   | -r<res>  pixels/inch resolution
 -sDEVICE=<devname>  select device         | -dBATCH  exit after last file
 -sOutputFile=<file> select output file: - for stdout, |command for pipe,
                                         embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF
Default output device: bbox
Available devices:
   alc1900 alc2000 alc4000 alc4100 alc8500 alc8600 alc9100 ap3250 appledmp
   atx23 atx24 atx38 bbox bit bitcmyk bitrgb bitrgbtags bj10e bj10v bj10vh
   bj200 bjc600 bjc800 bjc880j bjccmyk bjccolor bjcgray bjcmono bmp16 bmp16m
   bmp256 bmp32b bmpgray bmpmono bmpsep1 bmpsep8 ccr cdeskjet cdj1600 cdj500
   cdj550 cdj670 cdj850 cdj880 cdj890 cdj970 cdjcolor cdjmono cdnj500 cfax
   chp2200 cif cljet5 cljet5c cljet5pr coslw2p coslwxl cups declj250 deskjet
   devicen dfaxhigh dfaxlow display dj505j djet500 djet500c dl2100 dnj650c
   epl2050 epl2050p epl2120 epl2500 epl2750 epl5800 epl5900 epl6100 epl6200
   eplcolor eplmono eps2write eps9high eps9mid epson epsonc escp escpage
   faxg3 faxg32d faxg4 fmlbp fmpr fpng fs600 gdi hl1240 hl1250 hl7x0
   hpdj1120c hpdj310 hpdj320 hpdj340 hpdj400 hpdj500 hpdj500c hpdj510
   hpdj520 hpdj540 hpdj550c hpdj560c hpdj600 hpdj660c hpdj670c hpdj680c
   hpdj690c hpdj850c hpdj855c hpdj870c hpdj890c hpdjplus hpdjportable ibmpro
   ijs imagen inferno ink_cov inkcov itk24i itk38 iwhi iwlo iwlq jetp3852
   jj100 jpeg jpegcmyk jpeggray la50 la70 la75 la75plus laserjet lbp310
   lbp320 lbp8 lex2050 lex3200 lex5700 lex7000 lips2p lips3 lips4 lips4v
   lj250 lj3100sw lj4dith lj4dithp lj5gray lj5mono ljet2p ljet3 ljet3d ljet4
   ljet4d ljet4pjl ljetplus ln03 lp1800 lp1900 lp2000 lp2200 lp2400 lp2500
   lp2563 lp3000c lp7500 lp7700 lp7900 lp8000 lp8000c lp8100 lp8200c lp8300c
   lp8300f lp8400f lp8500c lp8600 lp8600f lp8700 lp8800c lp8900 lp9000b
   lp9000c lp9100 lp9200b lp9200c lp9300 lp9400 lp9500c lp9600 lp9600s
   lp9800c lps4500 lps6500 lq850 lxm3200 lxm5700m m8510 md1xMono md2k
   md50Eco md50Mono md5k mgr4 mgr8 mgrgray2 mgrgray4 mgrgray8 mgrmono miff24
   mj500c mj6000c mj700v2c mj8000c ml600 necp6 npdl nullpage oce9050 oki182
   oki4w okiibm oprp opvp paintjet pam pamcmyk32 pamcmyk4 pbm pbmraw pcl3
   pclm pcx16 pcx24b pcx256 pcxcmyk pcxgray pcxmono pdfimage24 pdfimage32
   pdfimage8 pdfwrite pdfwrite pdfwrite pgm pgmraw pgnm pgnmraw photoex
   picty180 pj pjetxl pjxl pjxl300 pkm pkmraw pksm pksmraw plan plan9bm
   planc plang plank planm plib plibc plibg plibk plibm png16 png16m png256
   png48 pngalpha pnggray pngmono pngmonod pnm pnmraw ppm ppmraw pr1000
   pr1000_4 pr150 pr201 ps2write psdcmyk psdcmyk16 psdcmykog psdrgb psdrgb16
   pwgraster pxlcolor pxlmono r4081 rinkj rpdl samsunggdi sj48 spotcmyk
   st800 stcolor t4693d2 t4693d4 t4693d8 tek4696 tiff12nc tiff24nc tiff32nc
   tiff48nc tiff64nc tiffcrle tiffg3 tiffg32d tiffg4 tiffgray tifflzw
   tiffpack tiffscaled tiffscaled24 tiffscaled32 tiffscaled4 tiffscaled8
   tiffsep tiffsep1 txtwrite uniprint xcf xes xpswrite
Search path:
   /usr/share/ghostscript/9.53.3/Resource/Init :
   /usr/share/ghostscript/9.53.3/lib :
   /usr/share/ghostscript/9.53.3/Resource/Font :
   /usr/share/ghostscript/fonts : /var/lib/ghostscript/fonts :
   /usr/share/cups/fonts : /usr/share/ghostscript/fonts :
   /usr/local/lib/ghostscript/fonts : /usr/share/fonts
Ghostscript is also using fontconfig to search for font files
For more information, see /usr/share/doc/ghostscript/Use.htm.
On debian system you may need to install ghostscript-doc package.
Please report bugs to bugs.ghostscript.com.
$ ls -1 font/devpdf/
CB
CBI
CI
CR
DESC
DESC.in
EURO
Foundry
Foundry.in
HB
HBI
HI
HR
S
TB
TBI
TI
TR
ZD
devpdf.am
download
enc
map
stamp
tests
util


It appears that with Debian's Ghostscript packages, these font files are provided.


$ ls -1 /usr/share/ghostscript/9.53.3/Resource/Font/
C059-BdIta
C059-Bold
C059-Italic
C059-Roman
D050000L
NimbusMonoPS-Bold
NimbusMonoPS-BoldItalic
NimbusMonoPS-Italic
NimbusMonoPS-Regular
NimbusRoman-Bold
NimbusRoman-BoldItalic
NimbusRoman-Italic
NimbusRoman-Regular
NimbusSans-Bold
NimbusSans-BoldItalic
NimbusSans-Italic
NimbusSans-Regular
NimbusSansNarrow-Bold
NimbusSansNarrow-BoldOblique
NimbusSansNarrow-Oblique
NimbusSansNarrow-Regular
P052-Bold
P052-BoldItalic
P052-Italic
P052-Roman
StandardSymbolsPS
URWBookman-Demi
URWBookman-DemiItalic
URWBookman-Light
URWBookman-LightItalic
URWGothic-Book
URWGothic-BookOblique
URWGothic-Demi
URWGothic-DemiOblique
Z003-MediumItalic


The generated Foundry file looks like this.


# Foundry file

# Copyright (C) 2011-2020 Free Software Foundation, Inc.
#      Written by Deri James <deri@chuzzlewit.myzen.co.uk>
#
# This file is part of groff.
#
# groff is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# groff is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

#=======================================================================
#Foundry|Name|Search path
foundry||@urwfontsdir@:(gs):/usr/share/fonts/type1/gsfonts:/usr/share/fonts/default/Type1:/usr/share/fonts/default/Type1/adobestd35:/usr/share/fonts/type1/urw-base35:/opt/local/share/fonts/urw-fonts:/usr/local/share/fonts/ghostscript

# Enable the font description files for grops (generated from Adobe
# foundry font files) to be used with gropdf.  afmtodit must not be
# called with any flags.  URW fonts are substituted for Adobe fonts in
# the download file by default.  If you have Adobe Type 1 fonts, you can
# update the foundry search path above if necessary and replace the
# contents of the file fields below with their file names.

#Font|IsBase14|Flags|Map|Encoding|File(!file)...
AB|N||||URWGothic-Demi.t1!URWGothic-Demi!URWGothicL-Demi!a010015l.pfb
...


So URWGothic-Demi is definitely present, is in one of the directories reported by "gs -h", and yet the special "(gs)" token in the Foundry file doesn't seem to be leading gropdf to it.

I'll dig more into this.  Any eureka insights you have would of course be welcome.  :)

G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 08:25:23 PM UTC, comment #28: 

I think I tracked down the embedding problem with HI and HBI.

This is in the "urw present, gs absent" scenario.

It may be a Type 1 font file name issue...again.
 

$ rm doc/groff-man-pages.pdf
$ make doc/groff-man-pages.pdf
  GROFF    doc/groff-man-pages.pdf
/home/branden/BUILD/groff-1.23.0.rc2.86-1ebd/gropdf:contrib/glilypond/glilypond.1: warning: unable to embed font file for 'Helvetica-BoldOblique' (HBI) (missing entry in 'download' file?)
/home/branden/BUILD/groff-1.23.0.rc2.86-1ebd/gropdf:src/devices/gropdf/gropdf.1: warning: unable to embed font file for 'Helvetica-Oblique' (HI) (missing entry in 'download' file?)
troff: backtrace: file 'man/groff_char.7':1031
troff:man/groff_char.7:1031: warning: special character '.j' not defined
troff: backtrace: file 'man/groff_char.7':1453
troff:man/groff_char.7:1453: warning: special character 'vA' not defined
troff: backtrace: file 'man/groff_char.7':1583
troff:man/groff_char.7:1583: warning: special character 'bs' not defined
troff: backtrace: file 'man/groff_char.7':1756
troff:man/groff_char.7:1756: warning: special character '-+' not defined
troff: backtrace: file 'man/groff_char.7':1805
troff:man/groff_char.7:1805: warning: special character 'coproduct' not defined
troff: backtrace: file 'man/groff_char.7':1900
troff:man/groff_char.7:1900: warning: special character '+e' not defined
$ find -name download
./font/devps/download
./font/devpdf/download
$ cat font/devpdf/download
# foundry       ps-font-name    ps-font-file
# A blank foundry is the default.

        AvantGarde-Book /usr/share/fonts/type1/urw-base35/URWGothic-Book.t1
        AvantGarde-BookOblique  /usr/share/fonts/type1/urw-base35/URWGothic-BookOblique.t1
        AvantGarde-Demi /usr/share/fonts/type1/urw-base35/URWGothic-Demi.t1
        AvantGarde-DemiOblique  /usr/share/fonts/type1/urw-base35/URWGothic-DemiOblique.t1
        Bookman-Demi    /usr/share/fonts/type1/urw-base35/URWBookman-Demi.t1
        Bookman-DemiItalic      /usr/share/fonts/type1/urw-base35/URWBookman-DemiItalic.t1
        Bookman-Light   /usr/share/fonts/type1/urw-base35/URWBookman-Light.t1
        Bookman-LightItalic     /usr/share/fonts/type1/urw-base35/URWBookman-LightItalic.t1
        Courier */usr/share/fonts/type1/urw-base35/NimbusMonoPS-Regular.t1
        Courier-Bold    */usr/share/fonts/type1/urw-base35/NimbusMonoPS-Bold.t1
        Courier-BoldOblique     */usr/share/fonts/type1/urw-base35/NimbusMonoPS-BoldItalic.t1
        Courier-Oblique */usr/share/fonts/type1/urw-base35/NimbusMonoPS-Italic.t1
        FreeEuro        ../devps/freeeuro.pfa
        Helvetica       */usr/share/fonts/type1/urw-base35/NimbusSans-Regular.t1
        Helvetica-Bold  */usr/share/fonts/type1/urw-base35/NimbusSans-Bold.t1
        Helvetica-Narrow        /usr/share/fonts/type1/urw-base35/NimbusSansNarrow-Regular.t1
        Helvetica-Narrow-Bold   /usr/share/fonts/type1/urw-base35/NimbusSansNarrow-Bold.t1
        Helvetica-Narrow-BoldOblique    /usr/share/fonts/type1/urw-base35/NimbusSansNarrow-BoldOblique.t1
        Helvetica-Narrow-Oblique        /usr/share/fonts/type1/urw-base35/NimbusSansNarrow-Oblique.t1
        NewCenturySchlbk-Bold   /usr/share/fonts/type1/urw-base35/C059-Bold.t1
        NewCenturySchlbk-BoldItalic     /usr/share/fonts/type1/urw-base35/C059-BdIta.t1
        NewCenturySchlbk-Italic /usr/share/fonts/type1/urw-base35/C059-Italic.t1
        NewCenturySchlbk-Roman  /usr/share/fonts/type1/urw-base35/C059-Roman.t1
[...]


Note how there are no entries in the default foundry for Helvetica-BoldOblique or Helvetica-Oblique.


$ ls -1 /usr/share/fonts/type1/urw-base35/
C059-BdIta.afm
C059-BdIta.t1
C059-Bold.afm
C059-Bold.t1
C059-Italic.afm
C059-Italic.t1
C059-Roman.afm
C059-Roman.t1
D050000L.afm
D050000L.t1
NimbusMonoPS-Bold.afm
NimbusMonoPS-Bold.t1
NimbusMonoPS-BoldItalic.afm
NimbusMonoPS-BoldItalic.t1
NimbusMonoPS-Italic.afm
NimbusMonoPS-Italic.t1
NimbusMonoPS-Regular.afm
NimbusMonoPS-Regular.t1
NimbusRoman-Bold.afm
NimbusRoman-Bold.t1
NimbusRoman-BoldItalic.afm
NimbusRoman-BoldItalic.t1
NimbusRoman-Italic.afm
NimbusRoman-Italic.t1
NimbusRoman-Regular.afm
NimbusRoman-Regular.t1
NimbusSans-Bold.afm
NimbusSans-Bold.t1
NimbusSans-BoldItalic.afm
NimbusSans-BoldItalic.t1
NimbusSans-Italic.afm
NimbusSans-Italic.t1
NimbusSans-Regular.afm
NimbusSans-Regular.t1
NimbusSansNarrow-Bold.afm
NimbusSansNarrow-Bold.t1
NimbusSansNarrow-BoldOblique.afm
NimbusSansNarrow-BoldOblique.t1
NimbusSansNarrow-Oblique.afm
NimbusSansNarrow-Oblique.t1
NimbusSansNarrow-Regular.afm
NimbusSansNarrow-Regular.t1
P052-Bold.afm
P052-Bold.t1
P052-BoldItalic.afm
P052-BoldItalic.t1
P052-Italic.afm
P052-Italic.t1
P052-Roman.afm
P052-Roman.t1
StandardSymbolsPS.afm
StandardSymbolsPS.t1
URWBookman-Demi.afm
URWBookman-Demi.t1
URWBookman-DemiItalic.afm
URWBookman-DemiItalic.t1
URWBookman-Light.afm
URWBookman-Light.t1
URWBookman-LightItalic.afm
URWBookman-LightItalic.t1
URWGothic-Book.afm
URWGothic-Book.t1
URWGothic-BookOblique.afm
URWGothic-BookOblique.t1
URWGothic-Demi.afm
URWGothic-Demi.t1
URWGothic-DemiOblique.afm
URWGothic-DemiOblique.t1
Z003-MediumItalic.afm
Z003-MediumItalic.t1


It seems that the plain Helvetica replacement is using the somewhat incorrect term "Italic".  But the Helvetica Narrow replacement retains use of the term "Oblique".

My understanding is that the term "italic" properly applies only to fonts that use serifs.

But in any case, this inconsistency may be be something that Foundry.in is not prepared for.


$ grep 'HB*I|' font/devpdf/Foundry.in
HBI|Y||||NimbusSans-BoldItalic!NimbusSans-BoldOblique.t1!NimbusSans-BoldOblique!NimbusSanL-BoldItal!n019024l.pfb
HI|Y||||NimbusSans-Italic!NimbusSans-Oblique.t1!NimbusSans-Oblique!NimbusSanL-ReguItal!n019023l.pfb
HBI|N|i|text.map|text.enc|NimbusSans-BoldItalic!NimbusSans-BoldItalic.t1!NimbusSans-BoldOblique!NimbusSanL-BoldItal!n019024l.pfb
HI|N|i|text.map|text.enc|NimbusSans-Italic!NimbusSans-Italic.t1!NimbusSans-Oblique!NimbusSanL-ReguItal!n019023l.pfb


Okay, actually the problem seems to be a missing".t1" at the end of the "*Italic" file names.

I'll patch this and see what happens.

G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 06:15:35 PM UTC, comment #27: 


comment #26:

> These changes don't appear in master when I do a git pull so I can't do any investigations.


I hadn't pushed yet because I didn't have confidence in the changes, and thought you might be able to tell at a glace what had gone wrong.  A flash of hysterical optimism.  :-O

> Also, because you do make check rather than make -j; make check if there is a failure in the build phase we don't get to see the result of the tests.


Good point.

>
> For 01 (gs only) check-default-foundry failed and gropdf was in restricted mode.The reason is very strange! In the make I see lines such as:-
>
> BuildFoundries: warning: line 33: groff font 'AB' will not be available for PDF output; unable to locate font file(s): URWGothic-Demi.t1, URWGothi-Demi, URWGothicL-Demi, a010015l.pfb
> BuildFoundries: warning: line 34: groff font 'ABI' will not be available for PDF output; unable to locate font file(s): URWGothic-DemiOblique.t1, RWGothic-DemiOblique, URWGothicL-DemiObli, a010035l.pfb
> BuildFoundries: warning: line 35: groff font 'AI' will not be available for PDF output; unable to locate font file(s): URWGothic-BookOblique.t1, UWGothic-BookOblique, URWGothicL-BookObli, a010033l.pfb
> BuildFoundries: warning: line 36: groff font 'AR' will not be available for PDF output; unable to locate font file(s): URWGothic-Book.t1, URWGothi-Book, URWGothicL-Book, a010013l.pfb
>
> The equivalent entry in the Foundry.in file from which the filenames come is:-
>
> AB|N||||URWGothic-Demi.t1!URWGothic-Demi!URWGothicL-Demi!a010015l.pfb
> ABI|N||||URWGothic-DemiOblique.t1!URWGothic-DemiOblique!URWGothicL-DemiObli!a010035l.pfb
> AI|N||||URWGothic-BookOblique.t1!URWGothic-BookOblique!URWGothicL-BookObli!a010033l.pfb
> AR|N||||URWGothic-Book.t1!URWGothic-Book!URWGothicL-Book!a010013l.pfb
>
> If you compare the list of names you will see a character is missing in the second name in the list, i.e. for AB it should be looking for the name "URWGothic-Demi" (second name in the Foundry.in file entry for AB) but it reports it is looking for "URWGothi-Demi". This happens for every line, it is the 147th character of each line which has been chopped!
>
> The first thing I would look at is whether there is anything odd about your Foundry.in, whether it has the missing characters.
>
> Scrub all that, I've just realised the whole log file you uploaded has the 147th character missing on every line,  and its not even April 1st! So we next wonder whether ghostscript have changed fontnames again, so please locate where the ghostscript fonts are located (somewhere on the paths given by gs -h) and post an "ls -l".


This rings a bell.  I have heard tell of a long-standing bug in the Linux pseudoterminal driver that does this.  My bad for copying and pasting from xterm scrollback instead of using script(1).

> To do further investigations I think I need the changes you seem to have only done to your local git.


Yes.  I have a fix for the pdfroff problem that I will push soon along with the other stuff.

G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 04:07:18 PM UTC, comment #26: 

These changes don't appear in master when I do a git pull so I can't do any investigations. Also, because you do make check rather than make -j; make check if there is a failure in the build phase we don't get to see the result of the tests.

For 01 (gs only) check-default-foundry failed and gropdf was in restricted mode.The reason is very strange! In the make I see lines such as:-

BuildFoundries: warning: line 33: groff font 'AB' will not be available for PDF output; unable to locate font file(s): URWGothic-Demi.t1, URWGothi-Demi, URWGothicL-Demi, a010015l.pfb
BuildFoundries: warning: line 34: groff font 'ABI' will not be available for PDF output; unable to locate font file(s): URWGothic-DemiOblique.t1, RWGothic-DemiOblique, URWGothicL-DemiObli, a010035l.pfb
BuildFoundries: warning: line 35: groff font 'AI' will not be available for PDF output; unable to locate font file(s): URWGothic-BookOblique.t1, UWGothic-BookOblique, URWGothicL-BookObli, a010033l.pfb
BuildFoundries: warning: line 36: groff font 'AR' will not be available for PDF output; unable to locate font file(s): URWGothic-Book.t1, URWGothi-Book, URWGothicL-Book, a010013l.pfb

The equivalent entry in the Foundry.in file from which the filenames come is:-

AB|N||||URWGothic-Demi.t1!URWGothic-Demi!URWGothicL-Demi!a010015l.pfb
ABI|N||||URWGothic-DemiOblique.t1!URWGothic-DemiOblique!URWGothicL-DemiObli!a010035l.pfb
AI|N||||URWGothic-BookOblique.t1!URWGothic-BookOblique!URWGothicL-BookObli!a010033l.pfb
AR|N||||URWGothic-Book.t1!URWGothic-Book!URWGothicL-Book!a010013l.pfb

If you compare the list of names you will see a character is missing in the second name in the list, i.e. for AB it should be looking for the name "URWGothic-Demi" (second name in the Foundry.in file entry for AB) but it reports it is looking for "URWGothi-Demi". This happens for every line, it is the 147th character of each line which has been chopped!

The first thing I would look at is whether there is anything odd about your Foundry.in, whether it has the missing characters.

Scrub all that, I've just realised the whole log file you uploaded has the 147th character missing on every line,  and its not even April 1st! So we next wonder whether ghostscript have changed fontnames again, so please locate where the ghostscript fonts are located (somewhere on the paths given by gs -h) and post an "ls -l".

To do further investigations I think I need the changes you seem to have only done to your local git.

Deri James <deri>
Group Member
Sat 18 Feb 2023 09:43:16 AM UTC, comment #25: 

I've made some changes attempting to reflect the most recent discussions.


commit 38570563840748c7ae5a0a5c1514a9f0b1fdf91a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 01:37:28 2023 -0600

    [gropdf]: Revise tests to be foundry-focussed.

    * font/devpdf/tests/basic-fonts-present.sh: Stop trying to match font
      descriptions in the "devps" directory with ones in "devpdf"; instead,
      test whether "BuildFoundries" did its job.  Test for font descriptions
      corresponding to the full 35 PostScript Level 2 font repertoire, plus
      groff's "EURO".

    * font/devpdf/tests/urw-fonts-present.sh: Drop stale comment and rename
      variable for better parallelism with the other test above.

    Continues <https://savannah.gnu.org/bugs/?63808>.  Thanks to Deri James
    for the continued discussion.

commit 00b5b3803332abe0557c54b1cf8f5b78baf1329b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 01:41:29 2023 -0600

    [gropdf]: Rename tests.

    ...to more accurately characterize their purpose.

    * font/devpdf/tests/basic-fonts-present.sh:
    * font/devpdf/tests/urw-fonts-present.sh: Rename these...

    * font/devpdf/tests/check-default-foundry.sh:
    * font/devpdf/tests/check-urw-foundry.sh: ...to these.

    * font/devpdf/devpdf.am (font_devpdf_TESTS): Reflect rename.

commit e3954e5b15ae956c2ee7f98c8f323bfa9172e5a3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 02:04:00 2023 -0600

    [gropdf]: Don't test if hobbled.

    [gropdf]: Don't run automated tests if 'gropdf' will be operating with
    reduced function.  If neither Ghostscript nor the URW fonts are
    available at configuration time, there is no point testing for
    successful build-time population of the font descriptions for the
    default and URW foundries.

    * font/devpdf/devpdf.am (font_devpdf_TESTS) [USE_GROPDF]: Run
      "check-default-foundry" only if gropdf is fully functional.

      (font_devpdf_TESTS) [USE_GROPDF && HAVE_URW_FONTS]: Run
      "check-urw-foundry" only if the URW fonts were found.

    Continues <https://savannah.gnu.org/bugs/?63808>.  Thanks to Deri James
    for the continued discussion.

commit 03640de878b4b362bce18af6bea008bd4d2bb3be
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 02:50:51 2023 -0600

    [build]: Rename GROFF_CHECK_GROPDF_PROGRAMS macro.

    [build]: Rename `GROFF_CHECK_GROPDF_PROGRAMS` macro to
    `GROFF_GROPDF_DEPENDENCIES_CHECK` to generalize for greater accuracy in
    forthcoming change.

    * configure.ac:
    * m4/groff.m4: Do it.

commit 9f91b87d4d4ab9d762ac9b87e8a8ba526dff9a82 (HEAD -> master)
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Feb 18 02:58:41 2023 -0600

    [build]: Revise gropdf configuration.

    * m4/groff.m4 (GROFF_GROPDF_DEPENDENCIES_CHECK): Add `AC_REQUIRE`ment on
      `GROFF_URW_FONTS_CHECK`.  Per discussion with Deri James, if _either_
      Ghostscript or the URW fonts are avilable, gropdf will be fully
      functional, consequent to commit d5515, 22 June.  Drop dependency on
      awk; it is used only at configuration time (in an Autoconf macro) and
      since Savannah #62775 was resolved (19 September), it has not been
      strictly necessary.  (It is useful for searching more locations for
      URW fonts, but several others are searched even if it is absent.)
      Stop populating notice text here, instead moving it...

      (GROFF_GROPDF_PROGRAM_NOTICE): ...here, since it no longer needs to be
      dynamically constructed.

    Continues <https://savannah.gnu.org/bugs/?63808>.  Thanks to Deri James
    for the continued discussion.


I'm attaching a shell session transcript of builds in all 4 scenarios discussed.  Locate each one by searching for the word "scenario" in the text file.

I got expected errors from gropdf when building in scenario 00 (no URW, no Ghostscript).


/home/branden/BUILD/groff-1.23.0.rc2.84-9f91b/gropdf:src/utils/addftinfo/addftinfo.1: warning: unable to embed font file for 'Times-Italic' (TI) (issing entry in 'download' file?)
/home/branden/BUILD/groff-1.23.0.rc2.84-9f91b/gropdf:src/utils/addftinfo/addftinfo.1: warning: unable to embed font file for 'Times-Roman' (TR) (mssing entry in 'download' file?)
/home/branden/BUILD/groff-1.23.0.rc2.84-9f91b/gropdf:src/utils/addftinfo/addftinfo.1: warning: unable to embed font file for 'Helvetica-Bold' (HB)(missing entry in 'download' file?)
/home/branden/BUILD/groff-1.23.0.rc2.84-9f91b/gropdf:src/utils/addftinfo/addftinfo.1: warning: unable to embed font file for 'Times-Bold' (TB) (mising entry in 'download' file?)
/home/branden/BUILD/groff-1.23.0.rc2.84-9f91b/gropdf:src/utils/afmtodit/afmtodit.1: warning: unable to embed font file for 'Courier-Oblique' (CI) missing entry in 'download' file?)
fonts_x.roff: listing font 'ABI'...
/home/branden/BUILD/groff-1.23.0.rc2.84-9f91b/gropdf:src/utils/afmtodit/afmtodit.1: warning: unable to embed font file for 'Courier' (CR) (missingentry in 'download' file?)
fonts_n.roff: listing font 'ABI'...
fonts_x.roff: listing font 'AI'...
fonts_n.roff: listing font 'AI'...
/home/branden/BUILD/groff-1.23.0.rc2.84-9f91b/gropdf:contrib/chem/chem.1: warning: unable to embed font file for 'Symbol' (S) (missing entry in 'dwnload' file?)


But two real problems are evident:

1. pdfroff dies hard (and crashes the build) if Ghostscript is not available.  This was predictable; I've known for a long time that pdfroff produces PostScript documents and then used gs to make PDF from them.  This is an Autoconf usage problem; pdfroff has been hiding behind generic "PDF" macros (or even gropdf-specific ones).  Fixing this should be a minor matter of writing a notice macro similar to the one gropdf has.  We know that pdfroff has a hard dep on both awk and Ghostscript.

2. I got a gropdf error I do not understand the cause of in scenario 10 (with URW, without Ghostscript).


/home/branden/BUILD/groff-1.23.0.rc2.84-9f91b/gropdf:contrib/glilypond/glilypond.1: warning: unable to embed font file for 'Helvetica-BoldOblique'(HBI) (missing entry in 'download' file?)
/home/branden/BUILD/groff-1.23.0.rc2.84-9f91b/gropdf:src/devices/gropdf/gropdf.1: warning: unable to embed font file for 'Helvetica-Oblique' (HI) missing entry in 'download' file?)


It's just for these 2 man pages (out of about 60), and only for these fonts.  Where do you suggest I start?

(file #54377)

G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 08:32:57 AM UTC, comment #24: 


comment #23:

> ...and I think it has been since bug #62275 was resolved.


Sigh.  I mean bug #62775.

G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 08:32:13 AM UTC, comment #23: 


comment #22:

> Deri, is it true that gropdf has no need of awk?  Since you write in Perl I would guess it is the case.


Disregard.  The requirement is in the configure script itself.  However I think the "dependency" is overstated.

https://git.savannah.gnu.org/cgit/groff.git/tree/m4/groff.m4#n327

...and I think it has been since bug #62275 was resolved.


G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 08:17:03 AM UTC, comment #22: 


comment #21:

> It has been predicated on the Automake macro "USE_GROPDF" for some time, which is not set unless XXX,


...uh, unless awk and Ghostscript are both found.

So this raises one new point and one old one.

GROFF_CHECK_GROPDF_PROGRAMS should be changed to set 'use_gropdf' to "yes" if the URW fonts are found.  Actually that's a bad place to make that decision, but as discussed before, the present of the URW fonts should resulted in "enhanced mode" gropdf as you term it.  That's not happening now and I don't think it ever has.

I'll try to come up with an Autoconf incantation for that.

The new point is that gropdf's awk dependency doesn't seem to be warranted?  Nothing in font/devpdf or src/devices/gropdf mentions awk at all.

What does is pdfroff, over in contrib.

Deri, is it true that gropdf has no need of awk?  Since you write in Perl I would guess it is the case.

G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 08:11:24 AM UTC, comment #21: 

Hmm, if I gave the impression that groff-man-pages.pdf would be available even if gropdf was running in what you term "restricted mode", that was incorrect.

It has been predicated on the Automake macro "USE_GROPDF" for some time, which is not set unless XXX, and moreover it insists on embedding the fonts (a property I do not wish to discard).

I'm not sure under which circumstances I saw the degraded fonts in its grops(1) but if I can reproduce it, I will raise the issue.  But the problem may have been due solely to my errors in hooking things up; we saw in comments #13 to #15 that I am extravagantly fallible.

G. Branden Robinson <gbranden>
Group administrator
Sat 18 Feb 2023 07:19:18 AM UTC, comment #20: 


comment #19:

> > > Standard gropdf
> > >
> > > This is when only the default foundry is populated with the 35 postscript fonts. This will occur if only ghostscript is available. PDF documentation will be complete. The font test should look for all the 35 fonts, error if any are missing.
> >
> > Okay.  But also, the "-e" option will be nonfunctional because gropdf won't know where the Ghostscript fonts are located.  (Even if located, they may not be in a format embeddable in PDF; I assume this is the reason gropdf does not need the configure script to look for them.)  If I am correct then I will want to notify about this at configuration time.  Probably by updating the message that is already thrown when the URW fonts are unavailable.
>
> I think this is the only bit where you have swerved off course! The files found via gs -h are perfectly valid pfb files, so can be embedded by gropdf.


Ah, right.  Somehow I keep forgetting about "gs -h" despite that fact that you regularly ask people reporting font bugs to supply its output.

> A download file produced with ghostscript only (your scenario 01) will contain lines such as:-


>         Bookman-Light   /usr/share/ghostscript/9.53.3/Resource/Font/URWBookman-Light
>         Bookman-LightItalic     /usr/share/ghostscript/9.53.3/Resource/Font/URWBookman-LightItalic
>         Courier */usr/share/ghostscript/9.53.3/Resource/Font/NimbusMonoPS-Regular
>         Courier-Bold    */usr/share/ghostscript/9.53.3/Resource/Font/NimbusMonoPS-Bold


> These are default foundry and point to valid pfb files, although not named as such, i.e.:-


> [derij@pip build (master)]$ file /usr/share/ghostscript/9.53.3/Resource/Font/URWBookman-Light
> /usr/share/ghostscript/9.53.3/Resource/Font/URWBookman-Light: PostScript Type 1 font text (URWBookman-Light 1.00)


> So they can be embedded and no particular message is required for this scenario, although the missing URW message will have been output, because they have not been found by configure.


Understood and agreed.

> > Before we move on to restricted PDF documentation, you will notice that one case is not discussed above, the one which was of interest to you earlier.  I would call it "scenario 10": urw present, gs absent. 
> >
> > Is this a variant of scenario "11"?  Should I in fact collapse scenarios 10 and 11 into scenario "1x"?  Equivalently, if the URW fonts are available, is the value of the gs bit "don't care"?
>
> You are right, it is scenario 1x. Given the current contents of the file "Foundry.in" both foundries are populated with fonts from URW, ghostscript fonts are ignored, so it is exactly the same as scenario 10. Prior to commit d55157d39ab4d01bccea276122a2f3a5b1e30452 only ghostscript fonts were chosen for the default foundry, but now the URW fonts are used in preference if available.


I had utterly forgotten about this commit.

> One reason is because the naming convention of the URW fonts is much more stable than the ghostscript fonts, the path usually includes the ghostscript version number. We have had several instances where a previously working gropdf fails when a new version of ghostscript is installed (and you won't let me install BuildFoundries as a tool to run, like afmtodit, so this was the next best thing!).


Ehrm, yes.  I'd like to get something like BuildFoundries into 1.24.  Just needs documentation and (automated) testing and all that jazz...
 

> > I don't know of any problems in the generated documentation apart from the typeface "degradation" (maybe "fallback" would be a better word) I have spoken of in this and my previous (somewhat muddled) comments.
> >
> > So I am inclined to let the build throw warnings if a user builds groff in this very stripped-down host environment.
>
> Fine, it does not affect the usefulness of having the documents.


Cool--I'll retain that, then.

> > Given your presentation, I agree that the test should be restored to looking for all 35 names (I'll even "generously" retain the change to a a static list per comment #10).  Another important criterion will be to not run the test at all in "scenario 00" (your "restricted gropdf").  Restricted gropdf can't fail to find PDF font files, but also can't embed them.
>
> Bit muddled here. It is groff font files in the devpdf directory the checks look for.


Yes.  "Font description files" is the term I try to consistently use in our documentation.

> "PDF font files" could be confused with the fonts gropdf embeds.


Yes indeed.
 

> > I think I also want to rename the "basic" fonts test to "check-default-foundry".  My reasoning to date has been to run it only if gs is present.  But I begin to see that it is worth running this test even when urw is also present, because the Foundry file is constructed differently.  That is, as far as I know, the only difference between the two "Enhanced gropdf" configuration scenarios.
>
> There is actually no difference in the two foundries in the download file AR and U-AR will both point to the identical pfb file.


Right; this error of mine was a consequence of forgetting about commit d55157d39ab4d01bccea276122a2f3a5b1e30452 (above).

> It is the groff font files AR and U-AR which will be substantially different.


Because the former are copied over from font/devps and the latter are generated at build time from the URW foundry font files?

But if the URW fonts are available, and the URW fonts are also used for the default foundry if they are present (commit d5515), shouldn't they bear the same groff font description files?

Even if that's true, they are supposed to be metrically compatible anyway so I have no reason to suspect this is urgent to change before 1.23.0 final.

> > In fact, given my confusion in comment #2, I think I want to rename both tests.
> >
> > check-default-foundry.sh
> > check-u-foundry.sh
>
> A good choice.


Great!

G. Branden Robinson <gbranden>
Group administrator
Fri 17 Feb 2023 11:36:39 PM UTC, comment #19: 

comment #18:

> Hi Deri,
>
> Thank you very much--I think I may want to put much of this into a text file in the gropdf source directory.
>
> comment #17:
> > To be clear the major problem occurs when configure is run and it finds the URW fonts but not ghostscript, a minor problem is the check tests.
>
> Acknowledged.

> > First some definitions:-
> >
> > Standard gropdf
> >
> > This is when only the default foundry is populated with the 35 postscript fonts. This will occur if only ghostscript is available. PDF documentation will be complete. The font test should look for all the 35 fonts, error if any are missing.
>
> Okay.  But also, the "-e" option will be nonfunctional because gropdf won't know where the Ghostscript fonts are located.  (Even if located, they may not be in a format embeddable in PDF; I assume this is the reason gropdf does not need the configure script to look for them.)  If I am correct then I will want to notify about this at configuration time.  Probably by updating the message that is already thrown when the URW fonts are unavailable.


I think this is the only bit where you have swerved off course! The files found via gs -h are perfectly valid pfb files, so can be embedded by gropdf. A download file produced with ghostscript only (your scenario 01) will contain lines such as:-

        Bookman-Light   /usr/share/ghostscript/9.53.3/Resource/Font/URWBookman-Light
        Bookman-LightItalic     /usr/share/ghostscript/9.53.3/Resource/Font/URWBookman-LightItalic
        Courier */usr/share/ghostscript/9.53.3/Resource/Font/NimbusMonoPS-Regular
        Courier-Bold    */usr/share/ghostscript/9.53.3/Resource/Font/NimbusMonoPS-Bold

These are default foundry and point to valid pfb files, although not named as such, i.e.:-

[derij@pip build (master)]$ file /usr/share/ghostscript/9.53.3/Resource/Font/URWBookman-Light
/usr/share/ghostscript/9.53.3/Resource/Font/URWBookman-Light: PostScript Type 1 font text (URWBookman-Light 1.00)

So they can be embedded and no particular message is required for this scenario, although the missing URW message will have been output, because they have not been found by configure.

> Okay.  I think of this as "scenario 01" (binary).  urw absent, gs present.
>
> > Enhanced gropdf
> >
> > Both the default and the U- foundry are populated. This will occur if the URW fonts are available. PDF documentation will be complete. In addition to the font test for standard gropdf also check for the same 35 but starting with U-.
>
> Acknowledged.  I think of this as "scenario 11".  urw present, gs present.  No configuration notice should occur here.


Correct.

> > Restricted gropdf
> >
> > Only the base-14 fonts are available in the default foundry, there is no U- foundry. This will occur if neither ghostscript nor URW fonts are found. PDF documentation (if run will be "restricted", see below.
>
> Acknowledged.  I think of this as "scenario 00".  urw absent, gs absent.  I already (as of recently) have a configuration notice for this.
>
> Embedding will be impossible and the typeface lists in the grops(1) and gropdf(1) man pages in groff-man-pages.pdf should degrade.
>
> > It is not worth doing any font checks, the base-14 fonts are always populated by BuildFoundries.
>
> Quite reasonable.

> Before we move on to restricted PDF documentation, you will notice that one case is not discussed above, the one which was of interest to you earlier.  I would call it "scenario 10": urw present, gs absent. 
>
> Is this a variant of scenario "11"?  Should I in fact collapse scenarios 10 and 11 into scenario "1x"?  Equivalently, if the URW fonts are available, is the value of the gs bit "don't care"?


You are right, it is scenario 1x. Given the current contents of the file "Foundry.in" both foundries are populated with fonts from URW, ghostscript fonts are ignored, so it is exactly the same as scenario 10. Prior to commit d55157d39ab4d01bccea276122a2f3a5b1e30452 only ghostscript fonts were chosen for the default foundry, but now the URW fonts are used in preference if available. One reason is because the naming convention of the URW fonts is much more stable than the ghostscript fonts, the path usually includes the ghostscript version number. We have had several instances where a previously working gropdf fails when a new version of ghostscript is installed (and you won't let me install BuildFoundries as a tool to run, like afmtodit, so this was the next best thing!).

> This would mean that the presence of URW fonts is a sufficient condition to configure gropdf in "Enhanced" mode.


Yes.

> I suspect that there need be no configuration notice thrown for either scenario, but that they have slightly different consequences for testing; see below.  (This may be the point you have been trying to get me to understand since comment #0.)
>
> > Restricted PDF documentation
> >
> > This is documentation produced if only the base-14 fonts are available. You will notice warnings from throff about not finding particular fonts,
>
> Yes, I saw these in "scenario 00".

> > and warning from gropdf about not being able to embed fonts (if gropdf has been called with -P-e). A "valid" pdf will be produced (i.e. it can be opened with a viewer), but the fonts used in the pdf will be sub-optimal! When fonts can't be selected by troff it continues with the previous valid font. I'm not sure if this is "good enough" for the pdf documentation - your call.
>
> I don't know of any problems in the generated documentation apart from the typeface "degradation" (maybe "fallback" would be a better word) I have spoken of in this and my previous (somewhat muddled) comments.
>
> So I am inclined to let the build throw warnings if a user builds groff in this very stripped-down host environment.


Fine, it does not affect the usefulness of having the documents.

> > Confusion over basic-fonts-present.sh
> >
> > This used to check all the fonts in the default foundry were present - good. It could be used for the Standard Gropdf test. Then in comment #9 you received a number of missing fonts for a ghostscript only run and the check failed. This is absolutely correct, for a ghostscript only run all the default foundry fonts should be present, good the check worked. Why did you then change the code to make it pass the test, rather than investigate why you ended up with a restricted gropdf when a standard gropdf should be expected. The check, as it currently stands,  is meaningless, the result of running BuildFoundries will always produce at least the base-14 fonts, which is what you are now checking, it can never fail, so is a bit pointless. If you can reproduce this results - a restricted gropdf after a run with ghostscript available - please post the configure and run logs. If you can't please can basic-fonts-present.sh be returned to its former glory.
>
> Given your presentation, I agree that the test should be restored to looking for all 35 names (I'll even "generously" retain the change to a a static list per comment #10).  Another important criterion will be to not run the test at all in "scenario 00" (your "restricted gropdf").  Restricted gropdf can't fail to find PDF font files, but also can't embed them.


Bit muddled here. It is groff font files in the devpdf directory the checks look for. "PDF font files" could be confused with the fonts gropdf embeds.

> I think I also want to rename the "basic" fonts test to "check-default-foundry".  My reasoning to date has been to run it only if gs is present.  But I begin to see that it is worth running this test even when urw is also present, because the Foundry file is constructed differently.  That is, as far as I know, the only difference between the two "Enhanced gropdf" configuration scenarios.


There is actually no difference in the two foundries in the download file AR and U-AR will both point to the identical pfb file. It is the groff font files AR and U-AR which will be substantially different.

>
> In fact, given my confusion in comment #2, I think I want to rename both tests.
>
> check-default-foundry.sh
> check-u-foundry.sh


A good choice.

> I will proceed as described above but please follow-up as you are able.

Deri James <deri>
Group Member
Fri 17 Feb 2023 07:18:09 PM UTC, comment #18: 

Hi Deri,

Thank you very much--I think I may want to put much of this into a text file in the gropdf source directory.

comment #17:

> To be clear the major problem occurs when configure is run and it finds the URW fonts but not ghostscript, a minor problem is the check tests.


Acknowledged.
 

> First some definitions:-
>
> Standard gropdf
>
> This is when only the default foundry is populated with the 35 postscript fonts. This will occur if only ghostscript is available. PDF documentation will be complete. The font test should look for all the 35 fonts, error if any are missing.


Okay.  But also, the "-e" option will be nonfunctional because gropdf won't know where the Ghostscript fonts are located.  (Even if located, they may not be in a format embeddable in PDF; I assume this is the reason gropdf does not need the configure script to look for them.)  If I am correct then I will want to notify about this at configuration time.  Probably by updating the message that is already thrown when the URW fonts are unavailable.

Okay.  I think of this as "scenario 01" (binary).  urw absent, gs present.

> Enhanced gropdf
>
> Both the default and the U- foundry are populated. This will occur if the URW fonts are available. PDF documentation will be complete. In addition to the font test for standard gropdf also check for the same 35 but starting with U-.


Acknowledged.  I think of this as "scenario 11".  urw present, gs present.  No configuration notice should occur here.

> Restricted gropdf
>
> Only the base-14 fonts are available in the default foundry, there is no U- foundry. This will occur if neither ghostscript nor URW fonts are found. PDF documentation (if run will be "restricted", see below.


Acknowledged.  I think of this as "scenario 00".  urw absent, gs absent.  I already (as of recently) have a configuration notice for this.

Embedding will be impossible and the typeface lists in the grops(1) and gropdf(1) man pages in groff-man-pages.pdf should degrade.

> It is not worth doing any font checks, the base-14 fonts are always populated by BuildFoundries.


Quite reasonable.
 
Before we move on to restricted PDF documentation, you will notice that one case is not discussed above, the one which was of interest to you earlier.  I would call it "scenario 10": urw present, gs absent. 

Is this a variant of scenario "11"?  Should I in fact collapse scenarios 10 and 11 into scenario "1x"?  Equivalently, if the URW fonts are available, is the value of the gs bit "don't care"?

This would mean that the presence of URW fonts is a sufficient condition to configure gropdf in "Enhanced" mode.

I suspect that there need be no configuration notice thrown for either scenario, but that they have slightly different consequences for testing; see below.  (This may be the point you have been trying to get me to understand since comment #0.)

> Restricted PDF documentation
>
> This is documentation produced if only the base-14 fonts are available. You will notice warnings from throff about not finding particular fonts,


Yes, I saw these in "scenario 00".
 

> and warning from gropdf about not being able to embed fonts (if gropdf has been called with -P-e). A "valid" pdf will be produced (i.e. it can be opened with a viewer), but the fonts used in the pdf will be sub-optimal! When fonts can't be selected by troff it continues with the previous valid font. I'm not sure if this is "good enough" for the pdf documentation - your call.


I don't know of any problems in the generated documentation apart from the typeface "degradation" (maybe "fallback" would be a better word) I have spoken of in this and my previous (somewhat muddled) comments.

So I am inclined to let the build throw warnings if a user builds groff in this very stripped-down host environment.
 

> Confusion over basic-fonts-present.sh
>
> This used to check all the fonts in the default foundry were present - good. It could be used for the Standard Gropdf test. Then in comment #9 you received a number of missing fonts for a ghostscript only run and the check failed. This is absolutely correct, for a ghostscript only run all the default foundry fonts should be present, good the check worked. Why did you then change the code to make it pass the test, rather than investigate why you ended up with a restricted gropdf when a standard gropdf should be expected. The check, as it currently stands,  is meaningless, the result of running BuildFoundries will always produce at least the base-14 fonts, which is what you are now checking, it can never fail, so is a bit pointless. If you can reproduce this results - a restricted gropdf after a run with ghostscript available - please post the configure and run logs. If you can't please can basic-fonts-present.sh be returned to its former glory.


Given your presentation, I agree that the test should be restored to looking for all 35 names (I'll even "generously" retain the change to a a static list per comment #10).  Another important criterion will be to not run the test at all in "scenario 00" (your "restricted gropdf").  Restricted gropdf can't fail to find PDF font files, but also can't embed them.

I think I also want to rename the "basic" fonts test to "check-default-foundry".  My reasoning to date has been to run it only if gs is present.  But I begin to see that it is worth running this test even when urw is also present, because the Foundry file is constructed differently.  That is, as far as I know, the only difference between the two "Enhanced gropdf" configuration scenarios.

In fact, given my confusion in comment #2, I think I want to rename both tests.

check-default-foundry.sh
check-u-foundry.sh

I will proceed as described above but please follow-up as you are able.

G. Branden Robinson <gbranden>
Group administrator
Fri 17 Feb 2023 01:19:32 PM UTC, comment #17: 

I am glad you have said that, starting to run out of hair!

To be clear the major problem occurs when configure is run and it finds the URW fonts but not ghostscript, a minor problem is the check tests.

First some definitions:-

Standard gropdf

This is when only the default foundry is populated with the 35 postscript fonts. This will occur if only ghostscript is available. PDF documentation will be complete. The font test should look for all the 35 fonts, error if any are missing.

Enhanced gropdf

Both the default and the U- foundry are populated. This will occur if the URW fonts are available. PDF documentation will be complete. In addition to the font test for standard gropdf also check for the same 35 but starting with U-.

Restricted gropdf

Only the base-14 fonts are available in the default foundry, there is no U- foundry. This will occur if neither ghostscript nor URW fonts are found. PDF documentation (if run will be "restricted", see below. It is not worth doing any font checks, the base-14 fonts are always populated by BuildFoundries.

Restricted PDF documentation

This is documentation produced if only the base-14 fonts are available. You will notice warnings from throff about not finding particular fonts, and warning from gropdf about not being able to embed fonts (if gropdf has been called with -P-e). A "valid" pdf will be produced (i.e. it can be opened with a viewer), but the fonts used in the pdf will be sub-optimal! When fonts can't be selected by troff it continues with the previous valid font. I'm not sure if this is "good enough" for the pdf documentation - your call.

Confusion over basic-fonts-present.sh

This used to check all the fonts in the default foundry were present - good. It could be used for the Standard Gropdf test. Then in comment #9 you received a number of missing fonts for a ghostscript only run and the check failed. This is absolutely correct, for a ghostscript only run all the default foundry fonts should be present, good the check worked. Why did you then change the code to make it pass the test, rather than investigate why you ended up with a restricted gropdf when a standard gropdf should be expected. The check, as it currently stands,  is meaningless, the result of running BuildFoundries will always produce at least the base-14 fonts, which is what you are now checking, it can never fail, so is a bit pointless. If you can reproduce this results - a restricted gropdf after a run with ghostscript available - please post the configure and run logs. If you can't please can basic-fonts-present.sh be returned to its former glory.


Deri James <deri>
Group Member
Fri 17 Feb 2023 08:09:49 AM UTC, comment #16: 

Argh!  Ignore that build log!  It's the wrong one!  Or, rather, I just didn't run my test scenario correctly at all.

This invalidates much of my ramblings in the previous 3 comments.

Please disregard anything that doesn't make sense and I will try again after I'm sure I've tested the correct build scenario.

G. Branden Robinson <gbranden>
Group administrator
Fri 17 Feb 2023 07:59:58 AM UTC, comment #15: 

Sigh.

> If the Foundry file makes requests faces the default foundry use the URW fonts, why didn't this work?


Let me try to restate this in English.

If the Foundry file causes gropdf to resolve requests for faces from the default foundry to the URW fonts (and the generated Foundry file sure looks this way), why didn't this* work?


  • this = "the rendering of all the text typefaces in grops(1) to be done using themselves, as normally happens in a fully-dependency-satisfied build"
G. Branden Robinson <gbranden>
Group administrator
Fri 17 Feb 2023 07:58:13 AM UTC, comment #14: 


comment #13:

> This part I can't reproduce.  I do get generated PDF documentation; the collected groff man pages, automake.pdf, the mom docs, msboxes.pdf...


I have an 'ls' of this fact in the build log, by the way.
 

> groff-man-pages.pdf is noteworthy because grops(1)'s typefaces list uses Times roman in the listing of all text faces.  (When dependencies are fully satisfied, they render using themselves.)


I don't think I understand why this happened.  If the Foundry file makes requests faces the default foundry use the URW fonts, why didn't this work?

> gropdf(1)'s typefaces list is complete, i.e., all 35 faces


I was sloppy here.  For the sake of other readers:

33 faces.  4 styles of 8 families plus Zapf Chancery Medium Italic.  Symbol and Zapf Dingbats are not text faces.

G. Branden Robinson <gbranden>
Group administrator
Fri 17 Feb 2023 07:54:34 AM UTC, comment #13: 

comment #12:

> I have had to re-open this bug since my testing has shown some problems. First I will describe my testing method (in case there is something wrong with it). I want to do 4 separate runs after doing a git pull, a make distclean and rm -rf build (all runs will be out of tree builds with the distclean and the rm between each run).
>
> The four runs will be to test presence/absence of ghostscript and the URW fonts.
>
> Absense of ghostscript is achieved by renaming /usr/bin/gs to ogs.
>
> Absence of URW font is achieved by renaming /usr/share/fonts/default/Type1 to oType1 (this is the location of my URW fonts, your location may differ but the principle is the same).


Yes, this is practically identical to my test procedure.  I renamed things differently, but in a manner that sufficed to defeat the 'configure' script's ability to find them.

So I think your procedure was sound.
 

> The problem lies in the URW only run (no ghostscript). Configure detects no ghostscript but reports that gropdf is in base 14 fonts modeonly


...this I expected, given my understanding of your report and the support requirements.

> and then make produces no pdf documentation. The log shows there are 71 fonts available for devpdf!


This part I can't reproduce.  I do get generated PDF documentation; the collected groff man pages, automake.pdf, the mom docs, msboxes.pdf...

groff-man-pages.pdf is noteworthy because grops(1)'s typefaces list uses Times roman in the listing of all text faces.  (When dependencies are fully satisfied, they render using themselves.)

gropdf(1)'s typefaces list is complete, i.e., all 35 faces get demonstrated.  I was expecting, and for one of the test scenarios I witnessed, degradation of all text faces but the base 12 text fonts to Times roman.  So apparently I am indeed confused here, and embedding is succeeding even in a scenario where I didn't expect it to.  I was expecting the default foundry to be used, and that to be inadequate because the Ghostscript fonts were not available (per the "gs command test proxy").  But apparently gropdf will fail UPWARD to the U foundry if the default one is inadequate.  I suppose BuildFoundries is working as you intended.  Here is the Foundry file from that same build scenario as in my log file.


$ cat $(find -name Foundry)
# Foundry file

# Copyright (C) 2011-2020 Free Software Foundation, Inc.
#      Written by Deri James <deri@chuzzlewit.myzen.co.uk>
#
# This file is part of groff.
#
# groff is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# groff is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

#=======================================================================
#Foundry|Name|Search path
foundry||/usr/share/fonts/type1/urw-base35/:(gs):/usr/share/fonts/type1/gsfonts:/usr/share/fonts/default/Type1:/usr/share/fonts/default/Type1/adobestd35:/usr/share/fonts/type1/urw-base35:/opt/local/share/fonts/urw-fonts:/usr/local/share/fonts/ghostscript

# Enable the font description files for grops (generated from Adobe
# foundry font files) to be used with gropdf.  afmtodit must not be
# called with any flags.  URW fonts are substituted for Adobe fonts in
# the download file by default.  If you have Adobe Type 1 fonts, you can
# update the foundry search path above if necessary and replace the
# contents of the file fields below with their file names.

#Font|IsBase14|Flags|Map|Encoding|File(!file)...
AB|N||||URWGothic-Demi.t1!URWGothic-Demi!URWGothicL-Demi!a010015l.pfb
ABI|N||||URWGothic-DemiOblique.t1!URWGothic-DemiOblique!URWGothicL-DemiObli!a010035l.pfb
AI|N||||URWGothic-BookOblique.t1!URWGothic-BookOblique!URWGothicL-BookObli!a010033l.pfb
AR|N||||URWGothic-Book.t1!URWGothic-Book!URWGothicL-Book!a010013l.pfb
BMB|N||||URWBookman-Demi.t1!URWBookman-Demi!URWBookmanL-DemiBold!b018015l.pfb
BMBI|N||||URWBookman-DemiItalic.t1!URWBookman-DemiItalic!URWBookmanL-DemiBoldItal!b018035l.pfb
BMI|N||||URWBookman-LightItalic.t1!URWBookman-LightItalic!URWBookmanL-LighItal!b018032l.pfb
BMR|N||||URWBookman-Light.t1!URWBookman-Light!URWBookmanL-Ligh!b018012l.pfb
CB|Y||||NimbusMonoPS-Bold.t1!NimbusMonoPS-Bold!NimbusMonL-Bold!n022004l.pfb
CBI|Y||||NimbusMonoPS-BoldItalic.t1!NimbusMonoPS-BoldItalic!NimbusMonL-BoldObli!n022024l.pfb
CI|Y||||NimbusMonoPS-Italic.t1!NimbusMonoPS-Italic!NimbusMonL-ReguObli!n022023l.pfb
CR|Y||||NimbusMonoPS-Regular.t1!NimbusMonoPS-Regular!NimbusMonL-Regu!n022003l.pfb
HB|Y||||NimbusSans-Bold.t1!NimbusSans-Bold!NimbusSanL-Bold!n019004l.pfb
HBI|Y||||NimbusSans-BoldItalic!NimbusSans-BoldOblique.t1!NimbusSans-BoldOblique!NimbusSanL-BoldItal!n019024l.pfb
HI|Y||||NimbusSans-Italic!NimbusSans-Oblique.t1!NimbusSans-Oblique!NimbusSanL-ReguItal!n019023l.pfb
HNB|N||||NimbusSansNarrow-Bold.t1!NimbusSansNarrow-Bold!NimbusSanL-BoldCond!n019044l.pfb
HNBI|N||||NimbusSansNarrow-BoldOblique.t1!NimbusSansNarrow-BoldOblique!NimbusSansNarrow-BdOblique!NimbusSanL-BoldCondItal.t1!NimbusSanL-BoldCondItal!n019064l.pfb
HNI|N||||NimbusSansNarrow-Oblique.t1!NimbusSansNarrow-Oblique!NimbusSanL-ReguCondItal!n019063l.pfb
HNR|N||||NimbusSansNarrow-Regular.t1!NimbusSansNarrow-Regular!NimbusSanL-ReguCond!n019043l.pfb
HR|Y||||NimbusSans-Regular.t1!NimbusSans-Regular!NimbusSans-Regular!NimbusSanL-Regu!n019003l.pfb
NB|N||||C059-Bold.t1!C059-Bold!CenturySchL-Bold!c059016l.pfb
NBI|N||||C059-BdIta.t1!C059-BdIta!CenturySchL-BoldItal!c059036l.pfb
NI|N||||C059-Italic.t1!C059-Italic!CenturySchL-Ital!c059033l.pfb
NR|N||||C059-Roman.t1!C059-Roman!CenturySchL-Roma!c059013l.pfb
PB|N||||P052-Bold.t1!P052-Bold!URWPalladioL-Bold!p052004l.pfb
PBI|N||||P052-BoldItalic.t1!P052-BoldItalic!URWPalladioL-BoldItal!p052024l.pfb
PI|N||||P052-Italic.t1!P052-Italic!URWPalladioL-Ital!p052023l.pfb
PR|N||||P052-Roman.t1!P052-Roman!URWPalladioL-Roma!p052003l.pfb
S|Y||||StandardSymbolsPS.t1!StandardSymbolsPS!StandardSymL!s050000l.pfb
TB|Y||||NimbusRoman-Bold.t1!NimbusRoman-Bold!NimbusRomNo9L-Medi!n021004l.pfb
TBI|Y||||NimbusRoman-BoldItalic.t1!NimbusRoman-BoldItalic!NimbusRomNo9L-MediItal!n021024l.pfb
TI|Y||||NimbusRoman-Italic.t1!NimbusRoman-Italic!NimbusRomNo9L-ReguItal!n021023l.pfb
TR|Y||||NimbusRoman-Regular.t1!NimbusRoman-Regular!NimbusRomNo9L-Regu!n021003l.pfb
ZCMI|N||||Z003-MediumItalic.t1!Z003-MediumItalic!URWChanceryL-MediItal!z003034l.pfb
ZD|Y||||D050000L!D050000L.t1!Dingbats!d050000l.pfb
EURO|N||||*../devps/freeeuro.pfa

# BEGIN URW ============================================================

# URW fonts are typically shipped with Ghostscript, but can be replaced.

#Foundry|Name|Search path
foundry|U|/usr/share/fonts/type1/urw-base35/:/usr/share/fonts/type1/gsfonts:/usr/share/fonts/default/Type1:/usr/share/fonts/default/Type1/adobestd35:/usr/share/fonts/type1/urw-base35:/opt/local/share/fonts/urw-fonts:/usr/local/share/fonts/ghostscript:(gs)

# Define flags for afmtodit.

r=-i 0 -m
i=-i 50
n=-n
s=-s

#Font|IsBase14|Flags|Map|Encoding|File(!file)...
AB|N|r|text.map|text.enc|URWGothic-Demi.t1!URWGothic-Demi!URWGothicL-Demi!a010015l.pfb
ABI|N|i|text.map|text.enc|URWGothic-DemiOblique.t1!URWGothic-DemiOblique!URWGothicL-DemiObli!a010035l.pfb
AI|N|i|text.map|text.enc|URWGothic-BookOblique.t1!URWGothic-BookOblique!URWGothicL-BookObli!a010033l.pfb
AR|N|r|text.map|text.enc|URWGothic-Book.t1!URWGothic-Book!URWGothicL-Book!a010013l.pfb
BMB|N|r|text.map|text.enc|URWBookman-Demi.t1!URWBookman-Demi!URWBookmanL-DemiBold!b018015l.pfb
BMBI|N|i|text.map|text.enc|URWBookman-DemiItalic.t1!URWBookman-DemiItalic!URWBookmanL-DemiBoldItal!b018035l.pfb
BMI|N|i|text.map|text.enc|URWBookman-Light.t1!URWBookman-Light!URWBookmanL-LighItal!b018032l.pfb
BMR|N|r|text.map|text.enc|URWBookman-LightItalic.t1!URWBookman-LightItalic!URWBookmanL-Ligh!b018012l.pfb
CB|N|nr|text.map|text.enc|NimbusMonoPS-Bold.t1!NimbusMonoPS-Bold!NimbusMonL-Bold!n022004l.pfb
CBI|N|ni|text.map|text.enc|NimbusMonoPS-BoldItalic.t1!NimbusMonoPS-BoldItalic!NimbusMonL-BoldObli!n022024l.pfb
CI|N|ni|text.map|text.enc|NimbusMonoPS-Italic.t1!NimbusMonoPS-Italic!NimbusMonL-ReguObli!n022023l.pfb
CR|N|nr|text.map|text.enc|NimbusMonoPS-Regular.t1!NimbusMonoPS-Regular!NimbusMonL-Regu!n022003l.pfb
HB|N|r|text.map|text.enc|NimbusSans-Bold.t1!NimbusSans-Bold!NimbusSanL-Bold!n019004l.pfb
HBI|N|i|text.map|text.enc|NimbusSans-BoldItalic!NimbusSans-BoldItalic.t1!NimbusSans-BoldOblique!NimbusSanL-BoldItal!n019024l.pfb
HI|N|i|text.map|text.enc|NimbusSans-Italic!NimbusSans-Italic.t1!NimbusSans-Oblique!NimbusSanL-ReguItal!n019023l.pfb
HNB|N|r|text.map|text.enc|NimbusSansNarrow-Bold.t1!NimbusSansNarrow-Bold!NimbusSanL-BoldCond!n019044l.pfb
HNBI|N|i|text.map|text.enc|NimbusSansNarrow-BoldOblique.t1!NimbusSansNarrow-BoldOblique!NimbusSansNarrow-BdOblique!NimbusSanL-BoldCondItal.t1!NimbusSanL-BoldCondItal!n019064l.pfb
HNI|N|i|text.map|text.enc|NimbusSansNarrow-Oblique.t1!NimbusSansNarrow-Oblique!NimbusSanL-ReguCondItal!n019063l.pfb
HNR|N|r|text.map|text.enc|NimbusSansNarrow-Regular.t1!NimbusSansNarrow-Regular!NimbusSanL-ReguCond!n019043l.pfb
HR|N|r|text.map|text.enc|NimbusSans-Regular.t1!NimbusSans-Regular!NimbusSans-Regular!NimbusSanL-Regu!n019003l.pfb
NB|N|r|text.map|text.enc|C059-Bold.t1!C059-Bold!CenturySchL-Bold!c059016l.pfb
NBI|N|i|text.map|text.enc|C059-BdIta.t1!C059-BdIta!CenturySchL-BoldItal!c059036l.pfb
NI|N|i|text.map|text.enc|C059-Italic.t1!C059-Italic!CenturySchL-Ital!c059033l.pfb
NR|N|r|text.map|text.enc|C059-Roman.t1!C059-Roman!CenturySchL-Roma!c059013l.pfb
PB|N|r|text.map|text.enc|P052-Bold.t1!P052-Bold!URWPalladioL-Bold!p052004l.pfb
PBI|N|i|text.map|text.enc|P052-BoldItalic.t1!P052-BoldItalic!URWPalladioL-BoldItal!p052024l.pfb
PI|N|i|text.map|text.enc|P052-Italic.t1!P052-Italic!URWPalladioL-Ital!p052023l.pfb
PR|N|r|text.map|text.enc|P052-Roman.t1!P052-Roman!URWPalladioL-Roma!p052003l.pfb
S|N|sr|symbol.map||StandardSymbolsPS.t1!StandardSymbolsPS!StandardSymL!s050000l.pfb
TB|N|r|text.map|text.enc|NimbusRoman-Bold.t1!NimbusRoman-Bold!NimbusRomNo9L-Medi!n021004l.pfb
TBI|N|i|text.map|text.enc|NimbusRoman-BoldItalic.t1!NimbusRoman-BoldItalic!NimbusRomNo9L-MediItal!n021024l.pfb
TI|N|i|text.map|text.enc|NimbusRoman-Italic.t1!NimbusRoman-Italic!NimbusRomNo9L-ReguItal!n021023l.pfb
TR|N|r|text.map|text.enc|NimbusRoman-Regular.t1!NimbusRoman-Regular!NimbusRomNo9L-Regu!n021003l.pfb
ZCMI|N|i|text.map|text.enc|Z003-MediumItalic.t1!Z003-MediumItalic!URWChanceryL-MediItal!z003034l.pfb
ZD|N|sr|dingbats.map||D050000L!D050000L.t1!Dingbats!d050000l.pfb

# END URW ==============================================================


> You used to have a test basic-fonts-present.sh which tested for 35 fonts plus EURO but you have now changed it to 14 fonts plus EURO. You said because you got failures when testing with a ghostscript only run. This is a real failure, so it is better to investigate why fonts are missing than change the test to pass when something is wrong! Please can you provide the output of gs -h and an ls of whichever directory actually holds the postscript fonts. (Ghostscript may have changed the font names once again!). As you can see in my log of a ghostscript only run all 35 fonts are present in devpdf, as they should be, if they are not it is a real error.


I am starting to get confused again, but before we try to resolve this, please look at my attached output log (of a without gs, with URW fonts build) and see if you find any surprises in it.

> I think you mentioned using chroot for your tests, please make sure the paths given by gs -h are available at wherever you have chrooted to.


You are puzzling me here.  If gs is not installed (or moved out of the way), I don't expect the "gs -h" command to work at all.

> You say:


>     * font/devpdf/devpdf.am: Test availability of "basic" (PDF base
>       14) fonts (plus groff's "EURO") if either Ghostscript or URW fonts are
>       available.  Test availability of URW fonts (35) only if Ghostscript
>       _and_ the URW fonts were found at configuration time.


> The correct logic is this:-


> if gs or urw
>     run basic check
>     if urw
>         run urw check
>     end
> end


> I don't see why the urw check is only run if both gs and urw are present! The U- foundry has no no dependency on ghostscript at all. If you really want belt and braces you could rename the current basic-fonts-present.sh to base14-fonts-present.sh,


That is what I understand "basic-fonts-present" to mean.  Certainly the test could be renamed.  Maybe you are understanding "basic-fonts-present" to mean all those listed in the devps directory?

If that is the case then I am not certain we need a base14 check at all, given that grops ships with PS Level 2 base 35 font descriptions and URW always provides at least this many.  Maybe that is the root of our misunderstanding.

I suppose someone could go through and manually change their system to remove some of the URW fonts at random, but I'm not sure that's a scenario worth detecting in our configure script.  gropdf's own diagnostics should suffice if they they attempt to use the fonts they cast aside.

> and resurect the previous incarnation, and extend the logic to:-


> if gs or urw
>     run basic check
>     if urw
>         run urw check
>     end
> else
>     run base14 check
> end


This I don't understand.  What is the purpose of the "basic" check if it isn't to ensure that gropdf has font descriptions for the base 14 fonts (+EURO) that it can use to construct rudimentary PDF documents?  (Embedding only EURO, if necessary.)

Are you thinking of "basic" as a check for, so to speak, Adobe foundry fonts?  (Or the unnamed "default" foundry, equivalently?)

I was not thinking of it that way.

You will see that the post-rc2 commit count is now 75.  Here are the changes since my last push.  I don't think any of them should have any impact on this ticket, but I will be pushing again in the next day, most likely.


commit 3f1d9644283f06b5e6d3e996cfaf2dee38cda133 (HEAD -> master)
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Feb 17 01:13:38 2023 -0600

    [ms]: Port a test to Solaris 11 sed.

    * tmac/tests/s_TC-works-with-percent-in-custom-titles.sh: Put newlines
      after opening braces in sed scripts.  macOS and GNU sed tolerate their
      absence, but this sed does not.

    * HACKING: Document this problem.

commit 96e200dc5b0aec9a7b594caa6bd5877ed718bd61
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Feb 16 12:14:58 2023 -0600

    [tests]: Don't test grohtml if unsupported.

    * src/roff/groff/groff.am (groff_TESTS) [!USE_GROHTML]: Don't test the
      'grohtml' driver if we know it won't work.

commit 046dc24210336976552ec401c60f39e3b192f671
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Feb 16 11:49:51 2023 -0600

    [tests]: Fix test failure on Solaris 11.

    * src/roff/groff/tests/device_control_escapes_express_basic_latin.sh:
      Use printf(1), which is often a shell built-in command, more
      consistently.  Double backslashes intended as literals in the format
      string, and single-quote format strings using them.  Fixes test
      failure seen on Solaris 11 with GNU Bash 4.4 and ksh 93u+
      (2012-08-01).

commit 1f02825b60124fd9f048f6857902dff154da5300
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Feb 16 11:44:49 2023 -0600

    [tests]: Send progress to standard error stream.

    * src/roff/groff/tests/device_control_escapes_express_basic_latin.sh:
      Send progress updates to standard error stream.

commit 3e8eda648d6f45cea261638ae59818cacf0d2fdd
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Feb 16 11:24:18 2023 -0600

    groff(7): Fix typo.

commit 45177c87b78b21950b4f15f6fe725af3a486986d (origin/master, origin/HEAD)
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Feb 16 00:03:13 2023 -0600

    ChangeLog: Fix missing words.


I suspect some bystanders and/or groff critics will take dark amusement from our struggles to communicate with each other on this subject.  Nevertheless I think if we work through it, groff's PDF support will be the better for it.  That will set a more solid foundation for expanded font support in 1.24, giving the naysayers one fewer thing to grouse about.

(file #54367)

G. Branden Robinson <gbranden>
Group administrator
Fri 17 Feb 2023 01:29:12 AM UTC, comment #12: 

I have had to re-open this bug since my testing has shown some problems. First I will describe my testing method (in case there is something wrong with it). I want to do 4 separate runs after doing a git pull, a make distclean and rm -rf build (all runs will be out of tree builds with the distclean and the rm between each run).

The four runs will be to test presence/absence of ghostscript and the URW fonts.

Absense of ghostscript is achieved by renaming /usr/bin/gs to ogs.

Absence of URW font is achieved by renaming /usr/share/fonts/default/Type1 to oType1 (this is the location of my URW fonts, your location may differ but the principle is the same).

Each run (from the build directory, after ghostscript/URW have been adjusted to be present/absent) is:-

../configure.
[copy results of configure to a log file]
make -j4
ls font/devpdf
[copy to log to show which fonts/foundries are available]
ls doc
[copy to log to show if pdf documentation has been produced]
make check
[copy summary to log]

The four logs are attached.

The problem lies in the URW only run (no ghostscript). Configure detects no ghostscript but reports that gropdf is in base 14 fonts modeonly and then make produces no pdf documentation. The log shows there are 71 fonts available for devpdf!

You used to have a test basic-fonts-present.sh which tested for 35 fonts plus EURO but you have now changed it to 14 fonts plus EURO. You said because you got failures when testing with a ghostscript only run. This is a real failure, so it is better to investigate why fonts are missing than change the test to pass when something is wrong! Please can you provide the output of gs -h and an ls of whichever directory actually holds the postscript fonts. (Ghostscript may have changed the font names once again!). As you can see in my log of a ghostscript only run all 35 fonts are present in devpdf, as they should be, if they are not it is a real error.

I think you mentioned using chroot for your tests, please make sure the paths given by gs -h are available at wherever you have chrooted to.

You say:

    * font/devpdf/devpdf.am: Test availability of "basic" (PDF base
      14) fonts (plus groff's "EURO") if either Ghostscript or URW fonts are
      available.  Test availability of URW fonts (35) only if Ghostscript
      _and_ the URW fonts were found at configuration time.

The correct logic is this:-

if gs or urw
    run basic check
    if urw
        run urw check
    end
end

I don't see why the urw check is only run if both gs and urw are present! The U- foundry has no no dependency on ghostscript at all. If you really want belt and braces you could rename the current basic-fonts-present.sh to base14-fonts-present.sh, and resurect the previous incarnation, and extend the logic to:-

if gs or urw
    run basic check
    if urw
        run urw check
    end
else
    run base14 check
end


(file #54363, file #54364, file #54365, file #54366)

Deri James <deri>
Group Member
Thu 16 Feb 2023 06:02:17 AM UTC, comment #11: 


commit 1a329068ddccc11e4d91e7825f3de2d1550f75e5
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Feb 15 13:28:29 2023 -0600

    m4/groff.m4: Fix Savannah #63808 (1/3).

    * m4/groff.m4 (GROFF_CHECK_GROPDF_PROGRAMS): Better characterize
      gropdf's reduced function, pointing out the ways in which it would be
      more useful if the dependencies were met.

      (GROFF_URW_FONTS_NOTICE): Identify 'U' as the foundry name gropdf uses
      for the URW fonts.  Confirm continuing availability of most recent URW
      fonts release; bump date.

    Fixes <https://savannah.gnu.org/bugs/?63808>.  Thanks to Deri James for
    the report and extremely helpful pseudocode.

commit 9578e1f516b69833114bc35f8ed245952533f3e1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Feb 15 17:38:22 2023 -0600

    [build]: Fix Savannah #63808 (2/3).

    * configure.ac: Call new macro `GROFF_GHOSTSCRIPT_AVAILABILITY_NOTICE`.
      Call `GROFF_GHOSTSCRIPT_VERSION_NOTICE` after it, but before
      `GROFF_URW_FONTS_NOTICE`.

    * m4/groff.m4 (GROFF_AWK_NOTICE): New macro produces warning if no awk
      could be found.  This reduces gropdf functionality, but so do missing
      URW fonts, so we report this problem separately.  Report the names
      under which we sought it, since there's configure script option for
      that.

      (GROFF_GHOSTSCRIPT_AVAILABILITY_NOTICE): New macro explains
      consequences of missing optional dependency on Ghostscript program:
      reduced grohtml functionality, nonfunctional pdfroff.  Report the
      names under which we sought it, since there's configure script option
      for that.

      (GROFF_CHECK_GROPDF_PROGRAMS): Simplify the computational grammar.

commit 195e17f2d9a42cebdd4aa6fc4ce4e65342c26181
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Feb 15 17:48:32 2023 -0600

    [build, gropdf]: Fix Savannah #63808 (3/3).

    * configure.ac: Add Automake conditional, `HAVE_GHOSTSCRIPT`, so that we
      can populate the list of PDF device font tests dynamically.

    * font/devpdf/devpdf.am: Test availability of "basic" (PDF base
      14) fonts (plus groff's "EURO") if either Ghostscript or URW fonts are
      available.  Test availability of URW fonts (35) only if Ghostscript
      _and_ the URW fonts were found at configuration time.

    Test procedure for Savannah #63808:

    ./configure --prefix=$HOME
    make -j check
    make install
    make uninstall
    test -z "$(find $HOME/{bin,lib,share} -type f)" && echo clean
    make distclean

    Configurations and test results (total/pass/skip/xfail)
    -------------------------------------------------------
    without gs, without URW fonts: 161/152/7/2
    with gs, without URW fonts: 162/155/5/2
    without gs, with URW fonts: 162/153/7/2
    with gs, with URW fonts: 163/156/5/2


G. Branden Robinson <gbranden>
Group administrator
Thu 16 Feb 2023 04:11:06 AM UTC, comment #10: 


checking for font description DESC...


Also, that's bullshit.  Happens because it's an in-tree build.  Will fix.  (Easy, using a static font description list.)

G. Branden Robinson <gbranden>
Group administrator
Thu 16 Feb 2023 04:09:30 AM UTC, comment #9: 

comment #5:

> Incidentally, why do you have a static list for urw check but a dynamic list (from devps) for basic check. They are equivalent except urw check is looking for the name with U- at the beginning?


Okay, this is a little clearer to me now that I have a failing test case when Ghostscript is installed but the URW fonts aren't, and I'm using the logic you suggested:


if gs or urw
    run basic check
    if urw
        run urw check
    end
end


So I'll make it static lists in both places.  Here's why.


...
GNU roff version 1.23.0.rc2.67-b99f3
----------------------------------------------------------------------
 installation directory prefix    : /home/branden
 C++ compiler and options         : g++ -g -O2
 use libgroff's memory allocator  : no
 C compiler and options           : gcc -g -O2
 Perl interpreter version         : 5.32.1
 X11 support                      : disabled
 'groff -l' uses print spooler    : no
 Ghostscript command              : gs
 use URW fonts for PDF output     : no
 preconv can use uchardet library : no
 can build groff.dvi, groff.pdf   : no
 tests can use poppler PDF tools  : no
----------------------------------------------------------------------
...
============================================================================
Testsuite summary for GNU roff 1.23.0.rc2.67-b99f3
============================================================================
# TOTAL: 162
# PASS:  154
# SKIP:  5
# XFAIL: 2
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to http://savannah.gnu.org/bugs/?group=groff
============================================================================
make[3]: *** [Makefile:10437: test-suite.log] Error 1
...
$ ./font/devpdf/tests/basic-fonts-present.sh
/usr/bin/gs
checking for font description AB...
FAILED
checking for font description ABI...
FAILED
checking for font description AI...
FAILED
checking for font description AR...
FAILED
checking for font description BMB...
FAILED
checking for font description BMBI...
FAILED
checking for font description BMI...
FAILED
checking for font description BMR...
FAILED
checking for font description CB...
checking for font description CBI...
checking for font description CI...
checking for font description CR...
checking for font description DESC...
checking for font description EURO...
checking for font description HB...
checking for font description HBI...
checking for font description HI...
checking for font description HNB...
FAILED
checking for font description HNBI...
FAILED
checking for font description HNI...
FAILED
checking for font description HNR...
FAILED
checking for font description HR...
checking for font description NB...
FAILED
checking for font description NBI...
FAILED
checking for font description NI...
FAILED
checking for font description NR...
FAILED
checking for font description PB...
FAILED
checking for font description PBI...
FAILED
checking for font description PI...
FAILED
checking for font description PR...
FAILED
checking for font description S...
checking for font description TB...
checking for font description TBI...
checking for font description TI...
checking for font description TR...
checking for font description ZCMI...
FAILED
checking for font description ZD...


G. Branden Robinson <gbranden>
Group administrator
Thu 16 Feb 2023 02:34:12 AM UTC, comment #8: 


original submission:

> Currently, if ghostscript is not found, no pdf documentation is produced by make. This is incorrect, the logic should be:-
>


gs=found ghostcript
urw=found urw

if !gs
    warn can't make html doc (don't make html doc)
    warn can't use pdfroff (don't make pdfmark.pdf - or change it to use -Tpdf)
end


Just for the record, these pieces seem to already be in place.

G. Branden Robinson <gbranden>
Group administrator
Wed 15 Feb 2023 07:13:13 PM UTC, comment #7: 

The URW postscript fonts were donated to ghostscript. [1]. If we look at helvetica, for example, it is actually owned by linotype and licensed to adobe, microsoft and apple. When adobe developed postscript they included the licensed font as one of the 35 fonts. So the urw-fonts are in ghostscript if we look at the font header of the ghostscript font:-

%!PS-AdobeFont-1.0: NimbusSans-Regular 1.00
%%CreationDate: Thu Jul 27 2017
% Copyright (URW)++,Copyright 2014 by (URW)++ Design & Development
% (URW)++,Copyright 2014 by (URW)++ Design & Development

And compare it with the current URW font:-

%!PS-AdobeFont-1.0: NimbusSanL-Regu 1.06_%{version}-%{release}
%%Title: NimbusSanL-Regu
%Version: 1.06_%{version}-%{release}
%%CreationDate: Wed Feb 12 09:48:20 2020
%%Creator: Unknown
%Copyright: Copyright (URW)++,Copyright 1999 by (URW)++ Design &
%Copyright:  Development; Cyrillic glyphs aded by Valek Filippov (C).

There are differences, but the roots are the same. The default foundry contains the 35 postscript fonts, as does the U- foundry. The difference is that the default foundry uses the fonts from grops which defines 256 glyphs (which is what I assume is in the original Helvetica used by Adobe), whereas the U- foundry runs afmtodit so it has access to all the glyphs in the URW font (over 500). Compare the files HR and U-HR to see what I mean.

So the groff font names in the U- foundry are always a one to one match to the default foundry (with U- prepended), which in turn is a match with the names in grops (bar the ones you filter in basic checks).

I hope I have been clear enough, the "source of truth" for both is the same.

[1] https://tug.org/fonts/deutsch-urw.txt

Deri James <deri>
Group Member
Wed 15 Feb 2023 05:46:34 PM UTC, comment #6: 


comment #5:

> Incidentally, why do you have a static list for urw check but a dynamic list (from devps) for basic check. They are equivalent except urw check is looking for the name with U- at the beginning?


We have an internal (to groff), separate "source of truth" for the list of devps fonts; I figure the pdf device should support whatever fonts the ps device happens to support as shipped by groff (except for those we know it doesn't need or aren't "real" fonts).

We don't have a single source of truth for the URW collection of font names, though if you were to suggest we should develop one, since there are several places it would be useful, I would agree.

G. Branden Robinson <gbranden>
Group administrator
Wed 15 Feb 2023 05:36:30 PM UTC, comment #5: 

Incidentally, why do you have a static list for urw check but a dynamic list (from devps) for basic check. They are equivalent except urw check is looking for the name with U- at the beginning?

Deri James <deri>
Group Member
Wed 15 Feb 2023 05:32:09 PM UTC, comment #4: 


comment #3:

> It should be:-
>


> if gs or urw
>     run basic check
>     if urw
>         run urw check
>     end
> end


>
> The reason is that URW fonts on their own are sufficient to populate both the default and U- foundries. Ghostscript on its own will only populate the default foundry. The difference is because ghostscript does not supply the afm files so unable to run afmtodit.


Thanks!  This is helpful.

I'm preparing a push just for doc fixes--should happen momentarily.  After that I'll whack on this, which will take some time because I'll need to fire up my chroot and test multiple configuration scenarios.

G. Branden Robinson <gbranden>
Group administrator
Wed 15 Feb 2023 05:24:48 PM UTC, comment #3: 

It should be:-


if gs or urw
    run basic check
    if urw
        run urw check
    end
end


The reason is that URW fonts on their own are sufficient to populate both the default and U- foundries. Ghostscript on its own will only populate the default foundry. The difference is because ghostscript does not supply the afm files so unable to run afmtodit.

Deri James <deri>
Group Member
Wed 15 Feb 2023 04:41:05 PM UTC, comment #2: 

Hi Deri,

original submission:

> if gs or urw
>     run pdf fonts check
> end


I have a question about this bit.  There are two pdf font checks, "basic" and "URW".


font/devpdf/tests/basic-fonts-present.sh
font/devpdf/tests/urw-fonts-present.sh


I'm thinking then that the logic should be:


if gs
  run basic pdf font check
endif
if urw
  run urw pdf font check
endif


Does that look correct/plausible to you?

G. Branden Robinson <gbranden>
Group administrator
Wed 15 Feb 2023 04:37:03 PM UTC, comment #1: 

Thanks, Deri, I'll have a look.

G. Branden Robinson <gbranden>
Group administrator
Wed 15 Feb 2023 04:34:40 PM UTC, original submission:  

Currently, if ghostscript is not found, no pdf documentation is produced by make. This is incorrect, the logic should be:-


gs=found ghostcript
urw=found urw

if !gs
    warn can't make html doc (don't make html doc)
    warn can't use pdfroff (don't make pdfmark.pdf - or change it to use -Tpdf)
end

if !urw
    warn urw fonts not found U foundry not available to gropdf please install
    if !gs
        warn can't make pdf docs (don't make pdf docs)
        warn gropdf limited to 14 base fonts plus EURO and not able to embed fonts with -P-e
    end
end

if gs or urw
    run pdf fonts check
end



Deri James <deri>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #54388:  gs-solaris10 added by gbranden (10KiB - application/octet-stream)
file #54363:  URW@and@GS.log added by deri (3KiB - text/x-log)
file #54364:  URW@Only@No@GS.log added by deri (3KiB - text/x-log)
file #54365:  No@GS@and@No@URW.log added by deri (4KiB - text/x-log)
file #54366:  GS@only.log added by deri (3KiB - text/x-log)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by deri (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 25 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-02-25 gbranden Attached File- Added typescript-gbr-groff-1.23.0.rc3.31-a887a-debian-bullseye.txt, #54394
    2023-02-21 gbranden Attached File- Added gs-solaris10, #54388
    2023-02-20 gbranden Attached File- Added typescript-gbr-groff-1.23.0.rc2.93-a6c8-solaris11.txt, #54382
    2023-02-18 gbranden Attached File- Added typescript-gbr-groff-1.23.0.rc2.88-6e00.txt, #54381
        Severity5 - Blocker 3 - Normal
        StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2023-02-18 gbranden StatusNeed Info In Progress
    2023-02-18 gbranden Attached File- Added groff-build-log.gbr.2023-02-18.txt, #54377
        StatusIn Progress Need Info
    2023-02-17 gbranden StatusNeed Info In Progress
    2023-02-17 gbranden Attached File- Added 63808-gbr-without-gs-with-urw.log, #54367
    2023-02-17 deri Attached File- Added URW@and@GS.log, #54363
        Attached File- Added URW@Only@No@GS.log, #54364
        Attached File- Added No@GS@and@No@URW.log, #54365
        Attached File- Added GS@only.log, #54366
        StatusFixed Need Info
        Open/ClosedClosed Open
    2023-02-16 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2023-02-15 gbranden Planned ReleaseNone 1.23.0
    2023-02-15 deri StatusNeed Info In Progress
    2023-02-15 gbranden StatusConfirmed Need Info
    2023-02-15 gbranden Severity3 - Normal 5 - Blocker
        Assigned toNone gbranden

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code