[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[texlive-bin] 01/04: add several dvipdfm-x and type1 related fixes



This is an automated email from the git hooks/post-receive script.

preining pushed a commit to branch master
in repository texlive-bin.

commit 86f645969a037c055d99a3ebca98254970eb5cc5
Author: Norbert Preining <preining@debian.org>
Date:   Sun Aug 23 12:40:05 2015 +0900

    add several dvipdfm-x and type1 related fixes
---
 debian/patches/series                          |  6 +++
 debian/patches/upstream-svn37801-xobjcect-typo | 24 ++++++++++++
 debian/patches/upstream-svn38047-dvipdfmx-fix  | 51 ++++++++++++++++++++++++++
 debian/patches/upstream-svn38053-dvipdfmx-fix  | 36 ++++++++++++++++++
 debian/patches/upstream-svn38059-dvipdfmx-fix  | 30 +++++++++++++++
 debian/patches/upstream-svn38068-dvipdfmx-fix  | 16 ++++++++
 6 files changed, 163 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index a4ba463..1d1d6b4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,4 +10,10 @@ libpng-arm64-neon-fix
 mktexlsr-use-mktemp
 dvihp-use-mktemp
 remove-libdir-from-kpathsea-pkgconfig
+# from here on upstream patches
+upstream-svn37801-xobjcect-typo
+upstream-svn38047-dvipdfmx-fix
+upstream-svn38053-dvipdfmx-fix
+upstream-svn38059-dvipdfmx-fix
+upstream-svn38068-dvipdfmx-fix
 upstream-svn38091-fix-pltotf-output
diff --git a/debian/patches/upstream-svn37801-xobjcect-typo b/debian/patches/upstream-svn37801-xobjcect-typo
new file mode 100644
index 0000000..7b61705
--- /dev/null
+++ b/debian/patches/upstream-svn37801-xobjcect-typo
@@ -0,0 +1,24 @@
+---
+ texk/dvipdfm-x/pngimage.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- texlive-bin.orig/texk/dvipdfm-x/pngimage.c
++++ texlive-bin/texk/dvipdfm-x/pngimage.c
+@@ -972,7 +972,7 @@
+   smask = pdf_new_stream(STREAM_COMPRESS);
+   dict  = pdf_stream_dict(smask);
+   smask_data_ptr = (png_bytep) NEW(width*height, png_byte);
+-  pdf_add_dict(dict, pdf_new_name("Type"),    pdf_new_name("XObjcect"));
++  pdf_add_dict(dict, pdf_new_name("Type"),    pdf_new_name("XObject"));
+   pdf_add_dict(dict, pdf_new_name("Subtype"), pdf_new_name("Image"));
+   pdf_add_dict(dict, pdf_new_name("Width"),      pdf_new_number(width));
+   pdf_add_dict(dict, pdf_new_name("Height"),     pdf_new_number(height));
+@@ -1016,7 +1016,7 @@
+ 
+   smask = pdf_new_stream(STREAM_COMPRESS);
+   dict  = pdf_stream_dict(smask);
+-  pdf_add_dict(dict, pdf_new_name("Type"),    pdf_new_name("XObjcect"));
++  pdf_add_dict(dict, pdf_new_name("Type"),    pdf_new_name("XObject"));
+   pdf_add_dict(dict, pdf_new_name("Subtype"), pdf_new_name("Image"));
+   pdf_add_dict(dict, pdf_new_name("Width"),      pdf_new_number(width));
+   pdf_add_dict(dict, pdf_new_name("Height"),     pdf_new_number(height));
diff --git a/debian/patches/upstream-svn38047-dvipdfmx-fix b/debian/patches/upstream-svn38047-dvipdfmx-fix
new file mode 100644
index 0000000..9572ea8
--- /dev/null
+++ b/debian/patches/upstream-svn38047-dvipdfmx-fix
@@ -0,0 +1,51 @@
+---
+ texk/dvipdfm-x/dvi.c |   31 +++++++++++++++++++++++++++++++
+ 1 file changed, 31 insertions(+)
+
+--- texlive-bin.orig/texk/dvipdfm-x/dvi.c
++++ texlive-bin/texk/dvipdfm-x/dvi.c
+@@ -921,6 +921,34 @@
+ 
+ #ifdef XETEX
+ static int
++is_notdef_notzero (char *path)
++{
++  FILE *f;
++  char buf[2014];
++  char cmd[512];
++  char *p;
++  int  ret = 0;
++
++  strcpy (cmd, "t1disasm ");
++  strcat (cmd, path);
++  f = popen (cmd, "r");
++  if (f) {
++    while ((fgets (buf, 2000, f))) {
++      p = strstr (buf, "CharStrings");
++      if (p) {
++        fgets (buf, 2000, f);
++        if (strncmp (buf, "/.notdef", 8) != 0)
++          ret = 1;
++        break;
++      }
++    }
++    fclose(f);
++  }
++
++  return ret;
++}
++
++static int
+ dvi_locate_native_font (const char *filename, uint32_t index,
+                         spt_t ptsize, int layout_dir, int extend, int slant, int embolden)
+ {
+@@ -1001,6 +1029,9 @@
+     loaded_fonts[cur_id].numGlyphs = cffont->num_glyphs;
+ 
+     DPXFCLOSE(fp);
++    if (loaded_fonts[cur_id].cff_is_standard_encoding) {
++      loaded_fonts[cur_id].cff_is_standard_encoding = is_notdef_notzero (path);
++    }
+   } else {
+     if (is_dfont)
+       sfont = dfont_open(fp, index);
diff --git a/debian/patches/upstream-svn38053-dvipdfmx-fix b/debian/patches/upstream-svn38053-dvipdfmx-fix
new file mode 100644
index 0000000..cba500a
--- /dev/null
+++ b/debian/patches/upstream-svn38053-dvipdfmx-fix
@@ -0,0 +1,36 @@
+---
+ texk/dvipdfm-x/dvi.c |   16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+--- texlive-bin.orig/texk/dvipdfm-x/dvi.c
++++ texlive-bin/texk/dvipdfm-x/dvi.c
+@@ -924,19 +924,23 @@
+ is_notdef_notzero (char *path)
+ {
+   FILE *f;
+-  char buf[2014];
+-  char cmd[512];
++  char buf[2048];
++  char *cmd;
+   char *p;
+   int  ret = 0;
+ 
+-  strcpy (cmd, "t1disasm ");
+-  strcat (cmd, path);
++  p = kpse_var_value("SELFAUTOLOC");
++  if (p == NULL)
++    return ret;
++  cmd = concat3 (p, "/t1disasm ", path);
++  free (p);
+   f = popen (cmd, "r");
++  free (cmd);
+   if (f) {
+-    while ((fgets (buf, 2000, f))) {
++    while ((fgets (buf, 2047, f))) {
+       p = strstr (buf, "CharStrings");
+       if (p) {
+-        fgets (buf, 2000, f);
++        fgets (buf, 2047, f);
+         if (strncmp (buf, "/.notdef", 8) != 0)
+           ret = 1;
+         break;
diff --git a/debian/patches/upstream-svn38059-dvipdfmx-fix b/debian/patches/upstream-svn38059-dvipdfmx-fix
new file mode 100644
index 0000000..41e6953
--- /dev/null
+++ b/debian/patches/upstream-svn38059-dvipdfmx-fix
@@ -0,0 +1,30 @@
+---
+ texk/dvipdfm-x/dvi.c |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- texlive-bin.orig/texk/dvipdfm-x/dvi.c
++++ texlive-bin/texk/dvipdfm-x/dvi.c
+@@ -932,7 +932,11 @@
+   p = kpse_var_value("SELFAUTOLOC");
+   if (p == NULL)
+     return ret;
++#if defined(_WIN32)
++  cmd = concatn ("\"", p, "/t1disasm.exe\" \"", path, "\"", NULL);
++#else
+   cmd = concat3 (p, "/t1disasm ", path);
++#endif
+   free (p);
+   f = popen (cmd, "r");
+   free (cmd);
+@@ -941,7 +945,10 @@
+       p = strstr (buf, "CharStrings");
+       if (p) {
+         fgets (buf, 2047, f);
+-        if (strncmp (buf, "/.notdef", 8) != 0)
++        p = buf;
++        while (*p == ' ' || *p == '\t')
++          p++;
++        if (strncmp (p, "/.notdef", 8) != 0)
+           ret = 1;
+         break;
+       }
diff --git a/debian/patches/upstream-svn38068-dvipdfmx-fix b/debian/patches/upstream-svn38068-dvipdfmx-fix
new file mode 100644
index 0000000..956cd6c
--- /dev/null
+++ b/debian/patches/upstream-svn38068-dvipdfmx-fix
@@ -0,0 +1,16 @@
+---
+ texk/dvipdfm-x/dvi.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- texlive-bin.orig/texk/dvipdfm-x/dvi.c
++++ texlive-bin/texk/dvipdfm-x/dvi.c
+@@ -1026,7 +1026,8 @@
+       ERROR("Failed to read Type 1 font \"%s\".", filename);
+ 
+     loaded_fonts[cur_id].cffont = cffont;
+-    loaded_fonts[cur_id].cff_is_standard_encoding = enc_vec[0] == NULL;
++    loaded_fonts[cur_id].cff_is_standard_encoding =
++      (enc_vec[0] == NULL || !strcmp (enc_vec[0], ".notdef"));
+ 
+     if (cff_dict_known(cffont->topdict, "FontBBox")) {
+       loaded_fonts[cur_id].ascent = cff_dict_get(cffont->topdict, "FontBBox", 3);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/texlive-bin.git


Reply to: