Debian Codegraph @

texk/dvipdfm-x/dvipdfmx-ttf0.test

raw
1 #! /bin/sh -vx
2 # $Id: dvipdfmx-ttf0.test 74206 2025-02-22 18:41:57Z karl $
3 # Copyright 2025 Japanese TeX Development Community <[email protected]>
4 # You may freely use, modify and/or distribute this file.
5
6 KpsDir=${KpsDir:-../kpathsea}
7 BinDir=${BinDir:-.}
8 ExeExt=${ExeExt:-}
9 _kpsewhich=$KpsDir/kpsewhich$ExeExt
10 _xdvipdfmx=$BinDir/xdvipdfmx$ExeExt
11
12 if type kpsewhich > /dev/null 2>&1; then
13 ttfpath=".//;"`kpsewhich -show-path='truetype fonts'`
14 ttfpath=`echo $ttfpath | sed -e 's,!!,,g'`
15 tfmpath=".//;"`kpsewhich -show-path='tfm'`
16 tfmpath=`echo $tfmpath | sed -e 's,!!,,g'`
17 encpath=".//;"`kpsewhich -show-path='enc files'`
18 encpath=`echo $encpath | sed -e 's,!!,,g'`
19 fi
20
21 TEXMFCNF=$srcdir/../kpathsea
22 T1FONTS="$srcdir/tests;$srcdir/data"
23 TEXFONTMAPS="$srcdir/tests;$srcdir/data"
24 DVIPDFMXINPUTS="$srcdir/tests;$srcdir/data"
25 TEXPICTS=$srcdir/tests
26 TEXFONTS=".;$srcdir/tests"
27 SOURCE_DATE_EPOCH=1588474800
28 export TEXMFCNF T1FONTS TEXFONTMAPS DVIPDFMXINPUTS TEXPICTS TEXFONTS SOURCE_DATE_EPOCH
29
30 if type kpsewhich > /dev/null 2>&1; then
31 echo $ttfpath
32 echo $tfmpath
33 echo $encpath
34 else
35 ttfpath=".//;"`$_kpsewhich -show-path='truetype fonts'`
36 echo $ttfpath
37 tfmpath=".//;"`$_kpsewhich -show-path='tfm'`
38 echo $tfmpath
39 encpath=".//;"`$_kpsewhich -show-path='enc files'`
40 echo $encpath
41 fi
42 TTFONTS=`$_kpsewhich "--cnf-line=TTFONTS=$ttfpath" -show-path='truetype fonts'`
43 export TTFONTS
44 echo "TTFONTS::" $TTFONTS
45 TFMFONTS=`$_kpsewhich "--cnf-line=TFMFONTS=$tfmpath" -show-path='tfm'`
46 export TFMFONTS
47 echo "TFMFONTS::" $TFMFONTS
48 ENCFONTS=`$_kpsewhich "--cnf-line=ENCFONTS=$encpath" -show-path='enc files'`
49 export ENCFONTS
50 echo "ENCFONTS::" $ENCFONTS
51
52 failed=
53
54 ##### following tests require Cuprum fonts #####
55
56 $_kpsewhich Cuprum-Regular.ttf || exit 77
57 $_kpsewhich cprmn8t.tfm || exit 77
58 $_kpsewhich T1-WGL4.enc || exit 77
59
60 echo "*** dvipdfmx: test for cprm00.pdf" && echo \
61 && $_xdvipdfmx --dvipdfmx -vv -o cprm00.pdf $srcdir/tests/cprm00.dvi \
62 && echo && echo "dvipdfmx-ttf0 tests OK" && echo \
63 || failed="$failed dvipdfmx-ttf0"
64
65
66 test -z "$failed" && exit 0
67 echo
68 echo "failed tests:$failed"
69 exit 1