From 6d5e8c35c4fa102af6ca5a46fc8ca8f1648420f4 Mon Sep 17 00:00:00 2001 From: TANAKA Takuji Date: Sat, 17 Aug 2024 23:23:19 +0900 Subject: [PATCH] dvipdfm-x: add tests for ofm, latin modern (#170) --- source/texk/dvipdfm-x/Makefile.am | 7 +- source/texk/dvipdfm-x/Makefile.in | 11 +- source/texk/dvipdfm-x/dvipdfmx-lmr0.test | 67 ++++++++++++ source/texk/dvipdfm-x/tests/Makefile_upjf | 4 + source/texk/dvipdfm-x/tests/UPJF-UTF16-H | 9 +- source/texk/dvipdfm-x/tests/lm.map | 1 + source/texk/dvipdfm-x/tests/lmr0-al.dvi | Bin 0 -> 848 bytes source/texk/dvipdfm-x/tests/lmr0-up.dvi | Bin 0 -> 688 bytes source/texk/dvipdfm-x/tests/lmr0.tex | 107 ++++++++++++++++++++ source/texk/dvipdfm-x/tests/psfonts.map | 4 + source/texk/dvipdfm-x/tests/upjf1_full.vf | Bin 7008 -> 7108 bytes source/texk/dvipdfm-x/tests/upjf1_full.zvp0 | 51 ++++++++++ source/texk/dvipdfm-x/tests/upjf1_omit.vf | Bin 6940 -> 7032 bytes source/texk/dvipdfm-x/tests/upjf1_omit.zvp0 | 44 ++++++++ source/texk/dvipdfm-x/tests/upjf2_full.vf | Bin 7168 -> 7268 bytes source/texk/dvipdfm-x/tests/upjf2_full.zvp0 | 51 ++++++++++ source/texk/dvipdfm-x/tests/upjf_full.cnf | 5 + source/texk/dvipdfm-x/tests/upjf_full.vf | Bin 7008 -> 7136 bytes source/texk/dvipdfm-x/tests/upjf_omit.cnf | 5 + source/texk/dvipdfm-x/tests/upjf_omit.vf | Bin 6972 -> 7084 bytes source/texk/dvipdfm-x/tests/upjv2_full.vf | Bin 7168 -> 7268 bytes source/texk/dvipdfm-x/tests/upjv2_full.zvp0 | 51 ++++++++++ 22 files changed, 410 insertions(+), 7 deletions(-) create mode 100755 source/texk/dvipdfm-x/dvipdfmx-lmr0.test create mode 100644 source/texk/dvipdfm-x/tests/lm.map create mode 100644 source/texk/dvipdfm-x/tests/lmr0-al.dvi create mode 100644 source/texk/dvipdfm-x/tests/lmr0-up.dvi create mode 100644 source/texk/dvipdfm-x/tests/lmr0.tex diff --git a/source/texk/dvipdfm-x/Makefile.am b/source/texk/dvipdfm-x/Makefile.am index 62ad374421..0541572c9e 100644 --- a/source/texk/dvipdfm-x/Makefile.am +++ b/source/texk/dvipdfm-x/Makefile.am @@ -250,10 +250,12 @@ TESTS = xdvipdfmx.test xdvipdfm-ann.test xdvipdfm-bad.test xdvipdfm-bb.test TESTS += xdvipdfm-bkm.test xdvipdfm-psz.test xdvipdfm-ptx.test xdvipdfm-res.test TESTS += xdvipdfm-rev.test xdvipdfm-ttc.test TESTS += dvipdfmx-upjf.test dvipdfmx-upjf2.test dvipdfmx-upjf3.test dvipdfmx-incl.test +TESTS += dvipdfmx-lmr0.test xdvipdfmx.log xdvipdfm-ann.log xdvipdfm-bad.log xdvipdfm-bb.log \ xdvipdfm-bkm.log xdvipdfm-psz.log xdvipdfm-ptx.log xdvipdfm-res.log \ xdvipdfm-rev.log xdvipdfm-ttc.log \ - dvipdfmx-upjf.log dvipdfmx-upjf2.log dvipdfmx-upjf3.log dvipdfmx-incl.log: \ + dvipdfmx-upjf.log dvipdfmx-upjf2.log dvipdfmx-upjf3.log dvipdfmx-incl.log \ + dvipdfmx-lmr0.log: \ xdvipdfmx$(EXEEXT) EXTRA_DIST = $(TESTS) ## xdvipdfmx.test @@ -328,5 +330,8 @@ DISTCLEANFILES += upjf3_*.pdf ## dvipdfmx-incl.test EXTRA_DIST += tests/multi_incl.dvi tests/multi_incl.tex tests/sue-mp.pdf DISTCLEANFILES += multi_incl.pdf +## dvipdfmx-lmr0.test +EXTRA_DIST += tests/lmr0.tex tests/lmr0-al.dvi tests/lmr0-up.dvi +DISTCLEANFILES += lmr0-*.pdf ## EXTRA_DIST += tests/fullmap.dvi tests/fullmap.tex diff --git a/source/texk/dvipdfm-x/Makefile.in b/source/texk/dvipdfm-x/Makefile.in index ed090183b6..751db84bc9 100644 --- a/source/texk/dvipdfm-x/Makefile.in +++ b/source/texk/dvipdfm-x/Makefile.in @@ -833,12 +833,13 @@ dist_cmapdata_DATA = data/EUC-UCS2 DISTCLEANFILES = config.force image*.pdf xbmc*.pdf annot*.pdf pic*.* \ bookm*.pdf paper*.pdf ptex*.pdf resrc*.pdf reverse.pdf \ ttc*.pdf upjf.vf upjv.vf upjf-*.ofm upjv-*.ofm upjf-*.tfm \ - upjf_*.pdf upjf1_*.pdf upjf2_*.pdf upjf3_*.pdf multi_incl.pdf + upjf_*.pdf upjf1_*.pdf upjf2_*.pdf upjf3_*.pdf multi_incl.pdf \ + lmr0-*.pdf TESTS = xdvipdfmx.test xdvipdfm-ann.test xdvipdfm-bad.test \ xdvipdfm-bb.test xdvipdfm-bkm.test xdvipdfm-psz.test \ xdvipdfm-ptx.test xdvipdfm-res.test xdvipdfm-rev.test \ xdvipdfm-ttc.test dvipdfmx-upjf.test dvipdfmx-upjf2.test \ - dvipdfmx-upjf3.test dvipdfmx-incl.test + dvipdfmx-upjf3.test dvipdfmx-incl.test dvipdfmx-lmr0.test EXTRA_DIST = $(TESTS) tests/dvipdfmx.cfg tests/psfonts.map \ tests/cmr10.pfb tests/cmr10.tfm tests/image.dvi \ tests/image.tex tests/xbmc.dvi tests/xbmc.tex \ @@ -874,7 +875,8 @@ EXTRA_DIST = $(TESTS) tests/dvipdfmx.cfg tests/psfonts.map \ tests/upjv4_full.zvp0 tests/upjv4_full.vf tests/upjf-hu.tfm \ tests/upjf-hi.tfm tests/upjv-hu.tfm tests/upjv-hi.tfm \ tests/upjf-noto.map tests/upjf-ipa.map tests/multi_incl.dvi \ - tests/multi_incl.tex tests/sue-mp.pdf tests/fullmap.dvi \ + tests/multi_incl.tex tests/sue-mp.pdf tests/lmr0.tex \ + tests/lmr0-al.dvi tests/lmr0-up.dvi tests/fullmap.dvi \ tests/fullmap.tex all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -2062,7 +2064,8 @@ config.force: $(ZLIB_DEPEND) $(LIBPNG_DEPEND) $(KPATHSEA_DEPEND) $(LIBPAPER_DEPE xdvipdfmx.log xdvipdfm-ann.log xdvipdfm-bad.log xdvipdfm-bb.log \ xdvipdfm-bkm.log xdvipdfm-psz.log xdvipdfm-ptx.log xdvipdfm-res.log \ xdvipdfm-rev.log xdvipdfm-ttc.log \ - dvipdfmx-upjf.log dvipdfmx-upjf2.log dvipdfmx-upjf3.log dvipdfmx-incl.log: \ + dvipdfmx-upjf.log dvipdfmx-upjf2.log dvipdfmx-upjf3.log dvipdfmx-incl.log \ + dvipdfmx-lmr0.log: \ xdvipdfmx$(EXEEXT) # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/source/texk/dvipdfm-x/dvipdfmx-lmr0.test b/source/texk/dvipdfm-x/dvipdfmx-lmr0.test new file mode 100755 index 0000000000..82dab69dda --- /dev/null +++ b/source/texk/dvipdfm-x/dvipdfmx-lmr0.test @@ -0,0 +1,67 @@ +#! /bin/sh -vx +# $Id$ +# Copyright 2024 Japanese TeX Development Community +# You may freely use, modify and/or distribute this file. + +KpsDir=${KpsDir:-../kpathsea} +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_kpsewhich=$KpsDir/kpsewhich$ExeExt +_xdvipdfmx=$BinDir/xdvipdfmx$ExeExt + +TEXMFCNF=$srcdir/../kpathsea +TFMFONTS=".;$srcdir/tests;$srcdir/data;$srcdir/../web2c/tests" +T1FONTS="$srcdir/tests;$srcdir/data;$srcdir/../web2c/tests" +TEXFONTMAPS="$srcdir/tests;$srcdir/data" +DVIPDFMXINPUTS="$srcdir/tests;$srcdir/data" +TEXPICTS=$srcdir/tests +TEXFONTS="./tmp100;$srcdir/tests;$srcdir/../web2c/tests" +SOURCE_DATE_EPOCH=1588474800 +export TEXMFCNF TFMFONTS T1FONTS TEXFONTMAPS DVIPDFMXINPUTS TEXPICTS TEXFONTS SOURCE_DATE_EPOCH + +failed= + +test -d tmp100 || mkdir -p tmp100 + +rm -f ./tmp100/eu3-lmr10*.ovf ./tmp100/eu3-lmr10*.ofm + +echo "*** dvipdfmx: test for lmr0-al-8bit.pdf" && echo \ + && cp $srcdir/../web2c/tests/eu3-lmr10.ovf ./tmp100/eu3-lmr10.ovf \ + && cp $srcdir/../web2c/tests/eu3-lmr10.ofm ./tmp100/eu3-lmr10.ofm \ + && $_xdvipdfmx --dvipdfmx -vv -o lmr0-al-8bit.pdf $srcdir/tests/lmr0-al.dvi \ + && echo && echo "dvipdfmx-lmr0-al-8bit tests OK" && echo \ + || failed="$failed dvipdfmx-lmr0-al-8bit" + +echo "*** dvipdfmx: test for lmr0-up-8bit.pdf" && echo \ + && cp $srcdir/tests/upjf_omit.vf ./tmp100/upjf.vf \ + && $_xdvipdfmx --dvipdfmx -vv -f upjf.map -o lmr0-up-8bit.pdf $srcdir/tests/lmr0-up.dvi \ + && echo && echo "dvipdfmx-lmr0-up-8bit tests OK" && echo \ + || failed="$failed dvipdfmx-lmr0-up-8bit" + + +##### following tests require Latin Modern OpenType fonts ##### + +$_kpsewhich lmroman10-regular.otf +otfpath=`$_kpsewhich lmroman10-regular.otf` || exit 77 +OPENTYPEFONTS=`echo $otfpath | sed -e 's,lmroman10-regular\.otf,,' -e 's,/fonts/opentype/.*$,/fonts/opentype//,'` +export OPENTYPEFONTS + +rm -f ./tmp100/eu3-lmr10.ovf + +echo "*** dvipdfmx: test for lmr0-al-ucs.pdf" && echo \ + && cp $srcdir/../web2c/tests/eu3-lmr10_eu3.ovf ./tmp100/eu3-lmr10.ovf \ + && cp $srcdir/../web2c/tests/eu3-lmr10_ucs.ofm ./tmp100/eu3-lmr10_ucs.ofm \ + && $_xdvipdfmx --dvipdfmx -vv -f lm.map -o lmr0-al-ucs.pdf $srcdir/tests/lmr0-al.dvi \ + && echo && echo "dvipdfmx-lmr0-al-ucs tests OK" && echo \ + || failed="$failed dvipdfmx-lmr0-al-ucs" + +echo "*** dvipdfmx: test for lmr0-up-ucs.pdf" && echo \ + && $_xdvipdfmx --dvipdfmx -vv -f lm.map -f upjf.map -o lmr0-up-ucs.pdf $srcdir/tests/lmr0-up.dvi \ + && echo && echo "dvipdfmx-lmr0-up-ucs tests OK" && echo \ + || failed="$failed dvipdfmx-lmr0-up-ucs" + + +test -z "$failed" && exit 0 +echo +echo "failed tests:$failed" +exit 1 diff --git a/source/texk/dvipdfm-x/tests/Makefile_upjf b/source/texk/dvipdfm-x/tests/Makefile_upjf index b3a6b9664d..6fe66638e1 100644 --- a/source/texk/dvipdfm-x/tests/Makefile_upjf +++ b/source/texk/dvipdfm-x/tests/Makefile_upjf @@ -41,24 +41,28 @@ upjv-r00.ofm: upjf1-r.tfm: uppltotf upjf1-r.pl +# test for different mapping upjf1_full.vf: upjf1_full.zvp0 jfmutil zvp02vf upjf1_full.zvp0 upjf1_omit.vf: upjf1_omit.zvp0 jfmutil zvp02vf upjf1_omit.zvp0 +# test for variation selector, compound character upjf2_full.vf: upjf2_full.zvp0 jfmutil zvp02vf upjf2_full.zvp0 upjv2_full.vf: upjv2_full.zvp0 jfmutil zvp02vf upjv2_full.zvp0 +# test for hentaigana with noto font upjf3_full.vf: upjf3_full.zvp0 jfmutil zvp02vf upjf3_full.zvp0 upjv3_full.vf: upjv3_full.zvp0 jfmutil zvp02vf upjv3_full.zvp0 +# test for hentaigana with IPA MJ Mincho upjf4_full.vf: upjf4_full.zvp0 jfmutil zvp02vf upjf4_full.zvp0 diff --git a/source/texk/dvipdfm-x/tests/UPJF-UTF16-H b/source/texk/dvipdfm-x/tests/UPJF-UTF16-H index 8bb6cda848..35a4714380 100644 --- a/source/texk/dvipdfm-x/tests/UPJF-UTF16-H +++ b/source/texk/dvipdfm-x/tests/UPJF-UTF16-H @@ -39,7 +39,10 @@ endcodespacerange <0000> <001f> 1 endnotdefrange -7 begincidchar +10 begincidchar +<00a7> 720 +<00d7> 695 +<00f7> 696 <31f7> 16243 <537f> 1698 <6674> 2646 @@ -49,7 +52,9 @@ endnotdefrange 13719 endcidchar -14 begincidrange +16 begincidrange +<2018> <2019> 670 +<201C> <201D> 672 <2600> <2603> 8215 <3000> <3002> 633 <3005> <3007> 657 diff --git a/source/texk/dvipdfm-x/tests/lm.map b/source/texk/dvipdfm-x/tests/lm.map new file mode 100644 index 0000000000..92218ff2ea --- /dev/null +++ b/source/texk/dvipdfm-x/tests/lm.map @@ -0,0 +1 @@ +eu3-lmr10_ucs unicode lmroman10-regular.otf diff --git a/source/texk/dvipdfm-x/tests/lmr0-al.dvi b/source/texk/dvipdfm-x/tests/lmr0-al.dvi new file mode 100644 index 0000000000000000000000000000000000000000..0f62dc7b33c2eada7b71392d70ba6c0eb2068c83 GIT binary patch literal 848 zcmey)#MnIPfQ&T*5HP>6b<9aE$WX{HEh#81(NPFXEh^5;&r>kgGc++YwKOs_HP+QN z)H5{I)iu&H)KM@pFf!3Iu+TF!vobU?wde+#!3Z*l5cm%SlR%0VFwHi;wcu~c8MWT| zFB=%9I43=uiS%qrQv$Rcd!X_8uox_ zNhy3@0QzPgIUd*x@xVSb5AgAWtP~ajkqW2|zYB6$!*a0G7BwtwWSj(IHYzAIDkx4o z%ae@cMH6+WjQwyg@|C1k-x-&2_Fn-4C6kKtE SGreJT$xj9bro&A4!2kdbs~C&` literal 0 HcmV?d00001 diff --git a/source/texk/dvipdfm-x/tests/lmr0-up.dvi b/source/texk/dvipdfm-x/tests/lmr0-up.dvi new file mode 100644 index 0000000000000000000000000000000000000000..8b4d67ace3e129d5a5838b75e29e4f3d6e6432e1 GIT binary patch literal 688 zcmey)#MnIPfQ&T*5HP=xRtQOrP{=PWDJU&bFfuSQ(KE2nGc>m{ur##j2C85LDI)~_ z13~ZnPYeuw3z(XXZ}l$t+jd5+_p=>X9~Y1WVb0W2W8IwGB140h4aXXuO=AuXZDb5; zWDK6%$Y|8aXbhwb8=1`emhdnz^rmE3HC$-;FcGLICCjRjQJ|4guy0|nG)R}sWZB7b zljSE12u@B=pWLueaUx6M@rM2OK>0=m%SHt&kfMgw4Z9~dswe{mKijWslwt?F0pt#j z)MSV=UcsEvaJ}LCKMpxkE%b*GH|aM$paq*ml5<`ri`-1OQ3Rck}@F=Ky7#KJh7!)Kxg#m delta 10 RcmX?N{=jU4`Nr9r(f}Kf1Ze;O diff --git a/source/texk/dvipdfm-x/tests/upjf1_full.zvp0 b/source/texk/dvipdfm-x/tests/upjf1_full.zvp0 index aa79b23788..4e1ec3f47a 100644 --- a/source/texk/dvipdfm-x/tests/upjf1_full.zvp0 +++ b/source/texk/dvipdfm-x/tests/upjf1_full.zvp0 @@ -13,6 +13,57 @@ (FONTAT R 1.0) (FONTDSIZE R 10.0) ) +(CHARACTER H A7 + (CHARWD R 1.0) + (MAP + (SELECTFONT D 0) + (SETCHAR H A7) + ) + ) +(CHARACTER H D7 + (CHARWD R 1.0) + (MAP + (SELECTFONT D 1) + (SETCHAR H D7) + ) + ) +(CHARACTER H F7 + (CHARWD R 1.0) + (MAP + (SELECTFONT D 1) + (SETCHAR H F7) + ) + ) +(CHARACTER H 2018 + (CHARWD R 0.5) + (MAP + (MOVERIGHT R -0.5) + (SELECTFONT D 0) + (SETCHAR H 2018) + ) + ) +(CHARACTER H 2019 + (CHARWD R 0.5) + (MAP + (SELECTFONT D 0) + (SETCHAR H 2019) + ) + ) +(CHARACTER H 201C + (CHARWD R 0.5) + (MAP + (MOVERIGHT R -0.5) + (SELECTFONT D 0) + (SETCHAR H 201C) + ) + ) +(CHARACTER H 201D + (CHARWD R 0.5) + (MAP + (SELECTFONT D 0) + (SETCHAR H 201D) + ) + ) (CHARACTER H 2600 (CHARWD R 1.0) (MAP diff --git a/source/texk/dvipdfm-x/tests/upjf1_omit.vf b/source/texk/dvipdfm-x/tests/upjf1_omit.vf index 512d29ec205160f51f7776674fabf53dec7964d3..1647f385fd8dc3ad861ab9f4dd215a4c093ad70f 100644 GIT binary patch delta 103 zcmbPZ_QPy~c?|P)0S1OO4cD2!gX!;|7#J8h7#I{JK;*O^3=FFq6(m4{EI>g?kRVV% V5~fN9NtFytl`K@1>_+paQUID^7{vep delta 10 RcmexiHpgs&`Nqjlr2rhx1q%QG diff --git a/source/texk/dvipdfm-x/tests/upjf1_omit.zvp0 b/source/texk/dvipdfm-x/tests/upjf1_omit.zvp0 index 99c790b784..555ce724d1 100644 --- a/source/texk/dvipdfm-x/tests/upjf1_omit.zvp0 +++ b/source/texk/dvipdfm-x/tests/upjf1_omit.zvp0 @@ -13,6 +13,50 @@ (FONTAT R 1.0) (FONTDSIZE R 10.0) ) +(CHARACTER H D7 + (CHARWD R 1.0) + (MAP + (SELECTFONT D 1) + (SETCHAR H D7) + ) + ) +(CHARACTER H F7 + (CHARWD R 1.0) + (MAP + (SELECTFONT D 1) + (SETCHAR H F7) + ) + ) +(CHARACTER H 2018 + (CHARWD R 0.5) + (MAP + (MOVERIGHT R -0.5) + (SELECTFONT D 0) + (SETCHAR H 2018) + ) + ) +(CHARACTER H 2019 + (CHARWD R 0.5) + (MAP + (SELECTFONT D 0) + (SETCHAR H 2019) + ) + ) +(CHARACTER H 201C + (CHARWD R 0.5) + (MAP + (MOVERIGHT R -0.5) + (SELECTFONT D 0) + (SETCHAR H 201C) + ) + ) +(CHARACTER H 201D + (CHARWD R 0.5) + (MAP + (SELECTFONT D 0) + (SETCHAR H 201D) + ) + ) (CHARACTER H 2600 (CHARWD R 1.0) (MAP diff --git a/source/texk/dvipdfm-x/tests/upjf2_full.vf b/source/texk/dvipdfm-x/tests/upjf2_full.vf index fd29f21d56ce888fad5f82271ed14d902fb6168f..0cf7145cab72b52a1359a608d9c2a38a2e3cb64d 100644 GIT binary patch delta 111 zcmZp$cw#ZZH-&k*00YD7hULuHf%KY&>&)N5^!HB;3=A9$315+gnRV51*P-B1?uEqcr*y#UOis{D>012HRHvj+t delta 10 RcmZ2uzQ=5W-NrTlqyQU#1sMPU diff --git a/source/texk/dvipdfm-x/tests/upjv2_full.vf b/source/texk/dvipdfm-x/tests/upjv2_full.vf index dffc889b5c8cad2428d354308c15cdff9be3611a..29b8536902b5f41b218a27d18c6c4fabafb7720e 100644 GIT binary patch delta 111 zcmZp$cw#ZZH-&k*00YD7hULuHf%KY&>&)N5^!HB;3=A9$3DjcRt7OE;@qwi*E0LzRVC;$Ke delta 10 RcmaE2(O@ybcjLy*(f}K)1mXYy diff --git a/source/texk/dvipdfm-x/tests/upjv2_full.zvp0 b/source/texk/dvipdfm-x/tests/upjv2_full.zvp0 index 09d33779be..b36d2e6619 100644 --- a/source/texk/dvipdfm-x/tests/upjv2_full.zvp0 +++ b/source/texk/dvipdfm-x/tests/upjv2_full.zvp0 @@ -19,6 +19,57 @@ (FONTAT R 1.0) (FONTDSIZE R 10.0) ) +(CHARACTER H A7 + (CHARWD R 1.0) + (MAP + (SELECTFONT D 0) + (SETCHAR H A7) + ) + ) +(CHARACTER H D7 + (CHARWD R 1.0) + (MAP + (SELECTFONT D 1) + (SETCHAR H D7) + ) + ) +(CHARACTER H F7 + (CHARWD R 1.0) + (MAP + (SELECTFONT D 1) + (SETCHAR H F7) + ) + ) +(CHARACTER H 2018 + (CHARWD R 0.5) + (MAP + (MOVERIGHT R -0.5) + (SELECTFONT D 2) + (SETCHAR H 2059) + ) + ) +(CHARACTER H 2019 + (CHARWD R 0.5) + (MAP + (SELECTFONT D 2) + (SETCHAR H 205A) + ) + ) +(CHARACTER H 201C + (CHARWD R 0.5) + (MAP + (MOVERIGHT R -0.5) + (SELECTFONT D 2) + (SETCHAR H 2057) + ) + ) +(CHARACTER H 201D + (CHARWD R 0.5) + (MAP + (SELECTFONT D 2) + (SETCHAR H 2058) + ) + ) (CHARACTER H 2600 (CHARWD R 1.0) (MAP