texlive[56780] Build/source/texk/dvipdfm-x: Fix inverted conditional

commits+kakuto at tug.org commits+kakuto at tug.org
Tue Oct 27 21:36:12 CET 2020


Revision: 56780
          http://tug.org/svn/texlive?view=revision&revision=56780
Author:   kakuto
Date:     2020-10-27 21:36:12 +0100 (Tue, 27 Oct 2020)
Log Message:
-----------
Fix inverted conditional for writing CIDSet. (S. Hirata)

Modified Paths:
--------------
    trunk/Build/source/texk/dvipdfm-x/ChangeLog
    trunk/Build/source/texk/dvipdfm-x/cidtype0.c
    trunk/Build/source/texk/dvipdfm-x/cidtype2.c
    trunk/Build/source/texk/dvipdfm-x/configure
    trunk/Build/source/texk/dvipdfm-x/configure.ac
    trunk/Build/source/texk/dvipdfm-x/type1.c
    trunk/Build/source/texk/dvipdfm-x/type1c.c

Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog	2020-10-27 17:42:36 UTC (rev 56779)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog	2020-10-27 20:36:12 UTC (rev 56780)
@@ -1,3 +1,12 @@
+2020-10-28  Shunsaku Hirata  <shunsaku.hirata74 at gmail.com>
+
+	* cidtype0.c: Fix a bug that the conditional for deciding if
+	CIDSet should be written is inverted. CIDSet is deprecated in
+	PDF version 2.0.
+	* cidtype2.c, type1.c, type1c.c: Do not write CIDSet and
+	CharSet when the output PDF version is set to 2.0 or higher.
+	* configure.ac: Version 20201028.
+
 2020-10-19  Shunsaku Hirata  <shunsaku.hirata74 at gmail.com>
 
 	* cidtype0.c, cidtype2.c, type0.c: User defined CID-to-GID

Modified: trunk/Build/source/texk/dvipdfm-x/cidtype0.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/cidtype0.c	2020-10-27 17:42:36 UTC (rev 56779)
+++ trunk/Build/source/texk/dvipdfm-x/cidtype0.c	2020-10-27 20:36:12 UTC (rev 56780)
@@ -754,7 +754,7 @@
   if (dpx_conf.verbose_level > 1)
     MESG("[%u/%u glyphs][%ld bytes]", num_glyphs, cs_count, destlen);
 
-  if (pdf_check_version(2, 0) >= 0) {
+  if (pdf_check_version(2, 0) < 0) {
     CIDFont_type0_add_CIDSet(font, used_chars, last_cid);
   }
 
@@ -1441,7 +1441,7 @@
   if (dpx_conf.verbose_level > 1)
     MESG("[%u glyphs][%ld bytes]", num_glyphs, destlen);
 
-  if (pdf_check_version(2, 0) >= 0) {
+  if (pdf_check_version(2, 0) < 0) {
     CIDFont_type0_add_CIDSet(font, used_chars, last_cid);
   }
 
@@ -2110,7 +2110,7 @@
 
   cff_close(cffont);
 
-  if (pdf_check_version(2, 0) >= 0) {
+  if (pdf_check_version(2, 0) < 0) {
     CIDFont_type0_add_CIDSet(font, used_chars, last_cid);
   }
 

Modified: trunk/Build/source/texk/dvipdfm-x/cidtype2.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/cidtype2.c	2020-10-27 17:42:36 UTC (rev 56779)
+++ trunk/Build/source/texk/dvipdfm-x/cidtype2.c	2020-10-27 20:36:12 UTC (rev 56780)
@@ -940,7 +940,7 @@
    * NOTE: All glyphs including component glyph and dummy glyph must be
    * listed in CIDSet. However, .notdef glyph should be ommitted.
    */
-  {
+  if (pdf_check_version(2, 0) < 0) {
     pdf_obj *cidset;
     char    *cidset_data;
 

Modified: trunk/Build/source/texk/dvipdfm-x/configure
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/configure	2020-10-27 17:42:36 UTC (rev 56779)
+++ trunk/Build/source/texk/dvipdfm-x/configure	2020-10-27 20:36:12 UTC (rev 56780)
@@ -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) 20201019.
+# Generated by GNU Autoconf 2.69 for dvipdfm-x (TeX Live) 20201028.
 #
 # Report bugs to <dvipdfmx at tug.org>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='dvipdfm-x (TeX Live)'
 PACKAGE_TARNAME='dvipdfm-x--tex-live-'
-PACKAGE_VERSION='20201019'
-PACKAGE_STRING='dvipdfm-x (TeX Live) 20201019'
+PACKAGE_VERSION='20201028'
+PACKAGE_STRING='dvipdfm-x (TeX Live) 20201028'
 PACKAGE_BUGREPORT='dvipdfmx at tug.org'
 PACKAGE_URL=''
 
@@ -1350,7 +1350,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) 20201019 to adapt to many kinds of systems.
+\`configure' configures dvipdfm-x (TeX Live) 20201028 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1421,7 +1421,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20201019:";;
+     short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20201028:";;
    esac
   cat <<\_ACEOF
 
@@ -1551,7 +1551,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dvipdfm-x (TeX Live) configure 20201019
+dvipdfm-x (TeX Live) configure 20201028
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2390,7 +2390,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 20201019, which was
+It was created by dvipdfm-x (TeX Live) $as_me 20201028, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -8077,7 +8077,7 @@
 
 # Define the identity of the package.
  PACKAGE='dvipdfm-x--tex-live-'
- VERSION='20201019'
+ VERSION='20201028'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14746,7 +14746,7 @@
 Report bugs to <bug-libtool at gnu.org>."
 
 lt_cl_version="\
-dvipdfm-x (TeX Live) config.lt 20201019
+dvipdfm-x (TeX Live) config.lt 20201028
 configured by $0, generated by GNU Autoconf 2.69.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -16636,7 +16636,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 20201019, which was
+This file was extended by dvipdfm-x (TeX Live) $as_me 20201028, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16706,7 +16706,7 @@
 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 20201019
+dvipdfm-x (TeX Live) config.status 20201028
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/texk/dvipdfm-x/configure.ac
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/configure.ac	2020-10-27 17:42:36 UTC (rev 56779)
+++ trunk/Build/source/texk/dvipdfm-x/configure.ac	2020-10-27 20:36:12 UTC (rev 56780)
@@ -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)], [20201019], [dvipdfmx at tug.org])
+AC_INIT([dvipdfm-x (TeX Live)], [20201028], [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/type1.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/type1.c	2020-10-27 17:42:36 UTC (rev 56779)
+++ trunk/Build/source/texk/dvipdfm-x/type1.c	2020-10-27 20:36:12 UTC (rev 56780)
@@ -475,10 +475,12 @@
   pdf_add_stream (fontfile, (void *) stream_data_ptr,  offset);
   pdf_release_obj(fontfile);
 #if !defined(LIBDPX)
-  pdf_add_dict(descriptor,
-               pdf_new_name("CharSet"),
-               pdf_new_string(pdf_stream_dataptr(pdfcharset),
-                              pdf_stream_length(pdfcharset)));
+  if (pdf_check_version(2, 0) < 0) {
+    pdf_add_dict(descriptor,
+                pdf_new_name("CharSet"),
+                pdf_new_string(pdf_stream_dataptr(pdfcharset),
+                               pdf_stream_length(pdfcharset)));
+  }
 #endif /* !LIBDPX */
   RELEASE(stream_data_ptr);
 

Modified: trunk/Build/source/texk/dvipdfm-x/type1c.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/type1c.c	2020-10-27 17:42:36 UTC (rev 56779)
+++ trunk/Build/source/texk/dvipdfm-x/type1c.c	2020-10-27 20:36:12 UTC (rev 56780)
@@ -463,7 +463,7 @@
     widths[code] = notdef_width;
 
     if (!usedchars[code] || !enc_vec[code] ||
-	!strcmp(enc_vec[code], ".notdef"))
+        !strcmp(enc_vec[code], ".notdef"))
       continue;
 
     /*
@@ -485,12 +485,12 @@
      */
     for (j = 0; j < charset->num_entries; j++) {
       if (sid == charset->data.glyphs[j]) {
-	/* Already have this glyph. */
-	encoding->supp[encoding->num_supps].code  = code;
-	encoding->supp[encoding->num_supps].glyph = sid;
-	usedchars[code] = 0; /* Used but multiply-encoded. */
-	encoding->num_supps += 1;
-	break;
+        /* Already have this glyph. */
+        encoding->supp[encoding->num_supps].code  = code;
+        encoding->supp[encoding->num_supps].glyph = sid;
+        usedchars[code] = 0; /* Used but multiply-encoded. */
+        encoding->num_supps += 1;
+        break;
       }
     }
     if (j < charset->num_entries) {
@@ -729,10 +729,12 @@
   /*
    * CharSet
    */
-  pdf_add_dict(descriptor,
-               pdf_new_name("CharSet"),
-               pdf_new_string(pdf_stream_dataptr(pdfcharset),
-                              pdf_stream_length(pdfcharset)));
+  if (pdf_check_version(2, 0) < 0) {
+    pdf_add_dict(descriptor,
+                 pdf_new_name("CharSet"),
+                 pdf_new_string(pdf_stream_dataptr(pdfcharset),
+                                pdf_stream_length(pdfcharset)));
+  }
   pdf_release_obj(pdfcharset);
   /*
    * Write PDF FontFile data.



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