Skip to content

Commit

Permalink
dvipdfm-x: add test for hentaigana with Noto Hentaigana font (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tk committed May 11, 2024
1 parent 2883bae commit bb56f79
Show file tree
Hide file tree
Showing 14 changed files with 6,089 additions and 6 deletions.
12 changes: 10 additions & 2 deletions source/texk/dvipdfm-x/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ DISTCLEANFILES = config.force
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-incl.test
TESTS += dvipdfmx-upjf.test dvipdfmx-upjf2.test dvipdfmx-upjf3.test dvipdfmx-incl.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-incl.log: \
dvipdfmx-upjf.log dvipdfmx-upjf2.log dvipdfmx-upjf3.log dvipdfmx-incl.log: \
xdvipdfmx$(EXEEXT)
EXTRA_DIST = $(TESTS)
## xdvipdfmx.test
Expand Down Expand Up @@ -314,7 +314,15 @@ EXTRA_DIST += tests/upjf2_full.zvp0 tests/upjf2_full.vf
EXTRA_DIST += tests/upjv2_full.zvp0 tests/upjv2_full.vf
EXTRA_DIST += tests/upjf-c.pl tests/upjf-c.tfm
EXTRA_DIST += tests/upjv-c.pl tests/upjv-c.tfm
EXTRA_DIST += tests/upjf-hara.map
DISTCLEANFILES += upjf2_*.pdf
## dvipdfmx-upjf3.test
EXTRA_DIST += tests/upjf3_full.zvp0 tests/upjf3_full.vf
EXTRA_DIST += tests/upjv3_full.zvp0 tests/upjv3_full.vf
EXTRA_DIST += tests/upjf-hu.tfm tests/upjf-hi.tfm
EXTRA_DIST += tests/upjv-hu.tfm tests/upjv-hi.tfm
EXTRA_DIST += tests/upjf-noto.map
DISTCLEANFILES += upjf3_*.pdf
## dvipdfmx-incl.test
EXTRA_DIST += tests/multi_incl.dvi tests/multi_incl.tex tests/sue-mp.pdf
DISTCLEANFILES += multi_incl.pdf
Expand Down
50 changes: 50 additions & 0 deletions source/texk/dvipdfm-x/dvipdfmx-upjf3.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#! /bin/sh -vx
# $Id$
# Copyright 2020-2024 Japanese TeX Development Community <[email protected]>
# 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"
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=

##### following tests require HaranoAji fonts and Noto Hentaigana font #####

$_kpsewhich HaranoAjiMincho-Regular.otf
otfpath=`$_kpsewhich HaranoAjiMincho-Regular.otf` || exit 77
OPENTYPEFONTS=`echo $otfpath | sed -e 's,HaranoAjiMincho-Regular\.otf,,' -e 's,/fonts/opentype/.*$,/fonts/opentype//,'`
export OPENTYPEFONTS

$_kpsewhich NotoSerifHentaigana-Regular.ttf
ttfpath=`$_kpsewhich NotoSerifHentaigana-Regular.ttf` || exit 77
TTFONTS=`echo $ttfpath | sed -e 's,NotoSerifHentaigana-Regular\.ttf,,' -e 's,/fonts/truetype/.*$,/fonts/truetype//,'`
export TTFONTS

rm -f upjf.vf upjv.vf upjf-r.ofm upjv-r.ofm upjf-g.ofm upjv-g.ofm

echo "*** dvipdfmx: test for upjf3_full-noto.pdf" && echo \
&& cp $srcdir/tests/upjf3_full.vf ./upjf.vf \
&& cp $srcdir/tests/upjv3_full.vf ./upjv.vf \
&& $_xdvipdfmx --dvipdfmx -vv --pdfm-str-utf8 -f upjf-noto.map -o upjf3.pdf $srcdir/tests/upjf3.dvi \
&& mv ./upjf3.pdf ./upjf3_full-noto.pdf \
&& echo && echo "dvipdfmx-upjf3-vf_full-noto tests OK" && echo \
|| failed="$failed dvipdfmx-upjf3-vf_full-noto"


test -z "$failed" && exit 0
echo
echo "failed tests:$failed"
exit 1
22 changes: 18 additions & 4 deletions source/texk/dvipdfm-x/tests/Makefile_upjf
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,24 @@ upjv-r00.ofm:
upjf1-r.tfm:
uppltotf upjf1-r.pl

upjf1_full.vf:
upjf1_full.vf: upjf1_full.zvp0
jfmutil zvp02vf upjf1_full.zvp0

upjf1_omit.vf:
upjf1_omit.vf: upjf1_omit.zvp0
jfmutil zvp02vf upjf1_omit.zvp0

upjf2_full.vf:
upjf2_full.vf: upjf2_full.zvp0
jfmutil zvp02vf upjf2_full.zvp0

upjv2_full.vf:
upjv2_full.vf: upjv2_full.zvp0
jfmutil zvp02vf upjv2_full.zvp0

upjf3_full.vf: upjf3_full.zvp0
jfmutil zvp02vf upjf3_full.zvp0

upjv3_full.vf: upjv3_full.zvp0
jfmutil zvp02vf upjv3_full.zvp0

upjf-c.tfm:
uppltotf upjf-c.pl

Expand All @@ -75,3 +81,11 @@ upjf2.dvi: upjf2.tex
dvispc -x upjf2.dvitxt upjf2.dvi
rm upjf2.dvitxt

upjf3.dvi: upjf3.tex
uplatex upjf3.tex
dvispc -a upjf3.dvi upjf3.dvitxt
sed -i '/xxx/d' upjf3.dvitxt
sed -i -e "4i xxx1 176 'pdf:docinfo<</Title(upTeXを試す)/Subject(시험)/Creator(LaTeX with hyperref)/Author(☃ ☀)/Producer(dvipdfm)/Keywords(超鏈接; ハイパーリンク; 하이퍼링크)>>'" upjf3.dvitxt
dvispc -x upjf3.dvitxt upjf3.dvi
rm upjf3.dvitxt

Binary file added source/texk/dvipdfm-x/tests/upjf-hi.tfm
Binary file not shown.
Binary file added source/texk/dvipdfm-x/tests/upjf-hu.tfm
Binary file not shown.
12 changes: 12 additions & 0 deletions source/texk/dvipdfm-x/tests/upjf-noto.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
upjf-r unicode HaranoAjiMincho-Regular.otf
upjf-g unicode HaranoAjiGothic-Regular.otf
upjf-c Identity-H HaranoAjiMincho-Regular.otf
upjf-hu unicode NotoSerifHentaigana-Regular.ttf
upjf-hi Identity-H NotoSerifHentaigana-Regular.ttf
upjv-r unicode HaranoAjiMincho-Regular.otf -w 1
upjv-g unicode HaranoAjiGothic-Regular.otf -w 1
upjv-c Identity-V HaranoAjiMincho-Regular.otf
upjv-hu unicode NotoSerifHentaigana-Regular.ttf -w 1
upjv-hi Identity-V NotoSerifHentaigana-Regular.ttf

ptmr8r 8r Times-Roman
Binary file added source/texk/dvipdfm-x/tests/upjf3.dvi
Binary file not shown.
21 changes: 21 additions & 0 deletions source/texk/dvipdfm-x/tests/upjf3.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
% Copyright (C) 2020-2024 Japanese TeX Development Community
% You may freely use, modify and/or distribute this file.

\documentclass{ujarticle}
%\usepackage[T1]{fontenc}
%\usepackage{mathptmx}

\begin{document}
\pagestyle{empty}
\font\upjf=upjf at 10pt
\fbox{\hbox{\yoko
\upjf あいうえおアイウエオ、☃~雪晴☀𠮟。生𛁛𛂦゙、う𛂁ぎ,𛂦𛂦゙𛂦゚.ABC xyz.
}}

\tbaselineshift0.3zh
\font\upjv=upjv at 10pt
\fbox{\hbox{\tate
\upjv あいうえお、☃~雪晴☀𠮟。生𛁛𛂦゙、う𛂁ぎ,𛂦𛂦゙𛂦゚.ABC xyz.
}}
\end{document}

Binary file added source/texk/dvipdfm-x/tests/upjf3_full.vf
Binary file not shown.
Loading

0 comments on commit bb56f79

Please sign in to comment.