summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/web2c/pmpostdir/ChangeLog7
-rw-r--r--Build/source/texk/web2c/pmpostdir/ptfmin.ch9
-rw-r--r--Build/source/texk/web2c/pmpostdir/tests/testnewu.mp36
-rw-r--r--Build/source/texk/web2c/pmpostdir/tests/testnewu.tex7
-rw-r--r--Build/source/texk/web2c/pmpostdir/tests/testnewu.tfmbin0 -> 388 bytes
5 files changed, 56 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/pmpostdir/ChangeLog b/Build/source/texk/web2c/pmpostdir/ChangeLog
index 14728c8fff6..923987ec713 100644
--- a/Build/source/texk/web2c/pmpostdir/ChangeLog
+++ b/Build/source/texk/web2c/pmpostdir/ChangeLog
@@ -1,3 +1,10 @@
+2018-08-16 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * ptfmin.ch: Support new JFM spec, which allows 3-byte
+ characters in TYPE > 0.
+ * tests/testnewu.{mp,tex,tfm}: Added. (File testnewu.tfm
+ is the same as uptexdir/tests.)
+
2018-03-26 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* pmpost.ch: Use UTF-8 as a default encoding also on
diff --git a/Build/source/texk/web2c/pmpostdir/ptfmin.ch b/Build/source/texk/web2c/pmpostdir/ptfmin.ch
index 2990dc11044..296a98a74df 100644
--- a/Build/source/texk/web2c/pmpostdir/ptfmin.ch
+++ b/Build/source/texk/web2c/pmpostdir/ptfmin.ch
@@ -36,6 +36,10 @@
@d read_pair(A) { (A)=tfbyte;
tfget; (A)=(A)*0400+tfbyte;
}
+@d read_triplekanji(A) { (A)=tfbyte;
+ tfget; (A)=(A)*0400+tfbyte;
+ tfget; (A)=(A)+tfbyte*0200000;
+}
@d read_two(A) { (A)=tfbyte;
@z
@@ -91,10 +95,9 @@ tf_ignore(4*(tfm_lh-2))
ii=mp->ctype_base[n]+nt;
i=mp->ctype_base[n];
while ( i<ii ) {
- tfget; read_pair(ct); /* allow character codes up to 0xffff */
+ tfget; read_triplekanji(ct); /* allow character codes up to 0xffffff */
mp->font_info[i].hh.LH=ct;
- tfget; read_two(ct);
- mp->font_info[i].hh.RH=ct;
+ tfget; mp->font_info[i].hh.RH=tfbyte;
incr(i);
}
@z
diff --git a/Build/source/texk/web2c/pmpostdir/tests/testnewu.mp b/Build/source/texk/web2c/pmpostdir/tests/testnewu.mp
new file mode 100644
index 00000000000..6cc60d3b095
--- /dev/null
+++ b/Build/source/texk/web2c/pmpostdir/tests/testnewu.mp
@@ -0,0 +1,36 @@
+prologues:=0;
+beginfig(1);
+ u:=.5cm; h:=0; v:=0;
+ picture pct; string FONT;
+ bboxmargin:=-0pt;
+ def TEST(expr a)=
+ pct:=(a if length(FONT)>0: infont FONT fi);
+ draw bbox pct shifted (h,v) withcolor (blue+green);
+ draw pct shifted (h,v);
+ h:=h+xpart(urcorner pct-ulcorner pct); v:=v+0.1u;
+ enddef;
+
+ FONT:="cmr10";
+ TEST("VAr10");
+ h:=0; v:=v+u; FONT:="cmss10";
+ TEST("VAss10");
+ h:=0; v:=v+u; FONT:="uprml-h";
+ TEST("あ,臼𦥑あ"); % upjisr-h: error
+ h:=0; v:=v+u;
+ TEST("あ" );
+ TEST("," );
+ TEST("臼" );
+ TEST("𦥑" );
+ TEST("あ" );
+ h:=0; v:=v+u; FONT:="testnewu";
+ TEST("あ,臼𦥑あ");
+ h:=0; v:=v+u;
+ TEST("あ" );
+ TEST("," );
+ TEST("臼" );
+ TEST("𦥑" );
+ TEST("あ" );
+ h:=0; v:=v+u; FONT:="";
+ TEST(btex あ,臼𦥑あ etex);
+endfig;
+end;
diff --git a/Build/source/texk/web2c/pmpostdir/tests/testnewu.tex b/Build/source/texk/web2c/pmpostdir/tests/testnewu.tex
new file mode 100644
index 00000000000..5c524efecbf
--- /dev/null
+++ b/Build/source/texk/web2c/pmpostdir/tests/testnewu.tex
@@ -0,0 +1,7 @@
+%#!uplatex
+\documentclass{ujarticle}
+\usepackage[dvipdfmx]{graphicx}
+\begin{document}
+\special{pdf:mapline testnewu UniJIS-UTF16-H ipaexg.ttf}%
+\fbox{\includegraphics{testnewu.1}}
+\end{document} \ No newline at end of file
diff --git a/Build/source/texk/web2c/pmpostdir/tests/testnewu.tfm b/Build/source/texk/web2c/pmpostdir/tests/testnewu.tfm
new file mode 100644
index 00000000000..6860278f2ca
--- /dev/null
+++ b/Build/source/texk/web2c/pmpostdir/tests/testnewu.tfm
Binary files differ