Hi Kurt, At 2023-12-18T15:40:13-0500, T. Kurt Bond wrote: > I was building groff 1.23.0 on Fedora 39 and found that its > configure script didn't find the URW base 35 fonts, although they are > installed and the directory that they are in - > /usr/share/fonts/urw-base35 - is reported by gs -h: > > GPL Ghostscript 10.02.1 (2023-11-01) > Copyright (C) 2023 Artifex Software, Inc. All rights reserved. > [Irrelevant -h output elided.] > Search path: > /usr/share/ghostscript/Resource/Init : /usr/share/ghostscript/lib : > /usr/share/ghostscript/Resource/Font : /usr/share/ghostscript/fonts : > /usr/share/fonts/urw-base35 : /usr/share/fonts/google-droid-sans-fonts > Ghostscript is also using fontconfig to search for font files > > I continued with the '--with-urw-fonts-dir=DIR' option, but thought > I'd mention the problem.
At 2023-12-19T13:02:54-0500, T. Kurt Bond wrote: > On Mon, 18 Dec 2023 16:49:10 -0500, > "G. Branden Robinson" <g.branden.robin...@gmail.com> wrote: > > First thing to know is, did that ./configure option fix this build in > > this respect? > > Yes. The build and installation finished correctly, and the resulting > groff works. Okay, so the issue must be in our Autoconf macro that attempts to locate these fonts. I'll share two, starting with the simpler one that supports the `--with-urw-fonts-dir` option noted above, so that some variable references are clear. # Make URW font directory configurable. AC_DEFUN([GROFF_URW_FONTS_PATH], [ AC_ARG_WITH([urw-fonts-dir], [AS_HELP_STRING([--with-urw-fonts-dir=DIR], [search for URW PostScript Type 1 fonts in DIR])], [urwfontsdir="$withval"]) ]) # Check for availability of URW fonts in the directory specified by the # 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_GHOSTSCRIPT_PATH]) groff_have_urw_fonts=no AC_MSG_CHECKING([for URW fonts in Type 1/PFB format]) dnl Keep this list in sync with font/devpdf/Foundry.in. _list_paths="\ /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/" if test -n "$urwfontsdir" then _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 \ URWGothic-Book \ URWGothic-Book.t1 \ URWGothic-Book.pfb \ URWGothicL-Book.pfb \ a010013l.pfb do if test -f $k/$_font_file then AC_MSG_RESULT([found in $k]) groff_have_urw_fonts=yes urwfontsdir=$k break 2 fi done done if test $groff_have_urw_fonts = no then AC_MSG_RESULT([none found]) urwfontsdir= fi AC_SUBST([groff_have_urw_fonts]) AC_SUBST(urwfontsdir) ]) The lengthy comment up there looks like it might hold the explanation. # ... 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). So this may be working as designed--working _around_ a convention of frustrating limitation by some distributors of fonts. Do any of the following directories exist on Fedora 39 and contain .afm files alongside the fonts proper? _list_paths="\ /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/" Regards, Branden
signature.asc
Description: PGP signature