diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2023-02-24 08:42:46 -0600 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2023-02-25 02:19:16 -0600 |
commit | b379382ea6f91dc2408973db8eb284d56255580b (patch) | |
tree | ac49e9fd21ec6b0e7ce751752a391c7db11dbc6f /m4 | |
parent | 61f0a98453c3c99d053c2364a8678386e9a5fbd3 (diff) | |
download | groff-git-b379382ea6f91dc2408973db8eb284d56255580b.tar.gz |
[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.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/groff.m4 | 20 |
1 files changed, 9 insertions, 11 deletions
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 \ |