texlive[68305] Build/source/texk: ptex, makejvf: support more than
commits+hironobu at tug.org
commits+hironobu at tug.org
Sun Sep 17 15:24:01 CEST 2023
Revision: 68305
https://tug.org/svn/texlive?view=revision&revision=68305
Author: hironobu
Date: 2023-09-17 15:24:00 +0200 (Sun, 17 Sep 2023)
Log Message:
-----------
ptex, makejvf: support more than 256 different glue/kern
Modified Paths:
--------------
trunk/Build/source/texk/dviout-util/ChangeLog
trunk/Build/source/texk/dviout-util/chkdvifont.c
trunk/Build/source/texk/dviout-util/configure
trunk/Build/source/texk/dviout-util/configure.ac
trunk/Build/source/texk/dviout-util/tests/skipjfmp.cfn
trunk/Build/source/texk/dviout-util/tests/uparse.cfn
trunk/Build/source/texk/dviout-util/tests/upphirakakuw3-h.cfn
trunk/Build/source/texk/makejvf/ChangeLog
trunk/Build/source/texk/makejvf/Makefile.am
trunk/Build/source/texk/makejvf/Makefile.in
trunk/Build/source/texk/makejvf/makejvf.test
trunk/Build/source/texk/makejvf/tfmread.c
trunk/Build/source/texk/web2c/Makefile.in
trunk/Build/source/texk/web2c/ptexdir/ChangeLog
trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
trunk/Build/source/texk/web2c/ptexdir/ptex_version.h
trunk/Build/source/texk/web2c/uptexdir/ChangeLog
trunk/Build/source/texk/web2c/uptexdir/am/uptex.am
trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch
trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch
Added Paths:
-----------
trunk/Build/source/texk/makejvf/tests/gk256.vf
trunk/Build/source/texk/makejvf/tests/gk256g.tfm
trunk/Build/source/texk/makejvf/tests/gk256k.tfm
trunk/Build/source/texk/web2c/uptexdir/gk256.test
trunk/Build/source/texk/web2c/uptexdir/tests/gk256.tex
trunk/Build/source/texk/web2c/uptexdir/tests/gk256g.tfm
trunk/Build/source/texk/web2c/uptexdir/tests/gk256k.tfm
Modified: trunk/Build/source/texk/dviout-util/ChangeLog
===================================================================
--- trunk/Build/source/texk/dviout-util/ChangeLog 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/dviout-util/ChangeLog 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,3 +1,8 @@
+2023-09-17 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
+
+ * chkdvifont.c: Check JFM with over 256 glue/kern.
+ * configure.ac: Version 20230917.
+
2023-08-11 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
* dvispc.c, chkdvifont.c, dd.h, msvcdir.h, Makefile.am:
Modified: trunk/Build/source/texk/dviout-util/chkdvifont.c
===================================================================
--- trunk/Build/source/texk/dviout-util/chkdvifont.c 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/dviout-util/chkdvifont.c 2023-09-17 13:24:00 UTC (rev 68305)
@@ -932,7 +932,7 @@
font.c = read_n(fp,4); /* header[0] */
font.d = read_long(fp); /* header[1] */
- if (ch == 'j') { /* check for new features in pTeX p3.8.0 / JFM 2.0 */
+ if (ch == 'j') { /* check for new features in Community pTeX / JFM 2.0 */
for (i = 2; i < lh; i++) /* the rest of header */
read_long(fp);
for (i = 0; i < nt; i++){ /* char_type */
@@ -943,11 +943,13 @@
read_long(fp);
for (i = 0; i < nw+nh+nd+ni; i++) /* width, height, depth, italic */
read_long(fp);
- for (i = 0; i < nl; i++){ /* glue_kern */
+ for (i = 0; i < nl; i++){ /* glue_kern */
x = read_byte(fp); read_n(fp,3);
if (x>0 && x<128) tfmver |= 2; /* SKIP command */
if (x>128 && x<=255) tfmver |= 4; /* rearrangement */
}
+ if (nk>256) tfmver |= 8; /* many kern */
+ if (ne>256) tfmver |= 16; /* many glue */
}
fclose(fp);
@@ -959,10 +961,12 @@
printf("\t\"%s\" is a %cfm%s file :%3ld -> %3ld\n",
font.n, ch, u, bc, ec);
if (ch == 'j' && tfmver > 0) {
- printf("\t\tNew features in pTeX p3.8.0 / JFM 2.0:\n");
- if (tfmver & 1) printf("\t\t+ 3-byte kanji code\n");
- if (tfmver & 2) printf("\t\t+ SKIP command in glue_kern\n");
- if (tfmver & 4) printf("\t\t+ rearrangement in glue_kern\n");
+ printf("\t\tNew features in Community pTeX / JFM 2.0:\n");
+ if (tfmver & 1) printf("\t\t+ 3-byte kanji code\n"); /* TL18 */
+ if (tfmver & 2) printf("\t\t+ SKIP command in glue_kern\n"); /* TL18 */
+ if (tfmver & 4) printf("\t\t+ rearrangement in glue_kern\n"); /* TL18 */
+ if (tfmver & 8) printf("\t\t+ more than 256 different kern\n"); /* TL24 */
+ if (tfmver & 16) printf("\t\t+ more than 256 different glue\n"); /* TL24 */
}
}
if (f_vv > 0) {
Modified: trunk/Build/source/texk/dviout-util/configure
===================================================================
--- trunk/Build/source/texk/dviout-util/configure 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/dviout-util/configure 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for dviout-util (TeX Live) 20220409.
+# Generated by GNU Autoconf 2.71 for dviout-util (TeX Live) 20230917.
#
# Report bugs to <tex-k at tug.org>.
#
@@ -629,8 +629,8 @@
# Identity of this package.
PACKAGE_NAME='dviout-util (TeX Live)'
PACKAGE_TARNAME='dviout-util--tex-live-'
-PACKAGE_VERSION='20220409'
-PACKAGE_STRING='dviout-util (TeX Live) 20220409'
+PACKAGE_VERSION='20230917'
+PACKAGE_STRING='dviout-util (TeX Live) 20230917'
PACKAGE_BUGREPORT='tex-k at tug.org'
PACKAGE_URL=''
@@ -1378,7 +1378,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures dviout-util (TeX Live) 20220409 to adapt to many kinds of systems.
+\`configure' configures dviout-util (TeX Live) 20230917 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1450,7 +1450,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dviout-util (TeX Live) 20220409:";;
+ short | recursive ) echo "Configuration of dviout-util (TeX Live) 20230917:";;
esac
cat <<\_ACEOF
@@ -1571,7 +1571,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dviout-util (TeX Live) configure 20220409
+dviout-util (TeX Live) configure 20230917
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2095,7 +2095,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dviout-util (TeX Live) $as_me 20220409, which was
+It was created by dviout-util (TeX Live) $as_me 20230917, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -8536,7 +8536,7 @@
# Define the identity of the package.
PACKAGE='dviout-util--tex-live-'
- VERSION='20220409'
+ VERSION='20230917'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -14855,7 +14855,7 @@
Report bugs to <bug-libtool at gnu.org>."
lt_cl_version="\
-dviout-util (TeX Live) config.lt 20220409
+dviout-util (TeX Live) config.lt 20230917
configured by $0, generated by GNU Autoconf 2.71.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -16483,7 +16483,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by dviout-util (TeX Live) $as_me 20220409, which was
+This file was extended by dviout-util (TeX Live) $as_me 20230917, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16551,7 +16551,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-dviout-util (TeX Live) config.status 20220409
+dviout-util (TeX Live) config.status 20230917
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
Modified: trunk/Build/source/texk/dviout-util/configure.ac
===================================================================
--- trunk/Build/source/texk/dviout-util/configure.ac 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/dviout-util/configure.ac 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,12 +1,12 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-dnl Copyright 2018-2022 Japanese TeX Development Community <issue at texjp.org>
+dnl Copyright 2018-2023 Japanese TeX Development Community <issue at texjp.org>
dnl
dnl This file is free software; the copyright holder
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-AC_INIT([dviout-util (TeX Live)], [20220409], [tex-k at tug.org])
+AC_INIT([dviout-util (TeX Live)], [20230917], [tex-k at tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([dvispc.c])
AC_CONFIG_AUX_DIR([../../build-aux])
Modified: trunk/Build/source/texk/dviout-util/tests/skipjfmp.cfn
===================================================================
--- trunk/Build/source/texk/dviout-util/tests/skipjfmp.cfn 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/dviout-util/tests/skipjfmp.cfn 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,5 +1,5 @@
"skipjfmp" is a jfm file : 0 -> 6
- New features in pTeX p3.8.0 / JFM 2.0:
+ New features in Community pTeX / JFM 2.0:
+ SKIP command in glue_kern
checksum = 00000000
design size = 10485760 2^{-20} points = 10 points
Modified: trunk/Build/source/texk/dviout-util/tests/uparse.cfn
===================================================================
--- trunk/Build/source/texk/dviout-util/tests/uparse.cfn 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/dviout-util/tests/uparse.cfn 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,5 +1,5 @@
"uparse" is a jfm file : 0 -> 6
- New features in pTeX p3.8.0 / JFM 2.0:
+ New features in Community pTeX / JFM 2.0:
+ 3-byte kanji code
checksum = 00000000
design size = 10485760 2^{-20} points = 10 points
Modified: trunk/Build/source/texk/dviout-util/tests/upphirakakuw3-h.cfn
===================================================================
--- trunk/Build/source/texk/dviout-util/tests/upphirakakuw3-h.cfn 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/dviout-util/tests/upphirakakuw3-h.cfn 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,5 +1,5 @@
"upphirakakuw3-h" is a jfm file : 0 -> 130
- New features in pTeX p3.8.0 / JFM 2.0:
+ New features in Community pTeX / JFM 2.0:
+ rearrangement in glue_kern
checksum = 00000000
design size = 10485760 2^{-20} points = 10 points
Modified: trunk/Build/source/texk/makejvf/ChangeLog
===================================================================
--- trunk/Build/source/texk/makejvf/ChangeLog 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/makejvf/ChangeLog 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,3 +1,9 @@
+2023-09-17 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
+
+ * tfmread.c: Support more than 256 different glue/kern.
+ * makejvf.test: Add new tests.
+ * gk256[gk].tfm, gk256.vf: New tests.
+
2023-09-16 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
* uniblock.c: Update references Unicode blocks Blocks-15.1.0.txt
Modified: trunk/Build/source/texk/makejvf/Makefile.am
===================================================================
--- trunk/Build/source/texk/makejvf/Makefile.am 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/makejvf/Makefile.am 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,7 +1,7 @@
## Makefile.am for the TeX Live subdirectory texk/makejvfk/
##
## Copyright (C) 2010-2015 Peter Breitenlohner <tex-live at tug.org>
-## Copyright (C) 2016-2018 Japanese TeX Development Community <issue at texjp.org>
+## Copyright (C) 2016-2023 Japanese TeX Development Community <issue at texjp.org>
## You may freely use, modify and/or distribute this file.
##
AM_CPPFLAGS = $(PTEXENC_INCLUDES) $(KPATHSEA_INCLUDES)
@@ -21,7 +21,7 @@
@KPATHSEA_RULE@
@PTEXENC_RULE@
-EXTRA_DIST = COPYRIGHT COPYRIGHT.jis Changes.txt README.txt
+EXTRA_DIST = COPYRIGHT COPYRIGHT.ja Changes.txt README.txt
dist_check_SCRIPTS = makejvf.test
@@ -41,6 +41,9 @@
tests/testnewu.vf \
tests/gkhugeok.tfm \
tests/gkhugeok.vf \
+ tests/gk256g.tfm \
+ tests/gk256k.tfm \
+ tests/gk256.vf \
tests/skipjfmp.tfm \
tests/skipjfmp.vf \
tests/skipjfmp_omit.vf
Modified: trunk/Build/source/texk/makejvf/Makefile.in
===================================================================
--- trunk/Build/source/texk/makejvf/Makefile.in 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/makejvf/Makefile.in 2023-09-17 13:24:00 UTC (rev 68305)
@@ -561,10 +561,11 @@
uniblock.c uniblock.h usrtable.c usrtable.h version.h write.c
LDADD = $(PTEXENC_LIBS) $(KPATHSEA_LIBS)
-EXTRA_DIST = COPYRIGHT COPYRIGHT.jis Changes.txt README.txt \
+EXTRA_DIST = COPYRIGHT COPYRIGHT.ja Changes.txt README.txt \
tests/min10.tfm tests/min10.vf tests/rml.tfm tests/rmlv.tfm \
tests/tmin10.tfm tests/tmin10.vf tests/testnewu.tfm \
tests/testnewu.vf tests/gkhugeok.tfm tests/gkhugeok.vf \
+ tests/gk256g.tfm tests/gk256k.tfm tests/gk256.vf \
tests/skipjfmp.tfm tests/skipjfmp.vf tests/skipjfmp_omit.vf
dist_check_SCRIPTS = makejvf.test
TESTS = makejvf.test
Modified: trunk/Build/source/texk/makejvf/makejvf.test
===================================================================
--- trunk/Build/source/texk/makejvf/makejvf.test 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/makejvf/makejvf.test 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,6 +1,6 @@
#! /bin/sh -vx
# $Id$
-# Copyright 2017-2018 Karl Berry <tex-live at tug.org>
+# Copyright 2017-2023 Karl Berry <tex-live at tug.org>
# Copyright 2010-2013 Peter Breitenlohner <tex-live at tug.org>
# You may freely use, modify and/or distribute this file.
@@ -25,13 +25,21 @@
cmp $srcdir/tests/gkhugeok.vf gkhugeok.vf && \
cmp $srcdir/tests/rml.tfm urml.tfm || exit 4
+$_makejvf -e -i -u custom -t $srcdir/tests/uni10.cnf $srcdir/tests/gk256g urml && \
+ cmp $srcdir/tests/gk256.vf gk256g.vf && \
+ cmp $srcdir/tests/rml.tfm urml.tfm || exit 5
+
+$_makejvf -e -i -u custom -t $srcdir/tests/uni10.cnf $srcdir/tests/gk256k urml && \
+ cmp $srcdir/tests/gk256.vf gk256k.vf && \
+ cmp $srcdir/tests/rml.tfm urml.tfm || exit 6
+
$_makejvf -e $srcdir/tests/skipjfmp rml && \
cmp $srcdir/tests/skipjfmp.vf skipjfmp.vf && \
- cmp $srcdir/tests/rml.tfm rml.tfm || exit 5
+ cmp $srcdir/tests/rml.tfm rml.tfm || exit 7
$_makejvf -e -O $srcdir/tests/skipjfmp rml && \
cmp $srcdir/tests/skipjfmp_omit.vf skipjfmp.vf && \
- cmp $srcdir/tests/rml.tfm rml.tfm || exit 6
+ cmp $srcdir/tests/rml.tfm rml.tfm || exit 8
TEXMFCNF=$srcdir/../kpathsea \
$_makejvf -k0 -a abc && exit 100
Added: trunk/Build/source/texk/makejvf/tests/gk256.vf
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/makejvf/tests/gk256.vf
===================================================================
--- trunk/Build/source/texk/makejvf/tests/gk256.vf 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/makejvf/tests/gk256.vf 2023-09-17 13:24:00 UTC (rev 68305)
Property changes on: trunk/Build/source/texk/makejvf/tests/gk256.vf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/makejvf/tests/gk256g.tfm
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/makejvf/tests/gk256g.tfm
===================================================================
--- trunk/Build/source/texk/makejvf/tests/gk256g.tfm 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/makejvf/tests/gk256g.tfm 2023-09-17 13:24:00 UTC (rev 68305)
Property changes on: trunk/Build/source/texk/makejvf/tests/gk256g.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/makejvf/tests/gk256k.tfm
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/makejvf/tests/gk256k.tfm
===================================================================
--- trunk/Build/source/texk/makejvf/tests/gk256k.tfm 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/makejvf/tests/gk256k.tfm 2023-09-17 13:24:00 UTC (rev 68305)
Property changes on: trunk/Build/source/texk/makejvf/tests/gk256k.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Build/source/texk/makejvf/tfmread.c
===================================================================
--- trunk/Build/source/texk/makejvf/tfmread.c 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/makejvf/tfmread.c 2023-09-17 13:24:00 UTC (rev 68305)
@@ -38,11 +38,11 @@
if (glue_kern[(gk_ind+i)*4] > 128) break; /* ... skip loop */
if (glue_kern[(gk_ind+i)*4+1] == ctype) {
if (glue_kern[(gk_ind+i)*4+2] >= 128) {
- gk2_ind = glue_kern[(gk_ind+i)*4+3];
+ gk2_ind = (glue_kern[(gk_ind+i)*4+2]-128)*256+glue_kern[(gk_ind+i)*4+3];
ll = kern[gk2_ind];
}
else {
- gk2_ind = glue_kern[(gk_ind+i)*4+3];
+ gk2_ind = glue_kern[(gk_ind+i)*4+2]*256+glue_kern[(gk_ind+i)*4+3];
ll = glue[3*gk2_ind];
}
break;
@@ -64,11 +64,11 @@
if (glue_kern[(gk_ind+i)*4] > 128) break; /* ... skip loop */
if (glue_kern[(gk_ind+i)*4+1] == 0) {
if (glue_kern[(gk_ind+i)*4+2] >= 128) {
- gk2_ind = glue_kern[(gk_ind+i)*4+3];
+ gk2_ind = (glue_kern[(gk_ind+i)*4+2]-128)*256+glue_kern[(gk_ind+i)*4+3];
rr = kern[gk2_ind];
}
else {
- gk2_ind = glue_kern[(gk_ind+i)*4+3];
+ gk2_ind = glue_kern[(gk_ind+i)*4+2]*256+glue_kern[(gk_ind+i)*4+3];
rr = glue[3*gk2_ind];
}
break;
Modified: trunk/Build/source/texk/web2c/Makefile.in
===================================================================
--- trunk/Build/source/texk/web2c/Makefile.in 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/web2c/Makefile.in 2023-09-17 13:24:00 UTC (rev 68305)
@@ -3247,7 +3247,7 @@
eptexdir/tests/pdfprimitive-eptex.log $(uptex_web_srcs) \
$(uptex_ch_srcs) uptexdir/uptex.defines uptexdir/upbibtex.ch \
uptexdir/updvitype.ch uptexdir/uppltotf.ch \
- uptexdir/uptftopl.ch uptexdir/COPYRIGHT uptexdir/COPYRIGHT.jis \
+ uptexdir/uptftopl.ch uptexdir/COPYRIGHT uptexdir/COPYRIGHT.ja \
uptexdir/ChangeLog $(uptex_tests) $(upweb_tests) \
tests/enc-u.bbl tests/enc-eu.bbl tests/enc-su.bbl \
tests/enc-uu.bbl uptexdir/tests/uptex3.tex \
@@ -3259,6 +3259,7 @@
uptexdir/tests/testnewu.tfm uptexdir/tests/uparse.pl \
uptexdir/tests/uparse.tfm uptexdir/tests/gkhugeok.tfm \
uptexdir/tests/gkhugeng.tfm uptexdir/tests/gkhugeng.err \
+ uptexdir/tests/gk256g.tfm uptexdir/tests/gk256k.tfm \
uptexdir/uptrip/uptrip.diffs uptexdir/uptrip/texmf.cnf \
$(euptex_web_srcs) $(euptex_ch_srcs) euptexdir/euptex.defines \
euptexdir/COPYRIGHT euptexdir/COPYRIGHT.jis \
@@ -3592,40 +3593,40 @@
uptests/xcmr10.tfm uptests/xcmr10.pl uptests/xsample*.typ \
uptests/x*min10.* uptests/xchcode*.* uptests/xtestnewu.* \
uptests/xuparse.* uptests/yuparse.* uptests/ygkhuge*.* \
- uptests/xskipjfmp.* uptrip.diffs $(nodist_euptex_SOURCES) \
- euptex.web euptex.ch euptex-web2c euptex.p euptex.pool \
- euptex-tangle euptrip.diffs pdfprimitive-euptex.* \
- $(nodist_hitex_SOURCES) $(nodist_hishrink_SOURCES) \
- $(nodist_histretch_SOURCES) hiformat-tangle hitex-tangle \
- hello.log rule.log $(nodist_pdftex_SOURCES) pdftex-final.ch \
- pdftex-web2c pdftex.p pdftex.pool pdftex-tangle pwprob.log \
- pwprob.tex pdfimage.fmt pdfimage.log pdfimage.pdf expanded.log \
- cnfline.log partoken-ok.log partoken-xfail.log pdftests/fn*.* \
- postV3.afm postV7.afm test-13.pdf test-13.xref test-15.pdf \
- test-15.xref $(nodist_libluatex_sources) luaimage.* \
- luajitimage.* $(nodist_xetex_SOURCES) xetex.web xetex-final.ch \
- xetex-web2c xetex.p xetex.pool xetex-tangle bug73.fmt \
- bug73.log bug73.out bug73.tex filedump.log filedump.out \
- filedump.tex xetests/fn*.* $(omegaware_programs:=.c) \
- $(omegaware_programs:=.h) $(omegaware_programs:=.p) \
- $(omegaware_programs:=-web2c) ofm2opl.web opl2ofm.web \
- ovf2ovp.web ovp2ovf.web omegaware/bad*.* \
- omegaware/tests/charwdr.* omegaware/tests/charwdv.* \
- omegaware/tests/xcheck* omegaware/tests/xlevel1.* \
- omegaware/tests/xlig*.* ofont*vf omegaware/tests/xpagenum.* \
- omegaware/tests/xofont* omegaware/tests/Cherokee.tfm \
- omegaware/tests/OCherokee.ofm omegaware/tests/OCherokee.opl \
- omegaware/tests/OCherokee.ovf omegaware/tests/xCherokee.* \
- omegaware/tests/xOCherokee.* ocftest.* omegaware/tests/xinbmp* \
- omegaware/tests/xoverbmp* omegaware/tests/xrealnum.* \
- omegaware/tests/xrepeated.* omegaware/tests/sample*.ofm \
- omegaware/tests/sample*.ovf omegaware/tests/sample1-h.opl \
- omegaware/tests/xsample*.out omegaware/tests/shortend.* \
- omegaware/tests/specialhex.ofm omegaware/tests/specialhex.opl \
- omegaware/tests/specialhex.ovf omegaware/tests/xspecialhex.* \
- omegaware/tests/yrepeat* omegaware/tests/*yarabic* \
- $(nodist_aleph_SOURCES) aleph.web aleph.ch aleph-web2c aleph.p \
- aleph.pool aleph-tangle
+ uptests/ygk256*.* uptests/xskipjfmp.* uptrip.diffs \
+ $(nodist_euptex_SOURCES) euptex.web euptex.ch euptex-web2c \
+ euptex.p euptex.pool euptex-tangle euptrip.diffs \
+ pdfprimitive-euptex.* $(nodist_hitex_SOURCES) \
+ $(nodist_hishrink_SOURCES) $(nodist_histretch_SOURCES) \
+ hiformat-tangle hitex-tangle hello.log rule.log \
+ $(nodist_pdftex_SOURCES) pdftex-final.ch pdftex-web2c pdftex.p \
+ pdftex.pool pdftex-tangle pwprob.log pwprob.tex pdfimage.fmt \
+ pdfimage.log pdfimage.pdf expanded.log cnfline.log \
+ partoken-ok.log partoken-xfail.log pdftests/fn*.* postV3.afm \
+ postV7.afm test-13.pdf test-13.xref test-15.pdf test-15.xref \
+ $(nodist_libluatex_sources) luaimage.* luajitimage.* \
+ $(nodist_xetex_SOURCES) xetex.web xetex-final.ch xetex-web2c \
+ xetex.p xetex.pool xetex-tangle bug73.fmt bug73.log bug73.out \
+ bug73.tex filedump.log filedump.out filedump.tex xetests/fn*.* \
+ $(omegaware_programs:=.c) $(omegaware_programs:=.h) \
+ $(omegaware_programs:=.p) $(omegaware_programs:=-web2c) \
+ ofm2opl.web opl2ofm.web ovf2ovp.web ovp2ovf.web \
+ omegaware/bad*.* omegaware/tests/charwdr.* \
+ omegaware/tests/charwdv.* omegaware/tests/xcheck* \
+ omegaware/tests/xlevel1.* omegaware/tests/xlig*.* ofont*vf \
+ omegaware/tests/xpagenum.* omegaware/tests/xofont* \
+ omegaware/tests/Cherokee.tfm omegaware/tests/OCherokee.ofm \
+ omegaware/tests/OCherokee.opl omegaware/tests/OCherokee.ovf \
+ omegaware/tests/xCherokee.* omegaware/tests/xOCherokee.* \
+ ocftest.* omegaware/tests/xinbmp* omegaware/tests/xoverbmp* \
+ omegaware/tests/xrealnum.* omegaware/tests/xrepeated.* \
+ omegaware/tests/sample*.ofm omegaware/tests/sample*.ovf \
+ omegaware/tests/sample1-h.opl omegaware/tests/xsample*.out \
+ omegaware/tests/shortend.* omegaware/tests/specialhex.ofm \
+ omegaware/tests/specialhex.opl omegaware/tests/specialhex.ovf \
+ omegaware/tests/xspecialhex.* omegaware/tests/yrepeat* \
+ omegaware/tests/*yarabic* $(nodist_aleph_SOURCES) aleph.web \
+ aleph.ch aleph-web2c aleph.p aleph.pool aleph-tangle
CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES)
TRIPTRAP_CLEAN = $(am__append_8) $(am__append_18) $(am__append_27) \
$(am__append_36) $(am__append_44) $(am__append_60) \
@@ -4508,7 +4509,11 @@
uptftopl_DEPENDENCIES = $(uptex_dependencies)
# upTeX Tests
-uptex_tests = uptexdir/uptriptest.test uptexdir/ptriptest.test uptexdir/upver.test uptexdir/upkcat.test uptexdir/wcfname.test uptexdir/wcfname0.test
+uptex_tests = \
+ uptexdir/uptriptest.test uptexdir/ptriptest.test \
+ uptexdir/upver.test uptexdir/upkcat.test \
+ uptexdir/wcfname.test uptexdir/wcfname0.test
+
# uppPLtoTF/upTFtoPL
upweb_tests = uptexdir/upbibtex.test uptexdir/updvitype.test \
uptexdir/uppltotf.test uptexdir/uptftopl.test \
@@ -4516,7 +4521,8 @@
uptexdir/upbibtex-longline-test.pl uptexdir/upbibtex-mem.test \
uptexdir/nissya.test uptexdir/sample.test \
uptexdir/yokotate.test uptexdir/skipjfmp.test \
- uptexdir/newjfm.test uptexdir/uparse.test uptexdir/gkhuge.test
+ uptexdir/newjfm.test uptexdir/uparse.test uptexdir/gkhuge.test \
+ uptexdir/gk256.test
euptex_CPPFLAGS = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) \
-I$(srcdir)/libmd5 $(ZLIB_INCLUDES) $(am__append_142)
@@ -22077,7 +22083,8 @@
uptexdir/upbibtex-mem.log uptexdir/nissya.log: upbibtex$(EXEEXT)
uptexdir/sample.log: updvitype$(EXEEXT)
uptexdir/yokotate.log uptexdir/skipjfmp.log \
- uptexdir/newjfm.log uptexdir/uparse.log uptexdir/gkhuge.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
+ uptexdir/newjfm.log uptexdir/uparse.log \
+ uptexdir/gkhuge.log uptexdir/gk256.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
uptrip.diffs: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
$(triptrap_diffs) $@
.PHONY: uptrip-clean
Modified: trunk/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,3 +1,8 @@
+2023-09-17 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
+
+ * ptex-base.ch: Support more than 256 different glue/kern.
+ * ptex_version.h: Version p4.1.1.
+
2023-09-03 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
* {ptriptest,pver}.test:
Modified: trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch 2023-09-17 13:24:00 UTC (rev 68305)
@@ -73,6 +73,7 @@
% More details in TUGboat 41(2):329--334, 2020.
% (2022-10-24) HY pTeX p4.1.0 Add new syntax \font [in jis/ucs].
% New primitives: \tojis, \ptextracingfonts and \ptexfontname.
+% (2023-09-17) HY pTeX p4.1.1 Support more than 256 different glue/kern.
@x
% Here is TeX material that gets inserted after \input webmac
@@ -87,8 +88,8 @@
@y
@d pTeX_version=4
@d pTeX_minor_version=1
- at d pTeX_revision==".0"
- at d pTeX_version_string=='-p4.1.0' {current \pTeX\ version}
+ at d pTeX_revision==".1"
+ at d pTeX_version_string=='-p4.1.1' {current \pTeX\ version}
@#
@d pTeX_banner=='This is pTeX, Version 3.141592653',pTeX_version_string
@d pTeX_banner_k==pTeX_banner
@@ -3359,9 +3360,11 @@
end
else begin if b<>bchar then check_existence(b);
if c<128 then begin
- if jfm_flag<>dir_default then begin if d>=ne then abort; end
+ if jfm_flag<>dir_default then
+ begin if 256*c+d>=ne then abort; end {check glue}
else check_existence(d); {check ligature}
- end else if 256*(c-128)+d>=nk then abort; {check kern}
+ end
+ else if 256*(c-128)+d>=nk then abort; {check kern}
if a<128 then if k-lig_kern_base[f]+a+1>=nl then abort;
end;
end;
@@ -4451,7 +4454,7 @@
loop at + begin
if next_char(cur_i)=cur_c then if skip_byte(cur_i)<=stop_flag then
if op_byte(cur_i)<kern_flag then
- begin gp:=font_glue[cur_f]; rr:=rem_byte(cur_i);
+ begin gp:=font_glue[cur_f]; rr:=op_byte(cur_i)*256+rem_byte(cur_i);
if gp<>null then begin
while((type(gp)<>rr)and(link(gp)<>null)) do begin gp:=link(gp);
end;
@@ -8070,7 +8073,7 @@
end;
loop at +begin if next_char(main_j)=cur_l then if skip_byte(main_j)<=stop_flag then
begin if op_byte(main_j)<kern_flag then
- begin gp:=font_glue[main_f]; cur_r:=rem_byte(main_j);
+ begin gp:=font_glue[main_f]; cur_r:=op_byte(main_j)*256+rem_byte(main_j);
if gp<>null then
begin while((type(gp)<>cur_r)and(link(gp)<>null)) do gp:=link(gp);
gq:=glue_ptr(gp);
Modified: trunk/Build/source/texk/web2c/ptexdir/ptex_version.h
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex_version.h 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex_version.h 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1 +1 @@
-#define PTEX_VERSION "p4.1.0"
+#define PTEX_VERSION "p4.1.1"
Modified: trunk/Build/source/texk/web2c/uptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/ChangeLog 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/web2c/uptexdir/ChangeLog 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,5 +1,11 @@
-2022-09-16 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+2023-09-17 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
+ * uppltotf.ch, uptftopl.ch: Version p230917.
+ - Support more than 256 different glue/kern.
+ * gk256.test, tests/gk256[gk].{tex,tfm}: New tests.
+
+2023-09-16 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
+
* uptex-m.ch, upbibtex.ch, uptex_version.h:
upTeX version u1.30.
* uptex-m.ch, upbibtex.ch, kanji.c:
Modified: trunk/Build/source/texk/web2c/uptexdir/am/uptex.am
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/am/uptex.am 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/web2c/uptexdir/am/uptex.am 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,7 +1,7 @@
## $Id$
## texk/web2c/uptexdir/am/uptex.am: Makefile fragment for upTeX.
##
-## Copyright 2016-2022 Karl Berry <tex-live at tug.org>
+## Copyright 2016-2023 Karl Berry <tex-live at tug.org>
## Copyright 2011-2015 Peter Breitenlohner <tex-live at tug.org>
## You may freely use, modify and/or distribute this file.
@@ -161,11 +161,14 @@
##
EXTRA_DIST += \
uptexdir/COPYRIGHT \
- uptexdir/COPYRIGHT.jis \
+ uptexdir/COPYRIGHT.ja \
uptexdir/ChangeLog
# upTeX Tests
-uptex_tests = uptexdir/uptriptest.test uptexdir/ptriptest.test uptexdir/upver.test uptexdir/upkcat.test uptexdir/wcfname.test uptexdir/wcfname0.test
+uptex_tests = \
+ uptexdir/uptriptest.test uptexdir/ptriptest.test \
+ uptexdir/upver.test uptexdir/upkcat.test \
+ uptexdir/wcfname.test uptexdir/wcfname0.test
uptexdir/uptriptest.log uptexdir/ptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
uptexdir/upver.log uptexdir/upkcat.log uptexdir/wcfname.log uptexdir/wcfname0.log: uptex$(EXEEXT)
upweb_tests = \
@@ -183,7 +186,8 @@
# uppPLtoTF/upTFtoPL
upweb_tests += \
uptexdir/yokotate.test uptexdir/skipjfmp.test \
- uptexdir/newjfm.test uptexdir/uparse.test uptexdir/gkhuge.test
+ uptexdir/newjfm.test uptexdir/uparse.test \
+ uptexdir/gkhuge.test uptexdir/gk256.test
uptexdir/upbibtex.log: upbibtex$(EXEEXT)
uptexdir/updvitype.log: updvitype$(EXEEXT)
uptexdir/uppltotf.log: uppltotf$(EXEEXT)
@@ -192,7 +196,8 @@
uptexdir/upbibtex-mem.log uptexdir/nissya.log: upbibtex$(EXEEXT)
uptexdir/sample.log: updvitype$(EXEEXT)
uptexdir/yokotate.log uptexdir/skipjfmp.log \
- uptexdir/newjfm.log uptexdir/uparse.log uptexdir/gkhuge.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
+ uptexdir/newjfm.log uptexdir/uparse.log \
+ uptexdir/gkhuge.log uptexdir/gk256.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
EXTRA_DIST += $(uptex_tests) $(upweb_tests)
DISTCLEANFILES += $(upweb_programs:=.c) $(upweb_programs:=.h) \
@@ -241,6 +246,9 @@
## uptexdir/gkhuge.test
EXTRA_DIST += uptexdir/tests/gkhugeok.tfm uptexdir/tests/gkhugeng.tfm uptexdir/tests/gkhugeng.err
DISTCLEANFILES += uptests/ygkhuge*.*
+## uptexdir/gk256.test
+EXTRA_DIST += uptexdir/tests/gk256g.tfm uptexdir/tests/gk256k.tfm
+DISTCLEANFILES += uptests/ygk256*.*
## uptexdir/skipjfmp.test
DISTCLEANFILES += uptests/xskipjfmp.*
## uptexdir/uptriptest
Added: trunk/Build/source/texk/web2c/uptexdir/gk256.test
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/gk256.test (rev 0)
+++ trunk/Build/source/texk/web2c/uptexdir/gk256.test 2023-09-17 13:24:00 UTC (rev 68305)
@@ -0,0 +1,30 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2023 Karl Berry <tex-live at tug.org>
+# You may freely use, modify and/or distribute this file.
+
+BinDir=${BinDir:-.}
+ExeExt=${ExeExt:-}
+_uppltotf=$BinDir/uppltotf$ExeExt
+_uptftopl=$BinDir/uptftopl$ExeExt
+
+test -d uptests || mkdir -p uptests
+
+TEXMFCNF=$srcdir/../kpathsea
+export TEXMFCNF
+
+# Test inputs
+testdir=$srcdir/uptexdir/tests
+
+# Testing upPLtoTF/upTFtoPL for huge GLUEKERN table
+# with over 256 different glue/kern.
+for font in gk256g gk256k; do
+
+ # This test is constructed as a cycle, since JPL source
+ # of gkhugeok.tfm is so large.
+ $_uptftopl -verbose $testdir/$font.tfm uptests/y$font.pl && \
+ $_uppltotf -verbose uptests/y$font.pl uptests/y$font.tfm && \
+ cmp $testdir/$font.tfm uptests/y$font.tfm && echo || exit 1
+
+done
+
Property changes on: trunk/Build/source/texk/web2c/uptexdir/gk256.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/web2c/uptexdir/tests/gk256.tex
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/tests/gk256.tex (rev 0)
+++ trunk/Build/source/texk/web2c/uptexdir/tests/gk256.tex 2023-09-17 13:24:00 UTC (rev 68305)
@@ -0,0 +1,66 @@
+%#!uptex
+
+%% まずは kern が 256 を超える時:
+% * (u)pPLtoTF はエラー発生しないが正常に格納できず→修正
+% * (u)pTFtoPL は元々読み出し OK
+% * (u)pTeX は元々読み出し OK
+% ※オリジナルの TeX は max_kerns=5000 まで許容
+
+\prebreakpenalty`…=0
+\prebreakpenalty`・=0
+\prebreakpenalty`。=0
+
+\tracingonline1
+\showboxdepth10000
+\showboxbreadth10000
+\ptextracingfonts2
+
+\font\x=upjisr-h\x
+\setbox0=\hbox{あ……あ}\showbox0
+\box0
+
+\font\y=gk-over256-kern\y
+\setbox2=\hbox{あ……あ}\showbox2
+\box2
+
+\newfam\mx
+\newfam\my
+\textfont\mx=\x \scriptfont\mx=\x \scriptscriptfont\mx=\x
+\textfont\my=\y \scriptfont\my=\y \scriptscriptfont\my=\y
+
+\jfam\mx
+\setbox4=\hbox{$あ……あ$}\showbox4
+\box4
+
+\jfam\my
+\setbox6=\hbox{$あ……あ$}\showbox6
+\box6
+
+%% 次に glue が 256 を超える時:
+% * (u)pPLtoTF は 256 を超えるとエラー→修正
+% * (u)pTFtoPL は読み出せず→修正
+% * (u)pTeX も正常に読み出せず→修正
+% →新しい (u)pTeX では max_kerns*3 = 15000 まで許容してみた
+
+\font\z=upjisg-h\z
+\setbox0=\hbox{あ・・あ。あ}\showbox0
+\box0
+
+\font\w=gk-over256-glue\w
+\setbox2=\hbox{あ・・あ。あ}\showbox2
+\box2
+
+\newfam\mz
+\newfam\mw
+\textfont\mz=\z \scriptfont\mz=\z \scriptscriptfont\mz=\z
+\textfont\mw=\w \scriptfont\mw=\w \scriptscriptfont\mw=\w
+
+\jfam\mz
+\setbox4=\hbox{$あ・・あ。あ$}\showbox4
+\box4
+
+\jfam\mw
+\setbox6=\hbox{$あ・・あ。あ$}\showbox6
+\box6
+
+\bye
Property changes on: trunk/Build/source/texk/web2c/uptexdir/tests/gk256.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Build/source/texk/web2c/uptexdir/tests/gk256g.tfm
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/web2c/uptexdir/tests/gk256g.tfm
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/tests/gk256g.tfm 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/web2c/uptexdir/tests/gk256g.tfm 2023-09-17 13:24:00 UTC (rev 68305)
Property changes on: trunk/Build/source/texk/web2c/uptexdir/tests/gk256g.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Build/source/texk/web2c/uptexdir/tests/gk256k.tfm
===================================================================
(Binary files differ)
Index: trunk/Build/source/texk/web2c/uptexdir/tests/gk256k.tfm
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/tests/gk256k.tfm 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/web2c/uptexdir/tests/gk256k.tfm 2023-09-17 13:24:00 UTC (rev 68305)
Property changes on: trunk/Build/source/texk/web2c/uptexdir/tests/gk256k.tfm
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/web2c/uptexdir/uppltotf.ch 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,5 +1,6 @@
% This is a change file for PLtoTF
%
+% (2023-09-17) HY Support more than 256 different glue/kern
% (2022-12-03) TTK Merge pPLtoTF source/binary into upPLtoTF
% (2018-01-27) HY pPLtoTF p2.0 - new JFM spec by texjporg
% (07/18/2006) ST PLtoTF p1.8 (3.5, Web2c 7.2)
@@ -17,7 +18,7 @@
@d banner=='This is PLtoTF, Version 3.6' {printed when the program starts}
@y
@d my_name=='uppltotf'
- at d banner=='This is upPLtoTF, Version 3.6-p221203'
+ at d banner=='This is upPLtoTF, Version 3.6-p230917'
{printed when the program starts}
@z
@@ -113,12 +114,17 @@
@z
@x [110] l.1915 - pTeX: there are no charlists in kanji format files.
+@<Check for infinite ligature loops@>;
+@<Doublecheck the lig/kern commands and the extensible recipes@>;
for c:=0 to 255 do
@<Make sure that |c| is not the largest element of a charlist cycle@>;
@y
-if file_format=tfm_format then
+if file_format=tfm_format then begin
+ @<Check for infinite ligature loops@>;
+ @<Doublecheck the lig/kern commands and the extensible recipes@>;
for c:=0 to 255 do
@<Make sure that |c| is not the largest element of a charlist cycle@>;
+ end;
@z
@x [120] l.2037 - pTeX: when checking glue_kern prog check glues as well
@@ -140,23 +146,12 @@
if lig_gen>=128 then if(c<128)or(c=256) then
if(lig_exam<128)or(lig_exam=bchar) then seven_unsafe:=true;
end
- else check_existence(lig_exam)('GLUE character generated by');
+ else if lig_exam<>bchar then
+ check_existence(lig_exam)('GLUE character examined by');
+ at .GLUE character examined...@>
end
@z
- at x [126] l.2178 - pTeX: Fix up output of bytes.
-@<Doublecheck...@>=
-if nl>0 then for lig_ptr:=0 to nl-1 do
- if lig_kern[lig_ptr].b2<kern_flag then
- begin if lig_kern[lig_ptr].b0<255 then
- begin double_check_lig(b1)('LIG step'); double_check_lig(b3)('LIG step');
- end;
- end
- else double_check_lig(b1)('KRN step');
- at y
-@<Doublecheck...@>=
- at z
-
@x [128] l.2207 - pTeX: Decide the |file_format|.
@<Do the output@>=
@y
@@ -376,7 +371,7 @@
kanji_type:array[0..max_kanji] of -1..256; {the type of every kanji char }
kanji_type_index:0..max_kanji; { index into above }
nt:integer; {number of entries in character type table}
-glue:array[0..768] of fix_word; {the distinct glue amounts}
+glue:array[0..15000] of fix_word; {the distinct glue amounts, equals 3 * |max_kerns|}
ng:integer; {number of 3-word entries in glue table}
@ @<Set init...@>=
@@ -416,7 +411,8 @@
There routines a bit similar reading ligature/kern programs.
@<Read glue/kern list@>=
-begin while level=1 do
+begin lk_step_ended:=false;
+while level=1 do
begin while cur_char=" " do get_next;
if cur_char="(" then @<Read a glue/kern command@>
else if cur_char=")" then skip_to_end_of_item
@@ -442,40 +438,47 @@
end;
end
-@ When a character is about to be tagged, we use the following
-so that an error message is given in case of multiple tags.
+@ When a character is about to be tagged, we call the following
+procedure so that an error message is given in case of multiple tags.
-@<Read a glue label step@>=
-begin c:=get_byte;
-case char_tag[c] of
- no_tag: do_nothing;
- lig_tag: err_print('This character already appeared in a GLUEKERN LABEL');
- @.This character already...@>
- list_tag: err_print('Impossible: a list tag in a kanji format file?');
- ext_tag: err_print('Impossible: an extensible tag in a kanji format file?');
+@<Declare kanji scanning routines@>=
+procedure check_tag_gluekern(c:byte); {print error if |c| already tagged}
+begin case char_tag[c] of
+no_tag: do_nothing;
+lig_tag: err_print('This character already appeared in a GLUEKERN LABEL');
+ at .This character already...@>
+list_tag: err_print('Impossible: a list tag in a kanji format file?');
+ext_tag: err_print('Impossible: an extensible tag in a kanji format file?');
end;
-if nl>max_lig_steps then
- err_print('GLUEKERN with more than ',max_lig_steps,' commands cannot have further labels')
- at .GLUEKERN with more than...@>
-else begin char_tag[c]:=lig_tag; char_remainder[c]:=nl;
- lk_step_ended:=false;
+end;
+
+@ @<Read a glue label step@>=
+begin while cur_char=" " do get_next;
+if cur_char="B" then
+ begin bchar_label:=nl; skip_to_paren; {\.{LABEL BOUNDARYCHAR}}
+ end
+else begin backup; c:=get_byte;
+ check_tag_gluekern(c); char_tag[c]:=lig_tag; char_remainder[c]:=nl;
end;
+if min_nl<=nl then min_nl:=nl+1;
+lk_step_ended:=false;
end
@ @<Read a (glue) kerning step@>=
-begin lig_kern[nl].b0:=0; lig_kern[nl].b1:=get_byte;@/
-lig_kern[nl].b2:=kern_flag; kern[nk]:=get_fix; krn_ptr:=0;
+begin lig_kern[nl].b0:=0; lig_kern[nl].b1:=get_byte;
+kern[nk]:=get_fix; krn_ptr:=0;
while kern[krn_ptr]<>kern[nk] do incr(krn_ptr);
if krn_ptr=nk then
begin if nk<max_kerns then incr(nk)
else begin err_print('At most ',max_kerns,' different kerns are allowed');
@.At most 5000 different kerns...@>
- krn_ptr:=max_kerns-1;
+ decr(krn_ptr);
end;
end;
-lig_kern[nl].b3:=krn_ptr;
-if nl=max_lig_steps then
- err_print('GLUEKERN table should never exceed ',max_lig_steps,' LIG/KRN commands')
+lig_kern[nl].b2:=kern_flag+(krn_ptr div 256);
+lig_kern[nl].b3:=krn_ptr mod 256;
+if nl>=max_lig_steps-1 then
+ err_print('GLUEKERN table should never exceed ',max_lig_steps,' GLUE/KRN commands')
@.GLUEKERN table should never...@>
else incr(nl);
lk_step_ended:=true;
@@ -482,7 +485,7 @@
end
@ @<Read a glue step@>=
-begin lig_kern[nl].b0:=0; lig_kern[nl].b1:=get_byte; lig_kern[nl].b2:=0;@/
+begin lig_kern[nl].b0:=0; lig_kern[nl].b1:=get_byte;
glue[3*ng+0]:=get_fix; glue[3*ng+1]:=get_fix; glue[3*ng+2]:=get_fix;
krn_ptr:=0;
while (glue[3*krn_ptr+0]<>glue[3*ng+0])or
@@ -489,13 +492,14 @@
(glue[3*krn_ptr+1]<>glue[3*ng+1])or
(glue[3*krn_ptr+2]<>glue[3*ng+2]) do incr(krn_ptr);
if krn_ptr=ng then
- begin if ng<256 then incr(ng)
- else begin err_print('At most 256 different glues are allowed');
- krn_ptr:=255;
+ begin if ng<max_kerns then incr(ng)
+ else begin err_print('At most ',max_kerns,' different glues are allowed');
+ decr(krn_ptr);
end;
end;
-lig_kern[nl].b3:=krn_ptr;
-if nl=max_lig_steps then
+lig_kern[nl].b2:=krn_ptr div 256;
+lig_kern[nl].b3:=krn_ptr mod 256;
+if nl>=max_lig_steps-1 then
err_print('GLUEKERN table should never exceed ',max_lig_steps,' GLUE/KRN commands')
@.GLUEKERN table should never...@>
else incr(nl);
Modified: trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch 2023-09-17 09:06:29 UTC (rev 68304)
+++ trunk/Build/source/texk/web2c/uptexdir/uptftopl.ch 2023-09-17 13:24:00 UTC (rev 68305)
@@ -1,5 +1,6 @@
% This is a change file for TFtoPL
%
+% (2023-09-17) HY Support more than 256 different glue/kern
% (2022-12-03) TTK Merge pTFtoPL source/binary into upTFtoPL
% (2018-01-27) HY pTFtoPL p2.0 - new JFM spec by texjporg
% (07/18/2006) ST TFtoPL p1.7 (3.1, Web2c 7.2)
@@ -16,7 +17,7 @@
@d banner=='This is TFtoPL, Version 3.3' {printed when the program starts}
@y
@d my_name=='uptftopl'
- at d banner=='This is upTFtoPL, Version 3.3-p221203'
+ at d banner=='This is upTFtoPL, Version 3.3-p230917'
{printed when the program starts}
@z
@@ -258,6 +259,12 @@
out_ln;@/
@z
+ at x [68] l.1075 - pTeX: no need to check for loop
+ @<Check for ligature cycles@>;
+ at y
+ if file_format=tfm_format then begin @<Check for ligature cycles@>; end;
+ at z
+
@x [69] l.1090 - pTeX: we print Glue/kern instead of Ligature/kern
print('Ligature/kern starting index for character '); print_octal(c);
print_ln(' is too large;'); print_ln('so I removed it.'); reset_tag(c);
@@ -411,22 +418,21 @@
@!kanji_type:array[0..max_kanji] of -1..255; {kanji type index}
@ @<Output a glue step@>=
-begin if nonexistent(tfm[k+1]) then
- correct_bad_char('Glue step for')(k+1)
+begin if nonexistent(tfm[k+1]) then if tfm[k+1]<>boundary_char then
+ correct_bad_char('Glue step for')(k+1);
@.Glue step for nonexistent...@>
-else
- begin left; out('GLUE'); out_char(tfm[k+1]);
- if 3*tfm[k+3]>=ng then
- begin bad('Glue index too large.');
+left; out('GLUE'); out_char(tfm[k+1]);
+r:=3*(256*tfm[k+2]+tfm[k+3]);
+if r>=ng then
+ begin bad('Glue index too large.');
@.Glue index too large@>
- out(' R 0.0 R 0.0 R 0.0');
- end
- else begin out_fix(glue(3*tfm[k+3]));
- out_fix(glue(3*tfm[k+3]+1));
- out_fix(glue(3*tfm[k+3]+2));
- end;
- right;
+ out(' R 0.0 R 0.0 R 0.0');
+ end
+else begin out_fix(glue(r));
+ out_fix(glue(r+1));
+ out_fix(glue(r+2));
end;
+right;
end
@ list the |char_type| table in a similar way to the type table.
More information about the tex-live-commits
mailing list.