summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-02-24 22:07:11 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-02-24 22:07:11 +0000
commit08be43272a00facdb4dbaa840bfd7de25f1f2270 (patch)
treee3e074f7a09f83ed64d8a18ac34aafc3a3d1a7d3 /Build
parent6b45805ff1f19c8000f44773cd13122bc4e905fb (diff)
Allow PS glyph names in v 2.0 post table more than 32767. (S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@50114 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog7
-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/tt_post.c56
4 files changed, 54 insertions, 33 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index 86ab8a01e50..2c27ca96c7e 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,10 @@
+2019-02-25 Shunsaku Hirata <shunsaku.hirata74@gmail.com>
+
+ * tt_post.c: Since OpenType ver. 1.7, PostScript glyph names
+ more than 32767 are allowed for version 2.0 post table. Some
+ minore fixes in chek of valid index range.
+ * configure.ac: Version 20190225.
+
2019-02-23 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
* tt_post.c (tt_lookup_post_table): Fix a bug that the loop
diff --git a/Build/source/texk/dvipdfm-x/configure b/Build/source/texk/dvipdfm-x/configure
index bec095d52ab..5a79d45785b 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.69 for dvipdfm-x (TeX Live) 20190127.
+# Generated by GNU Autoconf 2.69 for dvipdfm-x (TeX Live) 20190225.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dvipdfm-x (TeX Live)'
PACKAGE_TARNAME='dvipdfm-x--tex-live-'
-PACKAGE_VERSION='20190127'
-PACKAGE_STRING='dvipdfm-x (TeX Live) 20190127'
+PACKAGE_VERSION='20190225'
+PACKAGE_STRING='dvipdfm-x (TeX Live) 20190225'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1350,7 +1350,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) 20190127 to adapt to many kinds of systems.
+\`configure' configures dvipdfm-x (TeX Live) 20190225 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1421,7 +1421,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20190127:";;
+ short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20190225:";;
esac
cat <<\_ACEOF
@@ -1551,7 +1551,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dvipdfm-x (TeX Live) configure 20190127
+dvipdfm-x (TeX Live) configure 20190225
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2390,7 +2390,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 20190127, which was
+It was created by dvipdfm-x (TeX Live) $as_me 20190225, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -8077,7 +8077,7 @@ fi
# Define the identity of the package.
PACKAGE='dvipdfm-x--tex-live-'
- VERSION='20190127'
+ VERSION='20190225'
cat >>confdefs.h <<_ACEOF
@@ -14746,7 +14746,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-dvipdfm-x (TeX Live) config.lt 20190127
+dvipdfm-x (TeX Live) config.lt 20190225
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -16636,7 +16636,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 20190127, which was
+This file was extended by dvipdfm-x (TeX Live) $as_me 20190225, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16706,7 +16706,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-dvipdfm-x (TeX Live) config.status 20190127
+dvipdfm-x (TeX Live) config.status 20190225
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/dvipdfm-x/configure.ac b/Build/source/texk/dvipdfm-x/configure.ac
index 87ecf506cc8..c802fa08a6e 100644
--- a/Build/source/texk/dvipdfm-x/configure.ac
+++ b/Build/source/texk/dvipdfm-x/configure.ac
@@ -7,7 +7,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)], [20190127], [tex-k@tug.org])
+AC_INIT([dvipdfm-x (TeX Live)], [20190225], [tex-k@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/tt_post.c b/Build/source/texk/dvipdfm-x/tt_post.c
index 2a1cd8e1970..05d0edecd73 100644
--- a/Build/source/texk/dvipdfm-x/tt_post.c
+++ b/Build/source/texk/dvipdfm-x/tt_post.c
@@ -47,28 +47,42 @@ read_v2_post_names (struct tt_post_table *post, sfnt *sfont)
indices = NEW(post->numberOfGlyphs, USHORT);
maxidx = 257;
- for (i = 0;
- i < post->numberOfGlyphs; i++) {
+ for (i = 0; i < post->numberOfGlyphs; i++) {
idx = sfnt_get_ushort(sfont);
if (idx >= 258) {
if (idx > maxidx)
maxidx = idx;
+#if 0
+ /*
+ * Apple's TrueType spec. describes as,
+ *
+ * Index numbers 32768 through 65535 are reserved for future use.
+ * If you do not want to associate a PostScript name with a particular
+ * glyph, use index number 0 which points to the name .notdef.
+ *
+ * -- https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6post.html
+ *
+ * But there are no restriction in Microsoft's OpenType spec.
+
if (idx > 32767) {
- /* Although this is strictly speaking out of spec, it seems to work
- and there are real-life fonts that use it.
- We show a warning only once, instead of thousands of times */
- static char warning_issued = 0;
- if (!warning_issued) {
- WARN("TrueType post table name index %u > 32767", idx);
- warning_issued = 1;
- }
+ /* Although this is strictly speaking out of spec, it seems to work
+ * and there are real-life fonts that use it.
+ * We show a warning only once, instead of thousands of times
+ */
+ static char warning_issued = 0;
+ if (!warning_issued) {
+ WARN("TrueType post table name index %u > 32767", idx);
+ warning_issued = 1;
+ }
/* In a real-life large font, (x)dvipdfmx crashes if we use
- nonvanishing idx in the case of idx > 32767.
- If we set idx = 0, (x)dvipdfmx works fine for the font and
- created pdf seems fine. The post table may not be important
- in such a case */
+ * nonvanishing idx in the case of idx > 32767.
+ * If we set idx = 0, (x)dvipdfmx works fine for the font and
+ * created pdf seems fine. The post table may not be important
+ * in such a case
+ */
idx = 0;
}
+#endif
}
indices[i] = idx;
}
@@ -81,11 +95,11 @@ read_v2_post_names (struct tt_post_table *post, sfnt *sfont)
for (i = 0; i < post->count; i++) { /* read Pascal strings */
len = sfnt_get_byte(sfont);
if (len > 0) {
- post->names[i] = NEW(len + 1, char);
- sfnt_read(post->names[i], len, sfont);
- post->names[i][len] = 0;
+ post->names[i] = NEW(len + 1, char);
+ sfnt_read(post->names[i], len, sfont);
+ post->names[i][len] = 0;
} else {
- post->names[i] = NULL;
+ post->names[i] = NULL;
}
}
}
@@ -163,7 +177,7 @@ tt_lookup_post_table (struct tt_post_table *post, const char *glyphname)
for (gid = 0; gid < post->numberOfGlyphs; gid++) {
if (post->glyphNamePtr[gid] &&
- !strcmp(glyphname, post->glyphNamePtr[gid])) {
+ !strcmp(glyphname, post->glyphNamePtr[gid])) {
return gid;
}
}
@@ -174,7 +188,7 @@ tt_lookup_post_table (struct tt_post_table *post, const char *glyphname)
char*
tt_get_glyphname (struct tt_post_table *post, USHORT gid)
{
- if (gid < post->count && post->glyphNamePtr[gid])
+ if (gid < post->numberOfGlyphs && post->glyphNamePtr[gid])
return xstrdup(post->glyphNamePtr[gid]);
return NULL;
}
@@ -191,7 +205,7 @@ tt_release_post_table (struct tt_post_table *post)
if (post->names) {
for (i = 0; i < post->count; i++) {
if (post->names[i])
- RELEASE(post->names[i]);
+ RELEASE(post->names[i]);
}
RELEASE(post->names);
}