texlive[63861] Build/source/texk/dvipdfm-x: dvipdfmx: Add option

commits+takuji at tug.org commits+takuji at tug.org
Sun Jul 10 13:41:59 CEST 2022


Revision: 63861
          http://tug.org/svn/texlive?view=revision&revision=63861
Author:   takuji
Date:     2022-07-10 13:41:59 +0200 (Sun, 10 Jul 2022)
Log Message:
-----------
dvipdfmx: Add option --pdfm-str-utf8 for upLaTeX & hyperref/pdfcomment

Modified Paths:
--------------
    trunk/Build/source/texk/dvipdfm-x/ChangeLog
    trunk/Build/source/texk/dvipdfm-x/configure
    trunk/Build/source/texk/dvipdfm-x/configure.ac
    trunk/Build/source/texk/dvipdfm-x/dpxconf.c
    trunk/Build/source/texk/dvipdfm-x/dpxconf.h
    trunk/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test
    trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c
    trunk/Build/source/texk/dvipdfm-x/man/dvipdfmx.1
    trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c
    trunk/Build/source/texk/dvipdfm-x/tests/Makefile_upjf
    trunk/Build/source/texk/dvipdfm-x/tests/upjf.dvi

Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog	2022-07-09 23:49:42 UTC (rev 63860)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog	2022-07-10 11:41:59 UTC (rev 63861)
@@ -1,3 +1,13 @@
+2022-07-10  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* {dvipdfmx,spc_pdfm}.c, dpxconf.{c,h}, man/dvipdfmx.1:
+	Add a new option --pdfm-str-utf8 to make pdfmark and/or bookmark
+	by upLaTeX + hyperref/pdfcomment package + dvipdfmx without CMap.
+	* dvipdfmx-upjf.test, tests/Makefile_upjf, tests/upjf.dvi:
+	Add tests for the option --pdfm-str-utf8.
+	https://github.com/texjporg/tex-jp-build/issues/143
+	* configure.ac: version 20220710.
+
 2022-06-15  Clerk Ma  <maqiyuan130324 at vip.qq.com>
 
 	* cidtype2.c, tt_cmap.c: Support some TrueType fonts in macOS

Modified: trunk/Build/source/texk/dvipdfm-x/configure
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/configure	2022-07-09 23:49:42 UTC (rev 63860)
+++ trunk/Build/source/texk/dvipdfm-x/configure	2022-07-10 11:41:59 UTC (rev 63861)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for dvipdfm-x (TeX Live) 20211117.
+# Generated by GNU Autoconf 2.71 for dvipdfm-x (TeX Live) 20220710.
 #
 # Report bugs to <dvipdfmx at tug.org>.
 #
@@ -629,8 +629,8 @@
 # Identity of this package.
 PACKAGE_NAME='dvipdfm-x (TeX Live)'
 PACKAGE_TARNAME='dvipdfm-x--tex-live-'
-PACKAGE_VERSION='20211117'
-PACKAGE_STRING='dvipdfm-x (TeX Live) 20211117'
+PACKAGE_VERSION='20220710'
+PACKAGE_STRING='dvipdfm-x (TeX Live) 20220710'
 PACKAGE_BUGREPORT='dvipdfmx at tug.org'
 PACKAGE_URL=''
 
@@ -1395,7 +1395,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 dvipdfm-x (TeX Live) 20211117 to adapt to many kinds of systems.
+\`configure' configures dvipdfm-x (TeX Live) 20220710 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1467,7 +1467,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20211117:";;
+     short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20220710:";;
    esac
   cat <<\_ACEOF
 
@@ -1597,7 +1597,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dvipdfm-x (TeX Live) configure 20211117
+dvipdfm-x (TeX Live) configure 20220710
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2353,7 +2353,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dvipdfm-x (TeX Live) $as_me 20211117, which was
+It was created by dvipdfm-x (TeX Live) $as_me 20220710, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -8675,7 +8675,7 @@
 
 # Define the identity of the package.
  PACKAGE='dvipdfm-x--tex-live-'
- VERSION='20211117'
+ VERSION='20220710'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -15480,7 +15480,7 @@
 Report bugs to <bug-libtool at gnu.org>."
 
 lt_cl_version="\
-dvipdfm-x (TeX Live) config.lt 20211117
+dvipdfm-x (TeX Live) config.lt 20220710
 configured by $0, generated by GNU Autoconf 2.71.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -17392,7 +17392,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dvipdfm-x (TeX Live) $as_me 20211117, which was
+This file was extended by dvipdfm-x (TeX Live) $as_me 20220710, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17464,7 +17464,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-dvipdfm-x (TeX Live) config.status 20211117
+dvipdfm-x (TeX Live) config.status 20220710
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/texk/dvipdfm-x/configure.ac
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/configure.ac	2022-07-09 23:49:42 UTC (rev 63860)
+++ trunk/Build/source/texk/dvipdfm-x/configure.ac	2022-07-10 11:41:59 UTC (rev 63861)
@@ -8,7 +8,7 @@
 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([dvipdfm-x (TeX Live)], [20211117], [dvipdfmx at tug.org])
+AC_INIT([dvipdfm-x (TeX Live)], [20220710], [dvipdfmx at tug.org])
 AC_PREREQ([2.65])
 AC_CONFIG_SRCDIR([agl.c])
 AC_CONFIG_AUX_DIR([../../build-aux])

Modified: trunk/Build/source/texk/dvipdfm-x/dpxconf.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dpxconf.c	2022-07-09 23:49:42 UTC (rev 63860)
+++ trunk/Build/source/texk/dvipdfm-x/dpxconf.c	2022-07-10 11:41:59 UTC (rev 63861)
@@ -30,7 +30,7 @@
 
 #include "dpxconf.h"
 
-struct _dpx_conf dpx_conf = {0, 0, dpx_mode_normal_mode, 0, {0}};
+struct _dpx_conf dpx_conf = {0, 0, dpx_mode_normal_mode, 0, 0, {0}};
 
 #ifndef  HAVE_LIBPAPER
 const struct paper paperspecs[] = {

Modified: trunk/Build/source/texk/dvipdfm-x/dpxconf.h
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dpxconf.h	2022-07-09 23:49:42 UTC (rev 63860)
+++ trunk/Build/source/texk/dvipdfm-x/dpxconf.h	2022-07-10 11:41:59 UTC (rev 63861)
@@ -35,6 +35,7 @@
   int            verbose_level;
   enum dpx_mode  compat_mode;
   int            ignore_font_license;
+  int            pdfm_str_utf8;
   struct {
     int keep_cache;
   } file;

Modified: trunk/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test	2022-07-09 23:49:42 UTC (rev 63860)
+++ trunk/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test	2022-07-10 11:41:59 UTC (rev 63861)
@@ -20,7 +20,7 @@
 echo "*** dvipdfmx: test for upjf_full.pdf" && echo \
 	&& cp $srcdir/tests/upjf_full.vf ./upjf.vf \
 	&& cp $srcdir/tests/upjv_full.vf ./upjv.vf \
-	&& ./xdvipdfmx --dvipdfmx -vv -f upjf.map -o upjf.pdf $srcdir/tests/upjf.dvi \
+	&& ./xdvipdfmx --dvipdfmx -vv --pdfm-str-utf8 -f upjf.map -o upjf.pdf $srcdir/tests/upjf.dvi \
 	&& mv ./upjf.pdf ./upjf_full.pdf \
 	&& echo && echo "dvipdfmx-upjf-vf_full tests OK" && echo \
 	|| failed="$failed dvipdfmx-upjf-vf_full"
@@ -30,7 +30,7 @@
 	&& cp $srcdir/tests/upjv_omit.vf ./upjv.vf \
 	&& cp $srcdir/tests/upjf-g00.ofm ./upjf-g.ofm \
 	&& cp $srcdir/tests/upjv-g00.ofm ./upjv-g.ofm \
-	&& ./xdvipdfmx --dvipdfmx -vv -f upjf.map -o upjf.pdf $srcdir/tests/upjf.dvi \
+	&& ./xdvipdfmx --dvipdfmx -vv --pdfm-str-utf8 -f upjf.map -o upjf.pdf $srcdir/tests/upjf.dvi \
 	&& mv ./upjf.pdf ./upjf_omit.pdf \
 	&& echo && echo "dvipdfmx-upjf-vf_omit tests OK" && echo \
 	|| failed="$failed dvipdfmx-upjf-vf_omit"

Modified: trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c	2022-07-09 23:49:42 UTC (rev 63860)
+++ trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c	2022-07-10 11:41:59 UTC (rev 63861)
@@ -199,11 +199,13 @@
   printf ("  -g dimension\tAnnotation \"grow\" amount [0.0in]\n");
   printf ("  -h | --help \tShow this help message and exit\n");
   printf ("  -i cfgfile\tRead additional configuration file\t\n");
+  printf ("  --kpathsea-debug number\tSet kpathsea debugging flags [0]\n");
   printf ("  -l \t\tLandscape mode\n");
   printf ("  -m number\tSet additional magnification [1.0]\n");
   printf ("  --mvorigin\tTranslate the origin for MP inclusion\n");
   printf ("  -o filename\tSet output file name, \"-\" for stdout [DVIFILE.pdf]\n");
   printf ("  -p papersize\tSet papersize [a4]\n");
+  printf ("  --pdfm-str-utf8\tAssume PDFMark strings are encoded in UTF-8\n");
   printf ("  -q \t\tBe quiet\n");
   printf ("  -r resolution\tSet resolution (in DPI) for raster fonts [600]\n");
   printf ("  -s pages\tSelect page ranges [all pages]\n");
@@ -212,7 +214,6 @@
   printf ("  --version\tOutput version information and exit\n");
   printf ("  -v \t\tBe verbose\n");
   printf ("  -vv\t\tBe more verbose\n");
-  printf ("  --kpathsea-debug number\tSet kpathsea debugging flags [0]\n");
   printf ("  -x dimension\tSet horizontal offset [1.0in]\n");
   printf ("  -y dimension\tSet vertical offset [1.0in]\n");
   printf ("  -z number  \tSet zlib compression level (0-9) [9]\n");
@@ -424,6 +425,7 @@
   {"dvipdfm", 0, 0, 132},
   {"mvorigin", 0, 0, 1000},
   {"kpathsea-debug", 1, 0, 133},
+  {"pdfm-str-utf8", 0, 0, 134},
   {0, 0, 0, 0}
 };
 
@@ -458,6 +460,10 @@
       kpathsea_debug = atoi(optarg);
       break;
 
+    case 134: /* --pdfm-str-utf8 */
+      dpx_conf.pdfm_str_utf8 = 1;
+      break;
+
     case 1000: /* --mvorigin */
       translate_origin = 1;
       break;
@@ -523,7 +529,7 @@
   optind = 1;
   while ((c = getopt_long(argc, argv, optstrig, long_options, NULL)) != -1) {
     switch(c) {
-    case 'h': case 130: case 131: case 132: case 133: case 1000: case 'q': case 'v': case 'M': /* already done */
+    case 'h': case 130: case 131: case 132: case 133: case 134: case 1000: case 'q': case 'v': case 'M': /* already done */
       break;
 
     /* 'm' option handled in first_pass */

Modified: trunk/Build/source/texk/dvipdfm-x/man/dvipdfmx.1
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/man/dvipdfmx.1	2022-07-09 23:49:42 UTC (rev 63860)
+++ trunk/Build/source/texk/dvipdfm-x/man/dvipdfmx.1	2022-07-10 11:41:59 UTC (rev 63861)
@@ -139,6 +139,9 @@
 as another include file, after reading the default
 .IR dvipdfmx.cfg .
 .TP 5
+.B \-\-\^kpathsea-debug number
+Have Kpathsea output debugging information; `-1' for everything (voluminous).
+.TP 5
 .B \-\^l
 Select landscape mode.  In other words, exchange the 
 .I x
@@ -161,6 +164,11 @@
 .BR letter ", " legal ", " ledger ", " tabloid ", " a3 ", " a4 ", or " a5
 )
 .TP 5
+.B \-\-\^pdfm-str-utf8
+Assume PDFMark strings in
+.B \especial
+commands are encoded in UTF-8.
+.TP 5
 .B \-\^q
 Quiet mode.
 .TP 5
@@ -234,9 +242,6 @@
 .B \-\^vv
 increases the verbosity by two increments).  Maximum verbosity is four.
 .TP 5
-.B \-\-\^kpathsea-debug number
-Have Kpathsea output debugging information; `-1' for everything (voluminous).
-.TP 5
 .B \-\^x x_offset
 Set the left margin to 
 .IR x_offset .

Modified: trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c	2022-07-09 23:49:42 UTC (rev 63860)
+++ trunk/Build/source/texk/dvipdfm-x/spc_pdfm.c	2022-07-10 11:41:59 UTC (rev 63861)
@@ -631,7 +631,8 @@
       CMap *cmap = CMap_cache_get(cd->cmap_id);
       if (need_reencode(kp, vp, cd))
         r = reencode_string(cmap, vp);
-    } else if ((dpx_conf.compat_mode == dpx_mode_xdv_mode) && cd && cd->taintkeys) {
+    } else if ((dpx_conf.compat_mode == dpx_mode_xdv_mode || dpx_conf.pdfm_str_utf8) &&
+               cd && cd->taintkeys) {
       if (need_reencode(kp, vp, cd))
         r = reencode_string_from_utf8_to_utf16be(vp);
     }
@@ -668,8 +669,8 @@
   pdf_obj  *dict;
 
   /* disable this test for XDV files, as we do UTF8 reencoding with no cmap */
-  if ((dpx_conf.compat_mode != dpx_mode_xdv_mode) && cd->cmap_id < 0) {
-    dict = parse_pdf_object_extended(pp, endptr, NULL, parse_pdf_reference, NULL); 
+  if ((dpx_conf.compat_mode != dpx_mode_xdv_mode && !dpx_conf.pdfm_str_utf8) && cd->cmap_id < 0) {
+    dict = parse_pdf_object_extended(pp, endptr, NULL, parse_pdf_reference, NULL);
     if (dict && !PDF_OBJ_DICTTYPE(dict)) {
       WARN("Dictionary type object expected but non-dictionary type found.");
       pdf_release_obj(dict);

Modified: trunk/Build/source/texk/dvipdfm-x/tests/Makefile_upjf
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/tests/Makefile_upjf	2022-07-09 23:49:42 UTC (rev 63860)
+++ trunk/Build/source/texk/dvipdfm-x/tests/Makefile_upjf	2022-07-10 11:41:59 UTC (rev 63861)
@@ -36,6 +36,7 @@
 	uplatex upjf.tex
 	dvispc -a upjf.dvi upjf.dvitxt
 	sed -i '/xxx/d' upjf.dvitxt
+	sed -i -e "4i xxx1 176 'pdf:docinfo<</Title(upTeXを試す)/Subject(시험)/Creator(LaTeX with hyperref)/Author(☃ ☀)/Producer(dvipdfm)/Keywords(超鏈接; ハイパーリンク; 하이퍼링크)>>'" upjf.dvitxt
 	dvispc -x upjf.dvitxt upjf.dvi
 	rm upjf.dvitxt
 

Modified: trunk/Build/source/texk/dvipdfm-x/tests/upjf.dvi
===================================================================
(Binary files differ)



More information about the tex-live-commits mailing list.