texlive[54979] Build/source/texk/dvipdfm-x: texk/dvipdfm-x: add test
commits+takuji at tug.org
commits+takuji at tug.org
Sun May 3 05:45:53 CEST 2020
Revision: 54979
http://tug.org/svn/texlive?view=revision&revision=54979
Author: takuji
Date: 2020-05-03 05:45:53 +0200 (Sun, 03 May 2020)
Log Message:
-----------
texk/dvipdfm-x: add test for upTeX VF
Modified Paths:
--------------
trunk/Build/source/texk/dvipdfm-x/ChangeLog
trunk/Build/source/texk/dvipdfm-x/Makefile.am
trunk/Build/source/texk/dvipdfm-x/Makefile.in
trunk/Build/source/texk/dvipdfm-x/vf.c
Added Paths:
-----------
trunk/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test
trunk/Build/source/texk/dvipdfm-x/tests/Makefile_upjf
trunk/Build/source/texk/dvipdfm-x/tests/UPJF-UTF16-H
trunk/Build/source/texk/dvipdfm-x/tests/upjf-g.tfm
trunk/Build/source/texk/dvipdfm-x/tests/upjf-r.tfm
trunk/Build/source/texk/dvipdfm-x/tests/upjf.dvi
trunk/Build/source/texk/dvipdfm-x/tests/upjf.map
trunk/Build/source/texk/dvipdfm-x/tests/upjf.tex
trunk/Build/source/texk/dvipdfm-x/tests/upjf.tfm
trunk/Build/source/texk/dvipdfm-x/tests/upjf_full.cnf
trunk/Build/source/texk/dvipdfm-x/tests/upjf_full.vf
trunk/Build/source/texk/dvipdfm-x/tests/upjf_omit.cnf
trunk/Build/source/texk/dvipdfm-x/tests/upjf_omit.vf
Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog 2020-05-02 23:55:48 UTC (rev 54978)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog 2020-05-03 03:45:53 UTC (rev 54979)
@@ -1,3 +1,12 @@
+2020-05-03 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
+ * dvipdfmx-upjf.test, Makefile.{am,in},
+ tests/Makefile_upjf, tests/upjf{,-r,-g}.tfm,
+ tests/upjf.{tex,dvi,map}, tests/upjf_{full,omit}.vf,
+ tests/upjf_{full,omit}.cnf, tests/UPJF-UTF16-H:
+ Add a new test for fallback of virtual fonts.
+ * vf.c: Tweak debugging message for fallback of virtual fonts.
+
2020-03-27 Karl Berry <karl at tug.org>
* TeX Live 2020.
@@ -7,7 +16,15 @@
* tfm.c, tfm.h, vf.c: Fallback multibyte character
in virtual font for (u)pTeX.
* configure.ac: version 20200315.
+ 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-02-29 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
* pdfdev.c: Revert the commit on 2019-06-30: see
Modified: trunk/Build/source/texk/dvipdfm-x/Makefile.am
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/Makefile.am 2020-05-02 23:55:48 UTC (rev 54978)
+++ trunk/Build/source/texk/dvipdfm-x/Makefile.am 2020-05-03 03:45:53 UTC (rev 54979)
@@ -248,6 +248,7 @@
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
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: xdvipdfmx$(EXEEXT)
@@ -290,5 +291,10 @@
## xdvipdfm-ttc.test
EXTRA_DIST += tests/ttc.dvi tests/ttc.tex tests/test.ttc
DISTCLEANFILES += ttc*.pdf
+## dvipdfmx-upjf.test
+EXTRA_DIST += tests/upjf.dvi tests/upjf.tex tests/upjf.map tests/Makefile_upjf
+EXTRA_DIST += tests/upjf_full.cnf tests/upjf_omit.cnf tests/upjf_full.vf tests/upjf_omit.vf
+EXTRA_DIST += tests/upjf-r.tfm tests/upjf-g.tfm tests/upjf.tfm tests/UPJF-UTF16-H
+DISTCLEANFILES += upjf.vf upjf*.pdf
##
EXTRA_DIST += tests/fullmap.dvi tests/fullmap.tex
Modified: trunk/Build/source/texk/dvipdfm-x/Makefile.in
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/Makefile.in 2020-05-02 23:55:48 UTC (rev 54978)
+++ trunk/Build/source/texk/dvipdfm-x/Makefile.in 2020-05-03 03:45:53 UTC (rev 54979)
@@ -628,6 +628,7 @@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -817,11 +818,11 @@
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
+ ttc*.pdf upjf.vf upjf*.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
+ xdvipdfm-ttc.test dvipdfmx-upjf.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 \
@@ -837,7 +838,11 @@
tests/picpdf.xbb tests/bookm.dvi tests/bookm.tex \
tests/paper.dvi tests/paper.tex tests/ptex.dvi tests/resrc.dvi \
tests/resrc.tex tests/reverse.dvi tests/ttc.dvi tests/ttc.tex \
- tests/test.ttc tests/fullmap.dvi tests/fullmap.tex
+ tests/test.ttc tests/upjf.dvi tests/upjf.tex tests/upjf.map \
+ tests/Makefile_upjf tests/upjf_full.cnf tests/upjf_omit.cnf \
+ tests/upjf_full.vf tests/upjf_omit.vf tests/upjf-r.tfm \
+ tests/upjf-g.tfm tests/upjf.tfm tests/UPJF-UTF16-H \
+ tests/fullmap.dvi tests/fullmap.tex
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
Added: trunk/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test (rev 0)
+++ trunk/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test 2020-05-03 03:45:53 UTC (rev 54979)
@@ -0,0 +1,38 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2020 Japanese TeX Development Community <issue at texjp.org>
+# You may freely use, modify and/or distribute this file.
+
+TEXMFCNF=$srcdir/../kpathsea
+TFMFONTS="$srcdir/tests;$srcdir/data"
+T1FONTS="$srcdir/tests;$srcdir/data"
+TEXFONTMAPS="$srcdir/tests;$srcdir/data"
+DVIPDFMXINPUTS="$srcdir/tests;$srcdir/data"
+TEXPICTS=$srcdir/tests
+TEXFONTS="$srcdir/tests;."
+SOURCE_DATE_EPOCH=1588474800
+export TEXMFCNF TFMFONTS T1FONTS TEXFONTMAPS DVIPDFMXINPUTS TEXPICTS TEXFONTS SOURCE_DATE_EPOCH
+
+failed=
+
+echo "*** dvipdfmx: test for upjf_full.pdf" && echo \
+ && cp $srcdir/tests/upjf_full.vf ./upjf.vf \
+ && ./xdvipdfmx --dvipdfmx -v -f upjf.map -o upjf.pdf $srcdir/tests/upjf.dvi \
+ && mv ./upjf.pdf ./upjf_full.pdf \
+ && echo && echo "dvipdfmx-upjf-vf_full tests OK" && echo \
+ || failed="$failed dvipdfmx-upjf-vf_full"
+
+echo "*** dvipdfmx: test for upjf_omit.pdf" && echo \
+ && cp $srcdir/tests/upjf_omit.vf ./upjf.vf \
+ && ./xdvipdfmx --dvipdfmx -v -f upjf.map -o upjf.pdf $srcdir/tests/upjf.dvi \
+ && mv ./upjf.pdf ./upjf_omit.pdf \
+ && echo && echo "dvipdfmx-upjf-vf_omit tests OK" && echo \
+ || failed="$failed dvipdfmx-upjf-vf_omit"
+
+cmp ./upjf_full.pdf ./upjf_omit.pdf || failed="$failed dvipdfmx-upjf-cmp"
+
+test -z "$failed" && exit 0
+echo
+echo "failed tests:$failed"
+exit 1
+
Property changes on: trunk/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/dvipdfm-x/tests/Makefile_upjf
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/Makefile_upjf (rev 0)
+++ trunk/Build/source/texk/dvipdfm-x/tests/Makefile_upjf 2020-05-03 03:45:53 UTC (rev 54979)
@@ -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
+
Added: trunk/Build/source/texk/dvipdfm-x/tests/UPJF-UTF16-H
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/UPJF-UTF16-H (rev 0)
+++ trunk/Build/source/texk/dvipdfm-x/tests/UPJF-UTF16-H 2020-05-03 03:45:53 UTC (rev 54979)
@@ -0,0 +1,71 @@
+%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (UPJF-UTF16-H)
+%%Title: (UPJF-UTF16-H test sample)
+%%Version: 1.000
+%%Copyright: -----------------------------------------------------------
+%%Copyright: Copyright 2017-2020 Japanese TeX Development Community
+%%Copyright:
+%%Copyright: You may freely use, modify and/or distribute this file.
+%%Copyright: -----------------------------------------------------------
+%%EndComments
+
+/CIDInit /ProcSet findresource begin
+
+12 dict begin
+
+begincmap
+
+/CIDSystemInfo 3 dict dup begin
+ /Registry (Adobe) def
+ /Ordering (Japan1) def
+ /Supplement 7 def
+end def
+
+/CMapName /UPJF-UTF16-H def
+/CMapVersion 1.000 def
+/CMapType 1 def
+
+/WMode 0 def
+
+3 begincodespacerange
+ <0000> <D7FF>
+ <D800DC00> <DBFFDFFF>
+ <E000> <FFFF>
+endcodespacerange
+
+1 beginnotdefrange
+<0000> <001f> 1
+endnotdefrange
+
+3 begincidchar
+<6674> 2646
+<96ea> 2695
+<d842df9f> 13803
+endcidchar
+
+14 begincidrange
+<2600> <2603> 8215
+<3000> <3002> 633
+<3005> <3007> 657
+<3008> <3011> 682
+<3014> <3015> 676
+<3016> <3017> 16197
+<3018> <3019> 12129
+<3033> <3035> 12108
+<3041> <3093> 842
+<3094> <3096> 7958
+<3099> <309a> 16326
+<309b> <309c> 643
+<309d> <309e> 653
+<ff61> <ff9f> 327
+endcidrange
+
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+
+%%EndResource
+%%EOF
Added: trunk/Build/source/texk/dvipdfm-x/tests/upjf-g.tfm
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/dvipdfm-x/tests/upjf-g.tfm
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/upjf-g.tfm 2020-05-02 23:55:48 UTC (rev 54978)
+++ trunk/Build/source/texk/dvipdfm-x/tests/upjf-g.tfm 2020-05-03 03:45:53 UTC (rev 54979)
Property changes on: trunk/Build/source/texk/dvipdfm-x/tests/upjf-g.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/dvipdfm-x/tests/upjf-r.tfm
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/dvipdfm-x/tests/upjf-r.tfm
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/upjf-r.tfm 2020-05-02 23:55:48 UTC (rev 54978)
+++ trunk/Build/source/texk/dvipdfm-x/tests/upjf-r.tfm 2020-05-03 03:45:53 UTC (rev 54979)
Property changes on: trunk/Build/source/texk/dvipdfm-x/tests/upjf-r.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/dvipdfm-x/tests/upjf.dvi
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/dvipdfm-x/tests/upjf.dvi
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/upjf.dvi 2020-05-02 23:55:48 UTC (rev 54978)
+++ trunk/Build/source/texk/dvipdfm-x/tests/upjf.dvi 2020-05-03 03:45:53 UTC (rev 54979)
Property changes on: trunk/Build/source/texk/dvipdfm-x/tests/upjf.dvi
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/dvipdfm-x/tests/upjf.map
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/upjf.map (rev 0)
+++ trunk/Build/source/texk/dvipdfm-x/tests/upjf.map 2020-05-03 03:45:53 UTC (rev 54979)
@@ -0,0 +1,9 @@
+%upjf-r UniJIS-UTF16-H HaranoAjiMincho-Regular.otf
+%upjf-g UniJIS-UTF16-H HaranoAjiGothic-Regular.otf
+
+%upjf-r UniJIS-UTF16-H !Ryumin-Light
+%upjf-g UniJIS-UTF16-H !GothicBBB-Medium
+
+upjf-r UPJF-UTF16-H !Ryumin-Light
+upjf-g UPJF-UTF16-H !GothicBBB-Medium
+
Added: trunk/Build/source/texk/dvipdfm-x/tests/upjf.tex
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/upjf.tex (rev 0)
+++ trunk/Build/source/texk/dvipdfm-x/tests/upjf.tex 2020-05-03 03:45:53 UTC (rev 54979)
@@ -0,0 +1,19 @@
+% 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 UniJIS-UTF16-H HaranoAjiMincho-Regular.otf}}
+%\AtBeginDvi{\special{pdf:mapline upjf-g UniJIS-UTF16-H HaranoAjiGothic-Regular.otf}}
+%\AtBeginDvi{\special{pdf:mapline upjf-r UniJIS-UTF16-H !Ryumin-Light}}
+%\AtBeginDvi{\special{pdf:mapline upjf-g UniJIS-UTF16-H !GothicBBB-Medium}}
+%\AtBeginDvi{\special{pdf:mapline upjf-r UPJF-UTF16-H !Ryumin-Light}}
+%\AtBeginDvi{\special{pdf:mapline upjf-g UPJF-UTF16-H !GothicBBB-Medium}}
+
+\begin{document}
+\pagestyle{empty}
+\font\upjf=upjf at 10pt
+\upjf あいうえおアイウエオ、☃~雪晴☀𠮟。
+\end{document}
+
Added: trunk/Build/source/texk/dvipdfm-x/tests/upjf.tfm
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/dvipdfm-x/tests/upjf.tfm
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/upjf.tfm 2020-05-02 23:55:48 UTC (rev 54978)
+++ trunk/Build/source/texk/dvipdfm-x/tests/upjf.tfm 2020-05-03 03:45:53 UTC (rev 54979)
Property changes on: trunk/Build/source/texk/dvipdfm-x/tests/upjf.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/dvipdfm-x/tests/upjf_full.cnf
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/upjf_full.cnf (rev 0)
+++ trunk/Build/source/texk/dvipdfm-x/tests/upjf_full.cnf 2020-05-03 03:45:53 UTC (rev 54979)
@@ -0,0 +1,13 @@
+% makejvf settings for test
+% You may freely use, modify and/or distribute this file.
+
+CHARSET %
++ 2600,% ☀
++ 2603,% ☃
++ 3000..303F,% CJK Symbols and Punctuation
++ 3040..309F,% Hiragana
++ 6674,% 晴
++ 96EA,% 雪
++ FF00..FFEF,% Halfwidth and Fullwidth Forms
++ 20B9F% 𠮟
+
Added: trunk/Build/source/texk/dvipdfm-x/tests/upjf_full.vf
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/dvipdfm-x/tests/upjf_full.vf
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/upjf_full.vf 2020-05-02 23:55:48 UTC (rev 54978)
+++ trunk/Build/source/texk/dvipdfm-x/tests/upjf_full.vf 2020-05-03 03:45:53 UTC (rev 54979)
Property changes on: trunk/Build/source/texk/dvipdfm-x/tests/upjf_full.vf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/dvipdfm-x/tests/upjf_omit.cnf
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/upjf_omit.cnf (rev 0)
+++ trunk/Build/source/texk/dvipdfm-x/tests/upjf_omit.cnf 2020-05-03 03:45:53 UTC (rev 54979)
@@ -0,0 +1,13 @@
+% makejvf settings for test
+% You may freely use, modify and/or distribute this file.
+
+CHARSET %
++ 2600,% ☀
++ 2603,% ☃
++ 3000..303F,% CJK Symbols and Punctuation
++ 3040..309F,% Hiragana
++ 6674,% 晴
+%+ 96EA,% 雪
++ FF00..FFEF,% Halfwidth and Fullwidth Forms
+%+ 20B9F% 𠮟
+
Added: trunk/Build/source/texk/dvipdfm-x/tests/upjf_omit.vf
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/dvipdfm-x/tests/upjf_omit.vf
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/upjf_omit.vf 2020-05-02 23:55:48 UTC (rev 54978)
+++ trunk/Build/source/texk/dvipdfm-x/tests/upjf_omit.vf 2020-05-03 03:45:53 UTC (rev 54979)
Property changes on: trunk/Build/source/texk/dvipdfm-x/tests/upjf_omit.vf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Build/source/texk/dvipdfm-x/vf.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/vf.c 2020-05-02 23:55:48 UTC (rev 54978)
+++ trunk/Build/source/texk/dvipdfm-x/vf.c 2020-05-03 03:45:53 UTC (rev 54979)
@@ -413,12 +413,12 @@
dvi_vf_init (default_font);
if (ch >= vf_fonts[vf_font].num_chars ||
!(start = (vf_fonts[vf_font].ch_pkt)[ch])) {
- if (tfm_is_jfm((vf_fonts[vf_font].dev_fonts[0]).tfm_id) &&
+ if (tfm_is_jfm(vf_fonts[vf_font].dev_fonts[0].tfm_id) &&
ch < 0x1000000 && dpx_conf.compat_mode != dpx_mode_xdv_mode) {
/* fallback multibyte character for (u)pTeX */
if (dpx_conf.verbose_level > 0)
- WARN ("Fallback multibyte character in virtual font: name=%s char=0x%06x(%d)",
- vf_fonts[vf_font].tex_name, ch, ch);
+ WARN ("Fallback multibyte character in virtual font: VF:%s char=0x%06x(%d) to TFM:%s",
+ vf_fonts[vf_font].tex_name, ch, ch, vf_fonts[vf_font].dev_fonts[0].name);
dvi_set (ch);
dvi_vf_finish();
return;
More information about the tex-live-commits
mailing list.