diff options
author | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2023-09-17 13:24:00 +0000 |
---|---|---|
committer | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2023-09-17 13:24:00 +0000 |
commit | b6caed3f9e827e5801a3f27868d6597e2de15f6b (patch) | |
tree | c8f168e8bd68970d61ad66a3bfb04a4a29d32018 /Build/source | |
parent | 7853a1ad37caf3886afd4f8ad64aa7e30307e608 (diff) |
ptex, makejvf: support more than 256 different glue/kern
git-svn-id: svn://tug.org/texlive/trunk@68305 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
27 files changed, 305 insertions, 143 deletions
diff --git a/Build/source/texk/dviout-util/ChangeLog b/Build/source/texk/dviout-util/ChangeLog index cc3c537025a..c5430071933 100644 --- a/Build/source/texk/dviout-util/ChangeLog +++ b/Build/source/texk/dviout-util/ChangeLog @@ -1,3 +1,8 @@ +2023-09-17 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + + * chkdvifont.c: Check JFM with over 256 glue/kern. + * configure.ac: Version 20230917. + 2023-08-11 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * dvispc.c, chkdvifont.c, dd.h, msvcdir.h, Makefile.am: diff --git a/Build/source/texk/dviout-util/chkdvifont.c b/Build/source/texk/dviout-util/chkdvifont.c index 5ac8aa01a83..acf22487c1c 100644 --- a/Build/source/texk/dviout-util/chkdvifont.c +++ b/Build/source/texk/dviout-util/chkdvifont.c @@ -932,7 +932,7 @@ void tfm_define(FILE * fp) 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 @@ void tfm_define(FILE * fp) 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 @@ void tfm_define(FILE * fp) 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) { diff --git a/Build/source/texk/dviout-util/configure b/Build/source/texk/dviout-util/configure index 13481a86e95..2be39da875d 100755 --- a/Build/source/texk/dviout-util/configure +++ b/Build/source/texk/dviout-util/configure @@ -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@tug.org>. # @@ -629,8 +629,8 @@ MAKEFLAGS= # 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@tug.org' PACKAGE_URL='' @@ -1378,7 +1378,7 @@ if test "$ac_init_help" = "long"; then # 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 @@ fi 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 @@ fi 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 @@ cat >config.log <<_ACEOF 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 @@ fi # 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 @@ Usage: $0 [OPTIONS] Report bugs to <bug-libtool@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 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ 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\\" diff --git a/Build/source/texk/dviout-util/configure.ac b/Build/source/texk/dviout-util/configure.ac index 7d7ecbe1533..c93e539d305 100644 --- a/Build/source/texk/dviout-util/configure.ac +++ b/Build/source/texk/dviout-util/configure.ac @@ -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@texjp.org> +dnl Copyright 2018-2023 Japanese TeX Development Community <issue@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@tug.org]) +AC_INIT([dviout-util (TeX Live)], [20230917], [tex-k@tug.org]) AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([dvispc.c]) AC_CONFIG_AUX_DIR([../../build-aux]) diff --git a/Build/source/texk/dviout-util/tests/skipjfmp.cfn b/Build/source/texk/dviout-util/tests/skipjfmp.cfn index 7751a84b802..ad728a69334 100644 --- a/Build/source/texk/dviout-util/tests/skipjfmp.cfn +++ b/Build/source/texk/dviout-util/tests/skipjfmp.cfn @@ -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 diff --git a/Build/source/texk/dviout-util/tests/uparse.cfn b/Build/source/texk/dviout-util/tests/uparse.cfn index 36f287e6076..9e79e4aaf07 100644 --- a/Build/source/texk/dviout-util/tests/uparse.cfn +++ b/Build/source/texk/dviout-util/tests/uparse.cfn @@ -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 diff --git a/Build/source/texk/dviout-util/tests/upphirakakuw3-h.cfn b/Build/source/texk/dviout-util/tests/upphirakakuw3-h.cfn index 0f9f25f9815..875057dcda3 100644 --- a/Build/source/texk/dviout-util/tests/upphirakakuw3-h.cfn +++ b/Build/source/texk/dviout-util/tests/upphirakakuw3-h.cfn @@ -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 diff --git a/Build/source/texk/makejvf/ChangeLog b/Build/source/texk/makejvf/ChangeLog index 5739fd61caf..a8239f2ff70 100644 --- a/Build/source/texk/makejvf/ChangeLog +++ b/Build/source/texk/makejvf/ChangeLog @@ -1,3 +1,9 @@ +2023-09-17 Hironobu Yamashita <h.y.acetaminophen@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@t-lab.opal.ne.jp> * uniblock.c: Update references Unicode blocks Blocks-15.1.0.txt diff --git a/Build/source/texk/makejvf/Makefile.am b/Build/source/texk/makejvf/Makefile.am index abacf534277..2da101c000b 100644 --- a/Build/source/texk/makejvf/Makefile.am +++ b/Build/source/texk/makejvf/Makefile.am @@ -1,7 +1,7 @@ ## Makefile.am for the TeX Live subdirectory texk/makejvfk/ ## ## Copyright (C) 2010-2015 Peter Breitenlohner <tex-live@tug.org> -## Copyright (C) 2016-2018 Japanese TeX Development Community <issue@texjp.org> +## Copyright (C) 2016-2023 Japanese TeX Development Community <issue@texjp.org> ## You may freely use, modify and/or distribute this file. ## AM_CPPFLAGS = $(PTEXENC_INCLUDES) $(KPATHSEA_INCLUDES) @@ -21,7 +21,7 @@ LDADD = $(PTEXENC_LIBS) $(KPATHSEA_LIBS) @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 @@ EXTRA_DIST += \ 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 diff --git a/Build/source/texk/makejvf/Makefile.in b/Build/source/texk/makejvf/Makefile.in index e068d6941c6..39efa58616d 100644 --- a/Build/source/texk/makejvf/Makefile.in +++ b/Build/source/texk/makejvf/Makefile.in @@ -561,10 +561,11 @@ makejvf_SOURCES = \ 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 diff --git a/Build/source/texk/makejvf/makejvf.test b/Build/source/texk/makejvf/makejvf.test index e2bb6ab9485..66fdcb9a8ee 100755 --- a/Build/source/texk/makejvf/makejvf.test +++ b/Build/source/texk/makejvf/makejvf.test @@ -1,6 +1,6 @@ #! /bin/sh -vx # $Id$ -# Copyright 2017-2018 Karl Berry <tex-live@tug.org> +# Copyright 2017-2023 Karl Berry <tex-live@tug.org> # Copyright 2010-2013 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. @@ -25,13 +25,21 @@ $_makejvf -e -i -u custom -t $srcdir/tests/uni10.cnf $srcdir/tests/gkhugeok urml 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 diff --git a/Build/source/texk/makejvf/tests/gk256.vf b/Build/source/texk/makejvf/tests/gk256.vf Binary files differnew file mode 100644 index 00000000000..37ed4cfbd71 --- /dev/null +++ b/Build/source/texk/makejvf/tests/gk256.vf diff --git a/Build/source/texk/makejvf/tests/gk256g.tfm b/Build/source/texk/makejvf/tests/gk256g.tfm Binary files differnew file mode 100644 index 00000000000..fb1051b7a96 --- /dev/null +++ b/Build/source/texk/makejvf/tests/gk256g.tfm diff --git a/Build/source/texk/makejvf/tests/gk256k.tfm b/Build/source/texk/makejvf/tests/gk256k.tfm Binary files differnew file mode 100644 index 00000000000..9a40b0f66ef --- /dev/null +++ b/Build/source/texk/makejvf/tests/gk256k.tfm diff --git a/Build/source/texk/makejvf/tfmread.c b/Build/source/texk/makejvf/tfmread.c index 5b4805d7e4e..23f13018722 100644 --- a/Build/source/texk/makejvf/tfmread.c +++ b/Build/source/texk/makejvf/tfmread.c @@ -38,11 +38,11 @@ int jfmread(int kcode) 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 @@ int jfmread(int kcode) 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; diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index bd0b9752009..7f73d82421e 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -3247,7 +3247,7 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \ 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 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \ 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 @@ DISTCLEANFILES = CXXLD.sh tangle.c tangle.h tangle.p tangle-web2c \ 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_LDADD = $(uptex_ldadd) 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 @@ upweb_tests = uptexdir/upbibtex.test uptexdir/updvitype.test \ 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-openout-test.log uptexdir/upbibtex-longline-test.log \ 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 diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog index 8ac9123da96..890d153de6e 100644 --- a/Build/source/texk/web2c/ptexdir/ChangeLog +++ b/Build/source/texk/web2c/ptexdir/ChangeLog @@ -1,3 +1,8 @@ +2023-09-17 Hironobu Yamashita <h.y.acetaminophen@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@t-lab.opal.ne.jp> * {ptriptest,pver}.test: diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch index 4a57d3eb17c..3ed7b821e7b 100644 --- a/Build/source/texk/web2c/ptexdir/ptex-base.ch +++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch @@ -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 -@d pTeX_revision==".0" -@d pTeX_version_string=='-p4.1.0' {current \pTeX\ version} +@d pTeX_revision==".1" +@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 @@ for k:=char_base[f]+bc to width_base[f]-1 do 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 @@ if (math_type(subscr(q))=empty)and(math_type(supscr(q))=empty)and@| loop@+ 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 @@ if inhibit_glue_flag<>true then end; loop@+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); diff --git a/Build/source/texk/web2c/ptexdir/ptex_version.h b/Build/source/texk/web2c/ptexdir/ptex_version.h index 7e26abb0f54..13e0f1467b3 100644 --- a/Build/source/texk/web2c/ptexdir/ptex_version.h +++ b/Build/source/texk/web2c/ptexdir/ptex_version.h @@ -1 +1 @@ -#define PTEX_VERSION "p4.1.0" +#define PTEX_VERSION "p4.1.1" diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog index 42bd7490c75..3079c110adb 100644 --- a/Build/source/texk/web2c/uptexdir/ChangeLog +++ b/Build/source/texk/web2c/uptexdir/ChangeLog @@ -1,4 +1,10 @@ -2022-09-16 TANAKA Takuji <ttk@t-lab.opal.ne.jp> +2023-09-17 Hironobu Yamashita <h.y.acetaminophen@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@t-lab.opal.ne.jp> * uptex-m.ch, upbibtex.ch, uptex_version.h: upTeX version u1.30. diff --git a/Build/source/texk/web2c/uptexdir/am/uptex.am b/Build/source/texk/web2c/uptexdir/am/uptex.am index c4226b35ffb..c0ba3f6b713 100644 --- a/Build/source/texk/web2c/uptexdir/am/uptex.am +++ b/Build/source/texk/web2c/uptexdir/am/uptex.am @@ -1,7 +1,7 @@ ## $Id$ ## texk/web2c/uptexdir/am/uptex.am: Makefile fragment for upTeX. ## -## Copyright 2016-2022 Karl Berry <tex-live@tug.org> +## Copyright 2016-2023 Karl Berry <tex-live@tug.org> ## Copyright 2011-2015 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. @@ -161,11 +161,14 @@ bin_links += uptftopl$(EXEEXT):ptftopl ## 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 @@ upweb_tests += \ # 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-openout-test.log uptexdir/upbibtex-longline-test.log \ 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 @@ DISTCLEANFILES += uptests/xuparse.* uptests/yuparse.* ## 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 diff --git a/Build/source/texk/web2c/uptexdir/gk256.test b/Build/source/texk/web2c/uptexdir/gk256.test new file mode 100755 index 00000000000..96fae296ca9 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/gk256.test @@ -0,0 +1,30 @@ +#! /bin/sh -vx +# $Id$ +# Copyright 2023 Karl Berry <tex-live@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 + diff --git a/Build/source/texk/web2c/uptexdir/tests/gk256.tex b/Build/source/texk/web2c/uptexdir/tests/gk256.tex new file mode 100644 index 00000000000..b8a8628f0b6 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/gk256.tex @@ -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 diff --git a/Build/source/texk/web2c/uptexdir/tests/gk256g.tfm b/Build/source/texk/web2c/uptexdir/tests/gk256g.tfm Binary files differnew file mode 100644 index 00000000000..fb1051b7a96 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/gk256g.tfm diff --git a/Build/source/texk/web2c/uptexdir/tests/gk256k.tfm b/Build/source/texk/web2c/uptexdir/tests/gk256k.tfm Binary files differnew file mode 100644 index 00000000000..9a40b0f66ef --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/gk256k.tfm diff --git a/Build/source/texk/web2c/uptexdir/uppltotf.ch b/Build/source/texk/web2c/uptexdir/uppltotf.ch index 06960c591f1..4c6b7fb9dfc 100644 --- a/Build/source/texk/web2c/uptexdir/uppltotf.ch +++ b/Build/source/texk/web2c/uptexdir/uppltotf.ch @@ -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' -@d banner=='This is upPLtoTF, Version 3.6-p221203' +@d banner=='This is upPLtoTF, Version 3.6-p230917' {printed when the program starts} @z @@ -113,12 +114,17 @@ dir_code: read_direction; @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 file_format=tfm_format then 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'); +@.GLUE character examined...@> end @z -@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'); -@y -@<Doublecheck...@>= -@z - @x [128] l.2207 - pTeX: Decide the |file_format|. @<Do the output@>= @y @@ -376,7 +371,7 @@ file_format:undefined..vfm_format; {the format of the input file} 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 @@ load11("E")("X")("T")("R")("A")("S")("H")("R")("I")("N")("K") 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,60 +438,68 @@ else begin case cur_code of 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. - -@<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?'); +@ 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. + +@<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'); +@.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') -@.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; 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 (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); diff --git a/Build/source/texk/web2c/uptexdir/uptftopl.ch b/Build/source/texk/web2c/uptexdir/uptftopl.ch index 5046263cc95..af21ffe429e 100644 --- a/Build/source/texk/web2c/uptexdir/uptftopl.ch +++ b/Build/source/texk/web2c/uptexdir/uptftopl.ch @@ -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' -@d banner=='This is upTFtoPL, Version 3.3-p221203' +@d banner=='This is upTFtoPL, Version 3.3-p230917' {printed when the program starts} @z @@ -258,6 +259,12 @@ if file_format<>tfm_format then out_ln;@/ @z +@x [68] l.1075 - pTeX: no need to check for loop + @<Check for ligature cycles@>; +@y + if file_format=tfm_format then begin @<Check for ligature cycles@>; end; +@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 @@ We need to include some routines for handling kanji character. @!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. |