From 38570563840748c7ae5a0a5c1514a9f0b1fdf91a Mon Sep 17 00:00:00 2001 From: "G. Branden Robinson" Date: Sat, 18 Feb 2023 01:37:28 -0600 Subject: [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 . Thanks to Deri James for the continued discussion. --- font/devpdf/tests/basic-fonts-present.sh | 64 +++++++++++++++----------------- font/devpdf/tests/urw-fonts-present.sh | 6 +-- 2 files changed, 32 insertions(+), 38 deletions(-) (limited to 'font') diff --git a/font/devpdf/tests/basic-fonts-present.sh b/font/devpdf/tests/basic-fonts-present.sh index a8dd05b82..1ddd83d0b 100755 --- a/font/devpdf/tests/basic-fonts-present.sh +++ b/font/devpdf/tests/basic-fonts-present.sh @@ -18,44 +18,27 @@ # along with this program. If not, see . # -# Ensure that groff's PDF device has the copies it needs of PostScript -# device font descriptions. +# 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. # -# This is for the reduced-functionality configuration that occurs when -# optional dependencies are not met; we require only font descriptions -# of the PDF base 14 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 fully armed gropdf configuration. - -# Locate directory containing the font descriptions for the PostScript -# device. -for srcroot in . .. ../.. -do - # Look for a source file characteristic of the groff source tree. - if ! [ -f "$srcroot"/ChangeLog.115 ] - then - continue - fi - - d=$srcroot/font/devps - if [ -d "$d" ] - then - devps_fontsrcdir=$d - break - fi -done - -# If we can't find it, we can't test. -if [ -z "$devps_fontsrcdir" ] -then - echo "$0: cannot locate font descriptions for 'ps' device;" \ - "skipping test" >&2 - exit 77 # skip -fi +# Another test script checks the "U" (URW) foundry. devpdf_fontbuilddir="${abs_top_builddir:-.}"/font/devpdf -psfonts='CB +fonts='AB +ABI +AI +AR +BMB +BMBI +BMI +BMR +CB CBI CI CR @@ -63,17 +46,30 @@ 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 $psfonts +for f in $fonts do printf "checking for font description %s...\n" "$f" >&2 if ! [ -f "$devpdf_fontbuilddir"/"$f" ] diff --git a/font/devpdf/tests/urw-fonts-present.sh b/font/devpdf/tests/urw-fonts-present.sh index 67af0f967..9d4e514bf 100755 --- a/font/devpdf/tests/urw-fonts-present.sh +++ b/font/devpdf/tests/urw-fonts-present.sh @@ -22,9 +22,7 @@ devpdf_fontbuilddir="${abs_top_builddir:-.}"/font/devpdf -# TODO: Scrape this list out of Foundry or Foundry.in. Not possible -# with grep, likely a little tedious with sed. -urwfonts='AB +fonts='AB ABI AI AR @@ -62,7 +60,7 @@ ZD' fail= -for basefontname in $urwfonts +for basefontname in $fonts do f=U-$basefontname printf "checking for font description %s...\n" $f >&2 -- cgit v1.2.1