summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm/dvisvgm-src/src
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src')
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.hpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.cpp14
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.cpp30
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Font.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Font.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.am14
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.in36
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandlerProxy.cpp85
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandlerProxy.hpp39
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.cpp30
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.hpp1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/VFActions.hpp5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.cpp16
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/VectorStream.hpp84
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/Makefile.in4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp257
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.am1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.in5
26 files changed, 345 insertions, 312 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp
index f87cbcbf3f3..a6ae7495c49 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp
@@ -81,7 +81,7 @@ int BasicDVIReader::evalCommand (CommandHandler &handler, int &param) {
const int opcode = readByte();
if (!isStreamValid() || opcode < 0) // at end of file
- throw InvalidDVIFileException("invalid DVI file");
+ throw DVIPrematureEOFException();
int num_param_bytes = 0;
param = -1;
@@ -163,7 +163,7 @@ void BasicDVIReader::executePreamble () {
return;
}
}
- throw DVIException("invalid DVI file");
+ throw DVIException("invalid DVI file (missing preamble)");
}
@@ -171,7 +171,7 @@ void BasicDVIReader::executePreamble () {
void BasicDVIReader::goToPostamble () {
clearStream();
if (!isStreamValid())
- throw DVIException("invalid DVI file");
+ throw DVIException("invalid DVI file (missing postamble)");
seek(-1, ios::end); // stream pointer to last byte
int count=0;
@@ -198,7 +198,7 @@ void BasicDVIReader::executePostamble () {
void BasicDVIReader::executePostPost () {
clearStream(); // reset all status bits
if (!isStreamValid())
- throw DVIException("invalid DVI file");
+ throw DVIException("invalid DVI file (missing postpost)");
seek(-1, ios::end); // stream pointer to last byte
int count=0;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.hpp
index c3135cb5d51..f3976a6b928 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.hpp
@@ -32,8 +32,8 @@ struct DVIException : public MessageException {
};
-struct InvalidDVIFileException : public DVIException {
- explicit InvalidDVIFileException (const std::string &msg) : DVIException(msg) {}
+struct DVIPrematureEOFException : public DVIException {
+ explicit DVIPrematureEOFException () : DVIException("premature end of DVI stream") {}
};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.cpp
index b7c08bc1395..01501f29b0c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.cpp
@@ -20,6 +20,7 @@
#include <algorithm>
#include <sstream>
+#include <vectorstream.hpp>
#include "Color.hpp"
#include "DVIActions.hpp"
#include "DVIReader.hpp"
@@ -27,7 +28,6 @@
#include "FontManager.hpp"
#include "HashFunction.hpp"
#include "utility.hpp"
-#include "VectorStream.hpp"
using namespace std;
@@ -49,7 +49,7 @@ void DVIReader::executeAll () {
try {
opcode = executeCommand();
}
- catch (const InvalidDVIFileException &e) {
+ catch (const DVIPrematureEOFException &e) {
// end of stream reached
opcode = -1;
}
@@ -64,7 +64,7 @@ void DVIReader::executeAll () {
bool DVIReader::executePage (unsigned n) {
clearStream(); // reset all status bits
if (!isStreamValid())
- throw DVIException("invalid DVI file");
+ throw DVIException("invalid DVI file (page "+to_string(n)+" not found");
if (n < 1 || n > numberOfPages())
return false;
@@ -204,7 +204,7 @@ void DVIReader::cmdPop (int) {
void DVIReader::putVFChar (Font *font, uint32_t c) {
if (auto vf = font_cast<VirtualFont*>(font)) { // is current font a virtual font?
FontManager &fm = FontManager::instance();
- const vector<uint8_t> *dvi = vf->getDVI(c); // try to get DVI snippet that represents character c
+ const auto *dvi = vf->getDVI(c); // try to get DVI snippet that represents character c
Font *firstFont = fm.vfFirstFont(vf);
if (!dvi) {
const FontMetrics *ffm = firstFont ? firstFont->getMetrics() : nullptr;
@@ -222,8 +222,8 @@ void DVIReader::putVFChar (Font *font, uint32_t c) {
_dvi2bp = vf->scaledSize()/(1 << 20);
DVIState savedState = _dviState; // save current cursor position
_dviState.x = _dviState.y = _dviState.w = _dviState.z = 0;
- VectorInputStream<uint8_t> vis(*dvi);
- istream &is = replaceStream(vis);
+ ivectorstream<vector<char>> vis(*dvi);
+ auto &is = replaceStream(vis);
try {
executeAll(); // execute DVI fragment
}
@@ -534,7 +534,7 @@ void DVIReader::defineVFFont (uint32_t fontnum, const string &path, const string
/** This template method is called by the VFReader after reading a character definition from a VF file.
* @param[in] c character number
* @param[in] dvi DVI fragment describing the character */
-void DVIReader::defineVFChar (uint32_t c, vector<uint8_t> &&dvi) {
+void DVIReader::defineVFChar (uint32_t c, vector<char> &&dvi) {
FontManager::instance().assignVFChar(c, std::move(dvi));
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.hpp
index ffab16c5a81..b221960cb6c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.hpp
@@ -77,7 +77,7 @@ class DVIReader : public BasicDVIReader, public VFActions {
// VFAction methods
void defineVFFont (uint32_t fontnum, const std::string &path, const std::string &name, uint32_t checksum, double dsize, double ssize) override;
- void defineVFChar (uint32_t c, std::vector<uint8_t> &&dvi) override;
+ void defineVFChar (uint32_t c, std::vector<char> &&dvi) override;
// The following template methods provide higher-level access to the DVI commands.
// In contrast to their cmdXXX pendants, they don't require any handling of the input stream.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.cpp
index b4340a89fec..a1da593d08b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.cpp
@@ -54,13 +54,8 @@
#include "HtmlSpecialHandler.hpp"
#include "PapersizeSpecialHandler.hpp"
#include "PdfSpecialHandler.hpp"
+#include "PsSpecialHandlerProxy.hpp"
#include "TpicSpecialHandler.hpp"
-#ifndef HAVE_LIBGS
- #include "NoPsSpecialHandler.hpp"
-#endif
-#ifndef DISABLE_GS
- #include "PsSpecialHandler.hpp"
-#endif
///////////////////////////////////
@@ -423,28 +418,9 @@ void DVIToSVG::setProcessSpecials (const char *ignorelist, bool pswarning) {
SpecialManager::registerHandler<EmSpecialHandler>(ignoredHandlerName); // handles emTeX specials
SpecialManager::registerHandler<HtmlSpecialHandler>(ignoredHandlerName); // handles hyperref specials
SpecialManager::registerHandler<PapersizeSpecialHandler>(ignoredHandlerName); // handles papersize special
- SpecialManager::registerHandler<PdfSpecialHandler>(ignoredHandlerName); // handles pdf specials
+ SpecialManager::registerHandler<PdfSpecialHandler>(ignoredHandlerName);
SpecialManager::registerHandler<TpicSpecialHandler>(ignoredHandlerName); // handles tpic specials
- if (find(ignoredHandlerName.begin(), ignoredHandlerName.end(), PsSpecialHandler::handlerName()) == ignoredHandlerName.end()) {
-#ifndef DISABLE_GS
- if (Ghostscript().available())
- SpecialManager::registerHandler<PsSpecialHandler>(ignoredHandlerName); // handles PostScript specials
- else
-#endif
- {
-#ifndef HAVE_LIBGS
- // dummy PS special handler that only prints warning messages
- SpecialManager::registerHandler<NoPsSpecialHandler>(ignoredHandlerName);
- if (pswarning) {
-#ifdef DISABLE_GS
- Message::wstream() << "processing of PostScript specials has been disabled permanently\n";
-#else
- Message::wstream() << "processing of PostScript specials is disabled (Ghostscript not found)\n";
-#endif
- }
-#endif
- }
- }
+ SpecialManager::registerHandler(util::make_unique<PsSpecialHandlerProxy>(pswarning), ignoredHandlerName);
}
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.cpp
index 42737d364ae..56b4c635b06 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.cpp
@@ -725,7 +725,7 @@ void VirtualFontImpl::assignChar (uint32_t c, DVIVector &&dvi) {
/** Returns the DVI sippet that describes a given character of the virtual font.
* @param[in] c character code
* @return pointer to vector of DVI commands, or 0 if character doesn't exist */
-const vector<uint8_t>* VirtualFontImpl::getDVI (int c) const {
+const VirtualFont::DVIVector* VirtualFontImpl::getDVI (int c) const {
auto it = _charDefs.find(c);
return (it == _charDefs.end() ? nullptr : &it->second);
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.hpp
index 84c19e512e3..c8a2e340a9a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.hpp
@@ -162,7 +162,7 @@ class PhysicalFont : public virtual Font {
class VirtualFont : public virtual Font {
friend class FontManager;
public:
- using DVIVector = std::vector<uint8_t>;
+ using DVIVector = std::vector<char>;
public:
static std::unique_ptr<Font> create (const std::string &name, uint32_t checksum, double dsize, double ssize);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.cpp
index 1020617178b..2a5778326ab 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.cpp
@@ -377,7 +377,7 @@ void FontManager::leaveVF () {
/** Assigns a sequence of DVI commands to a char code.
* @param[in] c character code
* @param[in] dvi DVI commands that describe character c */
-void FontManager::assignVFChar (int c, vector<uint8_t> &&dvi) {
+void FontManager::assignVFChar (int c, vector<char> &&dvi) {
if (!_vfStack.empty())
_vfStack.top()->assignChar(c, std::move(dvi));
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.hpp
index 3b051a38356..a2deb89d95d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.hpp
@@ -72,7 +72,7 @@ class FontManager {
Font* vfFirstFont (const VirtualFont *vf) const;
void enterVF (VirtualFont *vf);
void leaveVF ();
- void assignVFChar (int c, std::vector<uint8_t> &&dvi);
+ void assignVFChar (int c, std::vector<char> &&dvi);
void addUsedChar (const Font &font, int c);
void resetUsedChars ();
CharMap& getUsedChars () {return _usedChars;}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.cpp
index 6b2c6aa388d..6584d068498 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.cpp
@@ -158,7 +158,7 @@ bool GFReader::executePostamble () {
throw GFException("invalid identification byte in postpost");
_in.seekg(-5, ios::cur); // now on postpost
if (_in.get() != 249)
- throw GFException("invalid GF file");
+ throw GFException("invalid GF file (missing postpost)");
uint32_t q = readUnsigned(4); // pointer to begin of postamble
_in.seekg(q); // now on begin of postamble
while (executeCommand() != 249); // execute all commands until postpost is reached
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.am
index 393452534f2..f1888535c7a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.am
@@ -133,6 +133,7 @@ libdvisvgm_la_SOURCES = \
PSPattern.hpp PSPattern.cpp \
PSPreviewHandler.hpp PSPreviewHandler.cpp \
PsSpecialHandler.hpp PsSpecialHandler.cpp \
+ PsSpecialHandlerProxy.hpp PsSpecialHandlerProxy.cpp \
RangeMap.hpp RangeMap.cpp \
ShadingPatch.hpp ShadingPatch.cpp \
SignalHandler.hpp SignalHandler.cpp \
@@ -161,7 +162,6 @@ libdvisvgm_la_SOURCES = \
Unicode.hpp Unicode.cpp \
utility.hpp utility.cpp \
VectorIterator.hpp \
- VectorStream.hpp \
VFActions.hpp \
VFReader.hpp VFReader.cpp \
windows.hpp \
@@ -185,6 +185,7 @@ AM_CFLAGS = $(WARNING_CFLAGS) \
$(CODE_COVERAGE_CFLAGS)
AM_CXXFLAGS = $(WARNING_CXXFLAGS) \
+ -I$(dvisvgm_srcdir)/libs/boost \
-I$(dvisvgm_srcdir)/libs/clipper \
-I$(dvisvgm_srcdir)/libs/variant/include
@@ -256,14 +257,3 @@ if TEXLIVE_BUILD
# Rebuild potrace:
@POTRACE_RULE@
endif TEXLIVE_BUILD
-
-if TEXLIVE_BUILD
-# Rebuild libkpathsea:
-@KPATHSEA_RULE@
-# Rebuild libfreetype:
-@FREETYPE2_RULE@
-# Rebuild libz:
-@ZLIB_RULE@
-# Rebuild potrace:
-@POTRACE_RULE@
-endif TEXLIVE_BUILD
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.in
index 99d4c39a8a6..7e9e615e634 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.in
@@ -92,6 +92,8 @@ host_triplet = @host@
bin_PROGRAMS = dvisvgm$(EXEEXT)
@HAVE_BROTLI_FALSE@am__append_1 = -I$(dvisvgm_srcdir)/libs/brotli/include
@HAVE_BROTLI_FALSE@am__append_2 = ../libs/brotli/libbrotli.a
+# POTRACE_CFLAGS = -I$(dvisvgm_srcdir)/libs/potrace
+# POTRACE_LIBS = ../libs/potrace/libpotrace.a
@HAVE_WOFF2_FALSE@am__append_3 = -I$(dvisvgm_srcdir)/libs/woff2/include
@HAVE_WOFF2_FALSE@am__append_4 = ../libs/woff2/libwoff2.a
@ENABLE_WOFF_TRUE@am__append_5 = ttf
@@ -180,12 +182,12 @@ am_libdvisvgm_la_OBJECTS = BasicDVIReader.lo Bezier.lo \
PDFParser.lo PdfSpecialHandler.lo PDFToSVG.lo \
PreScanDVIReader.lo Process.lo psdefs.lo PSInterpreter.lo \
PSPattern.lo PSPreviewHandler.lo PsSpecialHandler.lo \
- RangeMap.lo ShadingPatch.lo SignalHandler.lo SourceInput.lo \
- SpecialActions.lo SpecialManager.lo StreamReader.lo \
- StreamWriter.lo Subfont.lo SVGCharHandler.lo \
- SVGCharHandlerFactory.lo SVGCharPathHandler.lo \
- SVGCharTspanTextHandler.lo SVGElement.lo SVGOutput.lo \
- SVGSingleCharTextHandler.lo SVGTree.lo System.lo \
+ PsSpecialHandlerProxy.lo RangeMap.lo ShadingPatch.lo \
+ SignalHandler.lo SourceInput.lo SpecialActions.lo \
+ SpecialManager.lo StreamReader.lo StreamWriter.lo Subfont.lo \
+ SVGCharHandler.lo SVGCharHandlerFactory.lo \
+ SVGCharPathHandler.lo SVGCharTspanTextHandler.lo SVGElement.lo \
+ SVGOutput.lo SVGSingleCharTextHandler.lo SVGTree.lo System.lo \
TensorProductPatch.lo Terminal.lo TFM.lo ToUnicodeMap.lo \
TpicSpecialHandler.lo TriangularPatch.lo Unicode.lo utility.lo \
VFReader.lo XMLDocument.lo XMLNode.lo XMLParser.lo \
@@ -258,7 +260,8 @@ am__depfiles_remade = ./$(DEPDIR)/BasicDVIReader.Plo \
./$(DEPDIR)/PapersizeSpecialHandler.Plo \
./$(DEPDIR)/PathClipper.Plo ./$(DEPDIR)/PdfSpecialHandler.Plo \
./$(DEPDIR)/PreScanDVIReader.Plo ./$(DEPDIR)/Process.Plo \
- ./$(DEPDIR)/PsSpecialHandler.Plo ./$(DEPDIR)/RangeMap.Plo \
+ ./$(DEPDIR)/PsSpecialHandler.Plo \
+ ./$(DEPDIR)/PsSpecialHandlerProxy.Plo ./$(DEPDIR)/RangeMap.Plo \
./$(DEPDIR)/SVGCharHandler.Plo \
./$(DEPDIR)/SVGCharHandlerFactory.Plo \
./$(DEPDIR)/SVGCharPathHandler.Plo \
@@ -545,8 +548,6 @@ dvisvgm_SOURCES = \
CommandLine.hpp \
dvisvgm.cpp
-@HAVE_POTRACE_FALSE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
-#
@TEXLIVE_BUILD_TRUE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
@HAVE_XXHASH_FALSE@XXHASH_CFLAGS = -I$(dvisvgm_srcdir)/libs/xxHash
@HAVE_XXHASH_FALSE@XXHASH_LIBS = ../libs/xxHash/libxxhash.a
@@ -640,6 +641,7 @@ libdvisvgm_la_SOURCES = \
PSPattern.hpp PSPattern.cpp \
PSPreviewHandler.hpp PSPreviewHandler.cpp \
PsSpecialHandler.hpp PsSpecialHandler.cpp \
+ PsSpecialHandlerProxy.hpp PsSpecialHandlerProxy.cpp \
RangeMap.hpp RangeMap.cpp \
ShadingPatch.hpp ShadingPatch.cpp \
SignalHandler.hpp SignalHandler.cpp \
@@ -668,7 +670,6 @@ libdvisvgm_la_SOURCES = \
Unicode.hpp Unicode.cpp \
utility.hpp utility.cpp \
VectorIterator.hpp \
- VectorStream.hpp \
VFActions.hpp \
VFReader.hpp VFReader.cpp \
windows.hpp \
@@ -686,7 +687,8 @@ AM_CFLAGS = $(WARNING_CFLAGS) \
$(ZLIB_CFLAGS) \
$(CODE_COVERAGE_CFLAGS)
-AM_CXXFLAGS = $(WARNING_CXXFLAGS) -I$(dvisvgm_srcdir)/libs/clipper \
+AM_CXXFLAGS = $(WARNING_CXXFLAGS) -I$(dvisvgm_srcdir)/libs/boost \
+ -I$(dvisvgm_srcdir)/libs/clipper \
-I$(dvisvgm_srcdir)/libs/variant/include $(POTRACE_CFLAGS) \
$(XXHASH_CFLAGS) $(am__append_11) $(am__append_12) \
$(am__append_13) $(am__append_14) -I$(dvisvgm_srcdir)/libs/md5
@@ -868,6 +870,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PreScanDVIReader.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Process.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PsSpecialHandler.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PsSpecialHandlerProxy.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RangeMap.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SVGCharHandler.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SVGCharHandlerFactory.Plo@am__quote@ # am--include-marker
@@ -1206,6 +1209,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/PreScanDVIReader.Plo
-rm -f ./$(DEPDIR)/Process.Plo
-rm -f ./$(DEPDIR)/PsSpecialHandler.Plo
+ -rm -f ./$(DEPDIR)/PsSpecialHandlerProxy.Plo
-rm -f ./$(DEPDIR)/RangeMap.Plo
-rm -f ./$(DEPDIR)/SVGCharHandler.Plo
-rm -f ./$(DEPDIR)/SVGCharHandlerFactory.Plo
@@ -1351,6 +1355,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/PreScanDVIReader.Plo
-rm -f ./$(DEPDIR)/Process.Plo
-rm -f ./$(DEPDIR)/PsSpecialHandler.Plo
+ -rm -f ./$(DEPDIR)/PsSpecialHandlerProxy.Plo
-rm -f ./$(DEPDIR)/RangeMap.Plo
-rm -f ./$(DEPDIR)/SVGCharHandler.Plo
-rm -f ./$(DEPDIR)/SVGCharHandlerFactory.Plo
@@ -1445,15 +1450,6 @@ uninstall-am: uninstall-binPROGRAMS
# Rebuild potrace:
@TEXLIVE_BUILD_TRUE@@POTRACE_RULE@
-# Rebuild libkpathsea:
-@TEXLIVE_BUILD_TRUE@@KPATHSEA_RULE@
-# Rebuild libfreetype:
-@TEXLIVE_BUILD_TRUE@@FREETYPE2_RULE@
-# Rebuild libz:
-@TEXLIVE_BUILD_TRUE@@ZLIB_RULE@
-# Rebuild potrace:
-@TEXLIVE_BUILD_TRUE@@POTRACE_RULE@
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.cpp
index 65f098eb35a..3d8e6a35006 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.cpp
@@ -40,6 +40,6 @@ void NoPsSpecialHandler::dviEndPage (unsigned pageno, SpecialActions &actions) {
vector<const char*> NoPsSpecialHandler::prefixes () const {
- vector<const char*> pfx {"header=", "psfile=", "PSfile=", "ps:", "ps::", "!", "\""};
+ vector<const char*> pfx {"header=", "psfile=", "PSfile=", "ps:", "ps::", "!", "\"", "pst:", "PST:"};
return pfx;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandlerProxy.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandlerProxy.cpp
new file mode 100644
index 00000000000..d13cc124ae6
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandlerProxy.cpp
@@ -0,0 +1,85 @@
+/*************************************************************************
+** PsSpecialHandlerProxy.cpp **
+** **
+** This file is part of dvisvgm -- a fast DVI to SVG converter **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
+** **
+** This program is free software; you can redistribute it and/or **
+** modify it under the terms of the GNU General Public License as **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#include <config.h>
+#include <memory>
+#include "Message.hpp"
+#ifndef DISABLE_GS
+ #include "PsSpecialHandler.hpp"
+#endif
+#ifndef HAVE_LIBGS
+ #include "NoPsSpecialHandler.hpp"
+#endif
+#include "PsSpecialHandlerProxy.hpp"
+#include "SpecialManager.hpp"
+#include "utility.hpp"
+
+using namespace std;
+
+inline unique_ptr<SpecialHandler> createPsSpecialHandler () {
+#ifndef DISABLE_GS
+#ifndef HAVE_LIBGS
+ if (Ghostscript().available())
+#endif
+ return util::make_unique<PsSpecialHandler>();
+#endif
+#ifndef HAVE_LIBGS
+ return util::make_unique<NoPsSpecialHandler>();
+#endif
+}
+
+
+/** Replaces this handler proxy with the actual PS special handler. */
+SpecialHandler* PsSpecialHandlerProxy::replaceHandler () {
+ auto psSpecialHandler = createPsSpecialHandler();
+ if (_pswarning) {
+#ifdef DISABLE_GS
+ Message::wstream() << "processing of PostScript specials was permanently disabled\n";
+#else
+ if (!psSpecialHandler->name())
+ Message::wstream() << "processing of PostScript specials is disabled (Ghostscript not found)\n";
+#endif
+ }
+ SpecialHandler *handlerPtr = psSpecialHandler.get();
+ SpecialManager::instance().unregisterHandler(this);
+ SpecialManager::instance().registerHandler(std::move(psSpecialHandler));
+ return handlerPtr;
+}
+
+
+void PsSpecialHandlerProxy::preprocess (const string &prefix, istream &is, SpecialActions &actions) {
+ replaceHandler()->preprocess(prefix, is, actions);
+}
+
+
+bool PsSpecialHandlerProxy::process (const string &prefix, istream &is, SpecialActions &actions) {
+ return replaceHandler()->process(prefix, is, actions);
+}
+
+
+const char* PsSpecialHandlerProxy::info() const {
+ return createPsSpecialHandler()->info();
+}
+
+
+vector<const char *> PsSpecialHandlerProxy::prefixes() const {
+ vector<const char*> pfx {"header=", "pdffile=", "psfile=", "PSfile=", "ps:", "ps::", "!", "\"", "pst:", "PST:"};
+ return pfx;
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandlerProxy.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandlerProxy.hpp
new file mode 100644
index 00000000000..f2a1b3ab13b
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandlerProxy.hpp
@@ -0,0 +1,39 @@
+/*************************************************************************
+** PsSpecialHandlerProxy.hpp **
+** **
+** This file is part of dvisvgm -- a fast DVI to SVG converter **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
+** **
+** This program is free software; you can redistribute it and/or **
+** modify it under the terms of the GNU General Public License as **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#pragma once
+
+#include "SpecialHandler.hpp"
+
+class PsSpecialHandlerProxy : public SpecialHandler {
+ public:
+ explicit PsSpecialHandlerProxy (bool pswarning) : _pswarning(pswarning) {}
+ void preprocess (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
+ bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
+ const char* name () const override {return "ps";}
+ const char* info () const override;
+ std::vector<const char*> prefixes () const override;
+
+ protected:
+ SpecialHandler* replaceHandler ();
+
+ private:
+ bool _pswarning;
+};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.cpp
index 21f70c4af2a..175f3c54fb0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.cpp
@@ -56,6 +56,13 @@ void SpecialManager::registerHandler (unique_ptr<SpecialHandler> handler) {
}
+void SpecialManager::registerHandler (unique_ptr<SpecialHandler> handler, const vector<string> &ignoredHandlerNames) {
+ const char *name = handler->name();
+ if (!name || find(ignoredHandlerNames.begin(), ignoredHandlerNames.end(), string(name)) == ignoredHandlerNames.end())
+ instance().registerHandler(std::move(handler));
+}
+
+
/** Registers several special handlers at once.
* If ignorelist == 0, all given handlers are registered. To exclude selected sets of
* specials, the corresponding names can be given separated by non alpha-numeric characters,
@@ -77,6 +84,21 @@ void SpecialManager::registerHandlers (vector<unique_ptr<SpecialHandler>> &handl
}
+/** Removes a handler and the corresponding prefixes. */
+void SpecialManager::unregisterHandler (SpecialHandler *handler) {
+ if (handler) {
+ auto it = find_if(_handlerPool.begin(), _handlerPool.end(), [=](unique_ptr<SpecialHandler> &h) {
+ return h.get() == handler;
+ });
+ if (it != _handlerPool.end()) {
+ for (const char *prefix : handler->prefixes())
+ _handlersByPrefix.erase(prefix);
+ _handlerPool.erase(it);
+ }
+ }
+}
+
+
/** Looks for a handler responsible for a given special prefix.
* @param[in] prefix the special prefix, e.g. "color" or "em"
* @return in case of success: pointer to handler, 0 otherwise */
@@ -170,10 +192,10 @@ void SpecialManager::writeHandlerInfo (ostream &os) const {
if (handler->name())
sortmap[handler->name()] = handler.get();
for (const auto &strhandlerpair : sortmap) {
- os << setw(10) << left << strhandlerpair.second->name() << ' ';
- if (strhandlerpair.second->info())
- os << strhandlerpair.second->info();
- os << endl;
+ if (const char *info = strhandlerpair.second->info()) {
+ os << setw(10) << left << strhandlerpair.second->name() << ' ';
+ os << info << '\n';
+ }
}
os.flags(osflags); // restore format flags
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.hpp
index b4eb95c991c..00cc3ebc6b3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.hpp
@@ -48,8 +48,10 @@ class SpecialManager {
instance().registerHandler(util::make_unique<Handler>());
}
+ static void registerHandler (std::unique_ptr<SpecialHandler> handler, const std::vector<std::string> &ignoredHandlerNames);
void registerHandler (std::unique_ptr<SpecialHandler> handler);
void registerHandlers (std::vector<std::unique_ptr<SpecialHandler>> &handlers, const char *ignorelist);
+ void unregisterHandler (SpecialHandler *handler);
void unregisterHandlers ();
void preprocess (const std::string &special, SpecialActions &actions) const;
bool process (const std::string &special, double dvi2bp, SpecialActions &actions) const;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp
index 93d4045248a..5fcdd8d8081 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp
@@ -146,6 +146,14 @@ vector<uint8_t> StreamReader::readBytes (int n, HashFunction &hashfunc) {
}
+vector<char> StreamReader::readBytesAsChars (int n) {
+ vector<char> chars(n);
+ if (n > 0)
+ _is->read(chars.data(), n);
+ return chars;
+}
+
+
int StreamReader::readByte (HashFunction &hashfunc) {
int ret = readByte();
if (ret >= 0) {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.hpp
index c5d06d4a3bb..70f05a5c774 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.hpp
@@ -46,6 +46,7 @@ class StreamReader {
std::string readString (int length, HashFunction &hashfunc);
std::vector<uint8_t> readBytes (int n);
std::vector<uint8_t> readBytes (int n, HashFunction &hash);
+ std::vector<char> readBytesAsChars (int n);
int readByte () {return _is->get();}
int readByte (HashFunction &hashfunc);
void seek (std::streampos pos, std::ios::seekdir dir) {_is->seekg(pos, dir);}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/VFActions.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/VFActions.hpp
index 2c8d6e47cc9..dc623293592 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/VFActions.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/VFActions.hpp
@@ -25,13 +25,12 @@
#include <vector>
-struct VFActions
-{
+struct VFActions {
virtual ~VFActions () =default;
virtual void vfPreamble (const std::string &comment, uint32_t checksum, double dsize) {}
virtual void vfPostamble () {}
virtual void defineVFFont (uint32_t fontnum, const std::string &path, const std::string &name, uint32_t checksum, double dsize, double ssize) {}
- virtual void defineVFChar (uint32_t c, std::vector<uint8_t> &&dvi) {}
+ virtual void defineVFChar (uint32_t c, std::vector<char> &&dvi) {}
};
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.cpp
index bf126039e4f..5ca91ced3db 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.cpp
@@ -126,13 +126,13 @@ void VFReader::cmdPost () {
void VFReader::cmdLongChar () {
- uint32_t pl = readUnsigned(4); // packet length (length of DVI subroutine)
+ uint32_t pl = readUnsigned(4); // packet length (length of DVI subroutine)
if (!_actions)
- seek(8+pl, ios::cur); // skip remaining char definition bytes
+ seek(8+pl, ios::cur); // skip remaining char definition bytes
else {
- uint32_t cc = readUnsigned(4); // character code
- readUnsigned(4); // equals character width from corresponding TFM file
- auto dvi = readBytes(pl); // DVI subroutine
+ uint32_t cc = readUnsigned(4); // character code
+ readUnsigned(4); // equals character width from corresponding TFM file
+ auto dvi = readBytesAsChars(pl); // DVI subroutine
_actions->defineVFChar(cc, std::move(dvi)); // call template method for user actions
}
}
@@ -144,9 +144,9 @@ void VFReader::cmdShortChar (int pl) {
if (!_actions)
seek(4+pl, ios::cur); // skip char definition bytes
else {
- uint32_t cc = readUnsigned(1); // character code
- readUnsigned(3); // character width from corresponding TFM file
- auto dvi = readBytes(pl); // DVI subroutine
+ uint32_t cc = readUnsigned(1); // character code
+ readUnsigned(3); // character width from corresponding TFM file
+ auto dvi = readBytesAsChars(pl); // DVI subroutine
_actions->defineVFChar(cc, std::move(dvi)); // call template method for user actions
}
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorStream.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorStream.hpp
deleted file mode 100644
index 10189944002..00000000000
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorStream.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*************************************************************************
-** VectorStream.hpp **
-** **
-** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
-** **
-** This program is free software; you can redistribute it and/or **
-** modify it under the terms of the GNU General Public License as **
-** published by the Free Software Foundation; either version 3 of **
-** the License, or (at your option) any later version. **
-** **
-** This program is distributed in the hope that it will be useful, but **
-** WITHOUT ANY WARRANTY; without even the implied warranty of **
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
-** GNU General Public License for more details. **
-** **
-** You should have received a copy of the GNU General Public License **
-** along with this program; if not, see <http://www.gnu.org/licenses/>. **
-*************************************************************************/
-
-#ifndef VECTORSTREAM_HPP
-#define VECTORSTREAM_HPP
-
-#include <istream>
-#include <vector>
-
-template <typename T>
-class VectorStreamBuffer : public std::streambuf {
- public:
- explicit VectorStreamBuffer (const std::vector<T> &v) {
- if (!v.empty()) {
- _begin = _curr = &v[0];
- _end = &v[0]+v.size();
- }
- }
-
- protected:
- int_type underflow () override {
- return _curr == _end ? traits_type::eof() : traits_type::to_int_type(*_curr);
- }
-
- int_type uflow() override {
- return _curr == _end ? traits_type::eof() : traits_type::to_int_type(*_curr++);
- }
-
- std::streamsize showmanyc () override {return _end-_curr;}
-
- int_type pbackfail (int_type c) override {
- if (_curr == _begin || (c != traits_type::eof() && c != _curr[-1]))
- return traits_type::eof();
- return traits_type::to_int_type(*--_curr);
- }
-
- pos_type seekoff (off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which=std::ios_base::in) override {
- switch (dir) {
- case std::ios_base::cur:
- _curr += off; break;
- case std::ios_base::beg:
- _curr = _begin+off; break;
- case std::ios_base::end:
- _curr = _end-off; break;
- default:
- break;
- }
- return _curr-_begin;
- }
-
- private:
- const T *_begin=nullptr;
- const T *_end=nullptr;
- const T *_curr=nullptr;
-};
-
-
-template <typename T>
-class VectorInputStream : public std::istream {
- public:
- explicit VectorInputStream (const std::vector<T> &source) : std::istream(&_buf), _buf(source) {}
-
- private:
- VectorStreamBuffer<T> _buf;
-};
-
-#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/Makefile.in
index 9f108830241..5dfafffaf30 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/Makefile.in
@@ -90,6 +90,8 @@ build_triplet = @build@
host_triplet = @host@
@HAVE_BROTLI_FALSE@am__append_1 = -I$(dvisvgm_srcdir)/libs/brotli/include
@HAVE_BROTLI_FALSE@am__append_2 = ../libs/brotli/libbrotli.a
+# POTRACE_CFLAGS = -I$(dvisvgm_srcdir)/libs/potrace
+# POTRACE_LIBS = ../libs/potrace/libpotrace.a
@HAVE_WOFF2_FALSE@am__append_3 = -I$(dvisvgm_srcdir)/libs/woff2/include
@HAVE_WOFF2_FALSE@am__append_4 = ../libs/woff2/libwoff2.a
subdir = dvisvgm-src/src/optimizer
@@ -382,8 +384,6 @@ liboptimizer_la_SOURCES = \
TransformSimplifier.hpp TransformSimplifier.cpp \
WSNodeRemover.hpp WSNodeRemover.cpp
-@HAVE_POTRACE_FALSE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
-#
@TEXLIVE_BUILD_TRUE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
@HAVE_XXHASH_FALSE@XXHASH_CFLAGS = -I$(dvisvgm_srcdir)/libs/xxHash
@HAVE_XXHASH_FALSE@XXHASH_LIBS = ../libs/xxHash/libxxhash.a
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp
index bba86bee7c0..a16690a9553 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp
@@ -33,132 +33,133 @@ const char *PSInterpreter::PSDEFS =
"ulldevice get put @SD/:image @SD/image get put @SD/:colorimage @SD/colorimage "
"get put @SD/.setopacityalpha known not{@SD/.setopacityalpha{pop}put}if @SD/.se"
"tshapealpha known not{@SD/.setshapealpha{pop}put}if @SD/.setblendmode known no"
-"t{@SD/.setblendmode{pop}put}if @SD/prseq{-1 1{-1 roll =only( )print}for(\\n)pr"
-"int}put @SD/prcmd{( )exch(\\ndvi.)3{print}repeat prseq}put @SD/cvxall{{cvx}for"
-"all}put @SD/defpr{[exch/copy cvx @SD 4 index[/get/exec]cvxall 5 index 3 index "
-"dup length string cvs/prcmd cvx]cvx bind def}put @SD/querypos{{currentpoint}st"
-"opped{$error/newerror false put}{2(querypos)prcmd}ifelse}put @SD/applyscaleval"
-"s{1 0 dtransform exch dup mul exch dup mul add sqrt 0 1 dtransform exch dup mu"
-"l exch dup mul add sqrt 1 0 dtransform dup mul exch dup dup mul 3 -1 roll add "
-"dup 0 eq{pop}{sqrt div}ifelse 3(applyscalevals)prcmd}put @SD/prpath{{2(moveto)"
-"prcmd}{2(lineto)prcmd}{6(curveto)prcmd}{0(closepath)prcmd}pathforall}put @SD/n"
-"ulldevice{@GD/@nulldev true put :nulldevice 1 1(setnulldevice)prcmd}put @SD/ch"
-"arpath{/@dodraw false store :charpath/@dodraw true store}put @SD/stringwidth{/"
-"@dodraw false store :stringwidth/@dodraw true store}put @SD/show{@dodraw @GD/@"
-"nulldev get not and{dup :gsave currentpoint 2{50 mul exch}repeat :newpath move"
-"to 50 50/scale sysexec true charpath fill :grestore/@dodraw false store :show/"
-"@dodraw true store}{:show}ifelse}put @SD/varxyshow{dup 0 ge{<</chr 3 -1 roll s"
-"tring/prc 5 -1 roll/arr 7 -1 roll/str 9 -1 roll/idx 0>>begin 0 chr length str "
-"length 1 sub{str exch chr length getinterval/chr exch store :gsave chr show :g"
-"restore currentpoint prc moveto/idx idx 1 add store}for end}{pop pop show}ifel"
-"se}put @SD/xyshow{dup dup type/arraytype eq exch length 0 gt and{dup length 2 "
-"idiv 2 index length exch idiv}{-1}ifelse{exch arr idx 2 mul get add exch arr i"
-"dx 2 mul 1 add get add}exch varxyshow}put @SD/xshow{dup dup type/arraytype eq "
-"exch length 0 gt and{dup length 2 index length exch idiv}{-1}ifelse{exch arr i"
-"dx get add exch}exch varxyshow}put @SD/yshow{dup dup type/arraytype eq exch le"
-"ngth 0 gt and{dup length 2 index length exch idiv}{-1}ifelse{arr idx get add}e"
-"xch varxyshow}put @SD/awidthshow{{1 string dup 0 5 index put :gsave show :gres"
-"tore pop 0 rmoveto 3 index eq{4 index 4 index rmoveto}if 1 index 1 index rmove"
-"to}exch cshow 5{pop}repeat}put @SD/widthshow{0 0 3 -1 roll awidthshow}put @SD/"
-"ashow{0 0 0 6 3 roll awidthshow}put @SD/newpath{:newpath 1 1(newpath)prcmd}put"
-" @SD/stroke{@dodraw @GD/@nulldev get not and{prcolor 0 1(newpath)prcmd prpath "
-"0(stroke)prcmd :newpath}{:stroke}ifelse}put @SD/fill{@dodraw @GD/@nulldev get "
-"not and{prcolor 0 1(newpath)prcmd prpath 0(fill)prcmd :newpath}{:fill}ifelse}p"
-"ut @SD/eofill{@dodraw @GD/@nulldev get not and{prcolor 0 1(newpath)prcmd prpat"
-"h 0(eofill)prcmd :newpath}{:eofill}ifelse}put/.fillstroke{:gsave fill :grestor"
-"e .swapcolors stroke .swapcolors}bind def/.eofillstroke{:gsave eofill :grestor"
-"e .swapcolors stroke .swapcolors}bind def @SD/clip{:clip @GD/@nulldev get not{"
-"0 1(newpath)prcmd prpath 0(clip)prcmd}if}put @SD/eoclip{:eoclip @GD/@nulldev g"
-"et not{0 1(newpath)prcmd prpath 0(eoclip)prcmd}if}put @SD/shfill{begin current"
-"dict/ShadingType known currentdict/ColorSpace known and currentdict/DataSource"
-" known and currentdict/Function known not and ShadingType 4 ge{DataSource type"
-"/arraytype eq{<</DeviceGray 1/DeviceRGB 3/DeviceCMYK 4/bgknown currentdict/Bac"
-"kground known/bbknown currentdict/BBox known>>begin currentdict ColorSpace kno"
-"wn{ShadingType ColorSpace load bgknown{1 Background aload pop}{0}ifelse bbknow"
-"n{1 BBox aload pop}{0}ifelse ShadingType 5 eq{VerticesPerRow}if DataSource alo"
-"ad length 4 add bgknown{ColorSpace load add}if bbknown{4 add}if ShadingType 5 "
-"eq{1 add}if(shfill)prcmd}if end}if}if end}put @SD/image{dup type/dicttype eq{d"
-"up}{<</Width 6 index/Height 7 index/colorimg false>>}ifelse @execimg}put @SD/c"
-"olorimage{<<2 index{/Width 2 index 8 add index/Height 4 index 9 add index}{/Wi"
-"dth 8 index/Height 9 index}ifelse/colorimg true>>@execimg}put/@imgbase(./)def/"
-"@imgdevice(jpeg)def/@execimg{@GD/@imgcnt 2 copy .knownget{1 add}{1}ifelse put "
-"begin<</imgdev null/imgid @GD/@imgcnt get/ispng @imgdevice 0 3 getinterval(png"
-")eq dup/suffix exch{(.png)}{(.jpg)}ifelse/colorimg currentdict/colorimg .known"
-"get dup{pop}if/colordev 1 index currentcolorspace dup length 1 ne exch 0 get/D"
-"eviceGray ne or or>>begin @imgdevice(png)ne @imgdevice(jpeg)ne and{@imgdevice "
-"cvn}{colordev{ispng{/png16m}{/jpeg}ifelse}{ispng{/pnggray}{/jpeggray}ifelse}if"
-"else}ifelse dup devicedict exch known{:gsave/imgdev exch finddevice def mark/O"
-"utputFile @imgbase imgid 20 string cvs strconcat suffix strconcat/PageSize[Wid"
-"th Height]/UseFastColor true ispng{@imgdevice(pngmonod)eq{/MinFeatureSize wher"
-"e{pop/MinFeatureSize MinFeatureSize}if}if}{/JPEGQ where{pop/JPEGQ JPEGQ}if}ife"
-"lse imgdev putdeviceprops setdevice[Width 0 0 Height neg 0 Height]/setmatrix s"
-"ysexec colorimg{:colorimage}{:image}ifelse/copypage sysexec mark/OutputFile()i"
-"mgdev putdeviceprops pop :grestore imgid Width Height 3(image)prcmd}{pop color"
-"img{:colorimage}{:image}ifelse}ifelse end end}def/@rect{4 -2 roll moveto exch "
-"dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath}bind def/@rectcc{4 -"
-"2 roll moveto 2 copy 0 lt exch 0 lt xor{dup 0 exch rlineto exch 0 rlineto neg "
-"0 exch rlineto}{exch dup 0 rlineto exch 0 exch rlineto neg 0 rlineto}ifelse cl"
-"osepath}bind def @SD/rectclip{:newpath dup type/arraytype eq{aload length 4 id"
-"iv{@rectcc}repeat}{@rectcc}ifelse clip :newpath}put @SD/rectfill{:gsave :newpa"
-"th dup type/arraytype eq{aload length 4 idiv{@rectcc}repeat}{@rectcc}ifelse fi"
-"ll :grestore}put @SD/rectstroke{gsave :newpath dup type/arraytype eq{aload len"
-"gth 4 idiv{@rect}repeat}{@rect}ifelse stroke grestore}put false setglobal @SD "
-"readonly pop/initclip 0 defpr/clippath 0 defpr/sysexec{@SD exch get exec}def/a"
-"dddot{dup length 1 add string dup 0 46 put dup 3 -1 roll 1 exch putinterval}de"
-"f/setlinewidth{dup/setlinewidth sysexec 1(setlinewidth)prcmd}def/setlinecap 1 "
-"defpr/setlinejoin 1 defpr/setmiterlimit 1 defpr/setdash{mark 3 1 roll 2 copy/s"
-"etdash sysexec exch aload length 1 add -1 roll counttomark(setdash)prcmd pop}d"
-"ef/@setpagedevice{pop<<>>/setpagedevice sysexec matrix setmatrix newpath 0(set"
-"pagedevice)prcmd}def/@checknulldev{@GD/@nulldev get{currentpagedevice maxlengt"
-"h 0 ne{@GD/@nulldev false put 0 1(setnulldevice)prcmd}if}if}def/prcolor{curren"
-"tcolorspace @setcolorspace currentrgbcolor 3(setrgbcolor)prcmd}def/printgstate"
-"{@dodraw @GD/@nulldev get not and{matrix currentmatrix aload pop 6(setmatrix)p"
-"rcmd applyscalevals currentlinewidth 1(setlinewidth)prcmd currentlinecap 1(set"
-"linecap)prcmd currentlinejoin 1(setlinejoin)prcmd currentmiterlimit 1(setmiter"
-"limit)prcmd revision dup 952 lt{pop}{.currentblendmode .setblendmode 952 eq{.c"
-"urrentopacityalpha .setopacityalpha .currentshapealpha .setshapealpha}{.curren"
-"talphaisshape{1}{0}ifelse 1(setalphaisshape)prcmd .currentstrokeconstantalpha "
-"1(setstrokeconstantalpha)prcmd .currentfillconstantalpha 1(setfillconstantalph"
-"a)prcmd}ifelse}ifelse prcolor currentdash mark 3 1 roll exch aload length 1 ad"
-"d -1 roll counttomark(setdash)prcmd pop}if}def/strconcat{exch dup length 2 ind"
-"ex length add string dup dup 4 2 roll copy length 4 -1 roll putinterval}def/se"
-"tgstate{/setgstate sysexec printgstate}def/save{@UD begin/@saveID vmstatus pop"
-" pop def end :save @saveID 1(save)prcmd}def/restore{:restore @checknulldev pri"
-"ntgstate @UD/@saveID known{@UD begin @saveID end}{0}ifelse 1(restore)prcmd}def"
-"/gsave 0 defpr/grestore{:grestore @checknulldev printgstate 0(grestore)prcmd}d"
-"ef/grestoreall{:grestoreall @checknulldev setstate 0(grestoreall)prcmd}def/rot"
-"ate{dup type/arraytype ne @dodraw and{dup 1(rotate)prcmd}if/rotate sysexec app"
-"lyscalevals}def/scale{dup type/arraytype ne @dodraw and{2 copy 2(scale)prcmd}i"
-"f/scale sysexec applyscalevals}def/translate{dup type/arraytype ne @dodraw and"
-"{2 copy 2(translate)prcmd}if/translate sysexec}def/setmatrix{dup/setmatrix sys"
-"exec @dodraw{aload pop 6(setmatrix)prcmd applyscalevals}{pop}ifelse}def/initma"
-"trix{matrix setmatrix}def/concat{matrix currentmatrix matrix concatmatrix setm"
-"atrix}def/makepattern{gsave<</mx 3 -1 roll>>begin<</XUID[1000000 @patcnt]>>cop"
-"y mx/makepattern sysexec dup begin PatternType 2 lt{PatternType @patcnt BBox a"
-"load pop XStep YStep PaintType mx aload pop 15(makepattern)prcmd :newpath matr"
-"ix setmatrix dup PaintProc 0 1(makepattern)prcmd @GD/@patcnt @patcnt 1 add put"
-"}if end end grestore}def/setpattern{dup begin PatternType end 1 eq{begin Paint"
-"Type 1 eq{XUID aload pop exch pop 1}{:gsave[currentcolorspace aload length -1 "
-"roll pop]/setcolorspace sysexec/setcolor sysexec XUID aload pop exch pop curre"
-"ntrgbcolor :grestore 4}ifelse(setpattern)prcmd currentcolorspace 0 get/Pattern"
-" ne{[/Pattern currentcolorspace]/setcolorspace sysexec}if currentcolorspace @s"
-"etcolorspace end}{/setpattern sysexec}ifelse}def/setcolor{dup type/dicttype eq"
-"{setpattern}{/setcolor sysexec/currentrgbcolor sysexec setrgbcolor}ifelse}def/"
-"setcolorspace{dup/setcolorspace sysexec @setcolorspace}def/@setcolorspace{dup "
-"type/arraytype eq{0 get}if/Pattern eq{1}{0}ifelse 1(setcolorspace)prcmd}def/se"
-"tgray 1 defpr/setcmykcolor 4 defpr/sethsbcolor 3 defpr/setrgbcolor 3 defpr/.se"
-"talphaisshape{@SD/.setalphaisshape known{dup/.setalphaisshape sysexec}if{1}{0}"
-"ifelse 1(setalphaisshape)prcmd}bind def/.setfillconstantalpha{@SD/.setfillcons"
-"tantalpha known{dup/.setfillconstantalpha sysexec}if 1(setfillconstantalpha)pr"
-"cmd}bind def/.setstrokeconstantalpha{@SD/.setstrokeconstantalpha known{dup/.se"
-"tstrokeconstantalpha sysexec}if 1(setstrokeconstantalpha)prcmd}bind def/.setop"
-"acityalpha{false .setalphaisshape dup .setfillconstantalpha .setstrokeconstant"
-"alpha}bind def/.setshapealpha{true .setalphaisshape dup .setfillconstantalpha "
-".setstrokeconstantalpha}bind def/.setblendmode{dup/.setblendmode sysexec<</Nor"
-"mal 0/Compatible 0/Multiply 1/Screen 2/Overlay 3/SoftLight 4/HardLight 5/Color"
-"Dodge 6/ColorBurn 7/Darken 8/Lighten 9/Difference 10/Exclusion 11/Hue 12/Satur"
-"ation 13/Color 14/Luminosity 15/CompatibleOverprint 16>>exch get 1(setblendmod"
-"e)prcmd}def/@pdfpagecount{(r)file runpdfbegin pdfpagecount runpdfend}def/@pdfp"
-"agebox{(r)file runpdfbegin dup dup 1 lt exch pdfpagecount gt or{pop}{pdfgetpag"
-"e/MediaBox pget pop aload pop}ifelse runpdfend}def DELAYBIND{.bindnow}if ";
+"t{@SD/.setblendmode{pop}put}if @SD/prseq{[exch 1 add 1 roll]{=only( )print}for"
+"all(\\n)print}put @SD/prcmd{( )exch(\\ndvi.)3{print}repeat prseq}put @SD/cvxal"
+"l{{cvx}forall}put @SD/defpr{[exch/copy cvx @SD 4 index[/get/exec]cvxall 5 inde"
+"x 3 index dup length string cvs/prcmd cvx]cvx bind def}put @SD/querypos{{curre"
+"ntpoint}stopped{$error/newerror false put}{2(querypos)prcmd}ifelse}put @SD/app"
+"lyscalevals{1 0 dtransform exch dup mul exch dup mul add sqrt 0 1 dtransform e"
+"xch dup mul exch dup mul add sqrt 1 0 dtransform dup mul exch dup dup mul 3 -1"
+" roll add dup 0 eq{pop}{sqrt div}ifelse 3(applyscalevals)prcmd}put @SD/prpath{"
+"{2(moveto)prcmd}{2(lineto)prcmd}{6(curveto)prcmd}{0(closepath)prcmd}pathforall"
+"}put @SD/nulldevice{@GD/@nulldev true put :nulldevice 1 1(setnulldevice)prcmd}"
+"put @SD/charpath{/@dodraw false store :charpath/@dodraw true store}put @SD/str"
+"ingwidth{/@dodraw false store :stringwidth/@dodraw true store}put @SD/show{@do"
+"draw @GD/@nulldev get not and{dup :gsave currentpoint 2{50 mul exch}repeat :ne"
+"wpath moveto 50 50/scale sysexec true charpath fill :grestore/@dodraw false st"
+"ore :show/@dodraw true store}{:show}ifelse}put @SD/varxyshow{dup 0 ge{<</chr 3"
+" -1 roll string/prc 5 -1 roll/arr 7 -1 roll/str 9 -1 roll/idx 0>>begin 0 chr l"
+"ength str length 1 sub{str exch chr length getinterval/chr exch store :gsave c"
+"hr show :grestore currentpoint prc moveto/idx idx 1 add store}for end}{pop pop"
+" show}ifelse}put @SD/xyshow{dup dup type/arraytype eq exch length 0 gt and{dup"
+" length 2 idiv 2 index length exch idiv}{-1}ifelse{exch arr idx 2 mul get add "
+"exch arr idx 2 mul 1 add get add}exch varxyshow}put @SD/xshow{dup dup type/arr"
+"aytype eq exch length 0 gt and{dup length 2 index length exch idiv}{-1}ifelse{"
+"exch arr idx get add exch}exch varxyshow}put @SD/yshow{dup dup type/arraytype "
+"eq exch length 0 gt and{dup length 2 index length exch idiv}{-1}ifelse{arr idx"
+" get add}exch varxyshow}put @SD/awidthshow{{1 string dup 0 5 index put :gsave "
+"show :grestore pop 0 rmoveto 3 index eq{4 index 4 index rmoveto}if 1 index 1 i"
+"ndex rmoveto}exch cshow 5{pop}repeat}put @SD/widthshow{0 0 3 -1 roll awidthsho"
+"w}put @SD/ashow{0 0 0 6 3 roll awidthshow}put @SD/newpath{:newpath 1 1(newpath"
+")prcmd}put @SD/stroke{@dodraw @GD/@nulldev get not and{prcolor 0 1(newpath)prc"
+"md prpath 0(stroke)prcmd :newpath}{:stroke}ifelse}put @SD/fill{@dodraw @GD/@nu"
+"lldev get not and{prcolor 0 1(newpath)prcmd prpath 0(fill)prcmd :newpath}{:fil"
+"l}ifelse}put @SD/eofill{@dodraw @GD/@nulldev get not and{prcolor 0 1(newpath)p"
+"rcmd prpath 0(eofill)prcmd :newpath}{:eofill}ifelse}put/.fillstroke{:gsave fil"
+"l :grestore .swapcolors stroke .swapcolors}bind def/.eofillstroke{:gsave eofil"
+"l :grestore .swapcolors stroke .swapcolors}bind def @SD/clip{:clip @GD/@nullde"
+"v get not{0 1(newpath)prcmd prpath 0(clip)prcmd}if}put @SD/eoclip{:eoclip @GD/"
+"@nulldev get not{0 1(newpath)prcmd prpath 0(eoclip)prcmd}if}put @SD/shfill{beg"
+"in currentdict/ShadingType known currentdict/ColorSpace known and currentdict/"
+"DataSource known and currentdict/Function known not and ShadingType 4 ge{DataS"
+"ource type/arraytype eq{<</DeviceGray 1/DeviceRGB 3/DeviceCMYK 4/bgknown curre"
+"ntdict/Background known/bbknown currentdict/BBox known>>begin currentdict Colo"
+"rSpace known{ShadingType ColorSpace load bgknown{1 Background aload pop}{0}ife"
+"lse bbknown{1 BBox aload pop}{0}ifelse ShadingType 5 eq{VerticesPerRow}if Data"
+"Source aload length 4 add bgknown{ColorSpace load add}if bbknown{4 add}if Shad"
+"ingType 5 eq{1 add}if(shfill)prcmd}if end}if}if end}put @SD/image{dup type/dic"
+"ttype eq{dup}{<</Width 6 index/Height 7 index/colorimg false>>}ifelse @execimg"
+"}put @SD/colorimage{<<2 index{/Width 2 index 8 add index/Height 4 index 9 add "
+"index}{/Width 8 index/Height 9 index}ifelse/colorimg true>>@execimg}put/@imgba"
+"se(./)def/@imgdevice(jpeg)def/@execimg{@GD/@imgcnt 2 copy .knownget{1 add}{1}i"
+"felse put begin<</imgdev null/imgid @GD/@imgcnt get/ispng @imgdevice 0 3 getin"
+"terval(png)eq dup/suffix exch{(.png)}{(.jpg)}ifelse/colorimg currentdict/color"
+"img .knownget dup{pop}if/colordev 1 index currentcolorspace dup length 1 ne ex"
+"ch 0 get/DeviceGray ne or or>>begin @imgdevice(png)ne @imgdevice(jpeg)ne and{@"
+"imgdevice cvn}{colordev{ispng{/png16m}{/jpeg}ifelse}{ispng{/pnggray}{/jpeggray"
+"}ifelse}ifelse}ifelse dup devicedict exch known{:gsave/imgdev exch finddevice "
+"def mark/OutputFile @imgbase imgid 20 string cvs strconcat suffix strconcat/Pa"
+"geSize[Width Height]/UseFastColor true ispng{@imgdevice(pngmonod)eq{/MinFeatur"
+"eSize where{pop/MinFeatureSize MinFeatureSize}if}if}{/JPEGQ where{pop/JPEGQ JP"
+"EGQ}if}ifelse imgdev putdeviceprops setdevice[Width 0 0 Height neg 0 Height]/s"
+"etmatrix sysexec colorimg{:colorimage}{:image}ifelse/copypage sysexec mark/Out"
+"putFile()imgdev putdeviceprops pop :grestore imgid Width Height 3(image)prcmd}"
+"{pop colorimg{:colorimage}{:image}ifelse}ifelse end end}def/@rect{4 -2 roll mo"
+"veto exch dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath}bind def/@"
+"rectcc{4 -2 roll moveto 2 copy 0 lt exch 0 lt xor{dup 0 exch rlineto exch 0 rl"
+"ineto neg 0 exch rlineto}{exch dup 0 rlineto exch 0 exch rlineto neg 0 rlineto"
+"}ifelse closepath}bind def @SD/rectclip{:newpath dup type/arraytype eq{aload l"
+"ength 4 idiv{@rectcc}repeat}{@rectcc}ifelse clip :newpath}put @SD/rectfill{:gs"
+"ave :newpath dup type/arraytype eq{aload length 4 idiv{@rectcc}repeat}{@rectcc"
+"}ifelse fill :grestore}put @SD/rectstroke{gsave :newpath dup type/arraytype eq"
+"{aload length 4 idiv{@rect}repeat}{@rect}ifelse stroke grestore}put false setg"
+"lobal @SD readonly pop/initclip 0 defpr/clippath 0 defpr/sysexec{@SD exch get "
+"exec}def/adddot{dup length 1 add string dup 0 46 put dup 3 -1 roll 1 exch puti"
+"nterval}def/setlinewidth{dup/setlinewidth sysexec 1(setlinewidth)prcmd}def/set"
+"linecap 1 defpr/setlinejoin 1 defpr/setmiterlimit 1 defpr/setdash{mark 3 1 rol"
+"l 2 copy/setdash sysexec exch aload length 1 add -1 roll counttomark(setdash)p"
+"rcmd pop}def/@setpagedevice{pop<<>>/setpagedevice sysexec matrix setmatrix new"
+"path 0(setpagedevice)prcmd}def/@checknulldev{@GD/@nulldev get{currentpagedevic"
+"e maxlength 0 ne{@GD/@nulldev false put 0 1(setnulldevice)prcmd}if}if}def/prco"
+"lor{currentcolorspace @setcolorspace currentrgbcolor 3(setrgbcolor)prcmd}def/p"
+"rintgstate{@dodraw @GD/@nulldev get not and{matrix currentmatrix aload pop 6(s"
+"etmatrix)prcmd applyscalevals currentlinewidth 1(setlinewidth)prcmd currentlin"
+"ecap 1(setlinecap)prcmd currentlinejoin 1(setlinejoin)prcmd currentmiterlimit "
+"1(setmiterlimit)prcmd revision dup 952 lt{pop}{.currentblendmode .setblendmode"
+" 952 eq{.currentopacityalpha .setopacityalpha .currentshapealpha .setshapealph"
+"a}{.currentalphaisshape{1}{0}ifelse 1(setalphaisshape)prcmd .currentstrokecons"
+"tantalpha 1(setstrokeconstantalpha)prcmd .currentfillconstantalpha 1(setfillco"
+"nstantalpha)prcmd}ifelse}ifelse prcolor currentdash mark 3 1 roll exch aload l"
+"ength 1 add -1 roll counttomark(setdash)prcmd pop}if}def/strconcat{exch dup le"
+"ngth 2 index length add string dup dup 4 2 roll copy length 4 -1 roll putinter"
+"val}def/setgstate{/setgstate sysexec printgstate}def/save{@UD begin/@saveID vm"
+"status pop pop def end :save @saveID 1(save)prcmd}def/restore{:restore @checkn"
+"ulldev printgstate @UD/@saveID known{@UD begin @saveID end}{0}ifelse 1(restore"
+")prcmd}def/gsave 0 defpr/grestore{:grestore @checknulldev printgstate 0(gresto"
+"re)prcmd}def/grestoreall{:grestoreall @checknulldev setstate 0(grestoreall)prc"
+"md}def/rotate{dup type/arraytype ne @dodraw and{dup 1(rotate)prcmd}if/rotate s"
+"ysexec applyscalevals}def/scale{dup type/arraytype ne @dodraw and{2 copy 2(sca"
+"le)prcmd}if/scale sysexec applyscalevals}def/translate{dup type/arraytype ne @"
+"dodraw and{2 copy 2(translate)prcmd}if/translate sysexec}def/setmatrix{dup/set"
+"matrix sysexec @dodraw{aload pop 6(setmatrix)prcmd applyscalevals}{pop}ifelse}"
+"def/initmatrix{matrix setmatrix}def/concat{matrix currentmatrix matrix concatm"
+"atrix setmatrix}def/makepattern{gsave<</mx 3 -1 roll>>begin<</XUID[1000000 @pa"
+"tcnt]>>copy mx/makepattern sysexec dup begin PatternType 2 lt{PatternType @pat"
+"cnt BBox aload pop XStep YStep PaintType mx aload pop 15(makepattern)prcmd :ne"
+"wpath matrix setmatrix dup PaintProc 0 1(makepattern)prcmd @GD/@patcnt @patcnt"
+" 1 add put}if end end grestore}def/setpattern{dup begin PatternType end 1 eq{b"
+"egin PaintType 1 eq{XUID aload pop exch pop 1}{:gsave[currentcolorspace aload "
+"length -1 roll pop]/setcolorspace sysexec/setcolor sysexec XUID aload pop exch"
+" pop currentrgbcolor :grestore 4}ifelse(setpattern)prcmd currentcolorspace 0 g"
+"et/Pattern ne{[/Pattern currentcolorspace]/setcolorspace sysexec}if currentcol"
+"orspace @setcolorspace end}{/setpattern sysexec}ifelse}def/setcolor{dup type/d"
+"icttype eq{setpattern}{/setcolor sysexec/currentrgbcolor sysexec setrgbcolor}i"
+"felse}def/setcolorspace{dup/setcolorspace sysexec @setcolorspace}def/@setcolor"
+"space{dup type/arraytype eq{0 get}if/Pattern eq{1}{0}ifelse 1(setcolorspace)pr"
+"cmd}def/setgray 1 defpr/setcmykcolor 4 defpr/sethsbcolor 3 defpr/setrgbcolor 3"
+" defpr/.setalphaisshape{@SD/.setalphaisshape known{dup/.setalphaisshape sysexe"
+"c}if{1}{0}ifelse 1(setalphaisshape)prcmd}bind def/.setfillconstantalpha{@SD/.s"
+"etfillconstantalpha known{dup/.setfillconstantalpha sysexec}if 1(setfillconsta"
+"ntalpha)prcmd}bind def/.setstrokeconstantalpha{@SD/.setstrokeconstantalpha kno"
+"wn{dup/.setstrokeconstantalpha sysexec}if 1(setstrokeconstantalpha)prcmd}bind "
+"def/.setopacityalpha{false .setalphaisshape dup .setfillconstantalpha .setstro"
+"keconstantalpha}bind def/.setshapealpha{true .setalphaisshape dup .setfillcons"
+"tantalpha .setstrokeconstantalpha}bind def/.setblendmode{dup/.setblendmode sys"
+"exec<</Normal 0/Compatible 0/Multiply 1/Screen 2/Overlay 3/SoftLight 4/HardLig"
+"ht 5/ColorDodge 6/ColorBurn 7/Darken 8/Lighten 9/Difference 10/Exclusion 11/Hu"
+"e 12/Saturation 13/Color 14/Luminosity 15/CompatibleOverprint 16>>exch get 1(s"
+"etblendmode)prcmd}def/@pdfpagecount{(r)file runpdfbegin pdfpagecount runpdfend"
+"}def/@pdfpagebox{(r)file runpdfbegin dup dup 1 lt exch pdfpagecount gt or{pop}"
+"{pdfgetpage/MediaBox pget pop aload pop}ifelse runpdfend}def DELAYBIND{.bindno"
+"w}if ";
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.am
index 6275714ff19..60883f64cc2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.am
@@ -22,5 +22,4 @@ include ../../libs/defs.am
AM_CXXFLAGS = \
-I$(dvisvgm_srcdir)/libs/boost \
-I$(dvisvgm_srcdir)/libs/variant/include \
- $(ZLIB_INCLUDES) \
$(BROTLI_CFLAGS) $(WOFF2_CFLAGS)
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.in
index 8312cc60d6e..e36f65ca31d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.in
@@ -90,6 +90,8 @@ build_triplet = @build@
host_triplet = @host@
@HAVE_BROTLI_FALSE@am__append_1 = -I$(dvisvgm_srcdir)/libs/brotli/include
@HAVE_BROTLI_FALSE@am__append_2 = ../libs/brotli/libbrotli.a
+# POTRACE_CFLAGS = -I$(dvisvgm_srcdir)/libs/potrace
+# POTRACE_LIBS = ../libs/potrace/libpotrace.a
@HAVE_WOFF2_FALSE@am__append_3 = -I$(dvisvgm_srcdir)/libs/woff2/include
@HAVE_WOFF2_FALSE@am__append_4 = ../libs/woff2/libwoff2.a
subdir = dvisvgm-src/src/ttf
@@ -388,15 +390,12 @@ libttf_la_SOURCES = \
VheaTable.hpp VheaTable.cpp \
VmtxTable.hpp VmtxTable.cpp
-@HAVE_POTRACE_FALSE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
-#
@TEXLIVE_BUILD_TRUE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
@HAVE_XXHASH_FALSE@XXHASH_CFLAGS = -I$(dvisvgm_srcdir)/libs/xxHash
@HAVE_XXHASH_FALSE@XXHASH_LIBS = ../libs/xxHash/libxxhash.a
AM_CXXFLAGS = \
-I$(dvisvgm_srcdir)/libs/boost \
-I$(dvisvgm_srcdir)/libs/variant/include \
- $(ZLIB_INCLUDES) \
$(BROTLI_CFLAGS) $(WOFF2_CFLAGS)
all: all-am