From ae7b9fdc9c67c9e25e75afa498ab82e686d8cca8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 23 Feb 2022 22:20:08 +0000 Subject: dvisvgm-2.13.2 git-svn-id: svn://tug.org/texlive/trunk@62156 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvisvgm/TLpatches/TL-Changes | 4 ++-- Build/source/texk/dvisvgm/configure | 24 +++++++++---------- Build/source/texk/dvisvgm/configure.ac | 2 +- Build/source/texk/dvisvgm/dvisvgm-src/ChangeLog | 28 ++++++++++++++++++++++ Build/source/texk/dvisvgm/dvisvgm-src/NEWS | 3 +++ Build/source/texk/dvisvgm/dvisvgm-src/configure.ac | 4 ++-- .../source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1 | 4 ++-- .../texk/dvisvgm/dvisvgm-src/src/BoundingBox.cpp | 2 +- .../texk/dvisvgm/dvisvgm-src/src/BoundingBox.hpp | 2 +- .../dvisvgm-src/src/DvisvgmSpecialHandler.cpp | 2 +- .../texk/dvisvgm/dvisvgm-src/src/PSPattern.cpp | 2 +- .../dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp | 21 +++++++++------- .../texk/dvisvgm/dvisvgm-src/src/SVGTree.cpp | 2 +- .../dvisvgm/dvisvgm-src/tests/BoundingBoxTest.cpp | 2 +- .../dvisvgm-src/tests/DvisvgmSpecialTest.cpp | 4 ++-- .../dvisvgm/dvisvgm-src/tests/EmSpecialTest.cpp | 2 +- .../dvisvgm-src/tests/PapersizeSpecialTest.cpp | 2 +- Build/source/texk/dvisvgm/version.ac | 2 +- 18 files changed, 74 insertions(+), 38 deletions(-) (limited to 'Build/source/texk/dvisvgm') diff --git a/Build/source/texk/dvisvgm/TLpatches/TL-Changes b/Build/source/texk/dvisvgm/TLpatches/TL-Changes index d1f6fd7ae63..849b6f6aaed 100644 --- a/Build/source/texk/dvisvgm/TLpatches/TL-Changes +++ b/Build/source/texk/dvisvgm/TLpatches/TL-Changes @@ -10,10 +10,10 @@ Update DATE and copyrights in configure.ac. mv dvisvgm-src dvisvgm-prev tar xf dvisvgm-VER.tar.gz mv dvisvgm-VER dvisvgm-src -cd dvisvgm-src -tar xf dvisvgm-VER.tar.gz # so we can compare orig release to ours +tar xf dvisvgm-VER.tar.gz # again, so we can compare orig release to ours # remove common and generated files: +cd dvisvgm-src rm ar-lib compile config.guess config.sub depcomp install-sh rm ltmain.sh missing test-driver rm -rf m4 autom4te.cache diff --git a/Build/source/texk/dvisvgm/configure b/Build/source/texk/dvisvgm/configure index e8d8cadd190..dceba59977c 100755 --- a/Build/source/texk/dvisvgm/configure +++ b/Build/source/texk/dvisvgm/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for dvisvgm (TeX Live) 2.13.1. +# Generated by GNU Autoconf 2.71 for dvisvgm (TeX Live) 2.13.2. # # Report bugs to . # @@ -629,8 +629,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dvisvgm (TeX Live)' PACKAGE_TARNAME='dvisvgm--tex-live-' -PACKAGE_VERSION='2.13.1' -PACKAGE_STRING='dvisvgm (TeX Live) 2.13.1' +PACKAGE_VERSION='2.13.2' +PACKAGE_STRING='dvisvgm (TeX Live) 2.13.2' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1437,7 +1437,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 dvisvgm (TeX Live) 2.13.1 to adapt to many kinds of systems. +\`configure' configures dvisvgm (TeX Live) 2.13.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1509,7 +1509,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dvisvgm (TeX Live) 2.13.1:";; + short | recursive ) echo "Configuration of dvisvgm (TeX Live) 2.13.2:";; esac cat <<\_ACEOF @@ -1642,7 +1642,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dvisvgm (TeX Live) configure 2.13.1 +dvisvgm (TeX Live) configure 2.13.2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2404,7 +2404,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 dvisvgm (TeX Live) $as_me 2.13.1, which was +It was created by dvisvgm (TeX Live) $as_me 2.13.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3381,7 +3381,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -DATE="January 2022" +DATE="February 2022" ac_config_headers="$ac_config_headers config.h" @@ -9015,7 +9015,7 @@ fi # Define the identity of the package. PACKAGE='dvisvgm--tex-live-' - VERSION='2.13.1' + VERSION='2.13.2' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -21413,7 +21413,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -dvisvgm (TeX Live) config.lt 2.13.1 +dvisvgm (TeX Live) config.lt 2.13.2 configured by $0, generated by GNU Autoconf 2.71. Copyright (C) 2011 Free Software Foundation, Inc. @@ -24822,7 +24822,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 dvisvgm (TeX Live) $as_me 2.13.1, which was +This file was extended by dvisvgm (TeX Live) $as_me 2.13.2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24890,7 +24890,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="\\ -dvisvgm (TeX Live) config.status 2.13.1 +dvisvgm (TeX Live) config.status 2.13.2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/Build/source/texk/dvisvgm/configure.ac b/Build/source/texk/dvisvgm/configure.ac index e1da5290521..23a400f3ace 100644 --- a/Build/source/texk/dvisvgm/configure.ac +++ b/Build/source/texk/dvisvgm/configure.ac @@ -15,7 +15,7 @@ dnl AC_PREREQ([2.65]) m4_include([version.ac])[] dnl define dvisvgm_version AC_INIT([dvisvgm (TeX Live)], dvisvgm_version, [tex-k@tug.org]) -DATE="January 2022" +DATE="February 2022" AC_CONFIG_SRCDIR([dvisvgm-src/src/dvisvgm.cpp]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIRS([../../m4])dnl not just _DIR diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/ChangeLog b/Build/source/texk/dvisvgm/dvisvgm-src/ChangeLog index 388fcf2acd8..69220afffe4 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/ChangeLog +++ b/Build/source/texk/dvisvgm/dvisvgm-src/ChangeLog @@ -1,3 +1,28 @@ +2022-02-22 Martin Gieseking + + * .appveyor.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile, + src/version.hpp: + set version to 2.13.2 + + * NEWS: + updated NEWS + +2022-02-21 Martin Gieseking + + * src/PsSpecialHandler.cpp: + removed redundant space is PS code + + * src/BoundingBox.cpp, src/BoundingBox.hpp, src/DvisvgmSpecialHandler.cpp, + src/PSPattern.cpp, src/PsSpecialHandler.cpp, src/SVGTree.cpp, + tests/BoundingBoxTest.cpp, tests/DvisvgmSpecialTest.cpp, + tests/EmSpecialTest.cpp, tests/PapersizeSpecialTest.cpp: + renamed BoundingBox::toSVGViewBox to BoundingBox::svgViewBoxString + +2022-02-18 Martin Gieseking + + * src/PsSpecialHandler.cpp: + use overflow='hidden' to clip included EPS/PDF graphics + 2022-01-26 Martin Gieseking * .appveyor.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile, @@ -7,6 +32,9 @@ * NEWS: updated NEWS + * README.md: + added Copr status badge to README + 2022-01-25 Martin Gieseking * src/PSPattern.cpp: diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/NEWS b/Build/source/texk/dvisvgm/dvisvgm-src/NEWS index d525c629487..cd62713981c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/NEWS +++ b/Build/source/texk/dvisvgm/dvisvgm-src/NEWS @@ -1,3 +1,6 @@ +dvisvgm-2.13.2 (2022-02-23) +- improved clipping of embedded EPS/PDF graphics (GH issue #176) + dvisvgm-2.13.1 (2022-01-26) - added evaluation of expression {?(...)} to special dvisvgm:rawdef - fixed regression regarding positioning of PDF graphics (GH issue #174) diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac b/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac index 8eabe7972e2..0e1a95f7049 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac +++ b/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac @@ -4,8 +4,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([dvisvgm],[2.13.1],[martin.gieseking@uos.de]) -DATE="January 2022" +AC_INIT([dvisvgm],[2.13.2],[martin.gieseking@uos.de]) +DATE="February 2022" AC_CONFIG_SRCDIR(src) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1 b/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1 index 19bfa9eb622..8d9274bfd7c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1 +++ b/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1 @@ -4,10 +4,10 @@ .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 2022-01-18 .\" Manual: dvisvgm Manual -.\" Source: dvisvgm 2.13.1 +.\" Source: dvisvgm 2.13.2 .\" Language: English .\" -.TH "DVISVGM" "1" "2022\-01\-18" "dvisvgm 2\&.13\&.1" "dvisvgm Manual" +.TH "DVISVGM" "1" "2022\-01\-18" "dvisvgm 2\&.13\&.2" "dvisvgm Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.cpp index 7276d717dad..d79848f8f91 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.cpp @@ -246,7 +246,7 @@ void BoundingBox::transform (const Matrix &tm) { } -string BoundingBox::toSVGViewBox () const { +string BoundingBox::svgViewBoxString () const { ostringstream oss; oss << XMLString(_ulx) << ' ' << XMLString(_uly) << ' ' << XMLString(width()) << ' ' << XMLString(height()); return oss.str(); diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.hpp index 339bc7eb41f..e9ffe2c9465 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.hpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.hpp @@ -76,7 +76,7 @@ class BoundingBox { bool operator != (const BoundingBox &bbox) const {return !(*this == bbox);} void scale (double sx, double sy); void transform (const Matrix &tm); - std::string toSVGViewBox () const; + std::string svgViewBoxString () const; std::ostream& write (std::ostream &os) const; std::unique_ptr createSVGRect () const; diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.cpp index 9a38ef9b3ba..077e030776d 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.cpp @@ -162,7 +162,7 @@ static void expand_constants (string &str, SpecialActions &actions) { ++endpos; if (str[endpos] == '}') { BoundingBox &box=actions.bbox(str.substr(pos+7, endpos-pos-7)); - str.replace(pos, endpos-pos+1, box.toSVGViewBox()); + str.replace(pos, endpos-pos+1, box.svgViewBoxString()); } else repl_bbox = false; diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.cpp index 3232c88bbee..cbb4f108077 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.cpp @@ -71,7 +71,7 @@ unique_ptr PSTilingPattern::createPatternNode () const { pattern->addAttribute("y", box.minY()); pattern->addAttribute("width", box.width()); pattern->addAttribute("height", box.height()); - pattern->addAttribute("viewBox", box.toSVGViewBox()); + pattern->addAttribute("viewBox", box.svgViewBoxString()); pattern->addAttribute("patternUnits", "userSpaceOnUse"); if (!_matrix.isIdentity()) pattern->addAttribute("patternTransform", _matrix.toSVG()); diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp index 66514d1b081..ff853c72ee4 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp @@ -422,12 +422,18 @@ unique_ptr PsSpecialHandler::createImageNode (FileType type, const s node->addAttribute("xlink:href", href); } else { // PostScript or PDF - // clip image to its bounding box if flag 'clip' is given - string rectclip; - if (clip) - rectclip = to_string(bbox.minX())+" "+to_string(bbox.minY())+" "+to_string(bbox.width())+" "+to_string(bbox.height())+" rectclip"; - - node = util::make_unique("g"); // put SVG nodes created from the EPS/PDF file in this group + if (!clip) + node = util::make_unique("g"); + else { + // clip image to its bounding box if flag 'clip' is given + node = util::make_unique("svg"); + node->addAttribute("overflow", "hidden"); + node->addAttribute("x", bbox.minX()); + node->addAttribute("y", bbox.minY()); + node->addAttribute("width", bbox.width()); + node->addAttribute("height", bbox.height()); + node->addAttribute("viewBox", bbox.svgViewBoxString()); + } _xmlnode = node.get(); _psi.execute( "\n@beginspecial @setspecial" // enter special environment @@ -435,8 +441,7 @@ unique_ptr PsSpecialHandler::createImageNode (FileType type, const s "/@imgbase("+image_base_path(*_actions)+")store " // path and basename of image files "matrix setmatrix" // don't apply outer PS transformations "/FirstPage "+to_string(pageno)+" def" // set number of first page to convert (PDF only) - "/LastPage "+to_string(pageno)+" def " // set number of last page to convert (PDF only) - +rectclip+ // clip to bounding box (if requexted by attribute 'clip') + "/LastPage "+to_string(pageno)+" def" // set number of last page to convert (PDF only) "(" + pathstr + ")run " // execute file content "@endspecial\n" // leave special environment ); diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.cpp index 8463ef08f15..f4cd9a85ef8 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.cpp @@ -72,7 +72,7 @@ void SVGTree::setBBox (const BoundingBox &bbox) { _root->addAttribute("width", XMLString(bbox.width()*ZOOM_FACTOR)+"pt"); _root->addAttribute("height", XMLString(bbox.height()*ZOOM_FACTOR)+"pt"); } - _root->addAttribute("viewBox", bbox.toSVGViewBox()); + _root->addAttribute("viewBox", bbox.svgViewBoxString()); } diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/BoundingBoxTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/BoundingBoxTest.cpp index 3d882679cfb..38109839584 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/BoundingBoxTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/BoundingBoxTest.cpp @@ -182,7 +182,7 @@ TEST(BoundingBoxTest, transform) { TEST(BoundingBoxTest, svgViewBox) { BoundingBox bbox(4, 5, 6, 7); ostringstream oss; - oss << bbox.toSVGViewBox(); + oss << bbox.svgViewBoxString(); EXPECT_EQ(oss.str(), "4 5 2 2"); } diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/DvisvgmSpecialTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/DvisvgmSpecialTest.cpp index ba3c1fe739e..ebd2020b822 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/DvisvgmSpecialTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/DvisvgmSpecialTest.cpp @@ -47,8 +47,8 @@ class DvisvgmSpecialTest : public ::testing::Test { double getY () const override {return 14;} bool defsEquals (const string &str) const {return defsString() == str;} bool pageEquals (const string &str) const {return pageString() == str;} - bool bboxEquals (const string &str) const {return bbox.toSVGViewBox() == str;} - string bboxString () const {return bbox.toSVGViewBox();} + bool bboxEquals (const string &str) const {return bbox.svgViewBoxString() == str;} + string bboxString () const {return bbox.svgViewBoxString();} string defsString () const {return toString(svgTree().defsNode());} string pageString () const {return toString(svgTree().pageNode());} diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/EmSpecialTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/EmSpecialTest.cpp index 57ed593ce8c..60aef9ba2a2 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/EmSpecialTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/EmSpecialTest.cpp @@ -52,7 +52,7 @@ class EmSpecialTest : public ::testing::Test { /* void write (ostream &os) const { os << "page: " << page << '\n' - << "bbox: " << bbox.toSVGViewBox() << '\n'; + << "bbox: " << bbox.svgViewBoxString() << '\n'; } */ private: diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PapersizeSpecialTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PapersizeSpecialTest.cpp index fae2cfcc5eb..536f6ff0a8a 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PapersizeSpecialTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PapersizeSpecialTest.cpp @@ -53,7 +53,7 @@ class PapersizeSpecialTest : public ::testing::Test { } string bboxString () { - return actions.bbox().toSVGViewBox(); + return actions.bbox().svgViewBoxString(); } void preprocess (const string &str) { diff --git a/Build/source/texk/dvisvgm/version.ac b/Build/source/texk/dvisvgm/version.ac index d113089ea2d..9b9f98ceefd 100644 --- a/Build/source/texk/dvisvgm/version.ac +++ b/Build/source/texk/dvisvgm/version.ac @@ -9,4 +9,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current dvisvgm version -m4_define([dvisvgm_version], [2.13.1]) +m4_define([dvisvgm_version], [2.13.2]) -- cgit v1.2.3