summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2022-07-10 11:41:59 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2022-07-10 11:41:59 +0000
commitfc64571d9d6e785483b33ec6b969ee88a6d5549e (patch)
tree35b60d1041f80a7966160995d4f93c72590e953c /Build/source/texk
parent04223d9c2e304489e9130ce8224a0bfa8f41ea4c (diff)
dvipdfmx: Add option --pdfm-str-utf8 for upLaTeX & hyperref/pdfcomment
git-svn-id: svn://tug.org/texlive/trunk@63861 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog10
-rwxr-xr-xBuild/source/texk/dvipdfm-x/configure22
-rw-r--r--Build/source/texk/dvipdfm-x/configure.ac2
-rw-r--r--Build/source/texk/dvipdfm-x/dpxconf.c2
-rw-r--r--Build/source/texk/dvipdfm-x/dpxconf.h1
-rwxr-xr-xBuild/source/texk/dvipdfm-x/dvipdfmx-upjf.test4
-rw-r--r--Build/source/texk/dvipdfm-x/dvipdfmx.c10
-rw-r--r--Build/source/texk/dvipdfm-x/man/dvipdfmx.111
-rw-r--r--Build/source/texk/dvipdfm-x/spc_pdfm.c7
-rw-r--r--Build/source/texk/dvipdfm-x/tests/Makefile_upjf1
-rw-r--r--Build/source/texk/dvipdfm-x/tests/upjf.dvibin588 -> 764 bytes
11 files changed, 47 insertions, 23 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index c5b38644bce..76720ecc08a 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,13 @@
+2022-07-10 TANAKA Takuji <ttk@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@vip.qq.com>
* cidtype2.c, tt_cmap.c: Support some TrueType fonts in macOS
diff --git a/Build/source/texk/dvipdfm-x/configure b/Build/source/texk/dvipdfm-x/configure
index 1a91b4f0b24..809b14224db 100755
--- a/Build/source/texk/dvipdfm-x/configure
+++ b/Build/source/texk/dvipdfm-x/configure
@@ -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@tug.org>.
#
@@ -629,8 +629,8 @@ MAKEFLAGS=
# 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@tug.org'
PACKAGE_URL=''
@@ -1395,7 +1395,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 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 @@ fi
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 @@ fi
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 @@ 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 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 @@ fi
# 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 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@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 @@ 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 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 @@ 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="\\
-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\\"
diff --git a/Build/source/texk/dvipdfm-x/configure.ac b/Build/source/texk/dvipdfm-x/configure.ac
index 8704cc45c52..b12cf018d7a 100644
--- a/Build/source/texk/dvipdfm-x/configure.ac
+++ b/Build/source/texk/dvipdfm-x/configure.ac
@@ -8,7 +8,7 @@ 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([dvipdfm-x (TeX Live)], [20211117], [dvipdfmx@tug.org])
+AC_INIT([dvipdfm-x (TeX Live)], [20220710], [dvipdfmx@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([agl.c])
AC_CONFIG_AUX_DIR([../../build-aux])
diff --git a/Build/source/texk/dvipdfm-x/dpxconf.c b/Build/source/texk/dvipdfm-x/dpxconf.c
index ab7f6693ac8..c82f84edc72 100644
--- a/Build/source/texk/dvipdfm-x/dpxconf.c
+++ b/Build/source/texk/dvipdfm-x/dpxconf.c
@@ -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[] = {
diff --git a/Build/source/texk/dvipdfm-x/dpxconf.h b/Build/source/texk/dvipdfm-x/dpxconf.h
index e0785a1e42d..d27f46f312f 100644
--- a/Build/source/texk/dvipdfm-x/dpxconf.h
+++ b/Build/source/texk/dvipdfm-x/dpxconf.h
@@ -35,6 +35,7 @@ extern struct _dpx_conf {
int verbose_level;
enum dpx_mode compat_mode;
int ignore_font_license;
+ int pdfm_str_utf8;
struct {
int keep_cache;
} file;
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test b/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test
index e11887fbb70..5e2c5c32c52 100755
--- a/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test
+++ b/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test
@@ -20,7 +20,7 @@ rm -f upjf.vf upjv.vf upjf-g.ofm upjv-g.ofm
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 @@ echo "*** dvipdfmx: test for upjf_omit.pdf" && echo \
&& 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"
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c
index 33c39365c22..3b066a3f1d6 100644
--- a/Build/source/texk/dvipdfm-x/dvipdfmx.c
+++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c
@@ -199,11 +199,13 @@ show_usage (void)
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 @@ show_usage (void)
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 @@ static struct option long_options[] = {
{"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 @@ do_args_first_pass (int argc, char *argv[], const char *source, int unsafe)
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 @@ do_args_second_pass (int argc, char *argv[], const char *source, int unsafe)
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 */
diff --git a/Build/source/texk/dvipdfm-x/man/dvipdfmx.1 b/Build/source/texk/dvipdfm-x/man/dvipdfmx.1
index dc3df56362a..d928d1c5c56 100644
--- a/Build/source/texk/dvipdfm-x/man/dvipdfmx.1
+++ b/Build/source/texk/dvipdfm-x/man/dvipdfmx.1
@@ -139,6 +139,9 @@ Read
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 @@ Select the papersize by name (e.g.,
.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 @@ option are cumulative (e.g.,
.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 .
diff --git a/Build/source/texk/dvipdfm-x/spc_pdfm.c b/Build/source/texk/dvipdfm-x/spc_pdfm.c
index d45e09330f2..f6375cdcec5 100644
--- a/Build/source/texk/dvipdfm-x/spc_pdfm.c
+++ b/Build/source/texk/dvipdfm-x/spc_pdfm.c
@@ -631,7 +631,8 @@ modify_strings (pdf_obj *kp, pdf_obj *vp, void *dp)
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 @@ parse_pdf_dict_with_tounicode (const char **pp, const char *endptr, struct touni
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);
diff --git a/Build/source/texk/dvipdfm-x/tests/Makefile_upjf b/Build/source/texk/dvipdfm-x/tests/Makefile_upjf
index bfea81918d9..99987fb6181 100644
--- a/Build/source/texk/dvipdfm-x/tests/Makefile_upjf
+++ b/Build/source/texk/dvipdfm-x/tests/Makefile_upjf
@@ -36,6 +36,7 @@ upjf.dvi: upjf.tex
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
diff --git a/Build/source/texk/dvipdfm-x/tests/upjf.dvi b/Build/source/texk/dvipdfm-x/tests/upjf.dvi
index e75a6ef20d4..4f74890b273 100644
--- a/Build/source/texk/dvipdfm-x/tests/upjf.dvi
+++ b/Build/source/texk/dvipdfm-x/tests/upjf.dvi
Binary files differ