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

[texlive-bin] 01/01: fix pdftex compiled against poppler when stemv is not integer



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

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

commit 6f69222adea90862786a958fdfde2880cd327ebc
Author: Norbert Preining <preining@debian.org>
Date:   Sat Jul 16 23:55:19 2016 +0900

    fix pdftex compiled against poppler when stemv is not integer
---
 debian/changelog                                   |  8 +++++
 debian/patches/series                              |  1 +
 .../upstream-svn41713-fix-pdftex-non-int-stemv     | 41 ++++++++++++++++++++++
 3 files changed, 50 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 9058d45..df704e2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+texlive-bin (2016.20160513.41080-5) UNRELEASED; urgency=medium
+
+  * fix pdftex segfaults with pdf docs with non-integer stemv values
+    - this is a problem introduced by poppler, upstream TeX Live
+    has not problem with this.
+
+ -- Norbert Preining <preining@debian.org>  Sat, 16 Jul 2016 23:54:33 +0900
+
 texlive-bin (2016.20160513.41080-4) unstable; urgency=medium
 
   * fix for upmendex segfaults (upstream svn 41497 and 41498)
diff --git a/debian/patches/series b/debian/patches/series
index 59ac5e8..8f4133a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,3 +20,4 @@ upstream-svn41295-fix-ptex-checkbox
 upstream-svn41417-rename-sdetp
 upstream-svn41418-pdftex-match-fix
 upstream-svn41497-svn41498-fix-upmendex
+upstream-svn41713-fix-pdftex-non-int-stemv
diff --git a/debian/patches/upstream-svn41713-fix-pdftex-non-int-stemv b/debian/patches/upstream-svn41713-fix-pdftex-non-int-stemv
new file mode 100644
index 0000000..eda7558
--- /dev/null
+++ b/debian/patches/upstream-svn41713-fix-pdftex-non-int-stemv
@@ -0,0 +1,41 @@
+Although by specification stemv values can be in principle floats/reals,
+pdftoepdf.cc/pdftex expects ints, and used getInt. Now, getInt in
+poppler breaks out if the value is not a real integer, but a float, while
+the getInt function in xpdf returns the (int)f instead.
+This patch uses round to obtain the closes value in case it is a float.
+---
+ texk/web2c/pdftexdir/ChangeLog    |    6 ++++++
+ texk/web2c/pdftexdir/pdftoepdf.cc |    3 ++-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+--- texlive-bin.orig/texk/web2c/pdftexdir/ChangeLog
++++ texlive-bin/texk/web2c/pdftexdir/ChangeLog
+@@ -1,3 +1,9 @@
++2016-07-16  Akira Kakuto  <kakuto@fuk.kindai.ac.jp>
++
++	* pdftoepdf.cc: Use zround(stemV->getNum()) instead of stemV->getInt()
++	in epdf_create_fontdescriptor(), since the value of stemV may be real
++	in general.
++
+ 2016-06-12  Karl Berry  <karl@freefriends.org>
+         and Akira Kakuto  <kakuto@fuk.kindai.ac.jp>
+ 
+--- texlive-bin.orig/texk/web2c/pdftexdir/pdftoepdf.cc
++++ texlive-bin/texk/web2c/pdftexdir/pdftoepdf.cc
+@@ -71,6 +71,7 @@
+ // does not allow it.
+ extern int getpdfsuppresswarningpagegroup(void);
+ extern integer getpdfsuppressptexinfo(void);
++extern integer zround(double);
+ }
+ 
+ // The prefix "PTEX" for the PDF keys is special to pdfTeX;
+@@ -427,7 +428,7 @@
+         && (fontmap = lookup_fontmap(basefont->getName())) != NULL) {
+         // copy the value of /StemV
+         fontdesc->dictLookup("StemV", &stemV);
+-        fd = epdf_create_fontdescriptor(fontmap, stemV->getInt());
++        fd = epdf_create_fontdescriptor(fontmap, zround(stemV->getNum()));
+         if (fontdesc->dictLookup("CharSet", &charset) &&
+             charset->isString() && is_subsetable(fontmap))
+             epdf_mark_glyphs(fd, charset->getString()->getCString());

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


Reply to: