diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2020-04-26 13:59:07 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2020-04-26 13:59:07 +0000 |
commit | cf7a02c33de280d27307edc97d34655bb673e8aa (patch) | |
tree | 12c8164d4d9e0283e989921699420525f7238562 /Build/source/texk | |
parent | 9d916e0c3ceb51f90ceedb1d6f517cc17dadbf17 (diff) |
texk/dvipsk: Add a new test for virtual fonts
git-svn-id: svn://tug.org/texlive/trunk@54887 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 16 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/Makefile.am | 8 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/Makefile.in | 12 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/Makefile_upjf | 20 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/upjf-g.tfm | bin | 0 -> 368 bytes | |||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/upjf-r.tfm | bin | 0 -> 108 bytes | |||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/upjf.dvi | bin | 0 -> 360 bytes | |||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/upjf.map | 2 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/upjf.tex | 15 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/upjf.tfm | bin | 0 -> 784 bytes | |||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/upjf_full.cnf | 10 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/upjf_full.vf | bin | 0 -> 6952 bytes | |||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/upjf_omit.cnf | 10 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/testdata/upjf_omit.vf | bin | 0 -> 6916 bytes | |||
-rwxr-xr-x | Build/source/texk/dvipsk/uptex-vf.test | 17 |
15 files changed, 106 insertions, 4 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index 3d1e8c2e855..a2ab4f61366 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,7 +1,23 @@ +2020-04-26 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * Makefile.{am,in}, uptex-vf.test, + testdata/Makefile_upjf, testdata/upjf{,-r,-g}.tfm, + testdata/upjf.{tex,dvi,map}, testdata/upjf_{full,omit}.vf, + testdata/upjf_{full,omit}.cnf: + Add a new test for fallback of virtual fonts. + 2020-04-19 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * {virtualfont,pprescan,scanpage,dopage}.c, dvips.h: Fallback multibyte character in virtual font for (u)pTeX. + https://github.com/texjporg/tex-jp-build/issues/99 + + A new rule for virtual fonts are implemented: + If a virtual font has no entry of a codepoint and the first + MAPFONT designates a (u)pTeX TFM(JFM), then we designate the + glyph (usually with a fullwidth metric) of the same codepoint + in the TFM(JFM) with the smallest font ID. + The new rule helps to shrink size of Japanese virtual fonts. 2020-04-10 Akira Kakuto <kakuto@w32tex.org> diff --git a/Build/source/texk/dvipsk/Makefile.am b/Build/source/texk/dvipsk/Makefile.am index c6ee55ed8e2..e6c0fbc128d 100644 --- a/Build/source/texk/dvipsk/Makefile.am +++ b/Build/source/texk/dvipsk/Makefile.am @@ -117,7 +117,7 @@ TESTS = afm2tfm-test.pl afm2tfm-test.log: afm2tfm$(EXEEXT) TESTS += beginfontk1.test eepic-nan.test pfbincl.test \ quotecmd-test.pl same-name.test test-dvips.test \ - test-overflow-buffers.test + test-overflow-buffers.test uptex-vf.test beginfontk1.log eepic-nan.log pfbincl.log \ quotecmd-test.log same-name.log test-dvips.log \ test-overflow-buffers.log: dvips$(EXEEXT) @@ -182,6 +182,12 @@ EXTRA_DIST += overflow-color-push.dvi overflow-color-push.tex \ overflow-epsfile.dvi overflow-epsfile.tex \ overflow-psbox.dvi overflow-psbox.tex DISTCLEANFILES += overflow-color-push.ps overflow-epsfile.ps overflow-psbox.ps +## uptex-vf.test +EXTRA_DIST += testdata/Makefile_upjf testdata/upjf.tex testdata/upjf.dvi testdata/upjf.map \ + testdata/upjf.tfm testdata/upjf-g.tfm testdata/upjf-r.tfm \ + testdata/upjf_full.vf testdata/upjf_omit.vf \ + testdata/upjf_full.cnf testdata/upjf_omit.cnf +DISTCLEANFILES += upjf.vf upjf_full.ps upjf_omit.ps EXTRA_DIST += \ NEWS \ diff --git a/Build/source/texk/dvipsk/Makefile.in b/Build/source/texk/dvipsk/Makefile.in index e27e1edf17c..b39e6e2e71d 100644 --- a/Build/source/texk/dvipsk/Makefile.in +++ b/Build/source/texk/dvipsk/Makefile.in @@ -657,6 +657,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -719,7 +720,8 @@ dvips_TEXINFOS = contrib/config.proto dvips.help DISTCLEANFILES = $(DVIS) $(PSS) afmtest.tfm beginfontk1.ps \ eepic-nan.ps pfbincl.ps *badnews* same-name.out dvipstst.ps \ missfont.log mtest.ps overflow-color-push.ps \ - overflow-epsfile.ps overflow-psbox.ps + overflow-epsfile.ps overflow-psbox.ps upjf.vf upjf_full.ps \ + upjf_omit.ps enc_DATA = dvips-all.enc prolog_DATA = $(prologues) dist_prologues = \ @@ -752,7 +754,11 @@ EXTRA_DIST = $(dist_prologues) texc.script $(TESTS) testdata/8r.enc \ testdata/dvipstst.xdv testdata/dvipstst.xps \ overflow-color-push.dvi overflow-color-push.tex \ overflow-epsfile.dvi overflow-epsfile.tex overflow-psbox.dvi \ - overflow-psbox.tex NEWS TODO testdata/intoverflow.dvi \ + overflow-psbox.tex testdata/Makefile_upjf testdata/upjf.tex \ + testdata/upjf.dvi testdata/upjf.map testdata/upjf.tfm \ + testdata/upjf-g.tfm testdata/upjf-r.tfm testdata/upjf_full.vf \ + testdata/upjf_omit.vf testdata/upjf_full.cnf \ + testdata/upjf_omit.cnf NEWS TODO testdata/intoverflow.dvi \ testdata/vfnameoverflow.dvi atari cmfonts.map config.ps \ contrib/afm-extra contrib/colorsep.lpro contrib/configs \ contrib/crop.lpr contrib/latex209 contrib/treen.sh \ @@ -764,7 +770,7 @@ CLEANFILES = $(prologues) texc.lpro TEST_EXTENSIONS = .pl .test TESTS = afm2tfm-test.pl beginfontk1.test eepic-nan.test pfbincl.test \ quotecmd-test.pl same-name.test test-dvips.test \ - test-overflow-buffers.test + test-overflow-buffers.test uptex-vf.test AM_TESTS_ENVIRONMENT = TEXMFCNF=$(srcdir)/../kpathsea; export \ TEXMFCNF; TEXCONFIG=$(srcdir)/testdata; export TEXCONFIG; \ TEXFONTS=$(srcdir)/testdata; export TEXFONTS; \ diff --git a/Build/source/texk/dvipsk/testdata/Makefile_upjf b/Build/source/texk/dvipsk/testdata/Makefile_upjf new file mode 100644 index 00000000000..d22dda7005c --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/Makefile_upjf @@ -0,0 +1,20 @@ +# Public domain. +# You may freely use, modify and/or distribute this file. + +# test data for uptex virtual fonts +uptex-vf: upjf_full.vf upjf_omit.vf upjf.dvi + +upjf.tfm: + cp -p `kpsewhich upjisr-h.tfm` upjf.tfm + +upjf_full.vf: upjf.tfm upjf_full.cnf + makejvf -i -u custom -e -t upjf_full.cnf -H upjf.tfm -K upjf-g upjf-r + mv upjf.vf upjf_full.vf + +upjf_omit.vf: upjf.tfm upjf_omit.cnf + makejvf -i -u custom -e -t upjf_omit.cnf -H upjf.tfm -K upjf-g upjf-r + mv upjf.vf upjf_omit.vf + +upjf.dvi: upjf.tex + uplatex upjf.tex + diff --git a/Build/source/texk/dvipsk/testdata/upjf-g.tfm b/Build/source/texk/dvipsk/testdata/upjf-g.tfm Binary files differnew file mode 100644 index 00000000000..3f0bfdff987 --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/upjf-g.tfm diff --git a/Build/source/texk/dvipsk/testdata/upjf-r.tfm b/Build/source/texk/dvipsk/testdata/upjf-r.tfm Binary files differnew file mode 100644 index 00000000000..8dbf787b3ec --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/upjf-r.tfm diff --git a/Build/source/texk/dvipsk/testdata/upjf.dvi b/Build/source/texk/dvipsk/testdata/upjf.dvi Binary files differnew file mode 100644 index 00000000000..d755a9d3bbe --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/upjf.dvi diff --git a/Build/source/texk/dvipsk/testdata/upjf.map b/Build/source/texk/dvipsk/testdata/upjf.map new file mode 100644 index 00000000000..df1f10908a1 --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/upjf.map @@ -0,0 +1,2 @@ +upjf-r Ryumin-Light-UniJIS-UTF16-H +upjf-g GothicBBB-Medium-UniJIS-UTF16-H diff --git a/Build/source/texk/dvipsk/testdata/upjf.tex b/Build/source/texk/dvipsk/testdata/upjf.tex new file mode 100644 index 00000000000..47695baa151 --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/upjf.tex @@ -0,0 +1,15 @@ +% Copyright (C) 2020 Japanese TeX Development Community +% You may freely use, modify and/or distribute this file. + +\documentclass{ujarticle} + +% for dvipdfmx +\AtBeginDvi{\special{pdf:mapline upjf-r unicode HaranoAjiMincho-Regular.otf}} +\AtBeginDvi{\special{pdf:mapline upjf-g unicode HaranoAjiGothic-Regular.otf}} + +\begin{document} +\pagestyle{empty} +\font\upjf=upjf at 10pt +\upjf あいうえおアイウエオ、雪𠮟。 +\end{document} + diff --git a/Build/source/texk/dvipsk/testdata/upjf.tfm b/Build/source/texk/dvipsk/testdata/upjf.tfm Binary files differnew file mode 100644 index 00000000000..2cbd365ee50 --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/upjf.tfm diff --git a/Build/source/texk/dvipsk/testdata/upjf_full.cnf b/Build/source/texk/dvipsk/testdata/upjf_full.cnf new file mode 100644 index 00000000000..83248850d74 --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/upjf_full.cnf @@ -0,0 +1,10 @@ +% makejvf settings for test +% You may freely use, modify and/or distribute this file. + +CHARSET % ++ 3000..303F,% CJK Symbols and Punctuation ++ 3040..309F,% Hiragana ++ 96EA,% 雪 ++ FF00..FFEF,% Halfwidth and Fullwidth Forms ++ 20B9F% 𠮟 + diff --git a/Build/source/texk/dvipsk/testdata/upjf_full.vf b/Build/source/texk/dvipsk/testdata/upjf_full.vf Binary files differnew file mode 100644 index 00000000000..1a25014b0ef --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/upjf_full.vf diff --git a/Build/source/texk/dvipsk/testdata/upjf_omit.cnf b/Build/source/texk/dvipsk/testdata/upjf_omit.cnf new file mode 100644 index 00000000000..3a96f137fe3 --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/upjf_omit.cnf @@ -0,0 +1,10 @@ +% makejvf settings for test +% You may freely use, modify and/or distribute this file. + +CHARSET % ++ 3000..303F,% CJK Symbols and Punctuation ++ 3040..309F,% Hiragana +%+ 96EA,% 雪 ++ FF00..FFEF,% Halfwidth and Fullwidth Forms +%+ 20B9F% 𠮟 + diff --git a/Build/source/texk/dvipsk/testdata/upjf_omit.vf b/Build/source/texk/dvipsk/testdata/upjf_omit.vf Binary files differnew file mode 100644 index 00000000000..79e0f654d08 --- /dev/null +++ b/Build/source/texk/dvipsk/testdata/upjf_omit.vf diff --git a/Build/source/texk/dvipsk/uptex-vf.test b/Build/source/texk/dvipsk/uptex-vf.test new file mode 100755 index 00000000000..97b4c1d4407 --- /dev/null +++ b/Build/source/texk/dvipsk/uptex-vf.test @@ -0,0 +1,17 @@ +#! /bin/sh -vx +# $Id$ +# Public domain. +# You may freely use, modify and/or distribute this file. + +TEXFONTS="$srcdir/testdata;." +export TEXFONTS + +cp $srcdir/testdata/upjf_full.vf ./upjf.vf && \ +./dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf.ps -u $srcdir/testdata/upjf.map -N && \ +mv upjf.ps upjf_full.ps || exit 1 + +cp $srcdir/testdata/upjf_omit.vf ./upjf.vf && \ +./dvips -d 4 $srcdir/testdata/upjf.dvi -o upjf.ps -u $srcdir/testdata/upjf.map -N && \ +mv upjf.ps upjf_omit.ps || exit 2 + +diff upjf_full.ps upjf_omit.ps || exit 3 |