mirror of
https://https.git.savannah.gnu.org/git/groff.git
synced 2026-01-26 15:39:07 +00:00
[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.
This commit is contained in:
parent
046d3c6b3b
commit
168d596d31
17
ChangeLog
17
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
|
||||
|
||||
@ -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@
|
||||
|
||||
fonts='AB
|
||||
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'
|
||||
|
||||
# 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 $fonts
|
||||
for f in $mandatory_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
|
||||
|
||||
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"
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user