diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-03-02 12:19:42 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-03-02 12:19:42 +0000 |
commit | 23761134624d629d1081b32e8a00884302d791ab (patch) | |
tree | 01939640cb3f8d213c1b8c05aee6bab411c6efb1 /Build | |
parent | 51c9a94fd776a8e05918e60d2c29851b936c0b07 (diff) |
dvisvgm 1.2
git-svn-id: svn://tug.org/texlive/trunk@29269 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/README | 4 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/Makefile.am | 16 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/Makefile.in | 74 | ||||
-rwxr-xr-x | Build/source/texk/dvisvgm/configure | 26 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.1/src/CommandLine.cpp | 319 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.1/src/Makefile.am | 51 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.1/src/psdefs.psc | 75 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2-PATCHES/TL-Changes (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1-PATCHES/TL-Changes) | 4 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/AUTHORS (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/AUTHORS) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/COPYING (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/COPYING) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/INSTALL (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/INSTALL) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/LGPL-2.1.txt (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/LGPL-2.1.txt) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/Makefile.am (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/Makefile.am) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/NEWS (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/NEWS) | 10 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/README (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/README) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/config.h.in (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/config.h.in) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/config.rpath (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/config.rpath) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/configure.ac (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/configure.ac) | 4 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/doc/Makefile.am (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/doc/Makefile.am) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/doc/dvisvgm.1 (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/doc/dvisvgm.1) | 79 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/doc/dvisvgm.txt.in (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/doc/dvisvgm.txt.in) | 67 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/Makefile.am (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/Makefile.am) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/auxiliary.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/auxiliary.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/bitmap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/bitmap.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/curve.c (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/curve.c) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/curve.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/curve.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/decompose.c (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/decompose.c) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/decompose.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/decompose.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/lists.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/lists.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/potracelib.c (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/potracelib.c) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/potracelib.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/potracelib.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/progress.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/progress.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/trace.c (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/trace.c) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/trace.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/trace.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/BgColorSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/BgColorSpecialHandler.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/BgColorSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/BgColorSpecialHandler.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Bitmap.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Bitmap.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Bitmap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Bitmap.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/BoundingBox.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/BoundingBox.cpp) | 3 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/BoundingBox.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/BoundingBox.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/CRC32.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/CRC32.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/CRC32.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/CRC32.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Calculator.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Calculator.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Calculator.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Calculator.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/CmdLineParserBase.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/CmdLineParserBase.cpp) | 63 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/CmdLineParserBase.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/CmdLineParserBase.h) | 7 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Color.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Color.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Color.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Color.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/ColorSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/ColorSpecialHandler.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/ColorSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/ColorSpecialHandler.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/CommandLine.cpp | 297 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/CommandLine.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/CommandLine.h) | 21 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DLLoader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DLLoader.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DLLoader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DLLoader.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIActions.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIActions.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIActions.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIReader.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIReader.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVG.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVG.cpp) | 3 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVG.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVG.h) | 13 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVGActions.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVGActions.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVGActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVGActions.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Directory.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Directory.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Directory.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Directory.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DvisvgmSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DvisvgmSpecialHandler.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/DvisvgmSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/DvisvgmSpecialHandler.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSFile.cpp | 114 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSFile.h | 46 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSToSVG.cpp | 74 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSToSVG.h | 65 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/EmSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/EmSpecialHandler.cpp) | 9 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/EmSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/EmSpecialHandler.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileFinder.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileFinder.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileFinder.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileFinder.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FilePath.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FilePath.cpp) | 1 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FilePath.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FilePath.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileSystem.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileSystem.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileSystem.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileSystem.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Font.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Font.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Font.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Font.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontCache.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontCache.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontCache.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontCache.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEncoding.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEncoding.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEncoding.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEncoding.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEngine.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEngine.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEngine.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEngine.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontManager.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontManager.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontManager.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontManager.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontMap.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontMap.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontMap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontMap.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFGlyphTracer.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFGlyphTracer.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFGlyphTracer.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFGlyphTracer.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFReader.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFReader.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFTracer.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFTracer.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFTracer.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFTracer.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Ghostscript.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Ghostscript.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Ghostscript.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Ghostscript.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Glyph.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Glyph.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/GlyphTracerMessages.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/GlyphTracerMessages.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/GraphicPath.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/GraphicPath.h) | 17 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputBuffer.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputBuffer.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputBuffer.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputBuffer.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputReader.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputReader.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Length.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Length.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Length.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Length.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Makefile.am | 52 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/MapLine.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/MapLine.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/MapLine.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/MapLine.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Matrix.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Matrix.cpp) | 21 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Matrix.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Matrix.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Message.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Message.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Message.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Message.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/MessageException.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/MessageException.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/MetafontWrapper.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/MetafontWrapper.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/MetafontWrapper.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/MetafontWrapper.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/MiKTeXCom.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/MiKTeXCom.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/MiKTeXCom.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/MiKTeXCom.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSInterpreter.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/PSInterpreter.cpp) | 86 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSInterpreter.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/PSInterpreter.h) | 12 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSPattern.cpp | 178 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSPattern.h | 100 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageRanges.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageRanges.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageRanges.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageRanges.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageSize.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageSize.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageSize.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageSize.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Pair.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Pair.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PdfSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/PdfSpecialHandler.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PdfSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/PdfSpecialHandler.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Process.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Process.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Process.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Process.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PsSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/PsSpecialHandler.cpp) | 175 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/PsSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/PsSpecialHandler.h) | 10 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/SVGOutputBase.h | 33 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/SVGTree.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/SVGTree.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/SVGTree.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/SVGTree.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/SignalHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/SignalHandler.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/SignalHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/SignalHandler.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialActions.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialHandler.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialManager.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialManager.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialManager.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialManager.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamReader.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamReader.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamWriter.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamWriter.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamWriter.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamWriter.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Subfont.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Subfont.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Subfont.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Subfont.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/System.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/System.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/System.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/System.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/TFM.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/TFM.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/TFM.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/TFM.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Terminal.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Terminal.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/Terminal.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/Terminal.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/TpicSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/TpicSpecialHandler.cpp) | 38 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/TpicSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/TpicSpecialHandler.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/VFActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/VFActions.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/VFReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/VFReader.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/VFReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/VFReader.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/VectorStream.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/VectorStream.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLDocTypeNode.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLDocTypeNode.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLDocument.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLDocument.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLDocument.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLDocument.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLNode.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLNode.cpp) | 44 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLNode.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLNode.h) | 10 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLString.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLString.cpp) | 32 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLString.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLString.h) | 2 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/dvisvgm.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/dvisvgm.cpp) | 81 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/gzstream.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/gzstream.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/gzstream.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/gzstream.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/iapi.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/iapi.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/ierrors.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/ierrors.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/macros.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/macros.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/options.xml (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/options.xml) | 10 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/psdefs.cpp | 84 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/src/types.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/src/types.h) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/BoundingBoxTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/BoundingBoxTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/CRC32Test.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/CRC32Test.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/CalculatorTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/CalculatorTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/ColorSpecialTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/ColorSpecialTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/CommandLineTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/CommandLineTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/DirectoryTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/DirectoryTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FileFinderTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FileFinderTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FilePathTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FilePathTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FileSystemTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FileSystemTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FontManagerTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FontManagerTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FontMapTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FontMapTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/GFReaderTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/GFReaderTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/GraphicPathTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/GraphicPathTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/LengthTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/LengthTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/Makefile.am (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/Makefile.am) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/MapLineTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/MapLineTest.cpp) | 26 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/MatrixTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/MatrixTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/MessageExceptionTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/MessageExceptionTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PSInterpreterTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PSInterpreterTest.cpp) | 2 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PageRagesTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PageRagesTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PageSizeTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PageSizeTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PairTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PairTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/SplittedCharInputBufferTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/SplittedCharInputBufferTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/StreamInputBufferTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/StreamInputBufferTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/StreamReaderTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/StreamReaderTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/StreamWriterTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/StreamWriterTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/SubfontTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/SubfontTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/TypesTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/TypesTest.cpp) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/VectorStreamTest.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/VectorStreamTest.cpp) | 0 | ||||
-rwxr-xr-x | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/check-conv (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/check-conv) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/cmr10.600gf (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/cmr10.600gf) | bin | 24244 -> 24244 bytes | |||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/frktest-nf-cmp.svg (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/frktest-nf-cmp.svg) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/frktest-wf-cmp.svg (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/frktest-wf-cmp.svg) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/frktest.dvi (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/frktest.dvi) | bin | 2072 -> 2072 bytes | |||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/normalize.xsl (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/normalize.xsl) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample-nf-cmp.svg (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample-nf-cmp.svg) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample-wf-cmp.svg (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample-wf-cmp.svg) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample.dvi (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample.dvi) | bin | 1320 -> 1320 bytes | |||
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample.sfd (renamed from Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample.sfd) | 0 | ||||
-rw-r--r-- | Build/source/texk/dvisvgm/version.ac | 2 |
218 files changed, 1718 insertions, 747 deletions
diff --git a/Build/source/texk/README b/Build/source/texk/README index 15c9c890c77..1e1326bb9b9 100644 --- a/Build/source/texk/README +++ b/Build/source/texk/README @@ -59,8 +59,8 @@ dvipos - ? dvipsk - maintained here, by us -dvisvgm - checked 30jan13 - http://downloads.sourceforge.net/dvisvgm/dvisvgm-1.1.tar.gz +dvisvgm - checked 2mar13 + http://downloads.sourceforge.net/dvisvgm/dvisvgm-1.2.tar.gz gsftopk - from Paul Vojta's xdvi? diff --git a/Build/source/texk/dvisvgm/ChangeLog b/Build/source/texk/dvisvgm/ChangeLog index e224a3db97b..fff925a270f 100644 --- a/Build/source/texk/dvisvgm/ChangeLog +++ b/Build/source/texk/dvisvgm/ChangeLog @@ -1,3 +1,8 @@ +2013-03-02 Peter Breitenlohner <peb@mppmu.mpg.de> + + * Imported release 1.2. + * Makefile.am, version.ac: Adapted. + 2013-01-29 Peter Breitenlohner <peb@mppmu.mpg.de> * Imported release 1.1. diff --git a/Build/source/texk/dvisvgm/Makefile.am b/Build/source/texk/dvisvgm/Makefile.am index daa51a0f931..b5278f032c4 100644 --- a/Build/source/texk/dvisvgm/Makefile.am +++ b/Build/source/texk/dvisvgm/Makefile.am @@ -62,12 +62,14 @@ nodist_libdvisvgm_a_SOURCES = \ @DVISVGM_TREE@/src/Color.cpp \ @DVISVGM_TREE@/src/ColorSpecialHandler.cpp \ @DVISVGM_TREE@/src/CommandLine.cpp \ - @DVISVGM_TREE@/src/Directory.cpp \ @DVISVGM_TREE@/src/DVIActions.cpp \ @DVISVGM_TREE@/src/DVIReader.cpp \ - @DVISVGM_TREE@/src/DvisvgmSpecialHandler.cpp \ @DVISVGM_TREE@/src/DVIToSVG.cpp \ @DVISVGM_TREE@/src/DVIToSVGActions.cpp \ + @DVISVGM_TREE@/src/Directory.cpp \ + @DVISVGM_TREE@/src/DvisvgmSpecialHandler.cpp \ + @DVISVGM_TREE@/src/EPSFile.cpp \ + @DVISVGM_TREE@/src/EPSToSVG.cpp \ @DVISVGM_TREE@/src/EmSpecialHandler.cpp \ @DVISVGM_TREE@/src/FileFinder.cpp \ @DVISVGM_TREE@/src/FilePath.cpp \ @@ -89,21 +91,23 @@ nodist_libdvisvgm_a_SOURCES = \ @DVISVGM_TREE@/src/Matrix.cpp \ @DVISVGM_TREE@/src/Message.cpp \ @DVISVGM_TREE@/src/MetafontWrapper.cpp \ + @DVISVGM_TREE@/src/PSInterpreter.cpp \ + @DVISVGM_TREE@/src/PSPattern.cpp \ + @DVISVGM_TREE@/src/PdfSpecialHandler.cpp \ @DVISVGM_TREE@/src/PageRanges.cpp \ @DVISVGM_TREE@/src/PageSize.cpp \ @DVISVGM_TREE@/src/Process.cpp \ - @DVISVGM_TREE@/src/PSInterpreter.cpp \ - @DVISVGM_TREE@/src/PdfSpecialHandler.cpp \ @DVISVGM_TREE@/src/PsSpecialHandler.cpp \ + @DVISVGM_TREE@/src/psdefs.cpp \ + @DVISVGM_TREE@/src/SVGTree.cpp \ @DVISVGM_TREE@/src/SignalHandler.cpp \ @DVISVGM_TREE@/src/SpecialManager.cpp \ @DVISVGM_TREE@/src/StreamReader.cpp \ @DVISVGM_TREE@/src/StreamWriter.cpp \ - @DVISVGM_TREE@/src/SVGTree.cpp \ @DVISVGM_TREE@/src/Subfont.cpp \ @DVISVGM_TREE@/src/System.cpp \ - @DVISVGM_TREE@/src/Terminal.cpp \ @DVISVGM_TREE@/src/TFM.cpp \ + @DVISVGM_TREE@/src/Terminal.cpp \ @DVISVGM_TREE@/src/TpicSpecialHandler.cpp \ @DVISVGM_TREE@/src/VFReader.cpp \ @DVISVGM_TREE@/src/XMLDocument.cpp \ diff --git a/Build/source/texk/dvisvgm/Makefile.in b/Build/source/texk/dvisvgm/Makefile.in index 52565aa55b4..a1277c58205 100644 --- a/Build/source/texk/dvisvgm/Makefile.in +++ b/Build/source/texk/dvisvgm/Makefile.in @@ -112,12 +112,14 @@ nodist_libdvisvgm_a_OBJECTS = \ @DVISVGM_TREE@/src/Color.$(OBJEXT) \ @DVISVGM_TREE@/src/ColorSpecialHandler.$(OBJEXT) \ @DVISVGM_TREE@/src/CommandLine.$(OBJEXT) \ - @DVISVGM_TREE@/src/Directory.$(OBJEXT) \ @DVISVGM_TREE@/src/DVIActions.$(OBJEXT) \ @DVISVGM_TREE@/src/DVIReader.$(OBJEXT) \ - @DVISVGM_TREE@/src/DvisvgmSpecialHandler.$(OBJEXT) \ @DVISVGM_TREE@/src/DVIToSVG.$(OBJEXT) \ @DVISVGM_TREE@/src/DVIToSVGActions.$(OBJEXT) \ + @DVISVGM_TREE@/src/Directory.$(OBJEXT) \ + @DVISVGM_TREE@/src/DvisvgmSpecialHandler.$(OBJEXT) \ + @DVISVGM_TREE@/src/EPSFile.$(OBJEXT) \ + @DVISVGM_TREE@/src/EPSToSVG.$(OBJEXT) \ @DVISVGM_TREE@/src/EmSpecialHandler.$(OBJEXT) \ @DVISVGM_TREE@/src/FileFinder.$(OBJEXT) \ @DVISVGM_TREE@/src/FilePath.$(OBJEXT) \ @@ -139,21 +141,23 @@ nodist_libdvisvgm_a_OBJECTS = \ @DVISVGM_TREE@/src/Matrix.$(OBJEXT) \ @DVISVGM_TREE@/src/Message.$(OBJEXT) \ @DVISVGM_TREE@/src/MetafontWrapper.$(OBJEXT) \ + @DVISVGM_TREE@/src/PSInterpreter.$(OBJEXT) \ + @DVISVGM_TREE@/src/PSPattern.$(OBJEXT) \ + @DVISVGM_TREE@/src/PdfSpecialHandler.$(OBJEXT) \ @DVISVGM_TREE@/src/PageRanges.$(OBJEXT) \ @DVISVGM_TREE@/src/PageSize.$(OBJEXT) \ @DVISVGM_TREE@/src/Process.$(OBJEXT) \ - @DVISVGM_TREE@/src/PSInterpreter.$(OBJEXT) \ - @DVISVGM_TREE@/src/PdfSpecialHandler.$(OBJEXT) \ @DVISVGM_TREE@/src/PsSpecialHandler.$(OBJEXT) \ + @DVISVGM_TREE@/src/psdefs.$(OBJEXT) \ + @DVISVGM_TREE@/src/SVGTree.$(OBJEXT) \ @DVISVGM_TREE@/src/SignalHandler.$(OBJEXT) \ @DVISVGM_TREE@/src/SpecialManager.$(OBJEXT) \ @DVISVGM_TREE@/src/StreamReader.$(OBJEXT) \ @DVISVGM_TREE@/src/StreamWriter.$(OBJEXT) \ - @DVISVGM_TREE@/src/SVGTree.$(OBJEXT) \ @DVISVGM_TREE@/src/Subfont.$(OBJEXT) \ @DVISVGM_TREE@/src/System.$(OBJEXT) \ - @DVISVGM_TREE@/src/Terminal.$(OBJEXT) \ @DVISVGM_TREE@/src/TFM.$(OBJEXT) \ + @DVISVGM_TREE@/src/Terminal.$(OBJEXT) \ @DVISVGM_TREE@/src/TpicSpecialHandler.$(OBJEXT) \ @DVISVGM_TREE@/src/VFReader.$(OBJEXT) \ @DVISVGM_TREE@/src/XMLDocument.$(OBJEXT) \ @@ -482,12 +486,13 @@ nodist_libdvisvgm_a_SOURCES = \ @DVISVGM_TREE@/src/Color.cpp \ @DVISVGM_TREE@/src/ColorSpecialHandler.cpp \ @DVISVGM_TREE@/src/CommandLine.cpp \ - @DVISVGM_TREE@/src/Directory.cpp \ @DVISVGM_TREE@/src/DVIActions.cpp \ @DVISVGM_TREE@/src/DVIReader.cpp \ - @DVISVGM_TREE@/src/DvisvgmSpecialHandler.cpp \ @DVISVGM_TREE@/src/DVIToSVG.cpp \ @DVISVGM_TREE@/src/DVIToSVGActions.cpp \ + @DVISVGM_TREE@/src/Directory.cpp \ + @DVISVGM_TREE@/src/DvisvgmSpecialHandler.cpp \ + @DVISVGM_TREE@/src/EPSFile.cpp @DVISVGM_TREE@/src/EPSToSVG.cpp \ @DVISVGM_TREE@/src/EmSpecialHandler.cpp \ @DVISVGM_TREE@/src/FileFinder.cpp \ @DVISVGM_TREE@/src/FilePath.cpp \ @@ -505,18 +510,19 @@ nodist_libdvisvgm_a_SOURCES = \ @DVISVGM_TREE@/src/Length.cpp @DVISVGM_TREE@/src/MapLine.cpp \ @DVISVGM_TREE@/src/Matrix.cpp @DVISVGM_TREE@/src/Message.cpp \ @DVISVGM_TREE@/src/MetafontWrapper.cpp \ - @DVISVGM_TREE@/src/PageRanges.cpp \ - @DVISVGM_TREE@/src/PageSize.cpp @DVISVGM_TREE@/src/Process.cpp \ @DVISVGM_TREE@/src/PSInterpreter.cpp \ + @DVISVGM_TREE@/src/PSPattern.cpp \ @DVISVGM_TREE@/src/PdfSpecialHandler.cpp \ + @DVISVGM_TREE@/src/PageRanges.cpp \ + @DVISVGM_TREE@/src/PageSize.cpp @DVISVGM_TREE@/src/Process.cpp \ @DVISVGM_TREE@/src/PsSpecialHandler.cpp \ + @DVISVGM_TREE@/src/psdefs.cpp @DVISVGM_TREE@/src/SVGTree.cpp \ @DVISVGM_TREE@/src/SignalHandler.cpp \ @DVISVGM_TREE@/src/SpecialManager.cpp \ @DVISVGM_TREE@/src/StreamReader.cpp \ @DVISVGM_TREE@/src/StreamWriter.cpp \ - @DVISVGM_TREE@/src/SVGTree.cpp @DVISVGM_TREE@/src/Subfont.cpp \ - @DVISVGM_TREE@/src/System.cpp @DVISVGM_TREE@/src/Terminal.cpp \ - @DVISVGM_TREE@/src/TFM.cpp \ + @DVISVGM_TREE@/src/Subfont.cpp @DVISVGM_TREE@/src/System.cpp \ + @DVISVGM_TREE@/src/TFM.cpp @DVISVGM_TREE@/src/Terminal.cpp \ @DVISVGM_TREE@/src/TpicSpecialHandler.cpp \ @DVISVGM_TREE@/src/VFReader.cpp \ @DVISVGM_TREE@/src/XMLDocument.cpp \ @@ -619,22 +625,28 @@ clean-noinstLIBRARIES: @DVISVGM_TREE@/src/CommandLine.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) -@DVISVGM_TREE@/src/Directory.$(OBJEXT): \ - @DVISVGM_TREE@/src/$(am__dirstamp) \ - @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @DVISVGM_TREE@/src/DVIActions.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @DVISVGM_TREE@/src/DVIReader.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@DVISVGM_TREE@/src/DVIToSVG.$(OBJEXT): \ + @DVISVGM_TREE@/src/$(am__dirstamp) \ + @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@DVISVGM_TREE@/src/DVIToSVGActions.$(OBJEXT): \ + @DVISVGM_TREE@/src/$(am__dirstamp) \ + @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@DVISVGM_TREE@/src/Directory.$(OBJEXT): \ + @DVISVGM_TREE@/src/$(am__dirstamp) \ + @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @DVISVGM_TREE@/src/DvisvgmSpecialHandler.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) -@DVISVGM_TREE@/src/DVIToSVG.$(OBJEXT): \ +@DVISVGM_TREE@/src/EPSFile.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) -@DVISVGM_TREE@/src/DVIToSVGActions.$(OBJEXT): \ +@DVISVGM_TREE@/src/EPSToSVG.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @DVISVGM_TREE@/src/EmSpecialHandler.$(OBJEXT): \ @@ -699,6 +711,15 @@ clean-noinstLIBRARIES: @DVISVGM_TREE@/src/MetafontWrapper.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@DVISVGM_TREE@/src/PSInterpreter.$(OBJEXT): \ + @DVISVGM_TREE@/src/$(am__dirstamp) \ + @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@DVISVGM_TREE@/src/PSPattern.$(OBJEXT): \ + @DVISVGM_TREE@/src/$(am__dirstamp) \ + @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@DVISVGM_TREE@/src/PdfSpecialHandler.$(OBJEXT): \ + @DVISVGM_TREE@/src/$(am__dirstamp) \ + @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @DVISVGM_TREE@/src/PageRanges.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @@ -708,13 +729,13 @@ clean-noinstLIBRARIES: @DVISVGM_TREE@/src/Process.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) -@DVISVGM_TREE@/src/PSInterpreter.$(OBJEXT): \ +@DVISVGM_TREE@/src/PsSpecialHandler.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) -@DVISVGM_TREE@/src/PdfSpecialHandler.$(OBJEXT): \ +@DVISVGM_TREE@/src/psdefs.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) -@DVISVGM_TREE@/src/PsSpecialHandler.$(OBJEXT): \ +@DVISVGM_TREE@/src/SVGTree.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @DVISVGM_TREE@/src/SignalHandler.$(OBJEXT): \ @@ -729,20 +750,17 @@ clean-noinstLIBRARIES: @DVISVGM_TREE@/src/StreamWriter.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) -@DVISVGM_TREE@/src/SVGTree.$(OBJEXT): \ - @DVISVGM_TREE@/src/$(am__dirstamp) \ - @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @DVISVGM_TREE@/src/Subfont.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @DVISVGM_TREE@/src/System.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@DVISVGM_TREE@/src/TFM.$(OBJEXT): @DVISVGM_TREE@/src/$(am__dirstamp) \ + @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @DVISVGM_TREE@/src/Terminal.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) -@DVISVGM_TREE@/src/TFM.$(OBJEXT): @DVISVGM_TREE@/src/$(am__dirstamp) \ - @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @DVISVGM_TREE@/src/TpicSpecialHandler.$(OBJEXT): \ @DVISVGM_TREE@/src/$(am__dirstamp) \ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp) @@ -874,6 +892,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/DVIToSVGActions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/Directory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/DvisvgmSpecialHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/EPSFile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/EPSToSVG.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/EmSpecialHandler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/FileFinder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/FilePath.Po@am__quote@ @@ -896,6 +916,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/Message.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/MetafontWrapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/PSInterpreter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/PSPattern.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/PageRanges.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/PageSize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/PdfSpecialHandler.Po@am__quote@ @@ -917,6 +938,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/XMLString.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/dvisvgm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/gzstream.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/psdefs.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ diff --git a/Build/source/texk/dvisvgm/configure b/Build/source/texk/dvisvgm/configure index 79e99025962..f660fa5893d 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.69 for dvisvgm 1.1. +# Generated by GNU Autoconf 2.69 for dvisvgm 1.2. # # Report bugs to <tex-k@tug.org>. # @@ -590,12 +590,12 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dvisvgm' PACKAGE_TARNAME='dvisvgm' -PACKAGE_VERSION='1.1' -PACKAGE_STRING='dvisvgm 1.1' +PACKAGE_VERSION='1.2' +PACKAGE_STRING='dvisvgm 1.2' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' -ac_unique_file="dvisvgm-1.1/src/dvisvgm.cpp" +ac_unique_file="dvisvgm-1.2/src/dvisvgm.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> @@ -1362,7 +1362,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 1.1 to adapt to many kinds of systems. +\`configure' configures dvisvgm 1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dvisvgm 1.1:";; + short | recursive ) echo "Configuration of dvisvgm 1.2:";; esac cat <<\_ACEOF @@ -1564,7 +1564,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dvisvgm configure 1.1 +dvisvgm configure 1.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2386,7 +2386,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 $as_me 1.1, which was +It was created by dvisvgm $as_me 1.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -7818,7 +7818,7 @@ fi # Define the identity of the package. PACKAGE='dvisvgm' - VERSION='1.1' + VERSION='1.2' cat >>confdefs.h <<_ACEOF @@ -17528,7 +17528,7 @@ Usage: $0 [OPTIONS] Report bugs to <bug-libtool@gnu.org>." lt_cl_version="\ -dvisvgm config.lt 1.1 +dvisvgm config.lt 1.2 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -19207,7 +19207,7 @@ CPPFLAGS=$kpse_save_CPPFLAGS LIBS=$kpse_save_LIBS -DVISVGM_TREE=dvisvgm-1.1 +DVISVGM_TREE=dvisvgm-1.2 ac_config_files="$ac_config_files Makefile" @@ -19759,7 +19759,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 $as_me 1.1, which was +This file was extended by dvisvgm $as_me 1.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19825,7 +19825,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dvisvgm config.status 1.1 +dvisvgm config.status 1.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CommandLine.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CommandLine.cpp deleted file mode 100644 index 4b11bc3e9fd..00000000000 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CommandLine.cpp +++ /dev/null @@ -1,319 +0,0 @@ -// This file was automatically generated by opt2cpp. -// It is part of the dvisvgm package and published under the terms -// of the GNU General Public License version 3, or (at your option) any later version. -// See file COPYING for further details. -// (C) 2009-2013 Martin Gieseking <martin.gieseking@uos.de> - -#include <cstdio> -#include <iostream> -#include <iomanip> -#include "InputReader.h" -#include "CommandLine.h" - -using namespace std; - -const CmdLineParserBase::Option CommandLine::_options[] = { - {'b', "bbox", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_bbox)}, - {'C', "cache", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_cache)}, - {'\0', "color", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_color)}, - {'e', "exact", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_exact)}, - {'m', "fontmap", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_fontmap)}, - {'h', "help", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_help)}, - {'\0', "keep", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_keep)}, -#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) - {'\0', "libgs", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_libgs)}, -#endif - {'l', "list-specials", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_list_specials)}, - {'M', "mag", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_mag)}, - {'n', "no-fonts", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_fonts)}, - {'\0', "no-mktexmf", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_mktexmf)}, - {'S', "no-specials", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_specials)}, - {'\0', "no-styles", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_styles)}, - {'o', "output", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_output)}, - {'p', "page", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_page)}, - {'P', "progress", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_progress)}, - {'r', "rotate", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_rotate)}, - {'c', "scale", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_scale)}, - {'s', "stdout", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_stdout)}, - {'a', "trace-all", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_trace_all)}, - {'T', "transform", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_transform)}, - {'t', "translate", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_translate)}, - {'v', "verbosity", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_verbosity)}, - {'V', "version", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_version)}, - {'z', "zip", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_zip)}, - {0, 0, 0, 0} -}; - -void CommandLine::init () { - CmdLineParserBase::init(); - _bbox_given = false; - _cache_given = false; - _color_given = false; - _exact_given = false; - _fontmap_given = false; - _help_given = false; - _keep_given = false; -#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) - _libgs_given = false; -#endif - _list_specials_given = false; - _mag_given = false; - _no_fonts_given = false; - _no_mktexmf_given = false; - _no_specials_given = false; - _no_styles_given = false; - _output_given = false; - _page_given = false; - _progress_given = false; - _rotate_given = false; - _scale_given = false; - _stdout_given = false; - _trace_all_given = false; - _transform_given = false; - _translate_given = false; - _verbosity_given = false; - _version_given = false; - _zip_given = false; - - _bbox_arg = "min"; - _cache_arg.clear(); - _fontmap_arg.clear(); -#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) - _libgs_arg.clear(); -#endif - _mag_arg = 4; - _no_fonts_arg = 0; - _no_specials_arg.clear(); - _output_arg.clear(); - _page_arg = "1"; - _progress_arg = 0.5; - _rotate_arg = 0; - _scale_arg.clear(); - _trace_all_arg = false; - _transform_arg.clear(); - _translate_arg.clear(); - _verbosity_arg = 7; - _version_arg = false; - _zip_arg = 9; -} - -void CommandLine::help () const { - puts("This program converts DVI files, as created by TeX/LaTeX, to\nthe XML-based scalable vector graphics format SVG.\n\nUsage: dvisvgm [options] dvifile\n"); - puts("Input options:"); - puts(" -p, --page=ranges choose pages to convert [1]"); - puts(" -m, --fontmap=filenames evaluate (additional) font map files"); - puts("\nSVG output options:"); - puts(" -b, --bbox=size set size of bounding box [min]"); - puts(" -o, --output=pattern set name pattern of output files"); - puts(" -s, --stdout write SVG output to stdout"); - puts(" -n, --no-fonts[=variant] draw glyphs by using path elements [0]"); - puts(" --no-styles don't use styles to reference fonts"); - puts(" -z, --zip[=level] create compressed .svgz file [9]"); - puts("\nSVG transformations:"); - puts(" -r, --rotate=angle rotate page content clockwise"); - puts(" -c, --scale=sx[,sy] scale page content"); - puts(" -t, --translate=tx[,ty] shift page content"); - puts(" -T, --transform=commands transform page content"); - puts("\nProcessing options:"); - puts(" -C, --cache[=dir] set/print path of cache directory"); - puts(" -e, --exact compute exact glyph boxes"); - puts(" --keep keep temporary files"); -#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) - puts(" --libgs=filename set name of Ghostscript shared library"); -#endif - puts(" -M, --mag=factor magnification of Metafont output [4]"); - puts(" --no-mktexmf don't try to create missing fonts"); - puts(" -S, --no-specials[=prefixes] don't process [selected] specials"); - puts(" -a, --trace-all[=retrace] trace all glyphs of bitmap fonts [no]"); - puts("\nMessage options:"); - puts(" --color colorize messages"); - puts(" -h, --help print this help and exit"); - puts(" -l, --list-specials print supported special sets and exit"); - puts(" -P, --progress[=delay] enable progess indicator [0.5]"); - puts(" -v, --verbosity=level set verbosity level (0-7) [7]"); - puts(" -V, --version[=extended] print version and exit [no]"); -} - - -void CommandLine::handle_bbox(InputReader &ir, const Option &opt, bool longopt) { - if (getStringArg(ir, opt, longopt, _bbox_arg)) - _bbox_given = true; -} - - -void CommandLine::handle_cache(InputReader &ir, const Option &opt, bool longopt) { - if (ir.eof() || getStringArg(ir, opt, longopt, _cache_arg)) - _cache_given = true; -} - - -void CommandLine::handle_color(InputReader &ir, const Option &opt, bool longopt) { - _color_given = true; -} - - -void CommandLine::handle_exact(InputReader &ir, const Option &opt, bool longopt) { - _exact_given = true; -} - - -void CommandLine::handle_fontmap(InputReader &ir, const Option &opt, bool longopt) { - if (getStringArg(ir, opt, longopt, _fontmap_arg)) - _fontmap_given = true; -} - - -void CommandLine::handle_help(InputReader &ir, const Option &opt, bool longopt) { - _help_given = true; -} - - -void CommandLine::handle_keep(InputReader &ir, const Option &opt, bool longopt) { - _keep_given = true; -} - - -#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) -void CommandLine::handle_libgs(InputReader &ir, const Option &opt, bool longopt) { - if (getStringArg(ir, opt, longopt, _libgs_arg)) - _libgs_given = true; -} -#endif - - -void CommandLine::handle_list_specials(InputReader &ir, const Option &opt, bool longopt) { - _list_specials_given = true; -} - - -void CommandLine::handle_mag(InputReader &ir, const Option &opt, bool longopt) { - if (getDoubleArg(ir, opt, longopt, _mag_arg)) - _mag_given = true; -} - - -void CommandLine::handle_no_fonts(InputReader &ir, const Option &opt, bool longopt) { - if (ir.eof() || getIntArg(ir, opt, longopt, _no_fonts_arg)) - _no_fonts_given = true; -} - - -void CommandLine::handle_no_mktexmf(InputReader &ir, const Option &opt, bool longopt) { - _no_mktexmf_given = true; -} - - -void CommandLine::handle_no_specials(InputReader &ir, const Option &opt, bool longopt) { - if (ir.eof() || getStringArg(ir, opt, longopt, _no_specials_arg)) - _no_specials_given = true; -} - - -void CommandLine::handle_no_styles(InputReader &ir, const Option &opt, bool longopt) { - _no_styles_given = true; -} - - -void CommandLine::handle_output(InputReader &ir, const Option &opt, bool longopt) { - if (getStringArg(ir, opt, longopt, _output_arg)) - _output_given = true; -} - - -void CommandLine::handle_page(InputReader &ir, const Option &opt, bool longopt) { - if (getStringArg(ir, opt, longopt, _page_arg)) - _page_given = true; -} - - -void CommandLine::handle_progress(InputReader &ir, const Option &opt, bool longopt) { - if (ir.eof() || getDoubleArg(ir, opt, longopt, _progress_arg)) - _progress_given = true; -} - - -void CommandLine::handle_rotate(InputReader &ir, const Option &opt, bool longopt) { - if (getDoubleArg(ir, opt, longopt, _rotate_arg)) - _rotate_given = true; -} - - -void CommandLine::handle_scale(InputReader &ir, const Option &opt, bool longopt) { - if (getStringArg(ir, opt, longopt, _scale_arg)) - _scale_given = true; -} - - -void CommandLine::handle_stdout(InputReader &ir, const Option &opt, bool longopt) { - _stdout_given = true; -} - - -void CommandLine::handle_trace_all(InputReader &ir, const Option &opt, bool longopt) { - if (ir.eof() || getBoolArg(ir, opt, longopt, _trace_all_arg)) - _trace_all_given = true; -} - - -void CommandLine::handle_transform(InputReader &ir, const Option &opt, bool longopt) { - if (getStringArg(ir, opt, longopt, _transform_arg)) - _transform_given = true; -} - - -void CommandLine::handle_translate(InputReader &ir, const Option &opt, bool longopt) { - if (getStringArg(ir, opt, longopt, _translate_arg)) - _translate_given = true; -} - - -void CommandLine::handle_verbosity(InputReader &ir, const Option &opt, bool longopt) { - if (getUIntArg(ir, opt, longopt, _verbosity_arg)) - _verbosity_given = true; -} - - -void CommandLine::handle_version(InputReader &ir, const Option &opt, bool longopt) { - if (ir.eof() || getBoolArg(ir, opt, longopt, _version_arg)) - _version_given = true; -} - - -void CommandLine::handle_zip(InputReader &ir, const Option &opt, bool longopt) { - if (ir.eof() || getIntArg(ir, opt, longopt, _zip_arg)) - _zip_given = true; -} - - -void CommandLine::status () const { - cout << 'b'<< setw(20) << "bbox " << bbox_given() << setw(10) << bbox_arg() << endl; - cout << 'C'<< setw(20) << "cache " << cache_given() << setw(10) << cache_arg() << endl; - cout << ' '<< setw(20) << "color " << color_given() << endl; - cout << 'e'<< setw(20) << "exact " << exact_given() << endl; - cout << 'm'<< setw(20) << "fontmap " << fontmap_given() << setw(10) << fontmap_arg() << endl; - cout << 'h'<< setw(20) << "help " << help_given() << endl; - cout << ' '<< setw(20) << "keep " << keep_given() << endl; -#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) - cout << ' '<< setw(20) << "libgs " << libgs_given() << setw(10) << libgs_arg() << endl; -#endif - cout << 'l'<< setw(20) << "list-specials " << list_specials_given() << endl; - cout << 'M'<< setw(20) << "mag " << mag_given() << setw(10) << mag_arg() << endl; - cout << 'n'<< setw(20) << "no-fonts " << no_fonts_given() << setw(10) << no_fonts_arg() << endl; - cout << ' '<< setw(20) << "no-mktexmf " << no_mktexmf_given() << endl; - cout << 'S'<< setw(20) << "no-specials " << no_specials_given() << setw(10) << no_specials_arg() << endl; - cout << ' '<< setw(20) << "no-styles " << no_styles_given() << endl; - cout << 'o'<< setw(20) << "output " << output_given() << setw(10) << output_arg() << endl; - cout << 'p'<< setw(20) << "page " << page_given() << setw(10) << page_arg() << endl; - cout << 'P'<< setw(20) << "progress " << progress_given() << setw(10) << progress_arg() << endl; - cout << 'r'<< setw(20) << "rotate " << rotate_given() << setw(10) << rotate_arg() << endl; - cout << 'c'<< setw(20) << "scale " << scale_given() << setw(10) << scale_arg() << endl; - cout << 's'<< setw(20) << "stdout " << stdout_given() << endl; - cout << 'a'<< setw(20) << "trace-all " << trace_all_given() << setw(10) << trace_all_arg() << endl; - cout << 'T'<< setw(20) << "transform " << transform_given() << setw(10) << transform_arg() << endl; - cout << 't'<< setw(20) << "translate " << translate_given() << setw(10) << translate_arg() << endl; - cout << 'v'<< setw(20) << "verbosity " << verbosity_given() << setw(10) << verbosity_arg() << endl; - cout << 'V'<< setw(20) << "version " << version_given() << setw(10) << version_arg() << endl; - cout << 'z'<< setw(20) << "zip " << zip_given() << setw(10) << zip_arg() << endl; - CmdLineParserBase::status(); -} - diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Makefile.am deleted file mode 100644 index a98ceedbd35..00000000000 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -## This file is part of dvisvgm -## Copyright (C) 2005-2013 Martin Gieseking <martin.gieseking@uos.de> -## -## Process this file with automake. - -bin_PROGRAMS = dvisvgm -noinst_LIBRARIES = libdvisvgm.a - -dvisvgm_SOURCES = gzstream.h \ - dvisvgm.cpp gzstream.cpp - -dvisvgm_LDADD = $(noinst_LIBRARIES) @EXTRA_LIBS@ -dvisvgm_DEPENDENCIES = $(noinst_LIBRARIES) @EXTRA_LIBS@ - -libdvisvgm_a_SOURCES = Bitmap.h BoundingBox.h BgColorSpecialHandler.h Calculator.h CmdLineParserBase.h Color.h CRC32.h \ - ColorSpecialHandler.h CommandLine.h Directory.h DLLoader.h DVIActions.h DVIReader.h DvisvgmSpecialHandler.h DVIToSVG.h \ - DVIToSVGActions.h EmSpecialHandler.h FileFinder.h FilePath.h FileSystem.h Font.h FontCache.h FontEncoding.h FontEngine.h \ - FontManager.h FontMap.h GFReader.h GFTracer.h GFGlyphTracer.h Ghostscript.h Glyph.h GlyphTracerMessages.h \ - GraphicPath.h InputBuffer.h InputReader.h Length.h macros.h MapLine.h Matrix.h Message.h MessageException.h \ - MetafontWrapper.h PageRanges.h PageSize.h Pair.h PdfSpecialHandler.h Process.h PSInterpreter.h PsSpecialHandler.h \ - SignalHandler.h SpecialActions.h SpecialHandler.h SpecialManager.h StreamReader.h StreamWriter.h Subfont.h SVGTree.h \ - System.h Terminal.h TpicSpecialHandler.h TFM.h types.h VectorStream.h VFActions.h VFReader.h XMLDocTypeNode.h XMLDocument.h \ - XMLNode.h XMLString.h \ - BgColorSpecialHandler.cpp Bitmap.cpp BoundingBox.cpp Calculator.cpp CmdLineParserBase.cpp Color.cpp \ - ColorSpecialHandler.cpp CommandLine.cpp CRC32.cpp Directory.cpp DLLoader.cpp DVIActions.cpp DVIReader.cpp \ - DvisvgmSpecialHandler.cpp DVIToSVG.cpp DVIToSVGActions.cpp EmSpecialHandler.cpp FileFinder.cpp FilePath.cpp \ - FileSystem.cpp Font.cpp FontCache.cpp FontEncoding.cpp FontEngine.cpp FontManager.cpp FontMap.cpp GFReader.cpp \ - GFGlyphTracer.cpp GFTracer.cpp Ghostscript.cpp InputBuffer.cpp InputReader.cpp Length.cpp MapLine.cpp Matrix.cpp \ - Message.cpp MetafontWrapper.cpp PageRanges.cpp PageSize.cpp PdfSpecialHandler.cpp Process.cpp PSInterpreter.cpp \ - PsSpecialHandler.cpp SignalHandler.cpp SpecialManager.cpp StreamReader.cpp StreamWriter.cpp Subfont.cpp SVGTree.cpp \ - System.cpp Terminal.cpp TFM.cpp TpicSpecialHandler.cpp VFReader.cpp XMLDocument.cpp XMLNode.cpp XMLString.cpp - -EXTRA_DIST = options.xml psdefs.psc iapi.h ierrors.h MiKTeXCom.h MiKTeXCom.cpp - -AM_CXXFLAGS = -Wall -Wnon-virtual-dtor - -# the commandline parser is generated from options.xml by opt2cpp -CommandLine.cpp: options.xml - if test -f opt2cpp.xsl; then \ - rm -f $@ $*.h; \ - xsltproc opt2cpp.xsl $<; \ - fi - -# Create a C string definition containing the PostScript routines psdefs.ps needed by class PSInterpreter -psdefs.psc: psdefs.ps - if test -f $<; then \ - ps2c PSInterpreter::PSDEFS $< >$@; \ - fi - -psdefs.ps: ; - diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/psdefs.psc b/Build/source/texk/dvisvgm/dvisvgm-1.1/src/psdefs.psc deleted file mode 100644 index 2415068a2b3..00000000000 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/psdefs.psc +++ /dev/null @@ -1,75 +0,0 @@ -/************************************************************************* -** psdefs.psc ** -** ** -** This file is part of dvisvgm -- the DVI to SVG converter ** -** Copyright (C) 2005-2013 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/>. ** -*************************************************************************/ - -const char *PSInterpreter::PSDEFS = -"3 dict dup begin/Install{matrix setmatrix}def/HWResolution[72 72]def/PageSize[10" -"000 10000]def end setpagedevice/@dodraw true store/@SD systemdict def/@UD userdi" -"ct def true setglobal @SD/:save @SD/save get put @SD/:restore @SD/restore get pu" -"t @SD/:gsave @SD/gsave get put @SD/:grestore @SD/grestore get put @SD/:grestorea" -"ll @SD/grestoreall get put @SD/:stroke @SD/stroke get put @SD/:fill @SD/fill get" -" put @SD/:eofill @SD/eofill get put @SD/:clip @SD/clip get put @SD/:eoclip @SD/e" -"oclip get put @SD/:charpath @SD/charpath get put @SD/.setopacityalpha known not{" -"@SD/.setopacityalpha{pop}put}if @SD/prval{dup type/stringtype eq{print}{30 strin" -"g cvs print}ifelse}put @SD/prseq{-1 1{-1 roll prval( )print}for(\\n)print}put @S" -"D/prcmd{( )exch(\\ndvi.)3{print}repeat prseq}put @SD/cvxall{{cvx}forall}put @SD/" -"defpr{[exch[/copy @SD]cvxall 5 -1 roll dup 6 1 roll[/get/exec]cvxall 6 -1 roll d" -"up 7 1 roll 4 -1 roll dup 5 1 roll dup length string cvs/prcmd cvx]cvx def}put @" -"SD/querypos{{currentpoint}stopped{$error/newerror false put}{2(querypos)prcmd}if" -"else}put @SD/applyscalevals{1 0 transform 0 0 transform 3 -1 roll sub dup mul 3 " -"1 roll sub dup mul add sqrt 0 1 transform 0 0 transform 3 -1 roll sub dup mul 3 " -"1 roll sub dup mul add sqrt 1 0 transform dup mul exch dup dup mul 3 -1 roll add" -" sqrt div 3(applyscalevals)prcmd}def @SD/prpath{{2(moveto)prcmd}{2(lineto)prcmd}" -"{6(curveto)prcmd}{0(closepath)prcmd}pathforall}put @SD/charpath{/@dodraw false s" -"tore :charpath/@dodraw true store}put @SD/show{@dodraw{true charpath eofill}if}p" -"ut @SD/stroke{@dodraw{0(newpath)prcmd prpath 0(stroke)prcmd newpath}{:stroke}ife" -"lse}put @SD/fill{@dodraw{0(newpath)prcmd prpath 0(fill)prcmd newpath}{:fill}ifel" -"se}put @SD/eofill{@dodraw{0(newpath)prcmd prpath 0(eofill)prcmd newpath}{:eofill" -"}ifelse}put @SD/clip{:clip 0(newpath)prcmd prpath 0(clip)prcmd}put @SD/eoclip{:e" -"oclip 0(newpath)prcmd prpath 0(eoclip)prcmd}put @SD/bop{pop pop}put/@rect{4 -2 r" -"oll moveto exch dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath}bind d" -"ef/@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 closepath}bind def @SD/rectclip{newpath dup type/arraytype eq{aload leng" -"th 4 idiv{@rectcc}repeat}{@rectcc}ifelse clip newpath}put @SD/rectfill{gsave new" -"path 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 length " -"4 idiv{@rect}repeat}{@rect}ifelse stroke grestore}put false setglobal @SD readon" -"ly pop/initclip 0 defpr/sysexec{@SD exch get exec}def/adddot{dup length 1 add st" -"ring dup 0 46 put dup 3 -1 roll 1 exch putinterval}def/setlinewidth{dup/setlinew" -"idth sysexec applyscalevals 1(setlinewidth)prcmd}def/setlinecap 1 defpr/setlinej" -"oin 1 defpr/setmiterlimit 1 defpr/setdash{mark 3 1 roll 2 copy/setdash sysexec a" -"pplyscalevals exch aload length 1 add -1 roll counttomark(setdash)prcmd pop}def/" -"setgstate{currentlinewidth 1(setlinewidth)prcmd currentlinecap 1(setlinecap)prcm" -"d currentlinejoin 1(setlinejoin)prcmd currentmiterlimit 1(setmiterlimit)prcmd cu" -"rrentrgbcolor 3(setrgbcolor)prcmd 6 array currentmatrix aload pop 6(setmatrix)pr" -"cmd currentdash mark 3 1 roll exch aload length 1 add -1 roll counttomark(setdas" -"h)prcmd pop}def/save{@UD begin/@saveID vmstatus pop pop def end :save @saveID 1(" -"save)prcmd}def/restore{:restore setgstate @UD/@saveID known{@UD begin @saveID en" -"d}{0}ifelse 1(restore)prcmd}def/gsave 0 defpr/grestore{:grestore setgstate 0(gre" -"store)prcmd}def/grestoreall{:grestoreall setstate 0(grestoreall)prcmd}def/rotate" -"{dup type/arraytype ne{dup 1(rotate)prcmd}if/rotate sysexec}def/scale{dup type/a" -"rraytype ne{2 copy 2(scale)prcmd}if/scale sysexec}def/translate{dup type/arrayty" -"pe ne{2 copy 2(translate)prcmd}if/translate sysexec}def/setmatrix{dup/setmatrix " -"sysexec aload pop 6(setmatrix)prcmd}def/initmatrix{matrix setmatrix}def/concat{m" -"atrix currentmatrix matrix concatmatrix setmatrix}def/setgray 1 defpr/setcmykcol" -"or 4 defpr/sethsbcolor 3 defpr/setrgbcolor 3 defpr/.setopacityalpha{dup/.setopac" -"ityalpha sysexec 1(setopacityalpha)prcmd}def "; - -// vim: set syntax=cpp: diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1-PATCHES/TL-Changes b/Build/source/texk/dvisvgm/dvisvgm-1.2-PATCHES/TL-Changes index 5f3d73be6b2..65f0d4cad31 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1-PATCHES/TL-Changes +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2-PATCHES/TL-Changes @@ -1,5 +1,5 @@ -Changes applied to the dvisvgm-1.1 tree as obtained from: - http://downloads.sourceforge.net/dvisvgm/dvisvgm-1.1.tar.gz +Changes applied to the dvisvgm-1.2 tree as obtained from: + http://downloads.sourceforge.net/dvisvgm/dvisvgm-1.2.tar.gz Removed: Makefile.in diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/AUTHORS b/Build/source/texk/dvisvgm/dvisvgm-1.2/AUTHORS index 837e1e96bfb..837e1e96bfb 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/AUTHORS +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/AUTHORS diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/COPYING b/Build/source/texk/dvisvgm/dvisvgm-1.2/COPYING index 94a9ed024d3..94a9ed024d3 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/COPYING +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/COPYING diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/INSTALL b/Build/source/texk/dvisvgm/dvisvgm-1.2/INSTALL index a4b34144dcf..a4b34144dcf 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/INSTALL +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/INSTALL diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/LGPL-2.1.txt b/Build/source/texk/dvisvgm/dvisvgm-1.2/LGPL-2.1.txt index 602bfc94635..602bfc94635 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/LGPL-2.1.txt +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/LGPL-2.1.txt diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.2/Makefile.am index 62cf7699878..62cf7699878 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/Makefile.am +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/Makefile.am diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/NEWS b/Build/source/texk/dvisvgm/dvisvgm-1.2/NEWS index a7fdcc08dbd..91b8e6cb172 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/NEWS +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/NEWS @@ -1,3 +1,13 @@ +dvisvgm-1.2 (2013-03-01) +- PostScript handler: added support of tiling patterns +- PostScript handler: added support for EPS files with binary headers/footers +- added option --eps to directly convert EPS files to SVG +- added option --precision to select the number of decimal places used in the generated SVG files +- added an optional argument to --help to choose a display variant +- fixed the text alignment of the --help output +- improved handling of PostScript operator "show" +- choose the correct output location if the input file argument contains path specifiers (Windows only) + dvisvgm-1.1 (2013-01-22) - added evaluation of pdf:mapline and pdf:mapfile specials - added evaluation of subfont file definitions (.sfd files) diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/README b/Build/source/texk/dvisvgm/dvisvgm-1.2/README index 6356881cd9f..6356881cd9f 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/README +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/README diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/config.h.in b/Build/source/texk/dvisvgm/dvisvgm-1.2/config.h.in index b027999e9b3..b027999e9b3 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/config.h.in +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/config.h.in diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/config.rpath b/Build/source/texk/dvisvgm/dvisvgm-1.2/config.rpath index e69de29bb2d..e69de29bb2d 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/config.rpath +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/config.rpath diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/configure.ac b/Build/source/texk/dvisvgm/dvisvgm-1.2/configure.ac index 80574a70878..e3457789a69 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/configure.ac +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/configure.ac @@ -4,8 +4,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([dvisvgm],[1.1],[martin.gieseking@uos.de]) -DATE="December 2012" +AC_INIT([dvisvgm],[1.2],[martin.gieseking@uos.de]) +DATE="February 2013" AC_CONFIG_SRCDIR(src) AC_CONFIG_HEADER(config.h) AC_CANONICAL_HOST diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/doc/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.2/doc/Makefile.am index fb5c56ffedf..fb5c56ffedf 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/doc/Makefile.am +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/doc/Makefile.am diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/doc/dvisvgm.1 b/Build/source/texk/dvisvgm/dvisvgm-1.2/doc/dvisvgm.1 index f6d8ed13537..54a376f687b 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/doc/dvisvgm.1 +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/doc/dvisvgm.1 @@ -2,12 +2,12 @@ .\" Title: dvisvgm .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 01/22/2013 +.\" Date: 03/01/2013 .\" Manual: dvisvgm Manual -.\" Source: dvisvgm 1.1 +.\" Source: dvisvgm 1.2 .\" Language: English .\" -.TH "DVISVGM" "1" "01/22/2013" "dvisvgm 1\&.1" "dvisvgm Manual" +.TH "DVISVGM" "1" "03/01/2013" "dvisvgm 1\&.2" "dvisvgm Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -171,15 +171,6 @@ only affects the bounding box and does not transform the page content\&. Hence, .RE .RE .PP -\fB\-c, \-\-scale\fR=\fIsx\fR[,\fIsy\fR] -.RS 4 -Scales the page content horizontally by -\fIsx\fR -and vertically by -\fIsy\fR\&. This option is equivalent to -\fB\-TS\fR\fIsx\fR,\fIsy\fR\&. -.RE -.PP \fB\-C, \-\-cache\fR[=\fIdir\fR] .RS 4 To speed up the conversion process of bitmap fonts, dvisvgm saves intermediate conversion information in cache files\&. By default, these files are stored in $HOME/\&.dvisvgm/cache\&. If you prefer a different location, use option @@ -196,6 +187,15 @@ Enables colorization of messages printed during the conversion process\&. The co DVISVGM_COLORS\&. See the ENVIRONMENT section below for further information\&. .RE .PP +\fB\-E, \-\-eps\fR +.RS 4 +If this option is given, dvisvgm does not expect a DVI but an EPS input file, and tries to convert it to SVG\&. In order to do so, a single +\fIpsfile\fR +special command is created and forwarded to the PostScript special handler\&. This option is only available if dvisvgm was built with PostScript support enabled, and requires Ghostscript to be available\&. See option +\fB\-\-libgs\fR +for further information\&. +.RE +.PP \fB\-e, \-\-exact\fR .RS 4 If this option is given, dvisvgm computes the precise bounding box of each character\&. By default, the values stored in a font\(cqs TFM file are used to determine a glyph\(cqs extent\&. As these values are intended to realize optimal character placements and are not designed to represent the exact dimensions, they don\(cqt necessarily correspond with the bounds of the visual glyphs\&. Thus, width and/or height of some glyphs may be larger than the respective TFM values\&. As a result, this can lead to clipped characters at the bounds of the SVG graphic\&. With option @@ -254,12 +254,19 @@ For further information about the map file formats, see the manuals of dvips and .RE .RE .PP -\fB\-h, \-\-help\fR +\fB\-h, \-\-help\fR[=\fImode\fR] +.RS 4 +Prints a short summary of all available command\-line options\&. The optional +\fImode\fR +parameter is an integer value between 0 and 2\&. It selects the display variant of the help text\&. Mode 0 lists all options divided into categories with section headers\&. This is also the default if dvisvgm is called without parameters\&. Mode 1 lists all options ordered by the short option name, while mode 2 sorts the lines by the long option name\&. +.RE +.PP +\fB\-\-keep\fR .RS 4 -Prints a short summary of all available command\-line options\&. This is also the default action if dvisvgm is called without parameters\&. +Disables the removal of temporary files as created by Metafont (usually \&.gf, \&.tfm, and \&.log files)\&. .RE .PP -\fB\-\-libgs=filename\fR +\fB\-\-libgs\fR=\fIfilename\fR .RS 4 This option is only available if the Ghostscript library is not directly linked to dvisvgm and if PostScript support was not completely disabled during compilation\&. In this case, dvisvgm tries to load the shared GS library dynamically during runtime\&. By default, it expects the library\(cqs name to be libgs\&.so (on Unix\-like systems) or gsdll32\&.dll/gsdll64\&.dll (Windows)\&. Option \fB\-\-libgs\fR @@ -275,14 +282,14 @@ or \fIps\fR\&. .RE .PP -\fB\-\-keep\fR +\fB\-M, \-\-mag\fR=\fIfactor\fR .RS 4 -Disables the removal of temporary files as created by Metafont (usually \&.gf, \&.tfm, and \&.log files)\&. +Sets the magnification factor applied in conjunction with Metafont calls prior tracing the glyphs\&. The larger this value, the better the tracing results\&. Nevertheless, large magnification values can cause Metafont arithmetic errors due to number overflows\&. So, use this option with care\&. The default setting usually produces nice results\&. .RE .PP -\fB\-M, \-\-mag\fR=\fIfactor\fR +\fB\-\-no\-mktexmf\fR .RS 4 -Sets the magnification factor applied in conjunction with Metafont calls prior tracing the glyphs\&. The larger this value, the better the tracing results\&. Nevertheless, large magnification values can cause Metafont arithmetic errors due to number overflows\&. So, use this option with care\&. The default setting usually produces nice results\&. +Suppresses the generation of missing font files\&. If dvisvgm can\(cqt find a font file through the kpathsea lookup mechanism, it calls the external tools mktextfm or mktexmf by\&. This option disables these calls\&. .RE .PP \fB\-n, \-\-no\-fonts\fR[=\fIvariant\fR] @@ -305,6 +312,15 @@ implies \fB\-\-no\-styles\fR\&. .RE .PP +\fB\-c, \-\-scale\fR=\fIsx\fR[,\fIsy\fR] +.RS 4 +Scales the page content horizontally by +\fIsx\fR +and vertically by +\fIsy\fR\&. This option is equivalent to +\fB\-TS\fR\fIsx\fR,\fIsy\fR\&. +.RE +.PP \fB\-S, \-\-no\-specials\fR[=\fInames\fR] .RS 4 Disable processing of special commands embedded in the DVI file\&. If no further parameter is given, all specials are ignored\&. To selectively disable sets of specials, an optional comma\-separated list of names can be appended to this option\&. A @@ -320,11 +336,6 @@ By default, dvisvgm creates CSS styles and class attributes to reference fonts b \fB\-\-no\-styles\fR\&. .RE .PP -\fB\-\-no\-mktexmf\fR -.RS 4 -Suppresses the generation of missing font files\&. If dvisvgm can\(cqt find a font file through the kpathsea lookup mechanism, it calls the external tools mktextfm or mktexmf by\&. This option disables these calls\&. -.RE -.PP \fB\-o, \-\-output\fR=\fIpattern\fR .RS 4 Sets the name pattern of the output file\&. Parameter @@ -365,6 +376,14 @@ converts all pages up to page 10, converts all pages starting with page 10\&. Please consider that the page values don\(cqt refer to the page numbers printed on the page\&. Instead, the physical page count is expected, where the first page always gets number 1\&. .RE .PP +\fB\-d, \-\-precision\fR=\fIdigits\fR +.RS 4 +Specifies the maximal number of decimal places applied to floating\-point attribute values\&. All attribute values written to the generated SVG file(s) are rounded accordingly\&. The parameter +\fIdigits\fR +allows integer values from 0 to 6, where 0 enables the automatic selection of significant decimal places\&. This is also the default value if dvisvgm is called without option +\fB\-\-precision\fR\&. +.RE +.PP \fB\-P, \-\-progress\fR[=\fIdelay\fR] .RS 4 Enables a simple progress indicator shown when time\-consuming operations like PostScript specials are processed\&. The indicator doesn\(cqt appear before the given delay (in seconds) has elapsed\&. The default delay value is 0\&.5 seconds\&. @@ -384,12 +403,6 @@ Don\(cqt write the SVG output to a file but redirect it to \fBstdout\fR\&. .RE .PP -\fB\-t, \-\-translate\fR=\fItx\fR[,\fIty\fR] -.RS 4 -Translates (moves) the page content in direction of vector (\fItx\fR,\fIty\fR)\&. This option is equivalent to -\fB\-TT\fR\fItx\fR,\fIty\fR\&. -.RE -.PP \fB\-T, \-\-transform\fR=\fIcommands\fR .RS 4 Applies a sequence of transformations to the SVG content\&. Each transformation is described by a @@ -559,6 +572,12 @@ and .RE .RE .PP +\fB\-t, \-\-translate\fR=\fItx\fR[,\fIty\fR] +.RS 4 +Translates (moves) the page content in direction of vector (\fItx\fR,\fIty\fR)\&. This option is equivalent to +\fB\-TT\fR\fItx\fR,\fIty\fR\&. +.RE +.PP \fB\-v, \-\-verbosity\fR=\fIlevel\fR .RS 4 Controls the type of messages printed during a dvisvgm run: diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/doc/dvisvgm.txt.in b/Build/source/texk/dvisvgm/dvisvgm-1.2/doc/dvisvgm.txt.in index 7e8da44034a..c4f0f8a7d79 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/doc/dvisvgm.txt.in +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/doc/dvisvgm.txt.in @@ -117,11 +117,6 @@ Hence, if you choose a landscape format, the page won't be rotated. // // -*-c, --scale*='sx'[,'sy']:: -Scales the page content horizontally by 'sx' and vertically by 'sy'. This option is equivalent -to *-TS*'sx','sy'. - - *-C, --cache*[='dir']:: To speed up the conversion process of bitmap fonts, dvisvgm saves intermediate conversion information in cache files. By default, these files are stored in $HOME/.dvisvgm/cache. If you prefer @@ -136,6 +131,14 @@ Enables colorization of messages printed during the conversion process. The colo via the environment variable +DVISVGM_COLORS+. See the ENVIRONMENT section below for further information. +*-E, --eps*:: +If this option is given, dvisvgm does not expect a DVI but an EPS input file, and tries to convert +it to SVG. In order to do so, a single 'psfile' special command is created and forwarded to the +PostScript special handler. +This option is only available if dvisvgm was built with PostScript support enabled, and requires +Ghostscript to be available. See option *--libgs* for further information. + + *-e, --exact*:: If this option is given, dvisvgm computes the precise bounding box of each character. By default, the values stored in a font's TFM file are used to determine a glyph's extent. As these values are @@ -181,12 +184,19 @@ given in `myfile2.map` are removed again. For further information about the map file formats, see the manuals of dvips and dvipdfm. -*-h, --help*:: -Prints a short summary of all available command-line options. -This is also the default action if dvisvgm is called without parameters. +*-h, --help*[='mode']:: +Prints a short summary of all available command-line options. The optional 'mode' parameter is +an integer value between 0 and 2. It selects the display variant of the help text. Mode 0 +lists all options divided into categories with section headers. This is also the default if +dvisvgm is called without parameters. Mode 1 lists all options ordered by the short option name, +while mode 2 sorts the lines by the long option name. + + +*--keep*:: +Disables the removal of temporary files as created by Metafont (usually .gf, .tfm, and .log files). -*--libgs=filename*:: +*--libgs*='filename':: This option is only available if the Ghostscript library is not directly linked to dvisvgm and if PostScript support was not completely disabled during compilation. In this case, dvisvgm tries to load the shared GS library dynamically during runtime. By default, it expects the library's name @@ -202,10 +212,6 @@ prefix of the special statements. It's usually a leading word separated from the statement by a colon or a blank, e.g. 'color' or 'ps'. -*--keep*:: -Disables the removal of temporary files as created by Metafont (usually .gf, .tfm, and .log files). - - *-M, --mag*='factor':: Sets the magnification factor applied in conjunction with Metafont calls prior tracing the glyphs. The larger this value, the better the tracing results. Nevertheless, large magnification values @@ -213,6 +219,12 @@ can cause Metafont arithmetic errors due to number overflows. So, use this optio The default setting usually produces nice results. +*--no-mktexmf*:: +Suppresses the generation of missing font files. If dvisvgm can't find a font file +through the kpathsea lookup mechanism, it calls the external tools mktextfm or mktexmf by. +This option disables these calls. + + *-n, --no-fonts*[='variant']:: If this option is given, dvisvgm doesn't create SVG 'font' elements but uses 'paths' instead. The resulting SVG files tends to be larger but concurrently more compatible with most applications that @@ -221,6 +233,11 @@ by paths. Variant 0 creates 'path' and 'use' elements. Variant 1 creates 'path' Option *--no-fonts* implies *--no-styles*. +*-c, --scale*='sx'[,'sy']:: +Scales the page content horizontally by 'sx' and vertically by 'sy'. This option is equivalent +to *-TS*'sx','sy'. + + *-S, --no-specials*[='names']:: Disable processing of special commands embedded in the DVI file. If no further parameter is given, all specials are ignored. To selectively disable sets of specials, @@ -236,12 +253,6 @@ compact than repeatedly set the complete font information in each text element. prefer direct font references, the default behavior can be disabled with option *--no-styles*. -*--no-mktexmf*:: -Suppresses the generation of missing font files. If dvisvgm can't find a font file -through the kpathsea lookup mechanism, it calls the external tools mktextfm or mktexmf by. -This option disables these calls. - - *-o, --output*='pattern':: Sets the name pattern of the output file. Parameter 'pattern' is a string that may contain the variables *%f* and *%p*. *%f* stands for the base name of the DVI file, i.e. @@ -269,6 +280,14 @@ Please consider that the page values don't refer to the page numbers printed on Instead, the physical page count is expected, where the first page always gets number 1. +*-d, --precision*='digits':: +Specifies the maximal number of decimal places applied to floating-point attribute values. +All attribute values written to the generated SVG file(s) are rounded accordingly. The +parameter 'digits' allows integer values from 0 to 6, where 0 enables the automatic selection +of significant decimal places. This is also the default value if dvisvgm is called without +option *--precision*. + + *-P, --progress*[='delay']:: Enables a simple progress indicator shown when time-consuming operations like PostScript specials are processed. The indicator doesn't appear before the given @@ -284,11 +303,6 @@ This option is equivalent to *-TR*'angle'. Don't write the SVG output to a file but redirect it to *stdout*. -*-t, --translate*='tx'[,'ty']:: -Translates (moves) the page content in direction of vector ('tx','ty'). This option is -equivalent to *-TT*'tx','ty'. - - *-T, --transform*='commands':: Applies a sequence of transformations to the SVG content. Each transformation is described by a 'command' beginning with a capital letter followed by a list of comma-separated @@ -360,6 +374,11 @@ transformation sequences. They are simply independent shorthand options for comm // // +*-t, --translate*='tx'[,'ty']:: +Translates (moves) the page content in direction of vector ('tx','ty'). This option is +equivalent to *-TT*'tx','ty'. + + *-v, --verbosity*='level':: Controls the type of messages printed during a dvisvgm run: [horizontal] diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/Makefile.am index 97bf78f50f4..97bf78f50f4 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/Makefile.am +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/Makefile.am diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/auxiliary.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/auxiliary.h index fbd1db4c166..fbd1db4c166 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/auxiliary.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/auxiliary.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/bitmap.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/bitmap.h index 2df04b46fbe..2df04b46fbe 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/bitmap.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/bitmap.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/curve.c b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/curve.c index 414fb5de9ee..414fb5de9ee 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/curve.c +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/curve.c diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/curve.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/curve.h index e98efdf5cfd..e98efdf5cfd 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/curve.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/curve.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/decompose.c b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/decompose.c index 376af015df3..376af015df3 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/decompose.c +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/decompose.c diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/decompose.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/decompose.h index 89b01e5045c..89b01e5045c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/decompose.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/decompose.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/lists.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/lists.h index 078129afce5..078129afce5 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/lists.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/lists.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/potracelib.c b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/potracelib.c index c483ea335b9..c483ea335b9 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/potracelib.c +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/potracelib.c diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/potracelib.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/potracelib.h index 99e17e424ae..99e17e424ae 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/potracelib.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/potracelib.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/progress.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/progress.h index 93a1fa3f04c..93a1fa3f04c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/progress.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/progress.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/trace.c b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/trace.c index f1e88a90862..f1e88a90862 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/trace.c +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/trace.c diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/trace.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/trace.h index dc2b9247adb..dc2b9247adb 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/potracelib/trace.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/potracelib/trace.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/BgColorSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/BgColorSpecialHandler.cpp index a225d360910..a225d360910 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/BgColorSpecialHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/BgColorSpecialHandler.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/BgColorSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/BgColorSpecialHandler.h index 98dd814ba9e..98dd814ba9e 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/BgColorSpecialHandler.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/BgColorSpecialHandler.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Bitmap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Bitmap.cpp index e72d5ee34ac..e72d5ee34ac 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Bitmap.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Bitmap.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Bitmap.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Bitmap.h index 1a1f19caf15..1a1f19caf15 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Bitmap.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Bitmap.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/BoundingBox.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/BoundingBox.cpp index 39f5f7ba2ac..d39ff708da9 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/BoundingBox.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/BoundingBox.cpp @@ -24,6 +24,7 @@ #include "BoundingBox.h" #include "Matrix.h" #include "XMLNode.h" +#include "XMLString.h" using namespace std; @@ -231,7 +232,7 @@ void BoundingBox::transform (const Matrix &tm) { string BoundingBox::toSVGViewBox () const { ostringstream oss; - oss << ulx << ' ' << uly << ' ' << width() << ' ' << height(); + oss << XMLString(ulx) << ' ' << XMLString(uly) << ' ' << XMLString(width()) << ' ' << XMLString(height()); return oss.str(); } diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/BoundingBox.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/BoundingBox.h index 96655cd1d5d..96655cd1d5d 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/BoundingBox.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/BoundingBox.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CRC32.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CRC32.cpp index 2295ab17bde..2295ab17bde 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CRC32.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CRC32.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CRC32.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CRC32.h index ca8ec359d0f..ca8ec359d0f 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CRC32.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CRC32.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Calculator.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Calculator.cpp index c26a40bc237..c26a40bc237 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Calculator.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Calculator.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Calculator.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Calculator.h index b3faa325322..b3faa325322 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Calculator.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Calculator.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CmdLineParserBase.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CmdLineParserBase.cpp index 6a44b939aca..73439fc3f09 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CmdLineParserBase.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CmdLineParserBase.cpp @@ -18,8 +18,9 @@ ** along with this program; if not, see <http://www.gnu.org/licenses/>. ** *************************************************************************/ +#include <algorithm> +#include <cstdio> #include <cstring> -#include <iostream> #include "CmdLineParserBase.h" #include "InputBuffer.h" #include "InputReader.h" @@ -115,6 +116,9 @@ void CmdLineParserBase::error (const Option &opt, bool longopt, const char *msg) } +#if 0 +#include <iostream> + /** Lists the scanned filenames. Just for debugging purposes. */ void CmdLineParserBase::status () const { cout << "file names:\n"; @@ -122,15 +126,19 @@ void CmdLineParserBase::status () const { cout << " " << _files[i] << endl; cout << endl; } +#endif /** Returns the option information of a given short option name. * If the option name can't be found 0 is returned. * @param[in] longname long version of the option without leading hyphen (e.g. p, not -p) */ const CmdLineParserBase::Option* CmdLineParserBase::option (char shortname) const { - for (const Option *opts = options(); opts->longname; ++opts) + size_t numopts; // number of available options + for (const Option *opts = options(&numopts); numopts > 0; ++opts) { if (opts->shortname == shortname) return opts; + numopts--; + } return 0; } @@ -143,12 +151,14 @@ const CmdLineParserBase::Option* CmdLineParserBase::option (char shortname) cons const CmdLineParserBase::Option* CmdLineParserBase::option (const string &longname) const { vector<const Option*> matches; // all matching options size_t len = longname.length(); - for (const Option *opts = options(); opts->longname; ++opts) { + size_t numopts; // number of available options + for (const Option *opts = options(&numopts); numopts > 0; ++opts) { if (string(opts->longname, len) == longname) { if (len == strlen(opts->longname)) // exact match? return opts; matches.push_back(opts); } + numopts--; } switch (matches.size()) { default: @@ -307,3 +317,50 @@ bool CmdLineParserBase::getCharArg (InputReader &ir, const Option &opt, bool lon } return false; } + + +/** Compares the short option characters of two help lines. + * @return true if line1 should appear before line2 */ +static bool cmp_short (const char *line1, const char *line2) { + if (*line1 != 'o' || *line2 != 'o' || (line1[1] == ' ' && line2[1] == ' ')) + return strcmp(line1, line2) < 0; + char lopt1 = tolower(line1[2]); + char lopt2 = tolower(line2[2]); + if (lopt1 == lopt2) // same character but different case? + return line1[2] > line2[2]; // line with lower-case letter first + return lopt1 < lopt2; +} + + +/** Compares the long option names of two help lines. + * @return true if line1 should appear before line2 */ +static bool cmp_long (const char *line1, const char *line2) { + if (*line1 != 'o' || *line2 != 'o') + return strcmp(line1, line2) < 0; + return strcmp(line1+6, line2+6) < 0; +} + + +/** Prints the help text to stdout. + * @param[in] mode format of help text */ +void CmdLineParserBase::help (int mode) const { + size_t numlines; + const char **lines = helplines(&numlines); + if (mode == 0) { // list options with section headers + for (size_t i=0; i < numlines; i++) { + switch (*lines[i]) { + case 's': fputc('\n', stdout); break; // section header + case 'o': fputs(" ", stdout); break; // option info + } + puts(lines[i]+1); + } + } + else { + vector<const char*> linevec(lines, lines+numlines); + sort(linevec.begin(), linevec.end(), mode == 1 ? cmp_short : cmp_long); + for (vector<const char*>::iterator it=linevec.begin(); it != linevec.end(); ++it) { + if (**it != 's') // skip section headers + puts(*it+1); + } + } +} diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CmdLineParserBase.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CmdLineParserBase.h index cd15d907b14..7de4f8133d8 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CmdLineParserBase.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CmdLineParserBase.h @@ -63,10 +63,10 @@ class CmdLineParserBase public: virtual void parse (int argc, char **argv, bool printErrors=true); - virtual void help () const {} + virtual void help (int mode=0) const; virtual int numFiles () const {return _files.size();} virtual const char* file (size_t n) {return n < _files.size() ? _files[n].c_str() : 0;} - virtual void status () const; +// virtual void status () const; virtual bool error () const {return _error;} protected: @@ -75,6 +75,8 @@ class CmdLineParserBase virtual ~CmdLineParserBase () {} virtual void init (); virtual void error (const Option &opt, bool longopt, const char *msg) const; + virtual const Option* options (size_t *numopts) const =0; + virtual const char** helplines (size_t *numlines) const =0; bool checkArgPrefix (InputReader &ir, const Option &opt, bool longopt) const; bool checkNoArg (InputReader &ir, const Option &opt, bool longopt) const; bool getIntArg (InputReader &ir, const Option &opt, bool longopt, int &arg) const; @@ -85,7 +87,6 @@ class CmdLineParserBase bool getCharArg (InputReader &ir, const Option &opt, bool longopt, char &arg) const; const Option* option (char shortname) const; const Option* option (const std::string &longname) const; - virtual const Option* options () const {return 0;} private: bool _printErrors; ///< if true, print error messages diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Color.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Color.cpp index c9695a62b32..c9695a62b32 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Color.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Color.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Color.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Color.h index a6b6b40dcc9..a6b6b40dcc9 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Color.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Color.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/ColorSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/ColorSpecialHandler.cpp index d156a43770f..d156a43770f 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/ColorSpecialHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/ColorSpecialHandler.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/ColorSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/ColorSpecialHandler.h index a9b73dc8b74..a9b73dc8b74 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/ColorSpecialHandler.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/ColorSpecialHandler.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CommandLine.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CommandLine.cpp new file mode 100644 index 00000000000..4d240b769ac --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CommandLine.cpp @@ -0,0 +1,297 @@ +// This file was automatically generated by opt2cpp. +// It is part of the dvisvgm package and published under the terms +// of the GNU General Public License version 3, or (at your option) any later version. +// See file COPYING for further details. +// (C) 2009-2013 Martin Gieseking <martin.gieseking@uos.de> + +#include <cstdio> +#include <iostream> +#include <iomanip> +#include "InputReader.h" +#include "CommandLine.h" + +using namespace std; + +const CmdLineParserBase::Option CommandLine::_options[] = { + {'b', "bbox", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_bbox)}, + {'C', "cache", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_cache)}, + {'\0', "color", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_color)}, +#if !defined(DISABLE_GS) + {'E', "eps", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_eps)}, +#endif + {'e', "exact", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_exact)}, + {'m', "fontmap", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_fontmap)}, + {'h', "help", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_help)}, + {'\0', "keep", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_keep)}, +#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) + {'\0', "libgs", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_libgs)}, +#endif + {'l', "list-specials", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_list_specials)}, + {'M', "mag", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_mag)}, + {'n', "no-fonts", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_fonts)}, + {'\0', "no-mktexmf", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_mktexmf)}, + {'S', "no-specials", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_specials)}, + {'\0', "no-styles", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_no_styles)}, + {'o', "output", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_output)}, + {'p', "page", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_page)}, + {'d', "precision", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_precision)}, + {'P', "progress", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_progress)}, + {'r', "rotate", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_rotate)}, + {'c', "scale", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_scale)}, + {'s', "stdout", 0, new OptionHandlerImpl<CommandLine>(&CommandLine::handle_stdout)}, + {'a', "trace-all", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_trace_all)}, + {'T', "transform", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_transform)}, + {'t', "translate", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_translate)}, + {'v', "verbosity", 'r', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_verbosity)}, + {'V', "version", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_version)}, + {'z', "zip", 'o', new OptionHandlerImpl<CommandLine>(&CommandLine::handle_zip)}, +}; + +const CmdLineParserBase::Option* CommandLine::options (size_t *numopts) const { + *numopts = sizeof(_options)/sizeof(CmdLineParserBase::Option); + return _options; +} + +void CommandLine::init () { + CmdLineParserBase::init(); + + // disable all options by default + _bbox_given = false; + _cache_given = false; + _color_given = false; +#if !defined(DISABLE_GS) + _eps_given = false; +#endif + _exact_given = false; + _fontmap_given = false; + _help_given = false; + _keep_given = false; +#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) + _libgs_given = false; +#endif + _list_specials_given = false; + _mag_given = false; + _no_fonts_given = false; + _no_mktexmf_given = false; + _no_specials_given = false; + _no_styles_given = false; + _output_given = false; + _page_given = false; + _precision_given = false; + _progress_given = false; + _rotate_given = false; + _scale_given = false; + _stdout_given = false; + _trace_all_given = false; + _transform_given = false; + _translate_given = false; + _verbosity_given = false; + _version_given = false; + _zip_given = false; + + // set default option values + _bbox_arg = "min"; + _cache_arg.clear(); + _fontmap_arg.clear(); + _help_arg = 0; +#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) + _libgs_arg.clear(); +#endif + _mag_arg = 4; + _no_fonts_arg = 0; + _no_specials_arg.clear(); + _output_arg.clear(); + _page_arg = "1"; + _precision_arg = 0; + _progress_arg = 0.5; + _rotate_arg = 0; + _scale_arg.clear(); + _trace_all_arg = false; + _transform_arg.clear(); + _translate_arg.clear(); + _verbosity_arg = 7; + _version_arg = false; + _zip_arg = 9; +} + +const char** CommandLine::helplines (size_t *numlines) const { + static const char *lines[] = { + "dThis program converts DVI files, as created by TeX/LaTeX, to\nthe XML-based scalable vector graphics format SVG.\n\nUsage: dvisvgm [options] dvifile", + "sInput options:", + "o-p, --page=ranges choose pages to convert [1]", + "o-m, --fontmap=filenames evaluate (additional) font map files", +#if !defined(DISABLE_GS) + "o-E, --eps convert an EPS file to SVG", +#endif + "sSVG output options:", + "o-b, --bbox=size set size of bounding box [min]", + "o-o, --output=pattern set name pattern of output files", + "o-d, --precision=number set number of decimal points (0-6) [0]", + "o-s, --stdout write SVG output to stdout", + "o-n, --no-fonts[=variant] draw glyphs by using path elements [0]", + "o --no-styles don't use styles to reference fonts", + "o-z, --zip[=level] create compressed .svgz file [9]", + "sSVG transformations:", + "o-r, --rotate=angle rotate page content clockwise", + "o-c, --scale=sx[,sy] scale page content", + "o-t, --translate=tx[,ty] shift page content", + "o-T, --transform=commands transform page content", + "sProcessing options:", + "o-C, --cache[=dir] set/print path of cache directory", + "o-e, --exact compute exact glyph boxes", + "o --keep keep temporary files", +#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) + "o --libgs=filename set name of Ghostscript shared library", +#endif + "o-M, --mag=factor magnification of Metafont output [4]", + "o --no-mktexmf don't try to create missing fonts", + "o-S, --no-specials[=prefixes] don't process [selected] specials", + "o-a, --trace-all[=retrace] trace all glyphs of bitmap fonts [no]", + "sMessage options:", + "o --color colorize messages", + "o-h, --help[=mode] print this summary of options and exit [0]", + "o-l, --list-specials print supported special sets and exit", + "o-P, --progress[=delay] enable progess indicator [0.5]", + "o-v, --verbosity=level set verbosity level (0-7) [7]", + "o-V, --version[=extended] print version and exit [no]", + }; + *numlines = sizeof(lines)/sizeof(char*); + return lines; +} + +void CommandLine::handle_bbox (InputReader &ir, const Option &opt, bool longopt) { + if (getStringArg(ir, opt, longopt, _bbox_arg)) + _bbox_given = true; +} + +void CommandLine::handle_cache (InputReader &ir, const Option &opt, bool longopt) { + if (ir.eof() || getStringArg(ir, opt, longopt, _cache_arg)) + _cache_given = true; +} + +void CommandLine::handle_color (InputReader &ir, const Option &opt, bool longopt) { + _color_given = true; +} + +#if !defined(DISABLE_GS) +void CommandLine::handle_eps (InputReader &ir, const Option &opt, bool longopt) { + _eps_given = true; +} +#endif + +void CommandLine::handle_exact (InputReader &ir, const Option &opt, bool longopt) { + _exact_given = true; +} + +void CommandLine::handle_fontmap (InputReader &ir, const Option &opt, bool longopt) { + if (getStringArg(ir, opt, longopt, _fontmap_arg)) + _fontmap_given = true; +} + +void CommandLine::handle_help (InputReader &ir, const Option &opt, bool longopt) { + if (ir.eof() || getIntArg(ir, opt, longopt, _help_arg)) + _help_given = true; +} + +void CommandLine::handle_keep (InputReader &ir, const Option &opt, bool longopt) { + _keep_given = true; +} + +#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS) +void CommandLine::handle_libgs (InputReader &ir, const Option &opt, bool longopt) { + if (getStringArg(ir, opt, longopt, _libgs_arg)) + _libgs_given = true; +} +#endif + +void CommandLine::handle_list_specials (InputReader &ir, const Option &opt, bool longopt) { + _list_specials_given = true; +} + +void CommandLine::handle_mag (InputReader &ir, const Option &opt, bool longopt) { + if (getDoubleArg(ir, opt, longopt, _mag_arg)) + _mag_given = true; +} + +void CommandLine::handle_no_fonts (InputReader &ir, const Option &opt, bool longopt) { + if (ir.eof() || getIntArg(ir, opt, longopt, _no_fonts_arg)) + _no_fonts_given = true; +} + +void CommandLine::handle_no_mktexmf (InputReader &ir, const Option &opt, bool longopt) { + _no_mktexmf_given = true; +} + +void CommandLine::handle_no_specials (InputReader &ir, const Option &opt, bool longopt) { + if (ir.eof() || getStringArg(ir, opt, longopt, _no_specials_arg)) + _no_specials_given = true; +} + +void CommandLine::handle_no_styles (InputReader &ir, const Option &opt, bool longopt) { + _no_styles_given = true; +} + +void CommandLine::handle_output (InputReader &ir, const Option &opt, bool longopt) { + if (getStringArg(ir, opt, longopt, _output_arg)) + _output_given = true; +} + +void CommandLine::handle_page (InputReader &ir, const Option &opt, bool longopt) { + if (getStringArg(ir, opt, longopt, _page_arg)) + _page_given = true; +} + +void CommandLine::handle_precision (InputReader &ir, const Option &opt, bool longopt) { + if (getIntArg(ir, opt, longopt, _precision_arg)) + _precision_given = true; +} + +void CommandLine::handle_progress (InputReader &ir, const Option &opt, bool longopt) { + if (ir.eof() || getDoubleArg(ir, opt, longopt, _progress_arg)) + _progress_given = true; +} + +void CommandLine::handle_rotate (InputReader &ir, const Option &opt, bool longopt) { + if (getDoubleArg(ir, opt, longopt, _rotate_arg)) + _rotate_given = true; +} + +void CommandLine::handle_scale (InputReader &ir, const Option &opt, bool longopt) { + if (getStringArg(ir, opt, longopt, _scale_arg)) + _scale_given = true; +} + +void CommandLine::handle_stdout (InputReader &ir, const Option &opt, bool longopt) { + _stdout_given = true; +} + +void CommandLine::handle_trace_all (InputReader &ir, const Option &opt, bool longopt) { + if (ir.eof() || getBoolArg(ir, opt, longopt, _trace_all_arg)) + _trace_all_given = true; +} + +void CommandLine::handle_transform (InputReader &ir, const Option &opt, bool longopt) { + if (getStringArg(ir, opt, longopt, _transform_arg)) + _transform_given = true; +} + +void CommandLine::handle_translate (InputReader &ir, const Option &opt, bool longopt) { + if (getStringArg(ir, opt, longopt, _translate_arg)) + _translate_given = true; +} + +void CommandLine::handle_verbosity (InputReader &ir, const Option &opt, bool longopt) { + if (getUIntArg(ir, opt, longopt, _verbosity_arg)) + _verbosity_given = true; +} + +void CommandLine::handle_version (InputReader &ir, const Option &opt, bool longopt) { + if (ir.eof() || getBoolArg(ir, opt, longopt, _version_arg)) + _version_given = true; +} + +void CommandLine::handle_zip (InputReader &ir, const Option &opt, bool longopt) { + if (ir.eof() || getIntArg(ir, opt, longopt, _zip_arg)) + _zip_given = true; +} + diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CommandLine.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CommandLine.h index 550f965e650..67d00d4e20d 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/CommandLine.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/CommandLine.h @@ -17,16 +17,19 @@ class CommandLine : public CmdLineParserBase public: CommandLine () {init();} CommandLine (int argc, char **argv, bool printErrors) {parse(argc, argv, printErrors);} - void help () const; - void status () const; bool page_given () const {return _page_given;} const std::string& page_arg () const {return _page_arg;} bool fontmap_given () const {return _fontmap_given;} const std::string& fontmap_arg () const {return _fontmap_arg;} +#if !defined(DISABLE_GS) + bool eps_given () const {return _eps_given;} +#endif bool bbox_given () const {return _bbox_given;} const std::string& bbox_arg () const {return _bbox_arg;} bool output_given () const {return _output_given;} const std::string& output_arg () const {return _output_arg;} + bool precision_given () const {return _precision_given;} + int precision_arg () const {return _precision_arg;} bool stdout_given () const {return _stdout_given;} bool no_fonts_given () const {return _no_fonts_given;} int no_fonts_arg () const {return _no_fonts_arg;} @@ -58,6 +61,7 @@ class CommandLine : public CmdLineParserBase bool trace_all_arg () const {return _trace_all_arg;} bool color_given () const {return _color_given;} bool help_given () const {return _help_given;} + int help_arg () const {return _help_arg;} bool list_specials_given () const {return _list_specials_given;} bool progress_given () const {return _progress_given;} double progress_arg () const {return _progress_arg;} @@ -68,11 +72,16 @@ class CommandLine : public CmdLineParserBase protected: void init (); - const CmdLineParserBase::Option* options () const {return _options;} + const CmdLineParserBase::Option* options (size_t *numopts) const; + const char** helplines (size_t *numlines) const; void handle_page (InputReader &ir, const Option &opt, bool longopt); void handle_fontmap (InputReader &ir, const Option &opt, bool longopt); +#if !defined(DISABLE_GS) + void handle_eps (InputReader &ir, const Option &opt, bool longopt); +#endif void handle_bbox (InputReader &ir, const Option &opt, bool longopt); void handle_output (InputReader &ir, const Option &opt, bool longopt); + void handle_precision (InputReader &ir, const Option &opt, bool longopt); void handle_stdout (InputReader &ir, const Option &opt, bool longopt); void handle_no_fonts (InputReader &ir, const Option &opt, bool longopt); void handle_no_styles (InputReader &ir, const Option &opt, bool longopt); @@ -104,10 +113,15 @@ class CommandLine : public CmdLineParserBase std::string _page_arg; bool _fontmap_given; std::string _fontmap_arg; +#if !defined(DISABLE_GS) + bool _eps_given; +#endif bool _bbox_given; std::string _bbox_arg; bool _output_given; std::string _output_arg; + bool _precision_given; + int _precision_arg; bool _stdout_given; bool _no_fonts_given; int _no_fonts_arg; @@ -139,6 +153,7 @@ class CommandLine : public CmdLineParserBase bool _trace_all_arg; bool _color_given; bool _help_given; + int _help_arg; bool _list_specials_given; bool _progress_given; double _progress_arg; diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DLLoader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DLLoader.cpp index 30317455ba6..30317455ba6 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DLLoader.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DLLoader.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DLLoader.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DLLoader.h index 3052d13714e..3052d13714e 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DLLoader.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DLLoader.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIActions.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIActions.cpp index f9c95dc3754..f9c95dc3754 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIActions.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIActions.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIActions.h index a3fa86a801c..a3fa86a801c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIActions.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIActions.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIReader.cpp index acdb8cd7351..acdb8cd7351 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIReader.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIReader.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIReader.h index 1a1163900d6..1a1163900d6 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIReader.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIReader.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVG.cpp index c70ccd8f210..5fe9bef8675 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVG.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVG.cpp @@ -42,6 +42,7 @@ #include "Message.h" #include "PageRanges.h" #include "PageSize.h" +#include "SVGOutputBase.h" #include "SVGTree.h" #include "TFM.h" #include "XMLDocument.h" @@ -103,7 +104,7 @@ class PSHeaderActions : public DVIActions char DVIToSVG::TRACE_MODE = 0; -DVIToSVG::DVIToSVG (istream &is, DVIToSVG::Output &out) : DVIReader(is), _out(out) +DVIToSVG::DVIToSVG (istream &is, SVGOutputBase &out) : DVIReader(is), _out(out) { replaceActions(new DVIToSVGActions(*this, _svg)); } diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVG.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVG.h index 4826d44c9a5..0efc86a8a07 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVG.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVG.h @@ -28,19 +28,12 @@ #include "SpecialManager.h" #include "SVGTree.h" +struct SVGOutputBase; class DVIToSVG : public DVIReader { public: - /** DVIToSVG uses this interface to get the output streams for the SVG files. */ - struct Output { - virtual ~Output () {} - virtual std::ostream& getPageStream (int page, int numPages) const =0; - virtual std::string filename (int page, int numPages) const =0; - }; - - public: - DVIToSVG (std::istream &is, Output &out); + DVIToSVG (std::istream &is, SVGOutputBase &out); ~DVIToSVG (); void convert (unsigned firstPage, unsigned lastPage, std::pair<int,int> *pageinfo=0); void convert (const std::string &range, std::pair<int,int> *pageinfo=0); @@ -61,7 +54,7 @@ class DVIToSVG : public DVIReader private: SVGTree _svg; - Output &_out; + SVGOutputBase &_out; std::string _bboxString; std::string _transCmds; SpecialManager _specialManager; diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVGActions.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVGActions.cpp index adae27f105b..adae27f105b 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVGActions.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVGActions.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVGActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVGActions.h index 2e68bb9cb31..2e68bb9cb31 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DVIToSVGActions.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DVIToSVGActions.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Directory.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Directory.cpp index c13ebe35a38..c13ebe35a38 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Directory.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Directory.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Directory.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Directory.h index 6420bec6d19..6420bec6d19 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Directory.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Directory.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DvisvgmSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DvisvgmSpecialHandler.cpp index 11e3c0fc42a..11e3c0fc42a 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DvisvgmSpecialHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DvisvgmSpecialHandler.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DvisvgmSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DvisvgmSpecialHandler.h index 93e726fe634..93e726fe634 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/DvisvgmSpecialHandler.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/DvisvgmSpecialHandler.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSFile.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSFile.cpp new file mode 100644 index 00000000000..cbeb5600366 --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSFile.cpp @@ -0,0 +1,114 @@ +/************************************************************************* +** EPSFile.cpp ** +** ** +** This file is part of dvisvgm -- the DVI to SVG converter ** +** Copyright (C) 2005-2013 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 <cstring> +#include <istream> +#include <limits> +#include "EPSFile.h" +#include "InputBuffer.h" +#include "InputReader.h" + +using namespace std; + + +/** Reads a little-endian 32-bit integer from the given input stream. */ +static UInt32 getUInt32 (istream &is) { + UInt32 value=0; + char buf[4]; + is.read(buf, 4); + for (int i=0; i < 4; i++) + value |= ((buf[i] & 255) << (8*i)); + return value; +} + + +static size_t getline (istream &is, char *line, size_t n) { + char buf[512]; + is.get(buf, min(n, (size_t)512)-1); + n = is.gcount(); + size_t linelen=0; + for (size_t i=0; i < n; i++) + if (isprint(buf[i])) + line[linelen++] = buf[i]; + line[linelen] = 0; + if (is.peek() == '\n') + is.get(); + else + is.ignore(numeric_limits<size_t>::max(), '\n'); + return linelen; +} + + +EPSFile::EPSFile (const std::string& fname) : _ifs(fname.c_str(), ios::binary), _headerValid(false), _offset(0), _pslength(0) +{ + if (_ifs) { + if (getUInt32(_ifs) != 0xC6D3D0C5) // no binary header present? + _ifs.seekg(0, ios_base::beg); // go back to the first byte + else { + _offset = getUInt32(_ifs); // stream offset where PS part of the file begins + _pslength = getUInt32(_ifs); // length of PS section in bytes + _ifs.seekg(_offset, ios_base::beg); // continue reading at the beginning of the PS section + } + string str; + str += _ifs.get(); + str += _ifs.get(); + _headerValid = (str == "%!"); + _ifs.seekg(0, ios_base::beg); + } +} + + +/** Returns an input stream for the EPS file. The stream pointer is automatically moved + * to the beginning of the ASCII (PostScript) part of the file. */ +istream& EPSFile::istream () const { + _ifs.clear(); + _ifs.seekg(_offset, ios_base::beg); + return _ifs; +} + + +/** Extracts the bounding box information from the DSC header/footer (if present) + * @param[out] the extracted bounding box + * @return true if %%BoundingBox data could be read successfully */ +bool EPSFile::bbox (BoundingBox &box) const { + std::istream &is = EPSFile::istream(); + if (is) { + char buf[64]; + while (is) { + size_t linelen = getline(is, buf, 64); + if (strncmp(buf, "%%BoundingBox:", 14) == 0) { + CharInputBuffer ib(buf, linelen); + BufferInputReader ir(ib); + ir.skip(14); + ir.skipSpace(); + if (!ir.check("(atend)", true)) { + int val[4]; + for (int i=0; i < 4; i++) { + ir.skipSpace(); + ir.parseInt(val[i]); + } + box = BoundingBox(val[0], val[1], val[2], val[3]); + return true; + } + } + } + } + return false; +} diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSFile.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSFile.h new file mode 100644 index 00000000000..60a4c007d39 --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSFile.h @@ -0,0 +1,46 @@ +/************************************************************************* +** EPSFile.h ** +** ** +** This file is part of dvisvgm -- the DVI to SVG converter ** +** Copyright (C) 2005-2013 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 EPSFILE_H +#define EPSFILE_H + +#include <fstream> +#include <string> +#include "BoundingBox.h" +#include "types.h" + +class EPSFile +{ + public: + EPSFile (const std::string &fname); + std::istream& istream () const; + bool hasValidHeader () const {return _headerValid;} + bool bbox (BoundingBox &box) const; + UInt32 pslength () const {return _pslength;} + + private: + mutable std::ifstream _ifs; + bool _headerValid; ///< true if file has a valid header + UInt32 _offset; ///< stream offset where ASCII part of the file begins + UInt32 _pslength; ///< length of PS section (in bytes) +}; + +#endif + diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSToSVG.cpp new file mode 100644 index 00000000000..2c2a38e7a9b --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSToSVG.cpp @@ -0,0 +1,74 @@ +/************************************************************************* +** EPSToSVG.cpp ** +** ** +** This file is part of dvisvgm -- the DVI to SVG converter ** +** Copyright (C) 2005-2013 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 <fstream> +#include <istream> +#include <sstream> +#include "EPSFile.h" +#include "EPSToSVG.h" +#include "Message.h" +#include "MessageException.h" +#include "PsSpecialHandler.h" +#include "SVGOutputBase.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#define VERSION_STR VERSION " (" TARGET_SYSTEM ")" +#else +#define VERSION_STR "" +#endif + + +using namespace std; + + +void EPSToSVG::convert () { + if (!Ghostscript().available()) + throw MessageException("Ghostscript is required to process the EPS file"); + EPSFile epsfile(_fname); + if (!epsfile.hasValidHeader()) + throw PSException("invalid EPS file"); + + BoundingBox bbox; + epsfile.bbox(bbox); + Message::mstream(false, Message::MC_PAGE_NUMBER) << "processing file " << _fname << '\n'; + Message::mstream().indent(1); + _svg.newPage(1); + // create a psfile special and forward it to the PsSpecialHandler + stringstream ss; + ss << "\"" << _fname << "\" " + "llx=" << bbox.minX() << " " + "lly=" << bbox.minY() << " " + "urx=" << bbox.maxX() << " " + "ury=" << bbox.maxY(); + PsSpecialHandler pshandler; + pshandler.process("psfile=", ss, this); + // output SVG file + _svg.setBBox(_bbox); + _svg.appendToDoc(new XMLCommentNode(" This file was generated by dvisvgm " VERSION_STR " ")); + _svg.write(_out.getPageStream(1, 1)); + string svgfname = _out.filename(1, 1); + Message::mstream(false, Message::MC_PAGE_SIZE) << "graphic size: " << bbox.width() << "pt" + " x " << bbox.height() << "pt" + " (" << bbox.width()/72.27*25.4 << "mm" + " x " << bbox.height()/72.27*25.4 << "mm)\n"; + Message::mstream(false, Message::MC_PAGE_WRITTEN) << "graphic written to " << (svgfname.empty() ? "<stdout>" : svgfname) << '\n'; +} + diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSToSVG.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSToSVG.h new file mode 100644 index 00000000000..92edb5884e0 --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EPSToSVG.h @@ -0,0 +1,65 @@ +/************************************************************************* +** EPSToSVG.h ** +** ** +** This file is part of dvisvgm -- the DVI to SVG converter ** +** Copyright (C) 2005-2013 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 EPSTOSVG_H +#define EPSTOSVG_H + +#include <string> +#include "SpecialActions.h" +#include "SVGTree.h" + +struct SVGOutputBase; + +class EPSToSVG : protected SpecialActions +{ + public: + EPSToSVG (const std::string &fname, SVGOutputBase &out) : _fname(fname), _out(out), _x(0), _y(0) {} + void convert (); + void setTransformation (const Matrix &m); + void setPageSize (const std::string &name); + + protected: + // implement abstract base class SpecialActions + double getX () const {return _x;} + double getY () const {return _y;} + void setX (double x) {_x = x; _svg.setX(x);} + void setY (double y) {_y = y; _svg.setY(y);} + void finishLine () {} + void setColor (const Color &color) {_svg.setColor(color);} + Color getColor () const {return _svg.getColor();} + void setMatrix (const Matrix &m) {_svg.setMatrix(m);} + const Matrix& getMatrix () const {return _svg.getMatrix();} + void setBgColor (const Color &color) {} + void appendToPage (XMLNode *node) {_svg.appendToPage(node);} + void appendToDefs (XMLNode *node) {_svg.appendToDefs(node);} + void embed (const BoundingBox &bbox) {_bbox.embed(bbox);} + void embed (const DPair &p, double r=0) {if (r==0) _bbox.embed(p); else _bbox.embed(p, r);} + BoundingBox& bbox () {return _bbox;} + BoundingBox& bbox (const std::string &name, bool reset=false) {return _bbox;} + + private: + std::string _fname; ///< name of EPS file + SVGTree _svg; + SVGOutputBase &_out; + double _x, _y; + BoundingBox _bbox; +}; + +#endif diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/EmSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EmSpecialHandler.cpp index 29b36e506ed..3617e188a64 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/EmSpecialHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EmSpecialHandler.cpp @@ -24,6 +24,7 @@ #include "InputReader.h" #include "SpecialActions.h" #include "XMLNode.h" +#include "XMLString.h" using namespace std; @@ -91,10 +92,10 @@ static void create_line (const DPair &p1, const DPair &p2, char c1, char c2, dou DPair q21 = p2+cv2, q22 = p2-cv2; node = new XMLElementNode("polygon"); ostringstream oss; - oss << q11.x() << ',' << q11.y() << ' ' - << q12.x() << ',' << q12.y() << ' ' - << q22.x() << ',' << q22.y() << ' ' - << q21.x() << ',' << q21.y(); + oss << XMLString(q11.x()) << ',' << XMLString(q11.y()) << ' ' + << XMLString(q12.x()) << ',' << XMLString(q12.y()) << ' ' + << XMLString(q22.x()) << ',' << XMLString(q22.y()) << ' ' + << XMLString(q21.x()) << ',' << XMLString(q21.y()); node->addAttribute("points", oss.str()); if (actions->getColor() != Color::BLACK) node->addAttribute("fill", actions->getColor().rgbString()); diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/EmSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EmSpecialHandler.h index 2a0700ebb9e..2a0700ebb9e 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/EmSpecialHandler.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/EmSpecialHandler.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileFinder.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileFinder.cpp index 032ea7da55f..032ea7da55f 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileFinder.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileFinder.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileFinder.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileFinder.h index f0d8dbba001..f0d8dbba001 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileFinder.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileFinder.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FilePath.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FilePath.cpp index 0066909e8ca..2d7e676772a 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FilePath.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FilePath.cpp @@ -99,6 +99,7 @@ void FilePath::init (string path, bool isfile, string current_dir) { single_slashes(current_dir); #ifdef __WIN32__ tolower(path); + path = FileSystem::adaptPathSeperators(path); _drive = strip_drive_letter(path); #endif if (isfile) { diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FilePath.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FilePath.h index 5bd3fdf98e2..5bd3fdf98e2 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FilePath.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FilePath.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileSystem.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileSystem.cpp index 67e48595db9..67e48595db9 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileSystem.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileSystem.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileSystem.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileSystem.h index c920a5046e6..c920a5046e6 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FileSystem.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FileSystem.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Font.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Font.cpp index f9ec0737a2d..f9ec0737a2d 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Font.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Font.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Font.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Font.h index ed3c82f3634..ed3c82f3634 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Font.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Font.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontCache.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontCache.cpp index a36df9afa82..a36df9afa82 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontCache.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontCache.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontCache.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontCache.h index cf4cbef7ec2..cf4cbef7ec2 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontCache.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontCache.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEncoding.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEncoding.cpp index bf9efb8e3ee..bf9efb8e3ee 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEncoding.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEncoding.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEncoding.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEncoding.h index 3170d850256..3170d850256 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEncoding.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEncoding.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEngine.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEngine.cpp index ab53b1bd644..ab53b1bd644 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEngine.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEngine.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEngine.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEngine.h index 68652b66523..68652b66523 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontEngine.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontEngine.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontManager.cpp index 0481b59a969..0481b59a969 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontManager.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontManager.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontManager.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontManager.h index 18966269158..18966269158 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontManager.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontManager.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontMap.cpp index cd349080d14..cd349080d14 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontMap.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontMap.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontMap.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontMap.h index b3c1b85a304..b3c1b85a304 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/FontMap.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/FontMap.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFGlyphTracer.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFGlyphTracer.cpp index c40702e595f..c40702e595f 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFGlyphTracer.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFGlyphTracer.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFGlyphTracer.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFGlyphTracer.h index 379ed1d98c8..379ed1d98c8 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFGlyphTracer.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFGlyphTracer.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFReader.cpp index 1bb6c426549..1bb6c426549 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFReader.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFReader.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFReader.h index 0d9a7bb0e32..0d9a7bb0e32 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFReader.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFReader.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFTracer.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFTracer.cpp index 69a078456a0..69a078456a0 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFTracer.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFTracer.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFTracer.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFTracer.h index ba15961db65..ba15961db65 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GFTracer.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GFTracer.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Ghostscript.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Ghostscript.cpp index 7da863cbc82..7da863cbc82 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Ghostscript.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Ghostscript.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Ghostscript.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Ghostscript.h index ccfd5b0b0f4..ccfd5b0b0f4 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Ghostscript.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Ghostscript.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Glyph.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Glyph.h index b598dc5002d..b598dc5002d 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Glyph.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Glyph.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GlyphTracerMessages.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GlyphTracerMessages.h index 2b0cedcd8b6..2b0cedcd8b6 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GlyphTracerMessages.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GlyphTracerMessages.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GraphicPath.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GraphicPath.h index 07c85466ff9..46a3b0cc335 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/GraphicPath.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/GraphicPath.h @@ -27,6 +27,7 @@ #include "BoundingBox.h" #include "Matrix.h" #include "Pair.h" +#include "XMLString.h" template <typename T> @@ -177,10 +178,10 @@ class GraphicPath } - /** Writes the path data as SVG path drawing command to a given output stream. - * @param[in] os output stream used to write the SVG commands to + /** Writes the path data as SVG path drawing command to a given output stream. + * @param[in] os output stream used to write the SVG commands to * @param[in] sx horizontal scale factor - * @param[in] sy vertical scale factor + * @param[in] sy vertical scale factor * @param[in] dx horizontal translation in TeX point units * @param[in] sy vertical translation in TeX point units */ void writeSVG (std::ostream &os, double sx=1.0, double sy=1.0, double dx=0.0, double dy=0.0) const { @@ -191,13 +192,13 @@ class GraphicPath void draw (char cmd, const Point *points, int n) { _os << cmd; switch (cmd) { - case 'H': _os << _sx*points->x()+_dx; break; - case 'V': _os << _sy*points->y()+_dy; break; + case 'H': _os << XMLString(_sx*points->x()+_dx); break; + case 'V': _os << XMLString(_sy*points->y()+_dy); break; default : for (int i=0; i < n; i++) { if (i > 0) _os << ' '; - _os << _sx*points[i].x()+_dx << ' ' << _sy*points[i].y()+_dy; + _os << XMLString(_sx*points[i].x()+_dx) << ' ' << XMLString(_sy*points[i].y()+_dy); } } } @@ -223,7 +224,7 @@ class GraphicPath } - /** Checks whether the current path describes a dot/point only (with no extent). + /** Checks whether the current path describes a dot/point only (with no extent). * @param[out] p coordinates of the point if path describes a dot * @return true if path is a dot/point */ bool isDot (Point &p) const { @@ -243,7 +244,7 @@ class GraphicPath } - /** Transforms the path according to a given Matrix. + /** Transforms the path according to a given Matrix. * @param[in] matrix Matrix describing the affine transformation */ void transform (const Matrix &matrix) { FORALL(_commands, Iterator, it) diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputBuffer.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputBuffer.cpp index ad99305fa3c..ad99305fa3c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputBuffer.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputBuffer.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputBuffer.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputBuffer.h index c25df9a1452..c25df9a1452 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputBuffer.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputBuffer.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputReader.cpp index 3899a2362b2..3899a2362b2 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputReader.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputReader.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputReader.h index 5bc35d4f61b..5bc35d4f61b 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/InputReader.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/InputReader.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Length.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Length.cpp index aae20b74e59..aae20b74e59 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Length.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Length.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Length.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Length.h index 995ba068cee..995ba068cee 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Length.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Length.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Makefile.am new file mode 100644 index 00000000000..60fa35f5374 --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Makefile.am @@ -0,0 +1,52 @@ +:## This file is part of dvisvgm +## Copyright (C) 2005-2013 Martin Gieseking <martin.gieseking@uos.de> +## +## Process this file with automake. + +bin_PROGRAMS = dvisvgm +noinst_LIBRARIES = libdvisvgm.a + +dvisvgm_SOURCES = gzstream.h \ + dvisvgm.cpp gzstream.cpp + +dvisvgm_LDADD = $(noinst_LIBRARIES) @EXTRA_LIBS@ +dvisvgm_DEPENDENCIES = $(noinst_LIBRARIES) @EXTRA_LIBS@ + +libdvisvgm_a_SOURCES = Bitmap.h BoundingBox.h BgColorSpecialHandler.h Calculator.h CmdLineParserBase.h Color.h CRC32.h \ + ColorSpecialHandler.h CommandLine.h Directory.h DLLoader.h DVIActions.h DVIReader.h DvisvgmSpecialHandler.h DVIToSVG.h \ + DVIToSVGActions.h EmSpecialHandler.h EPSFile.h EPSToSVG.h FileFinder.h FilePath.h FileSystem.h Font.h FontCache.h \ + FontEncoding.h FontEngine.h FontManager.h FontMap.h GFReader.h GFTracer.h GFGlyphTracer.h Ghostscript.h Glyph.h \ + GlyphTracerMessages.h GraphicPath.h InputBuffer.h InputReader.h Length.h macros.h MapLine.h Matrix.h Message.h \ + MessageException.h MetafontWrapper.h PageRanges.h PageSize.h Pair.h PdfSpecialHandler.h Process.h PSInterpreter.h \ + PSPattern.h PsSpecialHandler.h SignalHandler.h SpecialActions.h SpecialHandler.h SpecialManager.h StreamReader.h \ + StreamWriter.h Subfont.h SVGOutputBase.h SVGTree.h System.h Terminal.h TpicSpecialHandler.h TFM.h types.h \ + VectorStream.h VFActions.h VFReader.h XMLDocTypeNode.h XMLDocument.h XMLNode.h XMLString.h \ + BgColorSpecialHandler.cpp Bitmap.cpp BoundingBox.cpp Calculator.cpp CmdLineParserBase.cpp Color.cpp \ + ColorSpecialHandler.cpp CommandLine.cpp CRC32.cpp Directory.cpp DLLoader.cpp DVIActions.cpp DVIReader.cpp \ + DvisvgmSpecialHandler.cpp DVIToSVG.cpp DVIToSVGActions.cpp EmSpecialHandler.cpp EPSFile.cpp EPSToSVG.cpp FileFinder.cpp \ + FilePath.cpp FileSystem.cpp Font.cpp FontCache.cpp FontEncoding.cpp FontEngine.cpp FontManager.cpp FontMap.cpp \ + GFReader.cpp GFGlyphTracer.cpp GFTracer.cpp Ghostscript.cpp InputBuffer.cpp InputReader.cpp Length.cpp MapLine.cpp \ + Matrix.cpp Message.cpp MetafontWrapper.cpp PageRanges.cpp PageSize.cpp PdfSpecialHandler.cpp Process.cpp psdefs.cpp \ + PSInterpreter.cpp PSPattern.cpp PsSpecialHandler.cpp SignalHandler.cpp SpecialManager.cpp StreamReader.cpp \ + StreamWriter.cpp Subfont.cpp SVGTree.cpp System.cpp Terminal.cpp TFM.cpp TpicSpecialHandler.cpp VFReader.cpp \ + XMLDocument.cpp XMLNode.cpp XMLString.cpp + +EXTRA_DIST = options.xml iapi.h ierrors.h MiKTeXCom.h MiKTeXCom.cpp + +AM_CXXFLAGS = -Wall -Wnon-virtual-dtor + +# the command-line parser is generated from options.xml by opt2cpp +CommandLine.cpp: options.xml + if test -f opt2cpp.xsl; then \ + rm -f $@ $*.h; \ + xsltproc opt2cpp.xsl $<; \ + fi + +# Create a C string definition containing the PostScript routines psdefs.ps needed by class PSInterpreter +$(srcdir)/psdefs.cpp: psdefs.ps + if test -f $<; then \ + ps2c PSInterpreter::PSDEFS $< >$@; \ + fi + +psdefs.ps: ; + diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MapLine.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MapLine.cpp index 99dce4f9547..99dce4f9547 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MapLine.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MapLine.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MapLine.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MapLine.h index 87451dc912d..87451dc912d 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MapLine.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MapLine.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Matrix.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Matrix.cpp index b8aac0bd6a9..f44e0661e80 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Matrix.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Matrix.cpp @@ -23,6 +23,7 @@ #include <sstream> #include "Calculator.h" #include "Matrix.h" +#include "XMLString.h" using namespace std; @@ -39,19 +40,19 @@ double det (const Matrix &m) { } -/** Computes the determinant of the 2x2 submatrix of m where a given - * row and column were removed. +/** Computes the determinant of the 2x2 submatrix of m where a given + * row and column were removed. * @param[in] m base matrix * @param[in] row row to remove * @param[in] col column to remove */ double det (const Matrix &m, int row, int col) { int c1 = (col+1)%3, c2 = (col+2)%3; int r1 = (row+1)%3, r2 = (row+2)%3; - if (c1 > c2) + if (c1 > c2) swap(c1, c2); if (r1 > r2) swap(r1, r2); - return m.values[r1][c1] * m.values[r2][c2] + return m.values[r1][c1] * m.values[r2][c2] - m.values[r1][c2] * m.values[r2][c1]; } @@ -62,12 +63,6 @@ static inline double deg2rad (double deg) { } -static inline double round (double x, int n) { - double pow10 = pow(10.0, n); - return floor(x*pow10+0.5)/pow10; -} - - /** Creates a diagonal matrix ((d,0,0),(0,d,0),(0,0,d)). * @param[in] d value of diagonal elements */ Matrix::Matrix (double d) { @@ -90,7 +85,7 @@ Matrix::Matrix (double v[], unsigned size) { /** Creates the matrix ((v0,v1,v2),(v3,v4,v5),(v6,v7,v8)). * If vector v has less than 9 elements, the remaining matrix components will be set to * those of the identity matrix. - * @param[in] v array containing the matrix components + * @param[in] v array containing the matrix components * @param[in] start use vector components start,...,start+8 */ Matrix::Matrix (const std::vector<double> &v, int start) { set(v, start); @@ -115,7 +110,7 @@ Matrix& Matrix::set (double v[], unsigned size) { /** Set matrix values ((v0,v1,v2),(v3,v4,v5),(v6,v7,v8)). * If vector v has less than 9 elements, the remaining matrix components will be set to * those of the identity matrix. - * @param[in] v array containing the matrix components + * @param[in] v array containing the matrix components * @param[in] start use vector components start,...,start+8 */ Matrix& Matrix::set (const vector<double> &v, int start) { unsigned size = min((unsigned)v.size()-start, 9u); @@ -421,7 +416,7 @@ string Matrix::getSVG () const { for (int j=0; j < 2; j++) { if (i > 0 || j > 0) oss << ' '; - oss << round(values[j][i], 3); + oss << XMLString(values[j][i]); } } oss << ')'; diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Matrix.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Matrix.h index 30f1b39f31b..30f1b39f31b 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Matrix.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Matrix.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Message.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Message.cpp index 24c5ea7547f..24c5ea7547f 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Message.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Message.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Message.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Message.h index bc4a9ed016c..bc4a9ed016c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Message.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Message.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MessageException.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MessageException.h index 92b8978c3e1..92b8978c3e1 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MessageException.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MessageException.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MetafontWrapper.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MetafontWrapper.cpp index 37e3b68f92f..37e3b68f92f 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MetafontWrapper.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MetafontWrapper.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MetafontWrapper.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MetafontWrapper.h index 2a69654ff95..2a69654ff95 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MetafontWrapper.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MetafontWrapper.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MiKTeXCom.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MiKTeXCom.cpp index ddf5af52f80..ddf5af52f80 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MiKTeXCom.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MiKTeXCom.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MiKTeXCom.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MiKTeXCom.h index 8649cc9f377..8649cc9f377 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/MiKTeXCom.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/MiKTeXCom.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PSInterpreter.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSInterpreter.cpp index 609b5005a80..f1fad9448d8 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PSInterpreter.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSInterpreter.cpp @@ -26,10 +26,8 @@ #include "InputReader.h" #include "Message.h" #include "PSInterpreter.h" -#include "psdefs.psc" #include "SignalHandler.h" - using namespace std; @@ -48,7 +46,7 @@ const char *PSInterpreter::GSARGS[] = { /** Constructs a new PSInterpreter object. * @param[in] actions template methods to be executed after recognizing the corresponding PS operator. */ PSInterpreter::PSInterpreter (PSActions *actions) - : _mode(PS_NONE), _actions(actions), _inError(false), _initialized(false) + : _mode(PS_NONE), _actions(actions), _bytesToRead(0), _inError(false), _initialized(false) { } @@ -91,48 +89,62 @@ void PSInterpreter::checkStatus (int status) { /** Executes a chunk of PostScript code. * @param[in] str buffer containing the code * @param[in] len number of characters in buffer - * @param[in] flush If true, a final 'flush' is sent which forces the - * output buffer to be written immediately.*/ -void PSInterpreter::execute (const char *str, size_t len, bool flush) { + * @param[in] flush If true, a final 'flush' is sent which forces the output buffer to be written immediately. + * @return true if the assigned number of bytes have been read */ +bool PSInterpreter::execute (const char *str, size_t len, bool flush) { init(); - if (_mode != PS_QUIT) { - int status=0; - if (_mode == PS_NONE) { - _gs.run_string_begin(0, &status); - _mode = PS_RUNNING; - } - checkStatus(status); - const char *p=str; - // feed Ghostscript with code chunks that are not larger than 64KB - // => see documentation of gsapi_run_string_foo() - while (PS_RUNNING && len > 0) { - SignalHandler::instance().check(); - size_t chunksize = min(len, (size_t)0xffff); - _gs.run_string_continue(p, chunksize, 0, &status); - p += chunksize; - len -= chunksize; - if (status == -101) // e_Quit - _mode = PS_QUIT; - else - checkStatus(status); - } - if (flush) { - // force writing contents of output buffer - _gs.run_string_continue("\nflush ", 7, 0, &status); - } + if (_mode == PS_QUIT) + return false; + + int status=0; + if (_mode == PS_NONE) { + _gs.run_string_begin(0, &status); + _mode = PS_RUNNING; + } + checkStatus(status); + + bool finished=false; + if (_bytesToRead > 0 && len >= _bytesToRead) { + len = _bytesToRead; + finished = true; + } + + // feed Ghostscript with code chunks that are not larger than 64KB + // => see documentation of gsapi_run_string_foo() + const char *p=str; + while (PS_RUNNING && len > 0) { + SignalHandler::instance().check(); + size_t chunksize = min(len, (size_t)0xffff); + _gs.run_string_continue(p, chunksize, 0, &status); + p += chunksize; + len -= chunksize; + if (_bytesToRead > 0) + _bytesToRead -= chunksize; + if (status == -101) // e_Quit + _mode = PS_QUIT; + else + checkStatus(status); + } + if (flush) { + // force writing contents of output buffer + _gs.run_string_continue("\nflush ", 7, 0, &status); } + return finished; } /** Executes a chunk of PostScript code read from a stream. The method returns on EOF. - * @param[in] is the input stream */ -void PSInterpreter::execute (istream &is) { + * @param[in] is the input stream + * @return true if the assigned number of bytes have been read */ +bool PSInterpreter::execute (istream &is) { char buf[4096]; - while (is && !is.eof()) { + bool finished = false; + while (is && !is.eof() && !finished) { is.read(buf, 4096); - execute(buf, is.gcount(), false); + finished = execute(buf, is.gcount(), false); } execute("\n", 1); + return finished; } @@ -140,7 +152,7 @@ void PSInterpreter::execute (istream &is) { * @param[in] inst pointer to calling instance of PSInterpreter * @param[in] buf takes the read characters * @param[in] len size of buffer buf - * @return number of read characters */ + * @return number of characters read */ int GSDLLCALL PSInterpreter::input (void *inst, char *buf, int len) { return 0; } @@ -240,6 +252,7 @@ void PSInterpreter::callActions (InputReader &in) { {"gsave", 0, &PSActions::gsave}, {"initclip", 0, &PSActions::initclip}, {"lineto", 2, &PSActions::lineto}, + {"makepattern", -1, &PSActions::makepattern}, {"moveto", 2, &PSActions::moveto}, {"newpath", 0, &PSActions::newpath}, {"querypos", 2, &PSActions::querypos}, @@ -257,6 +270,7 @@ void PSInterpreter::callActions (InputReader &in) { {"setmatrix", 6, &PSActions::setmatrix}, {"setmiterlimit", 1, &PSActions::setmiterlimit}, {"setopacityalpha", 1, &PSActions::setopacityalpha}, + {"setpattern", -1, &PSActions::setpattern}, {"setrgbcolor", 3, &PSActions::setrgbcolor}, {"stroke", 0, &PSActions::stroke}, {"translate", 2, &PSActions::translate}, diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PSInterpreter.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSInterpreter.h index 0b36dda570e..4e46732a420 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PSInterpreter.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSInterpreter.h @@ -53,6 +53,7 @@ struct PSActions virtual void grestoreall (std::vector<double> &p) =0; virtual void initclip (std::vector<double> &p) =0; virtual void lineto (std::vector<double> &p) =0; + virtual void makepattern (std::vector<double> &p) =0; virtual void moveto (std::vector<double> &p) =0; virtual void newpath (std::vector<double> &p) =0; virtual void querypos (std::vector<double> &p) =0; @@ -70,6 +71,7 @@ struct PSActions virtual void setmatrix (std::vector<double> &p) =0; virtual void setmiterlimit (std::vector<double> &p) =0; virtual void setopacityalpha (std::vector<double> &p) =0; + virtual void setpattern (std::vector<double> &p) =0; virtual void setrgbcolor (std::vector<double> &rgb) =0; virtual void stroke (std::vector<double> &p) =0; virtual void translate (std::vector<double> &p) =0; @@ -85,11 +87,12 @@ class PSInterpreter public: PSInterpreter (PSActions *actions=0); - void execute (const char *str, size_t len, bool flush=true); - void execute (const char *str) {execute(str, std::strlen(str));} - void execute (const std::string &str) {execute(str.c_str());} - void execute (std::istream &is); + bool execute (const char *str, size_t len, bool flush=true); + bool execute (const char *str) {return execute(str, std::strlen(str));} + bool execute (const std::string &str) {return execute(str.c_str());} + bool execute (std::istream &is); bool active () const {return _mode != PS_QUIT;} + void limit (size_t max_bytes) {_bytesToRead = max_bytes;} PSActions* setActions (PSActions *actions); protected: @@ -106,6 +109,7 @@ class PSInterpreter Ghostscript _gs; Mode _mode; ///< current execution mode PSActions *_actions; ///< actions to be performed + size_t _bytesToRead; ///< if > 0, maximal number of bytes to be processed by following calls of execute() std::vector<char> _linebuf; std::string _errorMessage; ///< text of error message bool _inError; ///< true if scanning error message diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSPattern.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSPattern.cpp new file mode 100644 index 00000000000..52fbf16c589 --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSPattern.cpp @@ -0,0 +1,178 @@ +/************************************************************************* +** PSPattern.cpp ** +** ** +** This file is part of dvisvgm -- the DVI to SVG converter ** +** Copyright (C) 2005-2013 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 <sstream> +#include <vector> +#include "BoundingBox.h" +#include "PSPattern.h" +#include "SpecialActions.h" +#include "SVGTree.h" +#include "XMLNode.h" + +using namespace std; + + +string PSPattern::svgID () const { + return XMLString("pat")+XMLString(_id); +} + + +/** Appends the definition of this pattern to the "def" section of the SVG tree. */ +void PSPattern::apply (SpecialActions *actions) { + if (XMLElementNode *pattern = createPatternNode()) + actions->appendToDefs(pattern); +} + + +///////////////////////////////////////////////////////////////////////////// + +PSTilingPattern::PSTilingPattern (int id, BoundingBox &bbox, Matrix &matrix, double xstep, double ystep) + : PSPattern(id), _bbox(bbox), _matrix(matrix), _xstep(xstep), _ystep(ystep), _groupNode(0) +{ + const double bp2pt = 72.27/72.0; // factor to convert bp to pt + _bbox.scale(bp2pt, bp2pt); + _xstep *= bp2pt; + _ystep *= bp2pt; + _groupNode = PSTilingPattern::createGroupNode(); +} + + +PSTilingPattern::~PSTilingPattern () { + delete _groupNode; +} + + +/** Creates a new pattern element representing the pattern defined in the PS code. */ +XMLElementNode* PSTilingPattern::createPatternNode () const { + if (!_groupNode) + return 0; + BoundingBox box(_bbox.minX(), _bbox.minY(), _bbox.minX()+_xstep, _bbox.minY()+_ystep); + XMLElementNode *pattern = new XMLElementNode("pattern"); + pattern->addAttribute("id", svgID()); + pattern->addAttribute("x", box.minX()); + pattern->addAttribute("y", box.minY()); + pattern->addAttribute("width", box.width()); + pattern->addAttribute("height", box.height()); + pattern->addAttribute("viewBox", box.toSVGViewBox()); + pattern->addAttribute("patternUnits", "userSpaceOnUse"); + if (!_matrix.isIdentity()) + pattern->addAttribute("patternTransform", _matrix.getSVG()); + if (_xstep < _bbox.width() || _ystep < _bbox.height()) { // overlapping tiles? + // disable clipping at the tile borders => tiles become "transparent" + pattern->addAttribute("overflow", "visible"); + } + if (XMLElementNode *clip=createClipNode()) + pattern->append(clip); + pattern->append(_groupNode); + return pattern; +} + + +/** Creates a new clip element restricting the drawing area to the + * dimensions given in the definition of the pattern. */ +XMLElementNode* PSTilingPattern::createClipNode() const { + XMLElementNode *clip = new XMLElementNode("clipPath"); + clip->addAttribute("id", "pc"+XMLString(psID())); + XMLElementNode *rect = new XMLElementNode("rect"); + rect->addAttribute("x", _bbox.minX()); + rect->addAttribute("y", _bbox.minY()); + rect->addAttribute("width", _bbox.width()); + rect->addAttribute("height", _bbox.height()); + clip->append(rect); + return clip; +} + + +/** Creates a new group element that contains all "drawing" elements that + * define the pattern graphic. */ +XMLElementNode* PSTilingPattern::createGroupNode () const { + // add all succeeding path elements to this group + XMLElementNode *group = new XMLElementNode("g"); + group->addAttribute("clip-path", XMLString("url(#pc")+XMLString(psID())+")"); + return group; +} + + +void PSTilingPattern::apply (SpecialActions *actions) { + PSPattern::apply(actions); + _groupNode = 0; +} + + +///////////////////////////////////////////////////////////////////////////// + +PSColoredTilingPattern::PSColoredTilingPattern (int id, BoundingBox &bbox, Matrix &matrix, double xstep, double ystep) + : PSTilingPattern(id, bbox, matrix, xstep, ystep) +{ +} + + +///////////////////////////////////////////////////////////////////////////// + +PSUncoloredTilingPattern::PSUncoloredTilingPattern (int id, BoundingBox &bbox, Matrix &matrix, double xstep, double ystep) + : PSTilingPattern(id, bbox, matrix, xstep, ystep), _applied(false) +{ +} + + +PSUncoloredTilingPattern::~PSUncoloredTilingPattern () { + if (_applied) + setGroupNode(0); // prevent deleting the group node in the parent destructor +} + + +/** Returns an SVG id value that identifies this pattern with the current color applied. */ +string PSUncoloredTilingPattern::svgID () const { + ostringstream oss; + oss << PSPattern::svgID() << '-' << hex << _currentColor; + return oss.str(); +} + + +/** Appends the definition of this pattern with the current color applied + * to the "def" section of the SVG tree. */ +void PSUncoloredTilingPattern::apply (SpecialActions* actions) { + set<Color>::iterator it=_colors.find(_currentColor); + if (it == _colors.end()) { + if (_applied) + setGroupNode(static_cast<XMLElementNode*>(getGroupNode()->clone())); + // assign current color to the pattern graphic + vector<XMLElementNode*> colored_elems; + const char *attribs[] = {"fill", "stroke"}; + for (int i=0; i < 2; i++) { + getGroupNode()->findDescendants(0, attribs[i], colored_elems); + for (vector<XMLElementNode*>::iterator it=colored_elems.begin(); it != colored_elems.end(); ++it) + if (string((*it)->getAttributeValue(attribs[i])) != "none") + (*it)->addAttribute(attribs[i], _currentColor.rgbString()); + colored_elems.clear(); + } + PSPattern::apply(actions); + _colors.insert(_currentColor); + _applied = true; + } +} + + +XMLElementNode* PSUncoloredTilingPattern::createClipNode() const { + // only the first instance of this patterns get a clip element + if (_colors.empty()) + return PSTilingPattern::createClipNode(); + return 0; +}
\ No newline at end of file diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSPattern.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSPattern.h new file mode 100644 index 00000000000..7e2848dea3b --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PSPattern.h @@ -0,0 +1,100 @@ +/************************************************************************* +** PSPattern.h ** +** ** +** This file is part of dvisvgm -- the DVI to SVG converter ** +** Copyright (C) 2005-2013 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 PSPATTERN_H +#define PSPATTERN_H + +#include <set> +#include <string> +#include "BoundingBox.h" +#include "Color.h" +#include "Matrix.h" + + +struct SpecialActions; +class SVGTree; +class XMLElementNode; + +class PSPattern +{ + public: + virtual ~PSPattern () {} + virtual int psID () const {return _id;} + virtual std::string svgID () const; + virtual void apply (SpecialActions *actions); + + protected: + PSPattern (int id) : _id(id) {} + virtual XMLElementNode* createPatternNode () const =0; + + private: + int _id; ///< PostSCript ID of this pattern +}; + + +class PSTilingPattern : public PSPattern +{ + public: + ~PSTilingPattern (); + virtual XMLElementNode* getContainerNode () {return _groupNode;} + void apply (SpecialActions *actions); + + protected: + PSTilingPattern (int id, BoundingBox &bbox, Matrix &matrix, double xstep, double ystep); + XMLElementNode* createPatternNode () const; + virtual XMLElementNode* createClipNode () const; + virtual XMLElementNode* createGroupNode () const; + virtual XMLElementNode* getGroupNode () const {return _groupNode;} + virtual void setGroupNode (XMLElementNode *node) {_groupNode = node;} + + private: + BoundingBox _bbox; ///< bounding box of the tile graphics + Matrix _matrix; ///< tile transformation + double _xstep, _ystep; ///< horizontal and vertical distance between neighboured tiles + XMLElementNode *_groupNode; ///< group containing the drawing elements +}; + + +class PSColoredTilingPattern : public PSTilingPattern +{ + public: + PSColoredTilingPattern (int id, BoundingBox &bbox, Matrix &matrix, double xstep, double ystep); +}; + + +class PSUncoloredTilingPattern : public PSTilingPattern +{ + public: + PSUncoloredTilingPattern (int id, BoundingBox &bbox, Matrix &matrix, double xstep, double ystep); + ~PSUncoloredTilingPattern (); + std::string svgID () const; + void setColor (Color color) {_currentColor = color;} + void apply (SpecialActions *actions); + + protected: + XMLElementNode* createClipNode () const; + + private: + std::set<Color> _colors; ///< colors this pattern has already been drawn with + Color _currentColor; ///< current color to be applied + bool _applied; ///< has pattern with current group node already been applied to the SVG tree? +}; + +#endif diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageRanges.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageRanges.cpp index 8a20a35d52b..8a20a35d52b 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageRanges.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageRanges.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageRanges.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageRanges.h index b9f155cac47..b9f155cac47 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageRanges.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageRanges.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageSize.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageSize.cpp index 85a6c062f85..85a6c062f85 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageSize.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageSize.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageSize.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageSize.h index 058bc3d21ff..058bc3d21ff 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PageSize.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PageSize.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Pair.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Pair.h index a3dc5a12af3..a3dc5a12af3 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Pair.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Pair.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PdfSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PdfSpecialHandler.cpp index f3d8464704c..f3d8464704c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PdfSpecialHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PdfSpecialHandler.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PdfSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PdfSpecialHandler.h index 43cdd1045de..43cdd1045de 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PdfSpecialHandler.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PdfSpecialHandler.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Process.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Process.cpp index a76219e9846..a76219e9846 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Process.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Process.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Process.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Process.h index 973fabf2baf..973fabf2baf 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Process.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Process.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PsSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PsSpecialHandler.cpp index 0bf926a3132..91020b9f28c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PsSpecialHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PsSpecialHandler.cpp @@ -22,9 +22,11 @@ #include <fstream> #include <iostream> #include <sstream> +#include "EPSFile.h" #include "FileFinder.h" #include "Ghostscript.h" #include "Message.h" +#include "PSPattern.h" #include "PsSpecialHandler.h" #include "SpecialActions.h" #include "XMLNode.h" @@ -47,8 +49,9 @@ PsSpecialHandler::PsSpecialHandler () : _psi(this), _actions(0), _initialized(fa PsSpecialHandler::~PsSpecialHandler () { - // ensure no further PS actions are performed - _psi.setActions(0); + _psi.setActions(0); // ensure no further PS actions are performed + for (map<int, PSPattern*>::iterator it=_patterns.begin(); it != _patterns.end(); ++it) + delete it->second; } @@ -61,9 +64,10 @@ void PsSpecialHandler::initialize (SpecialActions *actions) { _linewidth = 1; _linecap = _linejoin = 0; _miterlimit = 4; - _xmlnode = 0; + _xmlnode = _savenode = 0; _opacityalpha = 1; // fully opaque _sx = _sy = _cos = 1.0; + _pattern = 0; // execute dvips prologue/header files const char *headers[] = {"tex.pro", "texps.pro", "special.pro", /*"color.pro",*/ 0}; @@ -211,8 +215,9 @@ bool PsSpecialHandler::process (const char *prefix, istream &is, SpecialActions * @param[in] fname EPS file to be included * @param[in] attr attributes given with \special psfile */ void PsSpecialHandler::psfile (const string &fname, const map<string,string> &attr) { - ifstream ifs(fname.c_str()); - if (!ifs) + EPSFile epsfile(fname); + istream &is = epsfile.istream(); + if (!is) Message::wstream(true) << "file '" << fname << "' not found in special 'psfile'\n"; else { map<string,string>::const_iterator it; @@ -261,14 +266,16 @@ void PsSpecialHandler::psfile (const string &fname, const map<string,string> &at _xmlnode = new XMLElementNode("g"); _psi.execute("\n@beginspecial @setspecial "); // enter \special environment - _psi.execute(ifs); // process EPS file + _psi.limit(epsfile.pslength()); // limit the number of bytes to be processed + _psi.execute(is); // process EPS file + _psi.limit(0); // disable limitation _psi.execute("\n@endspecial "); // leave special environment - if (!_xmlnode->empty()) { // has anything been drawn? + if (!_xmlnode->empty()) { // has anything been drawn? Matrix m(1); m.rotate(angle).scale(hscale/100, vscale/100).translate(hoffset, voffset); m.translate(-llx, lly); m.scale(sx, sy); // resize image to width "rwi" and height "rhi" - m.translate(x, y); // move image to current DVI position + m.translate(x, y); // move image to current DVI position _xmlnode->addAttribute("transform", m.getSVG()); _actions->appendToPage(_xmlnode); } @@ -361,9 +368,9 @@ void PsSpecialHandler::stroke (vector<double> &p) { double y = point.y(); double r = _linewidth/2.0; path = new XMLElementNode("circle"); - path->addAttribute("cx", XMLString(x)); - path->addAttribute("cy", XMLString(y)); - path->addAttribute("r", XMLString(r)); + path->addAttribute("cx", x); + path->addAttribute("cy", y); + path->addAttribute("r", r); path->addAttribute("fill", _actions->getColor().rgbString()); bbox = BoundingBox(x-r, y-r, x+r, y+r); } @@ -380,21 +387,21 @@ void PsSpecialHandler::stroke (vector<double> &p) { path->addAttribute("stroke", _actions->getColor().rgbString()); path->addAttribute("fill", "none"); if (_linewidth != 1) - path->addAttribute("stroke-width", XMLString(_linewidth)); + path->addAttribute("stroke-width", _linewidth); if (_miterlimit != 4) - path->addAttribute("stroke-miterlimit", XMLString(_miterlimit)); - if (_linecap > 0) // default value is "butt", no need to set it explicitely - path->addAttribute("stroke-linecap", XMLString(_linecap == 1 ? "round" : "square")); - if (_linejoin > 0) // default value is "miter", no need to set it explicitely - path->addAttribute("stroke-linejoin", XMLString(_linecap == 1 ? "round" : "bevel")); + path->addAttribute("stroke-miterlimit", _miterlimit); + if (_linecap > 0) // default value is "butt", no need to set it explicitly + path->addAttribute("stroke-linecap", _linecap == 1 ? "round" : "square"); + if (_linejoin > 0) // default value is "miter", no need to set it explicitly + path->addAttribute("stroke-linejoin", _linecap == 1 ? "round" : "bevel"); if (_opacityalpha < 1) - path->addAttribute("stroke-opacity", XMLString(_opacityalpha)); + path->addAttribute("stroke-opacity", _opacityalpha); if (!_dashpattern.empty()) { ostringstream oss; for (size_t i=0; i < _dashpattern.size(); i++) { if (i > 0) oss << ','; - oss << _dashpattern[i]; + oss << XMLString(_dashpattern[i]); } path->addAttribute("stroke-dasharray", oss.str()); if (_dashoffset != 0) @@ -403,7 +410,7 @@ void PsSpecialHandler::stroke (vector<double> &p) { } if (path && _clipStack.top()) { // assign clipping path and clip bounding box - path->addAttribute("clip-path", XMLString("url(#clip")+XMLString(_clipStack.topID())+XMLString(")")); + path->addAttribute("clip-path", XMLString("url(#clip")+XMLString(_clipStack.topID())+")"); BoundingBox clipbox; _clipStack.top()->computeBBox(clipbox); bbox.intersect(clipbox); @@ -433,7 +440,6 @@ void PsSpecialHandler::fill (vector<double> &p, bool evenodd) { if (!_xmlnode) bbox.transform(_actions->getMatrix()); } - const double pt = 72.27/72.0; // factor to convert bp -> pt ScalingMatrix scale(pt, pt); _path.transform(scale); @@ -443,11 +449,13 @@ void PsSpecialHandler::fill (vector<double> &p, bool evenodd) { _path.writeSVG(oss); XMLElementNode *path = new XMLElementNode("path"); path->addAttribute("d", oss.str()); - if (_actions->getColor() != Color::BLACK) + if (_pattern) + path->addAttribute("fill", XMLString("url(#")+_pattern->svgID()+")"); + else if (_actions->getColor() != Color::BLACK || _savenode) path->addAttribute("fill", _actions->getColor().rgbString()); if (_clipStack.top()) { // assign clipping path and clip bounding box - path->addAttribute("clip-path", XMLString("url(#clip")+XMLString(_clipStack.topID())+XMLString(")")); + path->addAttribute("clip-path", XMLString("url(#clip")+XMLString(_clipStack.topID())+")"); BoundingBox clipbox; _clipStack.top()->computeBBox(clipbox); bbox.intersect(clipbox); @@ -455,7 +463,7 @@ void PsSpecialHandler::fill (vector<double> &p, bool evenodd) { if (evenodd) // SVG default fill rule is "nonzero" algorithm path->addAttribute("fill-rule", "evenodd"); if (_opacityalpha < 1) - path->addAttribute("fill-opacity", XMLString(_opacityalpha)); + path->addAttribute("fill-opacity", _opacityalpha); if (_xmlnode) _xmlnode->append(path); else { @@ -467,6 +475,101 @@ void PsSpecialHandler::fill (vector<double> &p, bool evenodd) { } +/** Creates a Matrix object out of a given sequence of 6 double values. + * The given values must be arranged in PostScript matrix order. + * @param[in] v vector containing the matrix values + * @param[in] startindex vector index of first component + * @param[out] matrix the generated matrix */ +static void create_matrix (vector<double> &v, int startindex, Matrix &matrix) { + // Ensure vector p has 6 elements. If necessary, add missing ones + // using corresponding values of the identity matrix. + if (v.size()-startindex < 6) { + v.resize(6+startindex); + for (int i=v.size()-startindex; i < 6; ++i) + v[i+startindex] = (i%3 ? 0 : 1); + } + // PS matrix [a b c d e f] equals ((a,b,0),(c,d,0),(e,f,1)). + // Since PS uses left multiplications, we must transpose and reorder + // the matrix to ((a,c,e),(b,d,f),(0,0,1)). This is done by the + // following swaps. + swap(v[startindex+1], v[startindex+2]); // => (a, c, b, d, e, f) + swap(v[startindex+2], v[startindex+4]); // => (a, c, e, d, b, f) + swap(v[startindex+3], v[startindex+4]); // => (a, c, e, b, d, f) + matrix.set(v, startindex); +} + + +/** Starts the definition of a new fill pattern. This operator + * expects 9 parameters for tiling patterns (see PS reference 4.9.2): + * @param[in] p the 9 values defining a tiling pattern (see PS reference 4.9.2): + * 0: pattern type (0:none, 1:tiling, 2:shading) + * 1: pattern ID + * 2-5: lower left and upper right coordinates of pattern box + * 6: horizontal distance of adjacent tiles + * 7: vertical distance of adjacent tiles + * 8: paint type (1: colored pattern, 2: uncolored pattern) + * 9-14: pattern matrix */ +void PsSpecialHandler::makepattern (vector<double> &p) { + int pattern_type = static_cast<int>(p[0]); + int id = static_cast<int>(p[1]); + switch (pattern_type) { + case 0: + // pattern definition completed + if (_savenode) { + _xmlnode = _savenode; + _savenode = 0; + } + break; + case 1: { // tiling pattern + BoundingBox bbox(p[2], p[3], p[4], p[5]); + const double &xstep=p[6], &ystep=p[7]; // horizontal and vertical distance of adjacent tiles + int paint_type = static_cast<int>(p[8]); + + Matrix matrix; // transformation matrix given together with pattern definition + create_matrix(p, 9, matrix); + matrix.rmultiply(_actions->getMatrix()); + + PSTilingPattern *pattern=0; + if (paint_type == 1) + pattern = new PSColoredTilingPattern(id, bbox, matrix, xstep, ystep); + else + pattern = new PSUncoloredTilingPattern(id, bbox, matrix, xstep, ystep); + _patterns[id] = pattern; + _savenode = _xmlnode; + _xmlnode = pattern->getContainerNode(); // insert the following SVG elements into this node + break; + } + case 2: { + // define a shading pattern + } + } +} + + +/** Selects a previously defined fill pattern. + * 0: pattern ID + * 1-3: (optional) RGB values for uncolored tiling patterns + * further parameters depend on the pattern type */ +void PsSpecialHandler::setpattern (vector<double> &p) { + int pattern_id = p[0]; + Color color; + if (p.size() == 4) + color.set((float)p[1], (float)p[2], (float)p[3]); + map<int,PSPattern*>::iterator it = _patterns.find(pattern_id); + if (it == _patterns.end()) + _pattern = 0; + else { + if (PSUncoloredTilingPattern *pattern = dynamic_cast<PSUncoloredTilingPattern*>(it->second)) + pattern->setColor(color); + it->second->apply(_actions); + if (PSTilingPattern *pattern = dynamic_cast<PSTilingPattern*>(it->second)) + _pattern = pattern; + else + _pattern = 0; + } +} + + /** Clears the current clipping path. * @param[in] p not used */ void PsSpecialHandler::initclip (vector<double> &p) { @@ -502,7 +605,7 @@ void PsSpecialHandler::clip (vector<double> &p, bool evenodd) { XMLElementNode *clip = new XMLElementNode("clipPath"); clip->addAttribute("id", XMLString("clip")+XMLString(newID)); if (oldID) - clip->addAttribute("clip-path", XMLString("url(#clip")+XMLString(oldID)+XMLString(")")); + clip->addAttribute("clip-path", XMLString("url(#clip")+XMLString(oldID)+")"); clip->append(path); _actions->appendToDefs(clip); @@ -518,21 +621,8 @@ void PsSpecialHandler::newpath (vector<double> &p) { void PsSpecialHandler::setmatrix (vector<double> &p) { if (_actions) { - // Ensure vector p has 6 elements. If necessary, add missing ones - // using corresponding values of the identity matrix. - if (p.size() < 6) { - p.resize(6); - for (int i=p.size(); i < 6; i++) - p[i] = (i%3 ? 0 : 1); - } - // PS matrix [a b c d e f] equals ((a,b,0),(c,d,0),(e,f,1)). - // Since PS uses left multiplications, we must transpose and reorder - // the matrix to ((a,c,e),(b,d,f),(0,0,1)). This is done by the - // following swaps. - swap(p[1], p[2]); // => (a, c, b, d, e, f) - swap(p[2], p[4]); // => (a, c, e, d, b, f) - swap(p[3], p[4]); // => (a, c, e, b, d, f) - Matrix m(p); + Matrix m; + create_matrix(p, 0, m); _actions->setMatrix(m); } } @@ -572,7 +662,9 @@ void PsSpecialHandler::rotate (vector<double> &p) { } } + void PsSpecialHandler::setgray (vector<double> &p) { + _pattern = 0; if (_actions) { Color c; c.setGray((float)p[0]); @@ -582,12 +674,14 @@ void PsSpecialHandler::setgray (vector<double> &p) { void PsSpecialHandler::setrgbcolor (vector<double> &p) { + _pattern= 0; if (_actions) _actions->setColor(Color((float)p[0], (float)p[1], (float)p[2])); } void PsSpecialHandler::setcmykcolor (vector<double> &p) { + _pattern = 0; if (_actions) { Color c; c.setCMYK((float)p[0], (float)p[1], (float)p[2], (float)p[3]); @@ -597,6 +691,7 @@ void PsSpecialHandler::setcmykcolor (vector<double> &p) { void PsSpecialHandler::sethsbcolor (vector<double> &p) { + _pattern = 0; if (_actions) { Color c; c.setHSB((float)p[0], (float)p[1], (float)p[2]); diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PsSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PsSpecialHandler.h index 0807382afbd..afb9b3cfc36 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/PsSpecialHandler.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/PsSpecialHandler.h @@ -21,12 +21,17 @@ #ifndef PSSPECIALHANDLER_H #define PSSPECIALHANDLER_H +#include <set> #include <stack> +#include <string> #include <vector> #include "GraphicPath.h" #include "PSInterpreter.h" #include "SpecialHandler.h" +#include "PSPattern.h" + +class PSPattern; class XMLElementNode; class PsSpecialHandler : public SpecialHandler, protected PSActions @@ -86,6 +91,7 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions void gsave (std::vector<double> &p); void initclip (std::vector<double> &p); void lineto (std::vector<double> &p); + void makepattern (std::vector<double> &p); void moveto (std::vector<double> &p); void newpath (std::vector<double> &p); void querypos (std::vector<double> &p) {_currentpoint = DPair(p[0], p[1]);} @@ -103,6 +109,7 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions void setmatrix (std::vector<double> &p); void setmiterlimit (std::vector<double> &p) {_miterlimit = p[0]*1.00375;} void setopacityalpha (std::vector<double> &p){_opacityalpha = p[0];} + void setpattern (std::vector<double> &p); void setrgbcolor (std::vector<double> &rgb); void stroke (std::vector<double> &p); void translate (std::vector<double> &p); @@ -113,6 +120,7 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions SpecialActions *_actions; bool _initialized; XMLElementNode *_xmlnode; ///< if != 0, created SVG elements are appended to this node + XMLElementNode *_savenode; ///< pointer to temporaryly store _xmlnode Path _path; DPair _currentpoint; ///< current PS position in bp units double _sx, _sy; ///< horizontal and vertical scale factors retrieved by operator "applyscalevals" @@ -125,6 +133,8 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions double _dashoffset; ///< current dash offset std::vector<double> _dashpattern; ClippingStack _clipStack; + std::map<int, PSPattern*> _patterns; + PSTilingPattern *_pattern; ///< current pattern }; #endif diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SVGOutputBase.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SVGOutputBase.h new file mode 100644 index 00000000000..f53815c0a28 --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SVGOutputBase.h @@ -0,0 +1,33 @@ +/************************************************************************* +** SVGOutputBase.h ** +** ** +** This file is part of dvisvgm -- the DVI to SVG converter ** +** Copyright (C) 2005-2013 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 SVGOUTPUTBASE_H +#define SVGOUTPUTBASE_H + +#include <ostream> +#include <string> + +struct SVGOutputBase { + virtual ~SVGOutputBase () {} + virtual std::ostream& getPageStream (int page, int numPages) const =0; + virtual std::string filename (int page, int numPages) const =0; +}; + +#endif diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SVGTree.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SVGTree.cpp index d37dba6dc7f..d37dba6dc7f 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SVGTree.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SVGTree.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SVGTree.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SVGTree.h index c81dbd6d62f..c81dbd6d62f 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SVGTree.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SVGTree.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SignalHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SignalHandler.cpp index ffcd66165e0..ffcd66165e0 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SignalHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SignalHandler.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SignalHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SignalHandler.h index e7473f567d8..e7473f567d8 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SignalHandler.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SignalHandler.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialActions.h index 3d99d9b17c0..3d99d9b17c0 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialActions.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialActions.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialHandler.h index 7818dbfb108..7818dbfb108 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialHandler.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialHandler.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialManager.cpp index 7ef7ea4a67a..7ef7ea4a67a 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialManager.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialManager.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialManager.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialManager.h index 51f9bb08d02..51f9bb08d02 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/SpecialManager.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/SpecialManager.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamReader.cpp index bc6ac14eaef..bc6ac14eaef 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamReader.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamReader.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamReader.h index 4a9ce672d8e..4a9ce672d8e 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamReader.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamReader.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamWriter.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamWriter.cpp index bdd378f9993..bdd378f9993 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamWriter.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamWriter.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamWriter.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamWriter.h index 6217800dae6..6217800dae6 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/StreamWriter.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/StreamWriter.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Subfont.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Subfont.cpp index aa552d029f6..aa552d029f6 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Subfont.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Subfont.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Subfont.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Subfont.h index b099bc76897..b099bc76897 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Subfont.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Subfont.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/System.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/System.cpp index 80c71ec7b4c..80c71ec7b4c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/System.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/System.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/System.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/System.h index 775d6358dd7..775d6358dd7 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/System.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/System.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/TFM.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/TFM.cpp index 093af8cb5e3..093af8cb5e3 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/TFM.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/TFM.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/TFM.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/TFM.h index f2ce472ead4..f2ce472ead4 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/TFM.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/TFM.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Terminal.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Terminal.cpp index b40a68c73d9..b40a68c73d9 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Terminal.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Terminal.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Terminal.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Terminal.h index 835ae4571e6..835ae4571e6 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/Terminal.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/Terminal.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/TpicSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/TpicSpecialHandler.cpp index 13c36259fae..f61338905e4 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/TpicSpecialHandler.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/TpicSpecialHandler.cpp @@ -88,7 +88,7 @@ void TpicSpecialHandler::drawLines (bool stroke, bool fill, double ddist, Specia oss << ' '; double x = it->x()+actions->getX(); double y = it->y()+actions->getY(); - oss << x << ',' << y; + oss << XMLString(x) << ',' << XMLString(y); actions->embed(DPair(x, y)); } elem->addAttribute("points", oss.str()); @@ -99,11 +99,8 @@ void TpicSpecialHandler::drawLines (bool stroke, bool fill, double ddist, Specia } if (ddist > 0) elem->addAttribute("stroke-dasharray", XMLString(ddist)); - else if (ddist < 0) { - ostringstream oss; - oss << _penwidth << ' ' << -ddist; - elem->addAttribute("stroke-dasharray", oss.str()); - } + else if (ddist < 0) + elem->addAttribute("stroke-dasharray", XMLString(_penwidth) + ' ' + XMLString(-ddist)); actions->appendToPage(elem); } reset(); @@ -111,8 +108,8 @@ void TpicSpecialHandler::drawLines (bool stroke, bool fill, double ddist, Specia /** Stroke a quadratic spline through the midpoints of the lines defined by - * the previously recorded points. The spline starts with a straight line - * from the first point to the mid-point of the first line. The spline ends + * the previously recorded points. The spline starts with a straight line + * from the first point to the mid-point of the first line. The spline ends * with a straight line from the mid-point of the last line to the last point. * If ddist=0, the spline is stroked solid. Otherwise ddist denotes the length * of the dashes and the gaps inbetween. @@ -127,24 +124,24 @@ void TpicSpecialHandler::drawSplines (double ddist, SpecialActions *actions) { double y = actions->getY(); DPair p(x,y); ostringstream oss; - oss << 'M' << x+_points[0].x() << ',' << y+_points[0].y(); + oss << 'M' << XMLString(x+_points[0].x()) << ',' << XMLString(y+_points[0].y()); DPair mid = p+_points[0]+(_points[1]-_points[0])/2.0; - oss << 'L' << mid.x() << ',' << mid.y(); + oss << 'L' << XMLString(mid.x()) << ',' << XMLString(mid.y()); actions->embed(p+_points[0]); for (size_t i=1; i < size-1; i++) { const DPair p0 = p+_points[i-1]; const DPair p1 = p+_points[i]; const DPair p2 = p+_points[i+1]; mid = p1+(p2-p1)/2.0; - oss << 'Q' << p1.x() << ',' << p1.y() - << ' ' << mid.x() << ',' << mid.y(); + oss << 'Q' << XMLString(p1.x()) << ',' << XMLString(p1.y()) + << ' ' << XMLString(mid.x()) << ',' << XMLString(mid.y()); actions->embed(mid); actions->embed((p0+p1*6.0+p2)/8.0, _penwidth); } if (_points[0] == _points[size-1]) // closed path? oss << 'Z'; else { - oss << 'L' << x+_points[size-1].x() << ',' << y+_points[size-1].y(); + oss << 'L' << XMLString(x+_points[size-1].x()) << ',' << XMLString(y+_points[size-1].y()); actions->embed(p+_points[size-1]); } @@ -164,11 +161,8 @@ void TpicSpecialHandler::drawSplines (double ddist, SpecialActions *actions) { path->addAttribute("stroke-width", XMLString(_penwidth)); if (ddist > 0) path->addAttribute("stroke-dasharray", XMLString(ddist)); - else if (ddist < 0) { - ostringstream oss; - oss << _penwidth << ' ' << -ddist; - path->addAttribute("stroke-dasharray", oss.str()); - } + else if (ddist < 0) + path->addAttribute("stroke-dasharray", XMLString(_penwidth) + ' ' + XMLString(-ddist)); actions->appendToPage(path); } } @@ -187,7 +181,7 @@ void TpicSpecialHandler::drawArc (double cx, double cy, double rx, double ry, do if (actions) { const double PI2 = 4*asin(1.0); angle1 *= -1; - angle2 *= -1; + angle2 *= -1; if (fabs(angle1) > PI2) { int n = (int)(angle1/PI2); angle1 = angle1 - n*PI2; @@ -217,11 +211,11 @@ void TpicSpecialHandler::drawArc (double cx, double cy, double rx, double ry, do sweep_flag = 1-sweep_flag; } ostringstream oss; - oss << 'M' << x+rx*cos(angle1) << ',' << y+ry*sin(-angle1) - << 'A' << rx << ',' << ry + oss << 'M' << XMLString(x+rx*cos(angle1)) << ',' << XMLString(y+ry*sin(-angle1)) + << 'A' << XMLString(rx) << ',' << XMLString(ry) << " 0 " << large_arg << ' ' << sweep_flag << ' ' - << x+rx*cos(angle2) << ',' << y-ry*sin(angle2); + << XMLString(x+rx*cos(angle2)) << ',' << XMLString(y-ry*sin(angle2)); if (_fill >= 0) oss << 'Z'; elem->addAttribute("d", oss.str()); diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/TpicSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/TpicSpecialHandler.h index 257843d1115..257843d1115 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/TpicSpecialHandler.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/TpicSpecialHandler.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/VFActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/VFActions.h index ba25639b337..ba25639b337 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/VFActions.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/VFActions.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/VFReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/VFReader.cpp index 39b081d8284..39b081d8284 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/VFReader.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/VFReader.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/VFReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/VFReader.h index 3abaa894cfa..3abaa894cfa 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/VFReader.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/VFReader.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/VectorStream.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/VectorStream.h index d767c071290..d767c071290 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/VectorStream.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/VectorStream.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLDocTypeNode.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLDocTypeNode.h index ad1cd0f3b38..ad1cd0f3b38 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLDocTypeNode.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLDocTypeNode.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLDocument.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLDocument.cpp index f9a65c90da8..f9a65c90da8 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLDocument.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLDocument.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLDocument.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLDocument.h index 3697c5702d6..3697c5702d6 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLDocument.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLDocument.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLNode.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLNode.cpp index e287c4ea852..909ad0f62a2 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLNode.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLNode.cpp @@ -36,6 +36,14 @@ XMLElementNode::XMLElementNode (const string &n) : _name(n), _emitted(false) { } +XMLElementNode::XMLElementNode (const XMLElementNode &node) + : _name(node._name), _attributes(node._attributes), _emitted(false) +{ + FORALL(node._children, ChildList::const_iterator, it) + _children.push_back((*it)->clone()); +} + + XMLElementNode::~XMLElementNode () { FORALL(_children, ChildList::iterator, i) delete *i; @@ -126,6 +134,23 @@ bool XMLElementNode::insertAfter (XMLNode *child, XMLNode *sibling) { } +/** Finds all descendant elements of a given name and given attribute. + * @param[in] name name of elements to find + * @param[in] attr_name name of attribute to find + * @param[out] descendants all elements found + * @return true if at least one element was found */ +bool XMLElementNode::findDescendants (const char *name, const char *attr_name, vector<XMLElementNode*> &descendants) { + FORALL(_children, ChildList::iterator, it) { + if (XMLElementNode *elem = dynamic_cast<XMLElementNode*>(*it)) { + if ((!name || elem->getName() == name) && (!attr_name || elem->hasAttribute(attr_name))) + descendants.push_back(elem); + elem->findDescendants(name, attr_name, descendants); + } + } + return !descendants.empty(); +} + + ostream& XMLElementNode::write (ostream &os) const { os << '<' << _name; FORALL(_attributes, AttribMap::const_iterator, i) @@ -191,6 +216,17 @@ bool XMLElementNode::hasAttribute (const string &name) const { } +/** Returns the value of an attribute. + * @param[in] name name of attribute + * @return attribute value or 0 if attribute doesn't exist */ +const char* XMLElementNode::getAttributeValue(const std::string& name) const { + AttribMap::const_iterator it = _attributes.find(name); + if (it != _attributes.end()) + return it->second.c_str(); + return 0; +} + + ////////////////////// void XMLTextNode::append (XMLNode *node) { @@ -229,6 +265,14 @@ XMLDeclarationNode::XMLDeclarationNode (const string &n, const string &p) } +XMLDeclarationNode::XMLDeclarationNode (const XMLDeclarationNode &node) + : _name(node._name), _params(node._params), _emitted(false) +{ + FORALL(node._children, list<XMLDeclarationNode*>::const_iterator, it) + _children.push_back(new XMLDeclarationNode(**it)); +} + + XMLDeclarationNode::~XMLDeclarationNode () { FORALL(_children, list<XMLDeclarationNode*>::iterator, i) delete *i; diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLNode.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLNode.h index 33792bcb6e7..c50a4ca45cf 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLNode.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLNode.h @@ -32,6 +32,7 @@ struct XMLNode { virtual ~XMLNode () {} + virtual XMLNode* clone () const =0; virtual std::ostream& write (std::ostream &os) const =0; virtual bool emit (std::ostream &os, XMLNode *stopElement); virtual void append (XMLNode *child) {} @@ -45,7 +46,9 @@ class XMLElementNode : public XMLNode typedef std::list<XMLNode*> ChildList; public: XMLElementNode (const std::string &name); + XMLElementNode (const XMLElementNode &node); ~XMLElementNode (); + XMLNode* clone () const {return new XMLElementNode(*this);} void addAttribute (const std::string &name, const std::string &value); void addAttribute (const std::string &name, double value); void append (XMLNode *child); @@ -54,6 +57,8 @@ class XMLElementNode : public XMLNode bool insertAfter (XMLNode *child, XMLNode *sibling); bool insertBefore (XMLNode *child, XMLNode *sibling); bool hasAttribute (const std::string &name) const; + const char* getAttributeValue (const std::string &name) const; + bool findDescendants (const char *name, const char *attr_name, std::vector<XMLElementNode*> &descendants); std::ostream& write (std::ostream &os) const; bool emit (std::ostream &os, XMLNode *stopElement); bool empty () const {return _children.empty();} @@ -72,6 +77,7 @@ class XMLTextNode : public XMLNode { public: XMLTextNode (const std::string &str) : _text(str) {} + XMLNode* clone () const {return new XMLTextNode(*this);} void append (XMLNode *node); void append (XMLTextNode *node); void append (const std::string &str); @@ -87,6 +93,7 @@ class XMLCommentNode : public XMLNode { public: XMLCommentNode (const std::string &str) : _text(str) {} + XMLNode* clone () const {return new XMLCommentNode(*this);} std::ostream& write (std::ostream &os) const {return os << "<!--" << _text << "-->\n";} private: @@ -98,7 +105,9 @@ class XMLDeclarationNode : public XMLNode { public: XMLDeclarationNode (const std::string &n, const std::string &p); + XMLDeclarationNode (const XMLDeclarationNode &node); ~XMLDeclarationNode (); + XMLNode* clone () const {return new XMLDeclarationNode(*this);} void append (XMLDeclarationNode *child); std::ostream& write (std::ostream &os) const; bool emit (std::ostream &os, XMLNode *stopElement); @@ -115,6 +124,7 @@ class XMLCDataNode : public XMLNode { public: XMLCDataNode (const std::string &d) : _data(d) {} + XMLNode* clone () const {return new XMLCDataNode(*this);} std::ostream& write (std::ostream &os) const; private: diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLString.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLString.cpp index 2ee9e7dad5f..326eaf89bdf 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLString.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLString.cpp @@ -18,12 +18,17 @@ ** along with this program; if not, see <http://www.gnu.org/licenses/>. ** *************************************************************************/ +#include <cmath> +#include <cstdlib> +#include <iomanip> #include <sstream> #include "macros.h" #include "XMLString.h" using namespace std; +int XMLString::DECIMAL_PLACES = 0; + static string translate (unsigned c) { switch (c) { case '<' : return "<"; @@ -40,6 +45,31 @@ static string translate (unsigned c) { } +#if 0 +/** Returns the number of pre-decimal places of a given floating point value. */ +static int predecimal_places (double x) { + int n = abs(static_cast<int>(x)); + int ret = (n == 0 ? 0 : 1); + while (n >= 10) { + ret++; + n /= 10; + } + return ret; +} +#endif + + +/** Rounds a floating point value to a given number of decimal places. + * @param[in] x number to round + * @param[in] n number of decimal places (must be between 1 and 6) + * @return rounded value */ +static inline double round (double x, long n) { + const long pow10[] = {10L, 100L, 1000L, 10000L, 100000L, 1000000L}; + n--; + return floor(x*pow10[n]+0.5)/pow10[n]; +} + + XMLString::XMLString (const string &str, bool plain) { if (plain) *this = str; @@ -75,6 +105,8 @@ XMLString::XMLString (int n, bool cast) { XMLString::XMLString (double x) { stringstream ss; + if (DECIMAL_PLACES > 0) + x = round(x, DECIMAL_PLACES); ss << x; ss >> *this; } diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLString.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLString.h index 0cc404b1b21..b1496b4a503 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/XMLString.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/XMLString.h @@ -32,6 +32,8 @@ class XMLString : public std::string XMLString (const std::string &str, bool plain=false); XMLString (int n, bool cast=true); XMLString (double x); + + static int DECIMAL_PLACES; ///< number of decimal places applied to floating point values (0-6) }; diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/dvisvgm.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/dvisvgm.cpp index 71dcb6740f5..7f6e5f5961b 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/dvisvgm.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/dvisvgm.cpp @@ -28,6 +28,7 @@ #include "CommandLine.h" #include "DVIToSVG.h" #include "DVIToSVGActions.h" +#include "EPSToSVG.h" #include "FilePath.h" #include "FileSystem.h" #include "Font.h" @@ -41,6 +42,7 @@ #include "PageSize.h" #include "SignalHandler.h" #include "SpecialManager.h" +#include "SVGOutputBase.h" #include "System.h" #ifdef HAVE_CONFIG_H @@ -60,7 +62,7 @@ extern "C" { using namespace std; -class SVGOutput : public DVIToSVG::Output +class SVGOutput : public SVGOutputBase { public: SVGOutput (const char *base=0, string pattern="", int zip_level=0) @@ -148,10 +150,11 @@ class SVGOutput : public DVIToSVG::Output mutable ostream *_os; }; +//////////////////////////////////////////////////////////////////////////////// static void show_help (const CommandLine &cmd) { cout << PACKAGE_STRING "\n\n"; - cmd.help(); + cmd.help(cmd.help_arg()); cout << "\nCopyright (C) 2005-2013 Martin Gieseking <martin.gieseking@uos.de> \n\n"; } @@ -173,7 +176,7 @@ static string ensure_suffix (string fname, const string &suffix) { } -static void set_trans (DVIToSVG &dvisvg, const CommandLine &args) { +static string get_transformation_string (const CommandLine &args) { ostringstream oss; if (args.rotate_given()) oss << 'R' << args.rotate_arg() << ",w/2,h/2"; @@ -183,7 +186,7 @@ static void set_trans (DVIToSVG &dvisvg, const CommandLine &args) { oss << 'S' << args.scale_arg(); if (args.transform_given()) oss << args.transform_arg(); - dvisvg.setTransformation(oss.str()); + return oss.str(); } @@ -361,50 +364,58 @@ int main (int argc, char *argv[]) { SVGTree::CREATE_USE_ELEMENTS = args.no_fonts_arg() < 1; DVIToSVGActions::EXACT_BBOX = args.exact_given(); DVIToSVG::TRACE_MODE = args.trace_all_given() ? (args.trace_all_arg() ? 'a' : 'm') : 0; + Message::LEVEL = args.verbosity_arg(); PhysicalFont::KEEP_TEMP_FILES = args.keep_given(); PhysicalFont::METAFONT_MAG = args.mag_arg(); + XMLString::DECIMAL_PLACES = max(0, min(6, args.precision_arg())); double start_time = System::time(); - string dvifile = ensure_suffix(args.file(0), "dvi"); - ifstream ifs(dvifile.c_str(), ios_base::binary|ios_base::in); - if (!ifs) - Message::estream(true) << "can't open file '" << dvifile << "' for reading\n"; - else { - SVGOutput out(args.stdout_given() ? 0 : dvifile.c_str(), args.output_arg(), args.zip_given() ? args.zip_arg() : 0); - Message::LEVEL = args.verbosity_arg(); - DVIToSVG dvisvg(ifs, out); - const char *ignore_specials = args.no_specials_given() ? (args.no_specials_arg().empty() ? "*" : args.no_specials_arg().c_str()) : 0; - dvisvg.setProcessSpecials(ignore_specials, true); - set_trans(dvisvg, args); - dvisvg.setPageSize(args.bbox_arg()); + string inputfile = ensure_suffix(args.file(0), args.eps_given() ? "eps" : "dvi"); + ifstream ifs(inputfile.c_str(), ios_base::binary|ios_base::in); + if (!ifs) { + Message::estream(true) << "can't open file '" << inputfile << "' for reading\n"; + return 0; + } + FileFinder::init(argv[0], "dvisvgm", !args.no_mktexmf_given()); + try { + SVGOutput out(args.stdout_given() ? 0 : inputfile.c_str(), args.output_arg(), args.zip_given() ? args.zip_arg() : 0); + SignalHandler::instance().start(); + if (args.eps_given()) { + EPSToSVG eps2svg(inputfile, out); + eps2svg.convert(); + Message::mstream().indent(0); + Message::mstream(false, Message::MC_PAGE_NUMBER) + << "file converted in " << (System::time()-start_time) << " seconds\n"; + } + else { + DVIToSVG dvi2svg(ifs, out); + const char *ignore_specials = args.no_specials_given() ? (args.no_specials_arg().empty() ? "*" : args.no_specials_arg().c_str()) : 0; + dvi2svg.setProcessSpecials(ignore_specials, true); + dvi2svg.setTransformation(get_transformation_string(args)); + dvi2svg.setPageSize(args.bbox_arg()); - try { - FileFinder::init(argv[0], "dvisvgm", !args.no_mktexmf_given()); init_fontmap(args); pair<int,int> pageinfo; - SignalHandler::instance().start(); - dvisvg.convert(args.page_arg(), &pageinfo); + dvi2svg.convert(args.page_arg(), &pageinfo); Message::mstream().indent(0); Message::mstream(false, Message::MC_PAGE_NUMBER) << "\n" << pageinfo.first << " of " << pageinfo.second << " page"; if (pageinfo.second > 1) Message::mstream(false, Message::MC_PAGE_NUMBER) << 's'; - Message::mstream(false, Message::MC_PAGE_NUMBER) << " converted in " << (System::time()-start_time) << " seconds"; - Message::mstream(false) << "\n"; - - } - catch (DVIException &e) { - Message::estream() << "\nDVI error: " << e.what() << '\n'; - } - catch (PSException &e) { - Message::estream() << "\nPostScript error: " << e.what() << '\n'; - } - catch (SignalException &e) { - Message::wstream(true) << "execution interrupted by user\n"; - } - catch (MessageException &e) { - Message::estream(true) << e.what() << '\n'; + Message::mstream(false, Message::MC_PAGE_NUMBER) << " converted in " << (System::time()-start_time) << " seconds\n"; } } + catch (DVIException &e) { + Message::estream() << "\nDVI error: " << e.what() << '\n'; + } + catch (PSException &e) { + Message::estream() << "\nPostScript error: " << e.what() << '\n'; + } + catch (SignalException &e) { + Message::wstream(true) << "execution interrupted by user\n"; + } + catch (MessageException &e) { + Message::estream(true) << e.what() << '\n'; + } FileFinder::finish(); return 0; } diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/gzstream.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/gzstream.cpp index 2893c299891..2893c299891 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/gzstream.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/gzstream.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/gzstream.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/gzstream.h index 60f38c4fac7..60f38c4fac7 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/gzstream.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/gzstream.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/iapi.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/iapi.h index 8e29d938d03..8e29d938d03 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/iapi.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/iapi.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/ierrors.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/ierrors.h index 3184341177e..3184341177e 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/ierrors.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/ierrors.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/macros.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/macros.h index 8935b9babe9..8935b9babe9 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/macros.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/macros.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/options.xml b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/options.xml index dd43c07c039..2abf740d04b 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/options.xml +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/options.xml @@ -36,6 +36,9 @@ <arg type="string" name="filenames"/> <description>evaluate (additional) font map files</description> </option> + <option long="eps" short="E" if="!defined(DISABLE_GS)"> + <description>convert an EPS file to SVG</description> + </option> </section> <section title="SVG output options"> <option long="bbox" short="b"> @@ -46,6 +49,10 @@ <arg type="string" name="pattern"/> <description>set name pattern of output files</description> </option> + <option long="precision" short="d"> + <arg type="int" name="number" default="0"/> + <description>set number of decimal points (0-6)</description> + </option> <option long="stdout" short="s"> <description>write SVG output to stdout</description> </option> @@ -115,7 +122,8 @@ <description>colorize messages</description> </option> <option long="help" short="h"> - <description>print this help and exit</description> + <arg name="mode" type="int" optional="yes" default="0"/> + <description>print this summary of options and exit</description> </option> <option long="list-specials" short="l"> <description>print supported special sets and exit</description> diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.2/src/psdefs.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/psdefs.cpp new file mode 100644 index 00000000000..259105a3529 --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/psdefs.cpp @@ -0,0 +1,84 @@ +/************************************************************************* +** psdefs.cpp ** +** ** +** This file is part of dvisvgm -- the DVI to SVG converter ** +** Copyright (C) 2005-2013 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 "PSInterpreter.h" + +const char *PSInterpreter::PSDEFS = +"3 dict dup begin/Install{matrix setmatrix}def/HWResolution[72 72]def/PageSize[10" +"000 10000]def end setpagedevice/@dodraw true store/@patcnt 0 store/@SD systemdic" +"t def/@UD userdict def true setglobal @SD/:save @SD/save get put @SD/:restore @S" +"D/restore get put @SD/:gsave @SD/gsave get put @SD/:grestore @SD/grestore get pu" +"t @SD/:grestoreall @SD/grestoreall get put @SD/:stroke @SD/stroke get put @SD/:f" +"ill @SD/fill get put @SD/:eofill @SD/eofill get put @SD/:clip @SD/clip get put @" +"SD/:eoclip @SD/eoclip get put @SD/:charpath @SD/charpath get put @SD/:show @SD/s" +"how get put @SD/.setopacityalpha known not{@SD/.setopacityalpha{pop}put}if @SD/p" +"rval{dup type/stringtype eq{print}{30 string cvs print}ifelse}put @SD/prseq{-1 1" +"{-1 roll prval( )print}for(\\n)print}put @SD/prcmd{( )exch(\\ndvi.)3{print}repea" +"t prseq}put @SD/cvxall{{cvx}forall}put @SD/defpr{[exch[/copy @SD]cvxall 5 -1 rol" +"l dup 6 1 roll[/get/exec]cvxall 6 -1 roll dup 7 1 roll 4 -1 roll dup 5 1 roll du" +"p length string cvs/prcmd cvx]cvx def}put @SD/querypos{{currentpoint}stopped{$er" +"ror/newerror false put}{2(querypos)prcmd}ifelse}put @SD/applyscalevals{1 0 trans" +"form 0 0 transform 3 -1 roll sub dup mul 3 1 roll sub dup mul add sqrt 0 1 trans" +"form 0 0 transform 3 -1 roll sub dup mul 3 1 roll sub dup mul add sqrt 1 0 trans" +"form dup mul exch dup dup mul 3 -1 roll add sqrt div 3(applyscalevals)prcmd}def " +"@SD/prpath{{2(moveto)prcmd}{2(lineto)prcmd}{6(curveto)prcmd}{0(closepath)prcmd}p" +"athforall}put @SD/charpath{/@dodraw false store :charpath/@dodraw true store}put" +" @SD/show{@dodraw{dup :gsave true charpath eofill :grestore :show}if}put @SD/str" +"oke{@dodraw{0(newpath)prcmd prpath 0(stroke)prcmd newpath}{:stroke}ifelse}put @S" +"D/fill{@dodraw{0(newpath)prcmd prpath 0(fill)prcmd newpath}{:fill}ifelse}put @SD" +"/eofill{@dodraw{0(newpath)prcmd prpath 0(eofill)prcmd newpath}{:eofill}ifelse}pu" +"t @SD/clip{:clip 0(newpath)prcmd prpath 0(clip)prcmd}put @SD/eoclip{:eoclip 0(ne" +"wpath)prcmd prpath 0(eoclip)prcmd}put @SD/bop{pop pop}put/@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 ne" +"g 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 idiv{" +"@rectcc}repeat}{@rectcc}ifelse clip newpath}put @SD/rectfill{gsave newpath dup t" +"ype/arraytype eq{aload length 4 idiv{@rectcc}repeat}{@rectcc}ifelse fill grestor" +"e}put @SD/rectstroke{gsave newpath dup type/arraytype eq{aload length 4 idiv{@re" +"ct}repeat}{@rect}ifelse stroke grestore}put false setglobal @SD readonly pop/ini" +"tclip 0 defpr/sysexec{@SD exch get exec}def/adddot{dup length 1 add string dup 0" +" 46 put dup 3 -1 roll 1 exch putinterval}def/setlinewidth{dup/setlinewidth sysex" +"ec applyscalevals 1(setlinewidth)prcmd}def/setlinecap 1 defpr/setlinejoin 1 defp" +"r/setmiterlimit 1 defpr/setdash{mark 3 1 roll 2 copy/setdash sysexec applyscalev" +"als exch aload length 1 add -1 roll counttomark(setdash)prcmd pop}def/setgstate{" +"currentlinewidth 1(setlinewidth)prcmd currentlinecap 1(setlinecap)prcmd currentl" +"inejoin 1(setlinejoin)prcmd currentmiterlimit 1(setmiterlimit)prcmd currentrgbco" +"lor 3(setrgbcolor)prcmd 6 array currentmatrix aload pop 6(setmatrix)prcmd curren" +"tdash mark 3 1 roll exch aload length 1 add -1 roll counttomark(setdash)prcmd po" +"p}def/save{@UD begin/@saveID vmstatus pop pop def end :save @saveID 1(save)prcmd" +"}def/restore{:restore setgstate @UD/@saveID known{@UD begin @saveID end}{0}ifels" +"e 1(restore)prcmd}def/gsave 0 defpr/grestore{:grestore setgstate 0(grestore)prcm" +"d}def/grestoreall{:grestoreall setstate 0(grestoreall)prcmd}def/rotate{dup type/" +"arraytype ne{dup 1(rotate)prcmd}if/rotate sysexec}def/scale{dup type/arraytype n" +"e{2 copy 2(scale)prcmd}if/scale sysexec}def/translate{dup type/arraytype ne{2 co" +"py 2(translate)prcmd}if/translate sysexec}def/setmatrix{dup/setmatrix sysexec al" +"oad pop 6(setmatrix)prcmd}def/initmatrix{matrix setmatrix}def/concat{matrix curr" +"entmatrix matrix concatmatrix setmatrix}def/makepattern{gsave <</mx 3 -1 roll >>" +" begin dup/XUID[1000000 @patcnt]put mx/makepattern sysexec dup dup begin Pattern" +"Type @patcnt BBox aload pop XStep YStep PaintType mx aload pop 15(makepattern)pr" +"cmd newpath matrix setmatrix PaintProc 0 1(makepattern)prcmd end/@patcnt @patcnt" +" 1 add store end grestore}def/setpattern{begin PatternType 1 eq{PaintType 1 eq{X" +"UID aload pop exch pop 1}{:gsave[currentcolorspace aload length -1 roll pop]setc" +"olorspace/setcolor sysexec XUID aload pop exch pop currentrgbcolor :grestore 4}i" +"felse(setpattern)prcmd}{/setpattern sysexec}ifelse end}def/setcolor{dup type/dic" +"ttype eq{setpattern}{/setcolor sysexec}ifelse}def/setgray 1 defpr/setcmykcolor 4" +" defpr/sethsbcolor 3 defpr/setrgbcolor 3 defpr/.setopacityalpha{dup/.setopacitya" +"lpha sysexec 1(setopacityalpha)prcmd}def "; diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/types.h b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/types.h index c22d0e1bf47..c22d0e1bf47 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/src/types.h +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/src/types.h diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/BoundingBoxTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/BoundingBoxTest.cpp index 53bf63c3bf4..53bf63c3bf4 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/BoundingBoxTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/BoundingBoxTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/CRC32Test.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/CRC32Test.cpp index 40bc3415363..40bc3415363 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/CRC32Test.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/CRC32Test.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/CalculatorTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/CalculatorTest.cpp index a4bb24c6215..a4bb24c6215 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/CalculatorTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/CalculatorTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/ColorSpecialTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/ColorSpecialTest.cpp index 48d4d57729b..48d4d57729b 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/ColorSpecialTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/ColorSpecialTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/CommandLineTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/CommandLineTest.cpp index 7d1e5874b33..7d1e5874b33 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/CommandLineTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/CommandLineTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/DirectoryTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/DirectoryTest.cpp index 5a503b9bfd7..5a503b9bfd7 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/DirectoryTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/DirectoryTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FileFinderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FileFinderTest.cpp index 9286237ad30..9286237ad30 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FileFinderTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FileFinderTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FilePathTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FilePathTest.cpp index 6f1ef7677ab..6f1ef7677ab 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FilePathTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FilePathTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FileSystemTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FileSystemTest.cpp index bd7adeef383..bd7adeef383 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FileSystemTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FileSystemTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FontManagerTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FontManagerTest.cpp index d7d0fb30f57..d7d0fb30f57 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FontManagerTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FontManagerTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FontMapTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FontMapTest.cpp index a853b829295..a853b829295 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/FontMapTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/FontMapTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/GFReaderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/GFReaderTest.cpp index 333eacfb7c4..333eacfb7c4 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/GFReaderTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/GFReaderTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/GraphicPathTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/GraphicPathTest.cpp index 6df695604f2..6df695604f2 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/GraphicPathTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/GraphicPathTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/LengthTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/LengthTest.cpp index e6c7bbd5dac..e6c7bbd5dac 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/LengthTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/LengthTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/Makefile.am index 8f528347c80..8f528347c80 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/Makefile.am +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/Makefile.am diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/MapLineTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/MapLineTest.cpp index 0816a37a24c..e03f53c4b21 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/MapLineTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/MapLineTest.cpp @@ -106,12 +106,13 @@ TEST_F(MapLineTest, pdfline3) { EXPECT_EQ(mapline.psname(), ""); EXPECT_EQ(mapline.encname(), "unicode"); EXPECT_EQ(mapline.fontfname(), "simsun.ttc"); - ASSERT_TRUE(mapline.sfd() != 0); - EXPECT_EQ(mapline.sfd()->name(), "UGBK"); - EXPECT_EQ(mapline.fontindex(), 0); - EXPECT_DOUBLE_EQ(mapline.slant(), 0.123); - EXPECT_DOUBLE_EQ(mapline.extend(), 0.456); - EXPECT_DOUBLE_EQ(mapline.bold(), 1); + if (mapline.sfd() != 0) { // if UGBK.sfd is installed do some more checks + EXPECT_EQ(mapline.sfd()->name(), "UGBK"); + EXPECT_EQ(mapline.fontindex(), 0); + EXPECT_DOUBLE_EQ(mapline.slant(), 0.123); + EXPECT_DOUBLE_EQ(mapline.extend(), 0.456); + EXPECT_DOUBLE_EQ(mapline.bold(), 1); + } } TEST_F(MapLineTest, pdfline4) { @@ -120,10 +121,11 @@ TEST_F(MapLineTest, pdfline4) { EXPECT_EQ(mapline.texname(), "gbk"); EXPECT_EQ(mapline.psname(), ""); EXPECT_EQ(mapline.encname(), ""); // encodings "default" and "none" are replaced with "" - EXPECT_EQ(mapline.fontfname(), "simsun.ttc"); - ASSERT_TRUE(mapline.sfd() != 0); - EXPECT_EQ(mapline.sfd()->name(), "UGBK"); - EXPECT_EQ(mapline.fontindex(), 1); - EXPECT_DOUBLE_EQ(mapline.slant(), 0); - EXPECT_DOUBLE_EQ(mapline.extend(), 0.345); + EXPECT_EQ(mapline.fontfname(), "simsun.ttc"); + if (mapline.sfd() != 0) { // if UGBK.sfd is installed do some more checks + EXPECT_EQ(mapline.sfd()->name(), "UGBK"); + EXPECT_EQ(mapline.fontindex(), 1); + EXPECT_DOUBLE_EQ(mapline.slant(), 0); + EXPECT_DOUBLE_EQ(mapline.extend(), 0.345); + } } diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/MatrixTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/MatrixTest.cpp index f01878900e1..f01878900e1 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/MatrixTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/MatrixTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/MessageExceptionTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/MessageExceptionTest.cpp index 14d6ed94978..14d6ed94978 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/MessageExceptionTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/MessageExceptionTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PSInterpreterTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PSInterpreterTest.cpp index 799124d477d..06a9e7ce0dc 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PSInterpreterTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PSInterpreterTest.cpp @@ -42,6 +42,8 @@ class PSTestActions : public PSActions void initclip (vector<double> &p) {print("initclip", p);} void lineto (vector<double> &p) {print("lineto", p);} void moveto (vector<double> &p) {print("moveto", p);} + void makepattern (vector<double> &p) {print("makepattern", p);} + void setpattern (vector<double> &p) {print("setpattern", p);} void newpath (vector<double> &p) {print("newpath", p);} void querypos (vector<double> &p) {print("querypos", p);} void restore(std::vector<double> &p) {print("restore", p);} diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PageRagesTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PageRagesTest.cpp index ec0da0dfb28..ec0da0dfb28 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PageRagesTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PageRagesTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PageSizeTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PageSizeTest.cpp index cb0bf778f9a..cb0bf778f9a 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PageSizeTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PageSizeTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PairTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PairTest.cpp index 68157243f43..68157243f43 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/PairTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/PairTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/SplittedCharInputBufferTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/SplittedCharInputBufferTest.cpp index ff35f1c265c..ff35f1c265c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/SplittedCharInputBufferTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/SplittedCharInputBufferTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/StreamInputBufferTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/StreamInputBufferTest.cpp index 8a1fbd103c2..8a1fbd103c2 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/StreamInputBufferTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/StreamInputBufferTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/StreamReaderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/StreamReaderTest.cpp index ba294a87201..ba294a87201 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/StreamReaderTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/StreamReaderTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/StreamWriterTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/StreamWriterTest.cpp index 0e142c205fa..0e142c205fa 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/StreamWriterTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/StreamWriterTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/SubfontTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/SubfontTest.cpp index de93aafcbaf..de93aafcbaf 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/SubfontTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/SubfontTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/TypesTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/TypesTest.cpp index 11cb44fc191..11cb44fc191 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/TypesTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/TypesTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/VectorStreamTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/VectorStreamTest.cpp index 2d5d0b0bc3e..2d5d0b0bc3e 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/VectorStreamTest.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/VectorStreamTest.cpp diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/check-conv b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/check-conv index 9aeda3a2d74..9aeda3a2d74 100755 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/check-conv +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/check-conv diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/cmr10.600gf b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/cmr10.600gf Binary files differindex 6dca421e21c..6dca421e21c 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/cmr10.600gf +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/cmr10.600gf diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/frktest-nf-cmp.svg b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/frktest-nf-cmp.svg index 372662c6b95..372662c6b95 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/frktest-nf-cmp.svg +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/frktest-nf-cmp.svg diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/frktest-wf-cmp.svg b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/frktest-wf-cmp.svg index b8effca34a5..b8effca34a5 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/frktest-wf-cmp.svg +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/frktest-wf-cmp.svg diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/frktest.dvi b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/frktest.dvi Binary files differindex 723b08a2964..723b08a2964 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/frktest.dvi +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/frktest.dvi diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/normalize.xsl b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/normalize.xsl index 5a6ba2f62d6..5a6ba2f62d6 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/normalize.xsl +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/normalize.xsl diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample-nf-cmp.svg b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample-nf-cmp.svg index b448e6caa8a..b448e6caa8a 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample-nf-cmp.svg +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample-nf-cmp.svg diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample-wf-cmp.svg b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample-wf-cmp.svg index d597c134c9a..d597c134c9a 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample-wf-cmp.svg +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample-wf-cmp.svg diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample.dvi b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample.dvi Binary files differindex 87e6236021d..87e6236021d 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample.dvi +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample.dvi diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample.sfd b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample.sfd index e7c84c7b5e1..e7c84c7b5e1 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-1.1/tests/sample.sfd +++ b/Build/source/texk/dvisvgm/dvisvgm-1.2/tests/sample.sfd diff --git a/Build/source/texk/dvisvgm/version.ac b/Build/source/texk/dvisvgm/version.ac index 285a8cbd248..1c972624ba2 100644 --- a/Build/source/texk/dvisvgm/version.ac +++ b/Build/source/texk/dvisvgm/version.ac @@ -8,4 +8,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current dvisvgm version -m4_define([dvisvgm_version], [1.1]) +m4_define([dvisvgm_version], [1.2]) |