gbranden pushed a commit to branch master
in repository groff.
commit 741f79a857ea888078c8254f85ec736b9c528f52
Author: Deri James <[email protected]>
AuthorDate: Mon Jul 27 15:08:06 2026 +0000
[devpdf]: Fix Savannah #68567.
Revise search for URW fonts to exclude
"/usr/share/ghostscript/Resource/Font".
* font/devpdf/Foundry.in:
* m4/groff.m4 (GROFF_URW_FONTS_CHECK): Drop it.
Systems like Arch and Manjaro Linux don't use Debian's approach to
Ghostscript and URW font packaging. Our "configure" script should be
looking only for the full URW fonts package, not not Ghostscript's
"Resource/Font" directory. If Ghostscript is installed, we can
configure gropdf's "intermediate" service level at least, and the
directory will be found by "BuildFoundries" when it parses the output of
the "gs -h" command. What "configure" should be doing is finding the
full URW fonts directory, and if found, setting "$urwfontsdir." It
should not be looking for Ghostscript-provided fonts at all.
We know that if the only URW fonts found are the ones supplied in
Ghostscript's "Resource" font directory, there are not going to be any
AFMs. `groff_have_urw_fonts` should be set only if the PFB files are
found elsewhere. It suffices to have `$GHOSTSCRIPT != "missing"` to
know that "intermediate" service is available.
Tested by adding my Ghostscript "Resource/Font" to "groff.m4", hiding
real URW fonts where "configure" won't find them, and reproducing the
"check-urw-foundry.sh" test script failure observed on Manjaro. If I
then remove that directory from "groff.m4" it then reports
"intermediate" and the test passes.
"configure" could look for AFM files as well, but it is unnecessary so
long as we don't search paths matching "Resource/Font".
Fixes <https://savannah.gnu.org/bugs/?68567>. Thanks to Bruno Haible
for the report.
---
ChangeLog | 39 +++++++++++++++++++++++++++++++++++++++
font/devpdf/Foundry.in | 2 +-
m4/groff.m4 | 3 +--
3 files changed, 41 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 51a4ab4de..c8d6e2cae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,42 @@
+2026-07-27 Deri James <[email protected]>
+
+ [devpdf]: Revise search for URW fonts to exclude
+ "/usr/share/ghostscript/Resource/Font".
+
+ * font/devpdf/Foundry.in:
+ * m4/groff.m4 (GROFF_URW_FONTS_CHECK): Drop it.
+
+ Systems like Arch and Manjaro Linux don't use Debian's approach
+ to Ghostscript and URW font packaging. Our "configure" script
+ should be looking only for the full URW fonts package, not
+ not Ghostscript's "Resource/Font" directory. If Ghostscript is
+ installed, we can configure gropdf's "intermediate" service
+ level at least, and the directory will be found by
+ "BuildFoundries" when it parses the output of the "gs -h"
+ command. What "configure" should be doing is finding the full
+ URW fonts directory, and if found, setting "$urwfontsdir." It
+ should not be looking for Ghostscript-provided fonts at all.
+
+ We know that if the only URW fonts found are the ones supplied
+ in Ghostscript's "Resource" font directory, there are not going
+ to be any AFMs. `groff_have_urw_fonts` should be set only if
+ the PFB files are found elsewhere. It suffices to have
+ `$GHOSTSCRIPT != "missing"` to know that "intermediate" service
+ is available.
+
+ Tested by adding my Ghostscript "Resource/Font" to "groff.m4",
+ hiding real URW fonts where "configure" won't find them, and
+ reproducing the "check-urw-foundry.sh" test script failure
+ observed on Manjaro. If I then remove that directory from
+ "groff.m4" it then reports "intermediate" and the test passes.
+
+ "configure" could look for AFM files as well, but it is
+ unnecessary so long as we don't search paths matching
+ "Resource/Font".
+
+ Fixes <https://savannah.gnu.org/bugs/?68567>. Thanks to Bruno
+ Haible for the report.
+
2026-07-28 G. Branden Robinson <[email protected]>
* doc/doc.am: Cut down "automake.pdf"'s excessive make(1)
diff --git a/font/devpdf/Foundry.in b/font/devpdf/Foundry.in
index 2760596ed..56297fc47 100644
--- a/font/devpdf/Foundry.in
+++ b/font/devpdf/Foundry.in
@@ -21,7 +21,7 @@
#=======================================================================
#Foundry|Name|Search path
-foundry||@urwfontsdir@:(gs):/usr/share/fonts/type1/urw-base35/:/usr/share/fonts/urw-base35:/opt/local/share/fonts/urw-fonts/:/usr/local/share/fonts/ghostscript/:/usr/share/fonts/type1/gsfonts/:/usr/share/fonts/type1/:/usr/share/fonts/default/Type1/adobestd35/:/usr/share/fonts/default/Type1/:/usr/share/ghostscript/Resource/Font
+foundry||@urwfontsdir@:(gs):/usr/share/fonts/type1/urw-base35/:/usr/share/fonts/urw-base35:/opt/local/share/fonts/urw-fonts/:/usr/local/share/fonts/ghostscript/:/usr/share/fonts/type1/gsfonts/:/usr/share/fonts/type1/:/usr/share/fonts/default/Type1/adobestd35/:/usr/share/fonts/default/Type1/
# Enable the font description files for grops (generated from Adobe
# foundry font files) to be used with gropdf. afmtodit must not be
diff --git a/m4/groff.m4 b/m4/groff.m4
index e502524c2..07a9871e0 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -342,8 +342,7 @@ dnl Keep this list in sync with font/devpdf/Foundry.in.
/usr/share/fonts/type1/gsfonts/ \
/usr/share/fonts/type1/ \
/usr/share/fonts/default/Type1/adobestd35/ \
- /usr/share/fonts/default/Type1/ \
- /usr/share/ghostscript/Resource/Font"
+ /usr/share/fonts/default/Type1/"
if test -n "$urwfontsdir"
then
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit