summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-09-10 09:38:08 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-09-10 09:38:08 +0000
commit7143ba9bdf3a38213d327a4c77be353764d15cc7 (patch)
tree591170d8d6bacfa9717c0ffd9417e7a4865ffd1f /Build/source/texk
parentca57ff3358d873bf94442abbd8f840e99f939a30 (diff)
dvisvgm 1.5
git-svn-id: svn://tug.org/texlive/trunk@31620 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/README6
-rw-r--r--Build/source/texk/dvisvgm/ChangeLog6
-rw-r--r--Build/source/texk/dvisvgm/Makefile.am1
-rw-r--r--Build/source/texk/dvisvgm/Makefile.in6
-rwxr-xr-xBuild/source/texk/dvisvgm/configure26
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/patch-01-cpp71
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/patch-02-config_h203
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.4/src/Makefile.am53
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5-PATCHES/ChangeLog (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/ChangeLog)5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5-PATCHES/TL-Changes (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/TL-Changes)4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/AUTHORS (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/AUTHORS)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/COPYING (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/COPYING)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/INSTALL (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/INSTALL)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/LGPL-2.1.txt (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/LGPL-2.1.txt)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/Makefile.am (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/Makefile.am)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/NEWS (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/NEWS)11
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/README (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/README)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/config.h.in (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/config.h.in)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/configure.ac (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/configure.ac)4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/doc/Makefile.am (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/doc/Makefile.am)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/doc/dvisvgm.1 (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/doc/dvisvgm.1)46
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/doc/dvisvgm.txt.in (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/doc/dvisvgm.txt.in)90
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/BgColorSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/BgColorSpecialHandler.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/BgColorSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/BgColorSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Bitmap.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Bitmap.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Bitmap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Bitmap.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/BoundingBox.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/BoundingBox.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/BoundingBox.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/BoundingBox.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMap.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMap.cpp)8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMap.h)4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapManager.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapManager.cpp)6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapManager.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapManager.h)4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapReader.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CRC32.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CRC32.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CRC32.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CRC32.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Calculator.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Calculator.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Calculator.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Calculator.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMap.cpp57
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEncoding.h)34
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMapID.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CharMapID.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMapID.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CharMapID.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Character.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Character.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CmdLineParserBase.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CmdLineParserBase.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CmdLineParserBase.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CmdLineParserBase.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Color.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Color.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Color.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Color.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/ColorSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/ColorSpecialHandler.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/ColorSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/ColorSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CommandLine.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CommandLine.cpp)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/CommandLine.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/CommandLine.h)174
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DLLoader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DLLoader.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DLLoader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DLLoader.h)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIActions.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIActions.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIActions.h)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIReader.cpp)308
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIReader.h)31
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVG.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVG.cpp)19
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVG.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVG.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVGActions.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVGActions.cpp)76
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVGActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVGActions.h)4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Directory.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Directory.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Directory.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Directory.h)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DvisvgmSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DvisvgmSpecialHandler.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/DvisvgmSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/DvisvgmSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSFile.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSFile.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSFile.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSFile.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSToSVG.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSToSVG.cpp)18
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSToSVG.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSToSVG.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/EmSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/EmSpecialHandler.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/EmSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/EmSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/EncFile.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/EncFile.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/EncFile.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/EncFile.h)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileFinder.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileFinder.cpp)6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileFinder.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileFinder.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FilePath.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FilePath.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FilePath.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FilePath.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileSystem.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileSystem.cpp)5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileSystem.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileSystem.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Font.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Font.cpp)321
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Font.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Font.h)190
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontCache.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontCache.cpp)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontCache.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontCache.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEncoding.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEncoding.cpp)39
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEncoding.h65
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEngine.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEngine.cpp)163
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEngine.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEngine.h)9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontManager.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontManager.cpp)67
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontManager.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontManager.h)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMap.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMap.cpp)12
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMap.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMap.h)8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMetrics.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMetrics.cpp)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMetrics.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMetrics.h)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontStyle.h12
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFGlyphTracer.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFGlyphTracer.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFGlyphTracer.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFGlyphTracer.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFReader.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFTracer.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFTracer.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFTracer.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFTracer.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Ghostscript.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Ghostscript.cpp)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Ghostscript.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Ghostscript.h)7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Glyph.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Glyph.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/GlyphTracerMessages.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/GlyphTracerMessages.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/GraphicPath.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/GraphicPath.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/HtmlSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/HtmlSpecialHandler.cpp)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/HtmlSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/HtmlSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputBuffer.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputBuffer.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputBuffer.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputBuffer.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputReader.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/JFM.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/JFM.cpp)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/JFM.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/JFM.h)4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Length.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Length.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Length.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Length.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Makefile.am53
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/MapLine.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/MapLine.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/MapLine.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/MapLine.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Matrix.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Matrix.cpp)33
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Matrix.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Matrix.h)6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Message.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Message.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Message.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Message.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/MessageException.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/MessageException.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/MetafontWrapper.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/MetafontWrapper.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/MetafontWrapper.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/MetafontWrapper.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/MiKTeXCom.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/MiKTeXCom.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/MiKTeXCom.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/MiKTeXCom.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/NoPsSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/NoPsSpecialHandler.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/NoPsSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/NoPsSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSFilter.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSFilter.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSInterpreter.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSInterpreter.cpp)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSInterpreter.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSInterpreter.h)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPattern.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPattern.cpp)3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPattern.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPattern.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPreviewFilter.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPreviewFilter.cpp)5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPreviewFilter.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPreviewFilter.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageRanges.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageRanges.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageRanges.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageRanges.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageSize.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageSize.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageSize.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageSize.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Pair.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Pair.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PdfSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PdfSpecialHandler.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PdfSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PdfSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Process.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Process.cpp)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Process.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Process.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PsSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PsSpecialHandler.cpp)7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/PsSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/PsSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/SVGOutputBase.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/SVGOutputBase.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/SVGTree.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/SVGTree.cpp)73
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/SVGTree.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/SVGTree.h)2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/SignalHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/SignalHandler.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/SignalHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/SignalHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialActions.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialManager.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialManager.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialManager.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialManager.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamReader.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamWriter.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamWriter.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamWriter.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamWriter.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Subfont.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Subfont.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Subfont.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Subfont.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/System.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/System.cpp)5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/System.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/System.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/TFM.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/TFM.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/TFM.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/TFM.h)7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Terminal.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Terminal.cpp)5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/Terminal.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/Terminal.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/TpicSpecialHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/TpicSpecialHandler.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/TpicSpecialHandler.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/TpicSpecialHandler.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/VFActions.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/VFActions.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/VFReader.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/VFReader.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/VFReader.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/VFReader.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/VectorStream.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/VectorStream.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLDocument.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLDocument.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLDocument.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLDocument.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLNode.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLNode.cpp)1
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLNode.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLNode.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLString.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLString.cpp)57
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLString.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLString.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/dvisvgm.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/dvisvgm.cpp)24
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/gzstream.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/gzstream.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/gzstream.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/gzstream.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/iapi.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/iapi.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/ierrors.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/ierrors.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/macros.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/macros.h)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/options.xml (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/options.xml)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/psdefs.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/psdefs.cpp)0
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.5/src/types.h (renamed from Build/source/texk/dvisvgm/dvisvgm-1.4/src/types.h)0
-rw-r--r--Build/source/texk/dvisvgm/version.ac2
-rw-r--r--Build/source/texk/lcdf-typetools/ChangeLog2
191 files changed, 1566 insertions, 982 deletions
diff --git a/Build/source/texk/README b/Build/source/texk/README
index 3e86f1e4e86..92a88f157c0 100644
--- a/Build/source/texk/README
+++ b/Build/source/texk/README
@@ -59,8 +59,8 @@ dvipos - ?
dvipsk - maintained here, by us
-dvisvgm - checked 8aug13
- http://downloads.sourceforge.net/dvisvgm/dvisvgm-1.4.tar.gz
+dvisvgm - checked 10sep13
+ http://downloads.sourceforge.net/dvisvgm/dvisvgm-1.5.tar.gz
gsftopk - from Paul Vojta's xdvi?
@@ -69,7 +69,7 @@ kpathsea - maintained here, by us
lacheck - checked 25apr11
http://mirror.ctan.org/support/lacheck/lacheck-1.26.tar.gz
-lcdf-typetools 2.98 - checked 11apr13
+lcdf-typetools 2.99 - checked 10sep13
http://www.lcdf.org/type/
http://www.lcdf.org/type/lcdf-typetools-2.98.tar.gz
diff --git a/Build/source/texk/dvisvgm/ChangeLog b/Build/source/texk/dvisvgm/ChangeLog
index cb11c1dfe59..b51e980c158 100644
--- a/Build/source/texk/dvisvgm/ChangeLog
+++ b/Build/source/texk/dvisvgm/ChangeLog
@@ -1,3 +1,9 @@
+2013-09-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Imported release 1.5.
+ * version.ac: Adapted.
+ * Makefile.am: Adjusted.
+
2013-08-08 Peter Breitenlohner <peb@mppmu.mpg.de>
* Imported release 1.4.
diff --git a/Build/source/texk/dvisvgm/Makefile.am b/Build/source/texk/dvisvgm/Makefile.am
index 500cfd1752d..e1a13c95330 100644
--- a/Build/source/texk/dvisvgm/Makefile.am
+++ b/Build/source/texk/dvisvgm/Makefile.am
@@ -60,6 +60,7 @@ nodist_libdvisvgm_a_SOURCES = \
@DVISVGM_TREE@/src/CMapReader.cpp \
@DVISVGM_TREE@/src/CRC32.cpp \
@DVISVGM_TREE@/src/Calculator.cpp \
+ @DVISVGM_TREE@/src/CharMap.cpp \
@DVISVGM_TREE@/src/CharMapID.cpp \
@DVISVGM_TREE@/src/CmdLineParserBase.cpp \
@DVISVGM_TREE@/src/Color.cpp \
diff --git a/Build/source/texk/dvisvgm/Makefile.in b/Build/source/texk/dvisvgm/Makefile.in
index a74134dfbf1..6acd59d150b 100644
--- a/Build/source/texk/dvisvgm/Makefile.in
+++ b/Build/source/texk/dvisvgm/Makefile.in
@@ -143,6 +143,7 @@ nodist_libdvisvgm_a_OBJECTS = \
@DVISVGM_TREE@/src/CMapReader.$(OBJEXT) \
@DVISVGM_TREE@/src/CRC32.$(OBJEXT) \
@DVISVGM_TREE@/src/Calculator.$(OBJEXT) \
+ @DVISVGM_TREE@/src/CharMap.$(OBJEXT) \
@DVISVGM_TREE@/src/CharMapID.$(OBJEXT) \
@DVISVGM_TREE@/src/CmdLineParserBase.$(OBJEXT) \
@DVISVGM_TREE@/src/Color.$(OBJEXT) \
@@ -677,6 +678,7 @@ nodist_libdvisvgm_a_SOURCES = \
@DVISVGM_TREE@/src/CMapManager.cpp \
@DVISVGM_TREE@/src/CMapReader.cpp @DVISVGM_TREE@/src/CRC32.cpp \
@DVISVGM_TREE@/src/Calculator.cpp \
+ @DVISVGM_TREE@/src/CharMap.cpp \
@DVISVGM_TREE@/src/CharMapID.cpp \
@DVISVGM_TREE@/src/CmdLineParserBase.cpp \
@DVISVGM_TREE@/src/Color.cpp \
@@ -818,6 +820,9 @@ clean-noinstLIBRARIES:
@DVISVGM_TREE@/src/Calculator.$(OBJEXT): \
@DVISVGM_TREE@/src/$(am__dirstamp) \
@DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
+@DVISVGM_TREE@/src/CharMap.$(OBJEXT): \
+ @DVISVGM_TREE@/src/$(am__dirstamp) \
+ @DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@DVISVGM_TREE@/src/CharMapID.$(OBJEXT): \
@DVISVGM_TREE@/src/$(am__dirstamp) \
@DVISVGM_TREE@/src/$(DEPDIR)/$(am__dirstamp)
@@ -1084,6 +1089,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/CMapReader.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/CRC32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/Calculator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/CharMap.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/CharMapID.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/CmdLineParserBase.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@@DVISVGM_TREE@/src/$(DEPDIR)/Color.Po@am__quote@
diff --git a/Build/source/texk/dvisvgm/configure b/Build/source/texk/dvisvgm/configure
index 52b25ce67f3..e6764436654 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 (TeX Live) 1.4.
+# Generated by GNU Autoconf 2.69 for dvisvgm (TeX Live) 1.5.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -590,12 +590,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dvisvgm (TeX Live)'
PACKAGE_TARNAME='dvisvgm--tex-live-'
-PACKAGE_VERSION='1.4'
-PACKAGE_STRING='dvisvgm (TeX Live) 1.4'
+PACKAGE_VERSION='1.5'
+PACKAGE_STRING='dvisvgm (TeX Live) 1.5'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
-ac_unique_file="dvisvgm-1.4/src/dvisvgm.cpp"
+ac_unique_file="dvisvgm-1.5/src/dvisvgm.cpp"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -1371,7 +1371,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures dvisvgm (TeX Live) 1.4 to adapt to many kinds of systems.
+\`configure' configures dvisvgm (TeX Live) 1.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1442,7 +1442,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dvisvgm (TeX Live) 1.4:";;
+ short | recursive ) echo "Configuration of dvisvgm (TeX Live) 1.5:";;
esac
cat <<\_ACEOF
@@ -1579,7 +1579,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dvisvgm (TeX Live) configure 1.4
+dvisvgm (TeX Live) configure 1.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2401,7 +2401,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dvisvgm (TeX Live) $as_me 1.4, which was
+It was created by dvisvgm (TeX Live) $as_me 1.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -7892,7 +7892,7 @@ fi
# Define the identity of the package.
PACKAGE='dvisvgm--tex-live-'
- VERSION='1.4'
+ VERSION='1.5'
cat >>confdefs.h <<_ACEOF
@@ -17745,7 +17745,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-dvisvgm (TeX Live) config.lt 1.4
+dvisvgm (TeX Live) config.lt 1.5
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -19550,7 +19550,7 @@ $as_echo "#define KPSE_CXX_UNSAFE 1" >>confdefs.h
fi
-DVISVGM_TREE=dvisvgm-1.4
+DVISVGM_TREE=dvisvgm-1.5
ac_config_files="$ac_config_files Makefile"
@@ -20102,7 +20102,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by dvisvgm (TeX Live) $as_me 1.4, which was
+This file was extended by dvisvgm (TeX Live) $as_me 1.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20168,7 +20168,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 (TeX Live) config.status 1.4
+dvisvgm (TeX Live) config.status 1.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/patch-01-cpp b/Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/patch-01-cpp
deleted file mode 100644
index 499f13207e0..00000000000
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/patch-01-cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-diff -ur dvisvgm-1.4.orig/configure.ac dvisvgm-1.4/configure.ac
---- dvisvgm-1.4.orig/configure.ac 2013-08-02 15:04:11.000000000 +0200
-+++ dvisvgm-1.4/configure.ac 2013-08-08 14:02:36.000000000 +0200
-@@ -146,6 +146,17 @@
- fi
- fi
-
-+# Check if the kpathsea headers are C++ safe
-+AC_MSG_CHECKING([if the kpathsea headers are C++ safe])
-+AC_LANG_PUSH([C++])
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <kpathsea/kpathsea.h>]],
-+ [[printf("%s\n", concat("one", "two"))]])],
-+ [AC_MSG_RESULT([yes])],
-+ [AC_MSG_RESULT([no])
-+ AC_DEFINE([KPSE_CXX_UNSAFE], 1,
-+ [Define to 1 if the kpathsea headers are not C++ safe.])])
-+AC_LANG_POP([C++])
-+
- AC_SUBST(DATE)
- AC_SUBST(EXTRA_LIBS)
- AC_SUBST(AM_CPPFLAGS)
-diff -ur dvisvgm-1.4.orig/src/FileFinder.cpp dvisvgm-1.4/src/FileFinder.cpp
---- dvisvgm-1.4.orig/src/FileFinder.cpp 2013-08-02 15:04:11.000000000 +0200
-+++ dvisvgm-1.4/src/FileFinder.cpp 2013-08-08 13:38:15.000000000 +0200
-@@ -18,6 +18,24 @@
- ** along with this program; if not, see <http://www.gnu.org/licenses/>. **
- *************************************************************************/
-
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#ifdef MIKTEX
-+ #include "MessageException.h"
-+ #include "MiKTeXCom.h"
-+ static MiKTeXCom *miktex=0;
-+#else
-+ #ifdef KPSE_CXX_UNSAFE
-+ extern "C" {
-+ #endif
-+ #include <kpathsea/kpathsea.h>
-+ #ifdef KPSE_CXX_UNSAFE
-+ }
-+ #endif
-+#endif
-+
- #include <cstdlib>
- #include <fstream>
- #include <map>
-@@ -28,21 +46,6 @@
- #include "Message.h"
- #include "Process.h"
-
--#ifdef MIKTEX
-- #include "MessageException.h"
-- #include "MiKTeXCom.h"
-- static MiKTeXCom *miktex=0;
--#else
-- // unfortunately, the kpathsea headers are not C++-ready,
-- // so we have to wrap it with some ugly code
-- namespace KPS {
-- extern "C" {
-- #include <kpathsea/kpathsea.h>
-- }
-- }
-- using namespace KPS;
--#endif
--
- // ---------------------------------------------------
-
- static bool _initialized = false;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/patch-02-config_h b/Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/patch-02-config_h
deleted file mode 100644
index d98248e036e..00000000000
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/patch-02-config_h
+++ /dev/null
@@ -1,203 +0,0 @@
- Include <config.h> always first.
-
-diff -ur dvisvgm-1.4.orig/src/CommandLine.cpp dvisvgm-1.4/src/CommandLine.cpp
---- dvisvgm-1.4.orig/src/CommandLine.cpp 2013-07-16 18:12:56.000000000 +0200
-+++ dvisvgm-1.4/src/CommandLine.cpp 2013-08-08 13:24:11.000000000 +0200
-@@ -4,11 +4,11 @@
- // See file COPYING for further details.
- // (C) 2009-2013 Martin Gieseking <martin.gieseking@uos.de>
-
-+#include "CommandLine.h"
- #include <cstdio>
- #include <iostream>
- #include <iomanip>
- #include "InputReader.h"
--#include "CommandLine.h"
-
- using namespace std;
-
-diff -ur dvisvgm-1.4.orig/src/EPSToSVG.cpp dvisvgm-1.4/src/EPSToSVG.cpp
---- dvisvgm-1.4.orig/src/EPSToSVG.cpp 2013-08-02 15:04:11.000000000 +0200
-+++ dvisvgm-1.4/src/EPSToSVG.cpp 2013-08-08 13:24:11.000000000 +0200
-@@ -18,16 +18,6 @@
- ** 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"
- #ifdef TARGET_SYSTEM
-@@ -39,6 +29,16 @@
- #define VERSION_STR ""
- #endif
-
-+#include <fstream>
-+#include <istream>
-+#include <sstream>
-+#include "EPSFile.h"
-+#include "EPSToSVG.h"
-+#include "Message.h"
-+#include "MessageException.h"
-+#include "PsSpecialHandler.h"
-+#include "SVGOutputBase.h"
-+
-
- using namespace std;
-
-diff -ur dvisvgm-1.4.orig/src/FileSystem.cpp dvisvgm-1.4/src/FileSystem.cpp
---- dvisvgm-1.4.orig/src/FileSystem.cpp 2013-01-21 16:53:23.000000000 +0100
-+++ dvisvgm-1.4/src/FileSystem.cpp 2013-08-08 13:24:11.000000000 +0200
-@@ -18,16 +18,16 @@
- ** along with this program; if not, see <http://www.gnu.org/licenses/>. **
- *************************************************************************/
-
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
- #include <cstdlib>
- #include <cstring>
- #include <fstream>
- #include "FileSystem.h"
- #include "macros.h"
-
--#ifdef HAVE_CONFIG_H
--#include "config.h"
--#endif
--
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
-diff -ur dvisvgm-1.4.orig/src/PSInterpreter.cpp dvisvgm-1.4/src/PSInterpreter.cpp
---- dvisvgm-1.4.orig/src/PSInterpreter.cpp 2013-08-02 15:04:11.000000000 +0200
-+++ dvisvgm-1.4/src/PSInterpreter.cpp 2013-08-08 13:24:11.386995185 +0200
-@@ -18,6 +18,7 @@
- ** along with this program; if not, see <http://www.gnu.org/licenses/>. **
- *************************************************************************/
-
-+#include "PSInterpreter.h"
- #include <cstring>
- #include <fstream>
- #include <iostream>
-@@ -26,7 +27,6 @@
- #include "InputReader.h"
- #include "Message.h"
- #include "PSFilter.h"
--#include "PSInterpreter.h"
- #include "SignalHandler.h"
-
- using namespace std;
-diff -ur dvisvgm-1.4.orig/src/PSInterpreter.h dvisvgm-1.4/src/PSInterpreter.h
---- dvisvgm-1.4.orig/src/PSInterpreter.h 2013-08-02 15:04:11.000000000 +0200
-+++ dvisvgm-1.4/src/PSInterpreter.h 2013-08-08 13:24:11.000000000 +0200
-@@ -21,11 +21,11 @@
- #ifndef PSINTERPRETER_H
- #define PSINTERPRETER_H
-
-+#include "Ghostscript.h"
- #include <cstring>
- #include <istream>
- #include <string>
- #include <vector>
--#include "Ghostscript.h"
- #include "InputReader.h"
- #include "MessageException.h"
-
-diff -ur dvisvgm-1.4.orig/src/PsSpecialHandler.cpp dvisvgm-1.4/src/PsSpecialHandler.cpp
---- dvisvgm-1.4.orig/src/PsSpecialHandler.cpp 2013-08-02 15:04:11.000000000 +0200
-+++ dvisvgm-1.4/src/PsSpecialHandler.cpp 2013-08-08 13:24:11.000000000 +0200
-@@ -18,13 +18,13 @@
- ** along with this program; if not, see <http://www.gnu.org/licenses/>. **
- *************************************************************************/
-
-+#include "Ghostscript.h"
- #include <cmath>
- #include <fstream>
- #include <iostream>
- #include <sstream>
- #include "EPSFile.h"
- #include "FileFinder.h"
--#include "Ghostscript.h"
- #include "Message.h"
- #include "PSPattern.h"
- #include "PSPreviewFilter.h"
-diff -ur dvisvgm-1.4.orig/src/System.cpp dvisvgm-1.4/src/System.cpp
---- dvisvgm-1.4.orig/src/System.cpp 2013-01-21 16:53:23.000000000 +0100
-+++ dvisvgm-1.4/src/System.cpp 2013-08-08 13:24:11.000000000 +0200
-@@ -18,13 +18,13 @@
- ** along with this program; if not, see <http://www.gnu.org/licenses/>. **
- *************************************************************************/
-
--#include <ctime>
--#include "System.h"
--
- #ifdef HAVE_CONFIG_H
- #include "config.h"
- #endif
-
-+#include <ctime>
-+#include "System.h"
-+
- #if defined (HAVE_SYS_TIME_H)
- #include <sys/time.h>
- #elif defined (HAVE_SYS_TIMEB_H)
-diff -ur dvisvgm-1.4.orig/src/Terminal.cpp dvisvgm-1.4/src/Terminal.cpp
---- dvisvgm-1.4.orig/src/Terminal.cpp 2013-05-08 19:29:03.000000000 +0200
-+++ dvisvgm-1.4/src/Terminal.cpp 2013-08-08 13:24:11.000000000 +0200
-@@ -18,12 +18,12 @@
- ** along with this program; if not, see <http://www.gnu.org/licenses/>. **
- *************************************************************************/
-
--#include "Terminal.h"
--
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
-
-+#include "Terminal.h"
-+
- #ifdef HAVE_TERMIOS_H
- #include <termios.h>
- #endif
-diff -ur dvisvgm-1.4.orig/src/dvisvgm.cpp dvisvgm-1.4/src/dvisvgm.cpp
---- dvisvgm-1.4.orig/src/dvisvgm.cpp 2013-08-02 15:04:11.000000000 +0200
-+++ dvisvgm-1.4/src/dvisvgm.cpp 2013-08-08 13:24:11.000000000 +0200
-@@ -18,6 +18,14 @@
- ** along with this program; if not, see <http://www.gnu.org/licenses/>. **
- *************************************************************************/
-
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#include "PSInterpreter.h"
-+#endif
-+#ifndef TARGET_SYSTEM
-+#define TARGET_SYSTEM ""
-+#endif
-+
- #include <cmath>
- #include <fstream>
- #include <iomanip>
-@@ -46,14 +54,6 @@
- #include "SVGOutputBase.h"
- #include "System.h"
-
--#ifdef HAVE_CONFIG_H
--#include "config.h"
--#include "PSInterpreter.h"
--#endif
--#ifndef TARGET_SYSTEM
--#define TARGET_SYSTEM ""
--#endif
--
- #ifdef __MSVC__
- #include <potracelib.h>
- #else
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Makefile.am
deleted file mode 100644
index 4c964fa1f9e..00000000000
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Makefile.am
+++ /dev/null
@@ -1,53 +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 Character.h CharMapID.h CMap.h CMapManager.h CMapReader.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 EncFile.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 FontMetrics.h GFReader.h GFTracer.h \
- GFGlyphTracer.h Ghostscript.h Glyph.h GlyphTracerMessages.h GraphicPath.h HtmlSpecialHandler.h InputBuffer.h InputReader.h \
- JFM.h Length.h macros.h MapLine.h Matrix.h Message.h MessageException.h MetafontWrapper.h NoPsSpecialHandler.h PageRanges.h \
- PageSize.h Pair.h PdfSpecialHandler.h Process.h PSFilter.h PSInterpreter.h PSPattern.h PSPreviewFilter.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 \
- XMLDocument.h XMLNode.h XMLString.h \
- BgColorSpecialHandler.cpp Bitmap.cpp BoundingBox.cpp Calculator.cpp CharMapID.cpp CMap.cpp CMapManager.cpp CMapReader.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 EncFile.cpp EPSFile.cpp EPSToSVG.cpp \
- FileFinder.cpp FilePath.cpp FileSystem.cpp Font.cpp FontCache.cpp FontEncoding.cpp FontEngine.cpp FontManager.cpp FontMap.cpp \
- FontMetrics.cpp GFReader.cpp GFGlyphTracer.cpp GFTracer.cpp Ghostscript.cpp HtmlSpecialHandler.cpp InputBuffer.cpp \
- InputReader.cpp JFM.cpp Length.cpp MapLine.cpp Matrix.cpp Message.cpp MetafontWrapper.cpp NoPsSpecialHandler.cpp \
- PageRanges.cpp PageSize.cpp PdfSpecialHandler.cpp Process.cpp psdefs.cpp PSInterpreter.cpp PSPattern.cpp PSPreviewFilter.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.4-PATCHES/ChangeLog b/Build/source/texk/dvisvgm/dvisvgm-1.5-PATCHES/ChangeLog
index 1ff8e921ac4..15c1b5b2b7e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/ChangeLog
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5-PATCHES/ChangeLog
@@ -1,3 +1,8 @@
+2013-09-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Import release 1.5.
+ * patch-01-cpp, patch-02-config_h: Removed.
+
2013-08-08 Peter Breitenlohner <peb@mppmu.mpg.de>
* Import release 1.4.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/TL-Changes b/Build/source/texk/dvisvgm/dvisvgm-1.5-PATCHES/TL-Changes
index f7e22dd79d1..14160857c5b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4-PATCHES/TL-Changes
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5-PATCHES/TL-Changes
@@ -1,5 +1,5 @@
-Changes applied to the dvisvgm-1.4 tree as obtained from:
- http://downloads.sourceforge.net/dvisvgm/dvisvgm-1.4.tar.gz
+Changes applied to the dvisvgm-1.5 tree as obtained from:
+ http://downloads.sourceforge.net/dvisvgm/dvisvgm-1.5.tar.gz
Removed:
ChangeLog
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/AUTHORS b/Build/source/texk/dvisvgm/dvisvgm-1.5/AUTHORS
index d9b6468421e..d9b6468421e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/AUTHORS
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/AUTHORS
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/COPYING b/Build/source/texk/dvisvgm/dvisvgm-1.5/COPYING
index 94a9ed024d3..94a9ed024d3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/COPYING
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/COPYING
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/INSTALL b/Build/source/texk/dvisvgm/dvisvgm-1.5/INSTALL
index a4b34144dcf..a4b34144dcf 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/INSTALL
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/INSTALL
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/LGPL-2.1.txt b/Build/source/texk/dvisvgm/dvisvgm-1.5/LGPL-2.1.txt
index 602bfc94635..602bfc94635 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/LGPL-2.1.txt
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/LGPL-2.1.txt
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.5/Makefile.am
index a3462b39cdb..a3462b39cdb 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/Makefile.am
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/NEWS b/Build/source/texk/dvisvgm/dvisvgm-1.5/NEWS
index 018dab8dc6c..8cf84bf01b6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/NEWS
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/NEWS
@@ -1,3 +1,12 @@
+dvisvgm-1.5 (2013-09-02)
+- added support for DVI format 3 as created by pTeX in vertical/tate mode
+- added support for DVI format 5 (XDV) as created by XeTeX
+- replaced numeric entity references by corresponding UTF-8 characters in
+ generated SVG files
+- added px unit to font-size attributes as used in the stylesheet section
+ to ensure correct computation of font sizes (LP bug #1215857)
+- various code refactorings
+
dvisvgm-1.4 (2013-08-02)
- added basic support for CMap files and CID-based fonts
- added character mapping from CIDs to char codes based on the encoding tables of a non-CID font
@@ -14,7 +23,7 @@ dvisvgm-1.3 (2013-05-13)
- added support for hyperref specials
- added command-line option --linkmarker to select the way how to mark hyperlinked areas
- dvisvgm builds for MiKTeX now try to access the Ghostscript DLL provided by MiKTeX so that
- it's no longer necessary to install Ghostscript seperately
+ it's no longer necessary to install Ghostscript separately
- improved the handling of TFM files to avoid failures in case of malformed files
- added evaluation of Japanese Font Metric (JFM) files
- the bundled potrace library has been removed from the source tarball as it's easy to build
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/README b/Build/source/texk/dvisvgm/dvisvgm-1.5/README
index d9728660268..d9728660268 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/README
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/README
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/config.h.in b/Build/source/texk/dvisvgm/dvisvgm-1.5/config.h.in
index b027999e9b3..fcd8cf41872 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/config.h.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/config.h.in
@@ -113,6 +113,9 @@
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
+/* Define to 1 if the kpathsea headers are not C++ safe. */
+#undef KPSE_CXX_UNSAFE
+
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/configure.ac b/Build/source/texk/dvisvgm/dvisvgm-1.5/configure.ac
index 5674e7f50f2..fb36743efdc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/configure.ac
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/configure.ac
@@ -4,8 +4,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([dvisvgm],[1.4],[martin.gieseking@uos.de])
-DATE="Juli 2013"
+AC_INIT([dvisvgm],[1.5],[martin.gieseking@uos.de])
+DATE="September 2013"
AC_CONFIG_SRCDIR(src)
AC_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/doc/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.5/doc/Makefile.am
index fb5c56ffedf..fb5c56ffedf 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/doc/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/doc/Makefile.am
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/doc/dvisvgm.1 b/Build/source/texk/dvisvgm/dvisvgm-1.5/doc/dvisvgm.1
index 6ec3d631413..4a4e3abebc7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/doc/dvisvgm.1
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/doc/dvisvgm.1
@@ -2,12 +2,12 @@
.\" Title: dvisvgm
.\" Author: Martin Gieseking <martin.gieseking@uos.de>
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 08/02/2013
+.\" Date: 09/01/2013
.\" Manual: dvisvgm Manual
-.\" Source: dvisvgm 1.4
+.\" Source: dvisvgm 1.5
.\" Language: English
.\"
-.TH "DVISVGM" "1" "08/02/2013" "dvisvgm 1\&.4" "dvisvgm Manual"
+.TH "DVISVGM" "1" "09/01/2013" "dvisvgm 1\&.5" "dvisvgm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -36,13 +36,15 @@ dvisvgm \- converts DVI files to the XML\-based SVG format
\fBdvisvgm\fR \-E [ \fIoptions\fR ] \fIfile\fR [\&.eps]
.SH "DESCRIPTION"
.sp
-The command\-line utility \fBdvisvgm\fR converts DVI files, as generated by TeX/LaTeX, to the XML\-based scalable vector graphics format SVG\&. Since the current SVG standard 1\&.1 doesn\(cqt specify multi\-page graphics, dvisvgm creates separate SVG files for each DVI page\&. Because of compatibility reasons, only the first page is converted by default\&. In order to select a different page or arbitrary page sequences, use option \fB\-p\fR which is described below\&.
+The command\-line utility \fBdvisvgm\fR converts DVI files, as generated by TeX/LaTeX, to the XML\-based scalable vector graphics format SVG\&. It supports the classic DVI format 2 as well as format 3 (created by pTeX in vertical mode), and format 5 which is also known as XDV (created by XeTeX)\&. Besides the basic DVI commands, dvisvgm also evaluates many so\-called \fIspecials\fR which heavily extend the capabilities of the DVI format\&. For a more detailed overview, see section \fBsupport of specials\fR below\&.
.sp
-dvisvgm should properly convert all pages that are made up of fonts and rules only\&. However, the utility also supports a couple of DVI extensions defined in terms of \fIDVI specials\fR\&. For a more detailed overview, see section \fBsupport of specials\fR below\&.
+Since the current SVG standard 1\&.1 doesn\(cqt specify multi\-page graphics, dvisvgm creates separate SVG files for each DVI page\&. Because of compatibility reasons, only the first page is converted by default\&. In order to select a different page or arbitrary page sequences, use option \fB\-p\fR which is described below\&.
.sp
-As SVG is a vector based graphics format, dvisvgm tries to convert the glyph outlines of all used fonts into scalable path descriptions\&. The fastest way to do that is to extract the path information from PFB (PostScript Type 1) files\&. So, if dvisvgm is able to find a PFB file for a required font, it will read the necessary information from this file\&.
+SVG is a vector\-based graphics format and therefore dvisvgm tries to convert the glyph outlines of all used fonts to scalable path descriptions\&. The fastest way to do that is to extract the path information from font files in PFB, TTF, or OTF format\&. If dvisvgm is able to find such a file, it extracts all necessary outline information about the glyphs from it\&.
.sp
-TeX\(cqs main source for font descriptions is Metafont though, which produces bitmap output\&. That\(cqs why not all obtainable TeX fonts are available in PFB format\&. In these cases, dvisvgm tries to vectorize Metafont\(cqs output (GF fonts) by tracing the glyph bitmaps\&. The results are not as perfect as most (manually optimized) PFB outlines but are nonetheless really nice in most cases\&.
+However, TeX\(cqs main source for font descriptions is Metafont, which produces bitmap output (GF files)\&. That\(cqs why not all obtainable TeX fonts are available in a scalable format\&. In these cases, dvisvgm tries to vectorize Metafont\(cqs output by tracing the glyph bitmaps\&. The results are not as perfect as most (manually optimized) PFB or OTF counterparts, but are nonetheless really nice in most cases\&.
+.sp
+When running dvisvgm without option \fB\-\-no\-fonts\fR, \fIfont\fR elements (<font>\&...</font>) are used to embed the font data into the SVG files\&. Unfortunately, only few SVG renderes support these elements yet\&. Most web browsers and vector graphics applications don\(cqt evaluate them properly so that the text components of the resulting graphics might look strange\&. In order to create more compatible SVG files, command\-line option \fB\-\-no\-fonts\fR can be given to replace the font elements by plain graphics paths\&.
.SH "OPTIONS"
.PP
\fB\-a, \-\-trace\-all\fR=[\fIretrace\fR]
@@ -130,7 +132,6 @@ T}
.TE
.sp 1
.RE
-.RE
.PP
\fBPage orientation\fR
.RS 4
@@ -172,6 +173,7 @@ only affects the bounding box and does not transform the page content\&. Hence,
.sp .5v
.RE
.RE
+.RE
.PP
\fB\-C, \-\-cache\fR[=\fIdir\fR]
.RS 4
@@ -180,7 +182,7 @@ To speed up the conversion process of bitmap fonts, dvisvgm saves intermediate c
to overwrite the default\&. Furthermore, it is also possible to disable the font caching mechanism completely with option
\fB\-\-cache=none\fR\&. If argument
\fIdir\fR
-is omitted, dvisvgm prints the path of the default cache directory and some information about the stored fonts\&. Additionally, outdated and corrupted cache files are removed\&.
+is omitted, dvisvgm prints the path of the default cache directory together with further information about the stored fonts\&. Additionally, outdated and corrupted cache files are removed\&.
.RE
.PP
\fB\-\-color\fR
@@ -200,16 +202,16 @@ for further information\&.
.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
+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 implement 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 (or smaller) than the respective TFM values\&. As a result, this can lead to clipped characters at the bounds of the SVG graphics\&. With option
\fB\-\-exact\fR
given, dvisvgm analyzes the actual shape of each character and derives a usually tight bounding box\&.
.RE
.PP
\fB\-m, \-\-fontmap\fR=\fIfilenames\fR
.RS 4
-Loads and evaluates a single or multiple font map files\&. These files are required to resolve font file names and encodings\&. dvisvgm does not provide its own map file but tries to read available ones coming with dvips or dvipdfm\&. If option
-\fB\-\-fonrmapm\fR
-is not given, dvisvgm looks for the default map files
+Loads and evaluates a single or multiple font map files\&. These files are required to resolve font file names and encodings\&. dvisvgm does not provide its own map files but tries to read available ones coming with dvips or dvipdfm\&. If option
+\fB\-\-fontmap\fR
+is omitted, dvisvgm looks for the default map files
ps2pk\&.map,
dvipdfm\&.map, and
psfonts\&.map
@@ -251,9 +253,9 @@ where all redefinitions of
myfile1\&.map
replace previous entries\&. Afterwards, all definitions for the fonts given in
myfile2\&.map
-are removed again\&.
+are removed from the font map tree\&.
.sp
-For further information about the map file formats, see the manuals of dvips and dvipdfm\&.
+For further information about the map file formats and the mode specifiers, see the manuals of dvips and dvipdfm\&.
.RE
.RE
.PP
@@ -261,7 +263,7 @@ For further information about the map file formats, see the manuals of dvips and
.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\&.
+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 names, while mode 2 sorts the lines by the long option names\&.
.RE
.PP
\fB\-\-keep\fR
@@ -681,7 +683,7 @@ This option cannot be combined with
.RE
.SH "SUPPORT OF SPECIALS"
.sp
-dvisvgm supports several sets of \fIspecial commands\fR that can be used to enrich DVI files with additional features, like color, graphics or hyperlinks\&. The evaluation of special commands is delegated to various handlers\&. Each handler is responsible for all special statements of the same command set, i\&.e\&. commands beginning with the same prefix\&. To get a list of actually provided special handlers, use option \fB\-\-list\-specials\fR (see above)\&.
+dvisvgm supports several sets of \fIspecial commands\fR that can be used to enrich DVI files with additional features, like color, graphics, and hyperlinks\&. The evaluation of special commands is delegated to various handlers\&. Each handler is responsible for all special statements of the same command set, i\&.e\&. commands beginning with the same prefix\&. To get a list of actually provided special handlers, use option \fB\-\-list\-specials\fR (see above)\&. This section gives an overview of the special commands currently supported\&.
.PP
\fBbgcolor\fR
.RS 4
@@ -811,11 +813,6 @@ are supported by dvisvgm\&. These specials allow modifying the font map tree dur
.RS 4
The famous DVI driver dvips introduced its own set of specials in order to embed PostScript code into DVI files, which greatly improves the capabilities of DVI documents\&. One aim of dvisvgm is to completely evaluate all PostScript snippets and to convert a large amount of it to SVG\&. However, in contrast to dvips, dvisvgm uses floating point arithmetics to compute the precise position of each graphic element, i\&.e\&. it doesn\(cqt round the coordinates\&. Therefore, the relative locations of the graphic elements may slightly differ from those computed by dvips\&.
.sp
-The PostScript handler also recognizes and evaluates bounding box data generated by the
-\fIpreview\fR
-package with option
-\fItightpage\fR\&. If the data is present in a DVI file, dvisvgm adapts the bounding box of the generated SVG file accordingly, and prints a message showing the width, height, and depth of the box in TeX point units\&. Especially, the depth value can be used to vertically align the SVG graphics with the baseline of surrounding text in HTML or XSL\-FO documents, for example\&.
-.sp
Since PostScript is a rather complex language, dvisvgm does not try to implement its own PostScript interpreter but relies on Ghostscript instead\&. If the Ghostscript library was not linked while building dvisvgm, it is looked up and loaded dynamically during runtime\&. In this case, dvisvgm looks for
\fIlibgs\&.so\fR
on Unix\-like systems, and for
@@ -830,6 +827,11 @@ or the command\-line option
to check whether PS support is available, i\&.e\&. the entry
\fIps\fR
is present\&.
+.sp
+The PostScript handler also recognizes and evaluates bounding box data generated by the
+\fIpreview\fR
+package with option
+\fItightpage\fR\&. If the data is present in a DVI file, dvisvgm adapts the bounding box of the generated SVG file accordingly, and prints a message showing the width, height, and depth of the box in TeX point units\&. Especially, the depth value can be used to vertically align the SVG graphics with the baseline of surrounding text in HTML or XSL\-FO documents, for example\&.
.RE
.PP
\fBtpic\fR
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/doc/dvisvgm.txt.in b/Build/source/texk/dvisvgm/dvisvgm-1.5/doc/dvisvgm.txt.in
index e6fbdfa7775..9436b57faa7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/doc/dvisvgm.txt.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/doc/dvisvgm.txt.in
@@ -38,24 +38,34 @@ SYNOPSIS
DESCRIPTION
-----------
The command-line utility *dvisvgm* converts DVI files, as generated by TeX/LaTeX, to the
-XML-based scalable vector graphics format SVG. Since the current SVG standard 1.1 doesn't
-specify multi-page graphics, dvisvgm creates separate SVG files for each DVI page.
-Because of compatibility reasons, only the first page is converted by default. In order
-to select a different page or arbitrary page sequences, use option *-p* which is described below.
-
-dvisvgm should properly convert all pages that are made up of fonts and rules only.
-However, the utility also supports a couple of DVI extensions defined in terms of 'DVI specials'.
-For a more detailed overview, see section *support of specials* below.
-
-As SVG is a vector based graphics format, dvisvgm tries to convert the glyph
-outlines of all used fonts into scalable path descriptions. The fastest way to do that
-is to extract the path information from PFB (PostScript Type 1) files. So, if dvisvgm is able
-to find a PFB file for a required font, it will read the necessary information from this file.
-
-TeX's main source for font descriptions is Metafont though, which produces bitmap output. That's why
-not all obtainable TeX fonts are available in PFB format. In these cases, dvisvgm tries
-to vectorize Metafont's output (GF fonts) by tracing the glyph bitmaps. The results are not
-as perfect as most (manually optimized) PFB outlines but are nonetheless really nice in most cases.
+XML-based scalable vector graphics format SVG. It supports the classic DVI format 2 as
+well as format 3 (created by pTeX in vertical mode), and format 5 which is also known as
+XDV (created by XeTeX). Besides the basic DVI commands, dvisvgm also evaluates many so-called
+'specials' which heavily extend the capabilities of the DVI format. For a more detailed
+overview, see section *support of specials* below.
+
+Since the current SVG standard 1.1 doesn't specify multi-page graphics, dvisvgm creates
+separate SVG files for each DVI page. Because of compatibility reasons, only the first page
+is converted by default. In order to select a different page or arbitrary page sequences,
+use option *-p* which is described below.
+
+SVG is a vector-based graphics format and therefore dvisvgm tries to convert the glyph outlines
+of all used fonts to scalable path descriptions. The fastest way to do that is to extract the
+path information from font files in PFB, TTF, or OTF format. If dvisvgm is able to find such
+a file, it extracts all necessary outline information about the glyphs from it.
+
+However, TeX's main source for font descriptions is Metafont, which produces bitmap output
+(GF files). That's why not all obtainable TeX fonts are available in a scalable format.
+In these cases, dvisvgm tries to vectorize Metafont's output by tracing the glyph bitmaps.
+The results are not as perfect as most (manually optimized) PFB or OTF counterparts, but are
+nonetheless really nice in most cases.
+
+When running dvisvgm without option *--no-fonts*, 'font' elements (<font>...</font>) are used to
+embed the font data into the SVG files. Unfortunately, only few SVG renderes support these
+elements yet. Most web browsers and vector graphics applications don't evaluate them properly
+so that the text components of the resulting graphics might look strange. In order to create
+more compatible SVG files, command-line option *--no-fonts* can be given to replace the font
+elements by plain graphics paths.
OPTIONS
@@ -101,7 +111,6 @@ Alternatively, the following format specifiers are supported:
*dvi*::: page size stored in the DVI file
*min*::: computes the minimal/tightest bounding box
*none*::: no bounding box is assigned
-
//
*Page orientation*;;
The default page orientation for DIN/ISO and American paper sizes is 'portrait',
@@ -124,7 +133,7 @@ To speed up the conversion process of bitmap fonts, dvisvgm saves intermediate c
information in cache files. By default, these files are stored in $HOME/.dvisvgm/cache. If you prefer
a different location, use option *--cache* to overwrite the default. Furthermore, it is also possible
to disable the font caching mechanism completely with option *--cache=none*. If argument 'dir' is omitted,
-dvisvgm prints the path of the default cache directory and some information about the stored fonts.
+dvisvgm prints the path of the default cache directory together with further information about the stored fonts.
Additionally, outdated and corrupted cache files are removed.
@@ -144,17 +153,17 @@ 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
-intended to realize optimal character placements and are not designed to represent the exact dimensions,
-they don't 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 *--exact* given, dvisvgm analyzes the actual shape
-of each character and derives a usually tight bounding box.
+intended to implement optimal character placements and are not designed to represent the exact
+dimensions, they don't necessarily correspond with the bounds of the visual glyphs. Thus, width
+and/or height of some glyphs may be larger (or smaller) than the respective TFM values. As a result,
+this can lead to clipped characters at the bounds of the SVG graphics. With option *--exact* given,
+dvisvgm analyzes the actual shape of each character and derives a usually tight bounding box.
*-m, --fontmap*='filenames'::
Loads and evaluates a single or multiple font map files. These files are required to resolve
-font file names and encodings. dvisvgm does not provide its own map file but tries to read
-available ones coming with dvips or dvipdfm. If option *--fonrmapm* is not given, dvisvgm looks for the
+font file names and encodings. dvisvgm does not provide its own map files but tries to read
+available ones coming with dvips or dvipdfm. If option *--fontmap* is omitted, dvisvgm looks for the
default map files +ps2pk.map+, +dvipdfm.map+, and +psfonts.map+ (in this order). Otherwise, the
listed files are used. Multiple filenames must be separated by commas without leading and/or trailing
whitespace.
@@ -181,17 +190,17 @@ Examples: *--fontmap=myfile1.map,+myfile2.map* loads `myfile1.map` followed by `
redefinitions of `myfile2.map` are ignored.
*--fontmap==myfile1.map,-myfile2.map* loads the default map file followed by `myfile1.map` and `myfile2.map`
where all redefinitions of `myfile1.map` replace previous entries. Afterwards, all definitions for the fonts
-given in `myfile2.map` are removed again.
+given in `myfile2.map` are removed from the font map tree.
+
-For further information about the map file formats, see the manuals of dvips and dvipdfm.
+For further information about the map file formats and the mode specifiers, see the manuals of dvips and dvipdfm.
*-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.
+dvisvgm is called without parameters. Mode 1 lists all options ordered by the short option names,
+while mode 2 sorts the lines by the long option names.
*--keep*::
@@ -423,9 +432,10 @@ CAUTION: This option cannot be combined with *-s, --stdout*.
SUPPORT OF SPECIALS
-------------------
dvisvgm supports several sets of 'special commands' that can be used to enrich DVI files with additional
-features, like color, graphics or hyperlinks. The evaluation of special commands is delegated to various handlers.
-Each handler is responsible for all special statements of the same command set, i.e. commands beginning
-with the same prefix. To get a list of actually provided special handlers, use option *--list-specials* (see above).
+features, like color, graphics, and hyperlinks. The evaluation of special commands is delegated to various
+handlers. Each handler is responsible for all special statements of the same command set, i.e. commands
+beginning with the same prefix. To get a list of actually provided special handlers, use option
+*--list-specials* (see above). This section gives an overview of the special commands currently supported.
*bgcolor*::
Special statement for changing the background/page color. Since SVG 1.1 doesn't support background colors,
@@ -521,12 +531,6 @@ PostScript snippets and to convert a large amount of it to SVG. However, in cont
arithmetics to compute the precise position of each graphic element, i.e. it doesn't round the coordinates. Therefore,
the relative locations of the graphic elements may slightly differ from those computed by dvips.
+
-The PostScript handler also recognizes and evaluates bounding box data generated by the 'preview' package with
-option 'tightpage'. If the data is present in a DVI file, dvisvgm adapts the bounding box of the generated SVG file
-accordingly, and prints a message showing the width, height, and depth of the box in TeX point units. Especially,
-the depth value can be used to vertically align the SVG graphics with the baseline of surrounding text in HTML or XSL-FO
-documents, for example.
-+
Since PostScript is a rather complex language, dvisvgm does not try to implement its own PostScript interpreter but relies on
Ghostscript instead. If the Ghostscript library was not linked while building dvisvgm, it is looked up and loaded dynamically
during runtime. In this case, dvisvgm looks for 'libgs.so' on Unix-like systems, and for 'gsdll32.dll' or 'gsdll64.dll' on Windows.
@@ -534,6 +538,12 @@ You can override these default file names with environment variable +LIBGS+ or t
The library must be installed and reachable through the ld search path (\*nix) or the PATH environment
variable (Windows). If it cannot be found, the processing of PostScript specials is disabled.
Use option *--list-specials* to check whether PS support is available, i.e. the entry 'ps' is present.
++
+The PostScript handler also recognizes and evaluates bounding box data generated by the 'preview' package with
+option 'tightpage'. If the data is present in a DVI file, dvisvgm adapts the bounding box of the generated SVG file
+accordingly, and prints a message showing the width, height, and depth of the box in TeX point units. Especially,
+the depth value can be used to vertically align the SVG graphics with the baseline of surrounding text in HTML or XSL-FO
+documents, for example.
*tpic*::
The TPIC special set defines instructions for drawing simple geometric objects. Some LaTeX packages, like
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/BgColorSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/BgColorSpecialHandler.cpp
index a225d360910..883704febd9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/BgColorSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/BgColorSpecialHandler.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "BgColorSpecialHandler.h"
#include "ColorSpecialHandler.h"
#include "SpecialActions.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/BgColorSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/BgColorSpecialHandler.h
index e8b9ec21eed..e8b9ec21eed 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/BgColorSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/BgColorSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Bitmap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Bitmap.cpp
index e72d5ee34ac..a7f2347988c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Bitmap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Bitmap.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstdlib>
#include <iostream>
#include "Bitmap.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Bitmap.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Bitmap.h
index 1a1f19caf15..1a1f19caf15 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Bitmap.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Bitmap.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/BoundingBox.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/BoundingBox.cpp
index 85ec9c4c452..6f7e301b3b2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/BoundingBox.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/BoundingBox.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <algorithm>
#include <sstream>
#include <string>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/BoundingBox.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/BoundingBox.h
index b3a4016f52a..b3a4016f52a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/BoundingBox.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/BoundingBox.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMap.cpp
index 870962f0714..b873ce234ed 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMap.cpp
@@ -18,11 +18,13 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <algorithm>
#include <sstream>
#include <set>
#include <vector>
#include "CMap.h"
+#include "CMapManager.h"
#include "FileFinder.h"
#include "InputReader.h"
@@ -34,6 +36,12 @@ const char* CMap::path () const {
}
+const FontEncoding* CMap::findCompatibleBaseFontMap (const PhysicalFont *font, CharMapID &charmapID) const {
+ return CMapManager::instance().findCompatibleBaseFontMap(font, this, charmapID);
+}
+
+//////////////////////////////////////////////////////////////////////
+
/** Returns the RO (Registry-Ordering) string of the CMap. */
string SegmentedCMap::getROString() const {
if (_registry.empty() || _ordering.empty())
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMap.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMap.h
index 5663499e9ee..15ead6e9f5a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMap.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMap.h
@@ -28,7 +28,7 @@
#include "types.h"
-struct CMap : public FontEncoding
+struct CMap : public NamedFontEncoding
{
virtual ~CMap () {}
virtual bool vertical () const =0;
@@ -37,6 +37,8 @@ struct CMap : public FontEncoding
virtual UInt32 cid (UInt32 c) const =0;
virtual UInt32 bfcode (UInt32 cid) const =0;
virtual std::string getROString () const =0;
+ virtual const FontEncoding* findCompatibleBaseFontMap (const PhysicalFont *font, CharMapID &charmapID) const;
+ virtual bool mapsToCharIndex () const {return mapsToCID();}
Character decode (UInt32 c) const {
if (mapsToCID())
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapManager.cpp
index 9322bc3099a..28a7b943c57 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapManager.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <sstream>
#include "CMap.h"
#include "CMapManager.h"
@@ -96,7 +97,7 @@ CMap* CMapManager::lookup (const string &name) {
* @param[in] cmap take the source registry-ordering pair from this CMap
* @param[out] charmapID ID of the compatible character map found in the given font
* @return base font CMap that maps from CIDs to character codes */
-CMap* CMapManager::findCompatibleBaseFontMap (const PhysicalFont *font, const CMap *cmap, CharMapID &charmapID) {
+const CMap* CMapManager::findCompatibleBaseFontMap (const PhysicalFont *font, const CMap *cmap, CharMapID &charmapID) {
if (!font || !cmap)
return 0;
@@ -131,10 +132,11 @@ CMap* CMapManager::findCompatibleBaseFontMap (const PhysicalFont *font, const CM
string cmapname = ro+"-"+enc->encname;
if (is_unicode_map || FileFinder::lookup(cmapname, "cmap", false)) {
charmapID = enc->id;
- return is_unicode_map ? const_cast<CMap*>(cmap) : lookup(cmapname);
+ return is_unicode_map ? cmap : lookup(cmapname);
}
}
}
}
return 0;
}
+
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapManager.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapManager.h
index cb1dbe7a8b1..43b163bb9c7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapManager.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapManager.h
@@ -28,6 +28,8 @@
#include "Font.h"
struct CMap;
+struct FontEncoding;
+class FontEncodingPair;
class CMapManager
{
@@ -35,7 +37,7 @@ class CMapManager
public:
~CMapManager ();
CMap* lookup (const std::string &name);
- CMap* findCompatibleBaseFontMap (const PhysicalFont *font, const CMap *cmap, CharMapID &charmapID);
+ const CMap* findCompatibleBaseFontMap (const PhysicalFont *font, const CMap *cmap, CharMapID &charmapID);
static CMapManager& instance ();
protected:
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapReader.cpp
index c7858ad34b5..75135340951 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapReader.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <fstream>
#include <sstream>
#include "CMap.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapReader.h
index 4e0ae9ac266..4e0ae9ac266 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CMapReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CMapReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CRC32.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CRC32.cpp
index 2295ab17bde..b2401e92224 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CRC32.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CRC32.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstring>
#include "CRC32.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CRC32.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CRC32.h
index ca8ec359d0f..ca8ec359d0f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CRC32.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CRC32.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Calculator.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Calculator.cpp
index 2814cc286e0..717e78294a4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Calculator.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Calculator.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cmath>
#include <sstream>
#include "Calculator.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Calculator.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Calculator.h
index 36bb39d679c..36bb39d679c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Calculator.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Calculator.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMap.cpp
new file mode 100644
index 00000000000..0dd6b25fd2f
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMap.cpp
@@ -0,0 +1,57 @@
+/*************************************************************************
+** CharMap.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 <config.h>
+#include <algorithm>
+#include "CharMap.h"
+
+using namespace std;
+
+static bool is_less (const pair<UInt32,UInt32> &p1, const pair<UInt32,UInt32> &p2) {
+ return p1.first < p2.first;
+}
+
+
+UInt32 CharMap::operator [] (UInt32 c) const {
+ vector<UInt32Pair>::const_iterator it = lower_bound(_pairs.begin(), _pairs.end(), UInt32Pair(c, 0), &is_less);
+ return (it != _pairs.end() && it->first == c) ? it->second : 0;
+}
+
+
+/** Returns true if the charmap contains an entry that maps to the given charcode */
+bool CharMap::valueExists (UInt32 c) const {
+ for (std::vector<UInt32Pair>::const_iterator it=_pairs.begin(); it != _pairs.end(); ++it)
+ if (it->second == c)
+ return true;
+ return false;
+}
+
+
+/** Swaps key and value of all entries. */
+void CharMap::invert () {
+ for (std::vector<UInt32Pair>::iterator it=_pairs.begin(); it != _pairs.end(); ++it)
+ swap(it->first, it->second);
+ sort();
+}
+
+
+void CharMap::sort () {
+ std::sort(_pairs.begin(), _pairs.end(), &is_less);
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEncoding.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMap.h
index 41ce932e16a..0b84d7570a7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEncoding.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMap.h
@@ -1,5 +1,5 @@
/*************************************************************************
-** FontEncoding.h **
+** CharMap.h **
** **
** This file is part of dvisvgm -- the DVI to SVG converter **
** Copyright (C) 2005-2013 Martin Gieseking <martin.gieseking@uos.de> **
@@ -18,20 +18,34 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#ifndef FONTENCODING_H
-#define FONTENCODING_H
+#ifndef CHARMAP_H
+#define CHARMAP_H
-#include "Character.h"
+#include <utility>
+#include <vector>
#include "types.h"
+class FontEngine;
-struct FontEncoding
+class CharMap
{
- virtual ~FontEncoding () {}
- virtual const char* name () const =0;
- virtual Character decode (UInt32 c) const =0;
- virtual const char* path () const =0;
- static FontEncoding* encoding (const std::string &fontname);
+ friend class FontEngine;
+ typedef std::pair<UInt32, UInt32> UInt32Pair;
+ public:
+ CharMap () {}
+ bool valueExists (UInt32 c) const;
+ UInt32 operator [] (UInt32 c) const;
+ UInt32 size () const {return _pairs.size();}
+ bool empty () const {return _pairs.empty();}
+ void clear () {return _pairs.clear();}
+ void invert ();
+
+ protected:
+ void append (UInt32 from, UInt32 to) {_pairs.push_back(UInt32Pair(from, to));}
+ void sort ();
+
+ private:
+ std::vector<UInt32Pair> _pairs;
};
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CharMapID.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMapID.cpp
index 596e669365f..596e669365f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CharMapID.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMapID.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CharMapID.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMapID.h
index 79d6e9bd538..79d6e9bd538 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CharMapID.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CharMapID.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Character.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Character.h
index 8d5a6965af7..8d5a6965af7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Character.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Character.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CmdLineParserBase.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CmdLineParserBase.cpp
index a929fd1c00b..b019f0d8acb 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CmdLineParserBase.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CmdLineParserBase.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <algorithm>
#include <cstdio>
#include <cstring>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CmdLineParserBase.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CmdLineParserBase.h
index b37cbb0863c..b37cbb0863c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CmdLineParserBase.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CmdLineParserBase.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Color.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Color.cpp
index b81ded6efc5..65a98c57a4b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Color.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Color.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cctype>
#include <cmath>
#include <cstdlib>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Color.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Color.h
index 56a69dd2da8..56a69dd2da8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Color.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Color.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/ColorSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/ColorSpecialHandler.cpp
index 912f43cc5ac..3e3bf6df3ad 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/ColorSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/ColorSpecialHandler.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <algorithm>
#include <cmath>
#include <cstring>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/ColorSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/ColorSpecialHandler.h
index b5559481b00..b5559481b00 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/ColorSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/ColorSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CommandLine.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CommandLine.cpp
index bb5f866d06b..491e110eb59 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CommandLine.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CommandLine.cpp
@@ -4,11 +4,12 @@
// See file COPYING for further details.
// (C) 2009-2013 Martin Gieseking <martin.gieseking@uos.de>
-#include "CommandLine.h"
+#include <config.h>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include "InputReader.h"
+#include "CommandLine.h"
using namespace std;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CommandLine.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CommandLine.h
index e1611191816..5f81df278dc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/CommandLine.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/CommandLine.h
@@ -7,9 +7,7 @@
#ifndef COMMANDLINE_H
#define COMMANDLINE_H
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include "CmdLineParserBase.h"
class CommandLine : public CmdLineParserBase
@@ -17,155 +15,155 @@ class CommandLine : public CmdLineParserBase
public:
CommandLine () {init();}
CommandLine (int argc, char **argv, bool printErrors) {parse(argc, argv, printErrors);}
- 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 linkmark_given () const {return _linkmark_given;}
- const std::string& linkmark_arg () const {return _linkmark_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;}
- bool no_styles_given () const {return _no_styles_given;}
- bool zip_given () const {return _zip_given;}
- int zip_arg () const {return _zip_arg;}
- bool rotate_given () const {return _rotate_given;}
- double rotate_arg () const {return _rotate_arg;}
- bool scale_given () const {return _scale_given;}
- const std::string& scale_arg () const {return _scale_arg;}
- bool translate_given () const {return _translate_given;}
- const std::string& translate_arg () const {return _translate_arg;}
- bool transform_given () const {return _transform_given;}
- const std::string& transform_arg () const {return _transform_arg;}
bool cache_given () const {return _cache_given;}
const std::string& cache_arg () const {return _cache_arg;}
+ bool color_given () const {return _color_given;}
+#if !defined(DISABLE_GS)
+ bool eps_given () const {return _eps_given;}
+#endif
bool exact_given () const {return _exact_given;}
+ bool fontmap_given () const {return _fontmap_given;}
+ const std::string& fontmap_arg () const {return _fontmap_arg;}
+ bool help_given () const {return _help_given;}
+ int help_arg () const {return _help_arg;}
bool keep_given () const {return _keep_given;}
#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS)
bool libgs_given () const {return _libgs_given;}
const std::string& libgs_arg () const {return _libgs_arg;}
#endif
+ bool linkmark_given () const {return _linkmark_given;}
+ const std::string& linkmark_arg () const {return _linkmark_arg;}
+ bool list_specials_given () const {return _list_specials_given;}
bool mag_given () const {return _mag_given;}
double mag_arg () const {return _mag_arg;}
+ bool no_fonts_given () const {return _no_fonts_given;}
+ int no_fonts_arg () const {return _no_fonts_arg;}
bool no_mktexmf_given () const {return _no_mktexmf_given;}
bool no_specials_given () const {return _no_specials_given;}
const std::string& no_specials_arg () const {return _no_specials_arg;}
- bool trace_all_given () const {return _trace_all_given;}
- 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 no_styles_given () const {return _no_styles_given;}
+ bool output_given () const {return _output_given;}
+ const std::string& output_arg () const {return _output_arg;}
+ bool page_given () const {return _page_given;}
+ const std::string& page_arg () const {return _page_arg;}
+ bool precision_given () const {return _precision_given;}
+ int precision_arg () const {return _precision_arg;}
bool progress_given () const {return _progress_given;}
double progress_arg () const {return _progress_arg;}
+ bool rotate_given () const {return _rotate_given;}
+ double rotate_arg () const {return _rotate_arg;}
+ bool scale_given () const {return _scale_given;}
+ const std::string& scale_arg () const {return _scale_arg;}
+ bool stdout_given () const {return _stdout_given;}
+ bool trace_all_given () const {return _trace_all_given;}
+ bool trace_all_arg () const {return _trace_all_arg;}
+ bool transform_given () const {return _transform_given;}
+ const std::string& transform_arg () const {return _transform_arg;}
+ bool translate_given () const {return _translate_given;}
+ const std::string& translate_arg () const {return _translate_arg;}
bool verbosity_given () const {return _verbosity_given;}
unsigned verbosity_arg () const {return _verbosity_arg;}
bool version_given () const {return _version_given;}
bool version_arg () const {return _version_arg;}
+ bool zip_given () const {return _zip_given;}
+ int zip_arg () const {return _zip_arg;}
protected:
void init ();
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);
+ void handle_bbox (InputReader &ir, const Option &opt, bool longopt);
+ void handle_cache (InputReader &ir, const Option &opt, bool longopt);
+ void handle_color (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_linkmark (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);
- void handle_zip (InputReader &ir, const Option &opt, bool longopt);
- void handle_rotate (InputReader &ir, const Option &opt, bool longopt);
- void handle_scale (InputReader &ir, const Option &opt, bool longopt);
- void handle_translate (InputReader &ir, const Option &opt, bool longopt);
- void handle_transform (InputReader &ir, const Option &opt, bool longopt);
- void handle_cache (InputReader &ir, const Option &opt, bool longopt);
void handle_exact (InputReader &ir, const Option &opt, bool longopt);
+ void handle_fontmap (InputReader &ir, const Option &opt, bool longopt);
+ void handle_help (InputReader &ir, const Option &opt, bool longopt);
void handle_keep (InputReader &ir, const Option &opt, bool longopt);
#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS)
void handle_libgs (InputReader &ir, const Option &opt, bool longopt);
#endif
+ void handle_linkmark (InputReader &ir, const Option &opt, bool longopt);
+ void handle_list_specials (InputReader &ir, const Option &opt, bool longopt);
void handle_mag (InputReader &ir, const Option &opt, bool longopt);
+ void handle_no_fonts (InputReader &ir, const Option &opt, bool longopt);
void handle_no_mktexmf (InputReader &ir, const Option &opt, bool longopt);
void handle_no_specials (InputReader &ir, const Option &opt, bool longopt);
- void handle_trace_all (InputReader &ir, const Option &opt, bool longopt);
- void handle_color (InputReader &ir, const Option &opt, bool longopt);
- void handle_help (InputReader &ir, const Option &opt, bool longopt);
- void handle_list_specials (InputReader &ir, const Option &opt, bool longopt);
+ void handle_no_styles (InputReader &ir, const Option &opt, bool longopt);
+ void handle_output (InputReader &ir, const Option &opt, bool longopt);
+ void handle_page (InputReader &ir, const Option &opt, bool longopt);
+ void handle_precision (InputReader &ir, const Option &opt, bool longopt);
void handle_progress (InputReader &ir, const Option &opt, bool longopt);
+ void handle_rotate (InputReader &ir, const Option &opt, bool longopt);
+ void handle_scale (InputReader &ir, const Option &opt, bool longopt);
+ void handle_stdout (InputReader &ir, const Option &opt, bool longopt);
+ void handle_trace_all (InputReader &ir, const Option &opt, bool longopt);
+ void handle_transform (InputReader &ir, const Option &opt, bool longopt);
+ void handle_translate (InputReader &ir, const Option &opt, bool longopt);
void handle_verbosity (InputReader &ir, const Option &opt, bool longopt);
void handle_version (InputReader &ir, const Option &opt, bool longopt);
+ void handle_zip (InputReader &ir, const Option &opt, bool longopt);
private:
static const CmdLineParserBase::Option _options[];
- bool _page_given;
- 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 _linkmark_given;
- std::string _linkmark_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;
- bool _no_styles_given;
- bool _zip_given;
- int _zip_arg;
- bool _rotate_given;
- double _rotate_arg;
- bool _scale_given;
- std::string _scale_arg;
- bool _translate_given;
- std::string _translate_arg;
- bool _transform_given;
- std::string _transform_arg;
bool _cache_given;
std::string _cache_arg;
+ bool _color_given;
+#if !defined(DISABLE_GS)
+ bool _eps_given;
+#endif
bool _exact_given;
+ bool _fontmap_given;
+ std::string _fontmap_arg;
+ bool _help_given;
+ int _help_arg;
bool _keep_given;
#if !defined(HAVE_LIBGS) && !defined(DISABLE_GS)
bool _libgs_given;
std::string _libgs_arg;
#endif
+ bool _linkmark_given;
+ std::string _linkmark_arg;
+ bool _list_specials_given;
bool _mag_given;
double _mag_arg;
+ bool _no_fonts_given;
+ int _no_fonts_arg;
bool _no_mktexmf_given;
bool _no_specials_given;
std::string _no_specials_arg;
- bool _trace_all_given;
- bool _trace_all_arg;
- bool _color_given;
- bool _help_given;
- int _help_arg;
- bool _list_specials_given;
+ bool _no_styles_given;
+ bool _output_given;
+ std::string _output_arg;
+ bool _page_given;
+ std::string _page_arg;
+ bool _precision_given;
+ int _precision_arg;
bool _progress_given;
double _progress_arg;
+ bool _rotate_given;
+ double _rotate_arg;
+ bool _scale_given;
+ std::string _scale_arg;
+ bool _stdout_given;
+ bool _trace_all_given;
+ bool _trace_all_arg;
+ bool _transform_given;
+ std::string _transform_arg;
+ bool _translate_given;
+ std::string _translate_arg;
bool _verbosity_given;
unsigned _verbosity_arg;
bool _version_given;
bool _version_arg;
+ bool _zip_given;
+ int _zip_arg;
};
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DLLoader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DLLoader.cpp
index 30317455ba6..e56c86aa96e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DLLoader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DLLoader.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "DLLoader.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DLLoader.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DLLoader.h
index 3052d13714e..0420c534869 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DLLoader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DLLoader.h
@@ -22,8 +22,6 @@
#define DLLOADER_H
#ifdef __WIN32__
- #undef NOMINMAX
- #define NOMINMAX 1
#include <windows.h>
#else
#include <dlfcn.h>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIActions.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIActions.cpp
index f9c95dc3754..2fc2adbf43c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIActions.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIActions.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "DVIActions.h"
const double DVIActions::BP = 72.0/72.27;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIActions.h
index 53edb402615..1a2fb3b9386 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIActions.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIActions.h
@@ -37,8 +37,9 @@ struct DVIActions
static const double CM;
static const double MM;
virtual ~DVIActions () {}
- virtual void setChar (double x, double y, unsigned c, const Font *f) {}
+ virtual void setChar (double x, double y, unsigned c, bool vertical, const Font *f) {}
virtual void setRule (double x, double y, double height, double width) {}
+ virtual void setTextOrientation (bool vertical) {}
virtual void moveToX (double x) {}
virtual void moveToY (double y) {}
virtual bool fontProcessingEnabled () const {return true;}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIReader.cpp
index fbde83c40be..4e086129b86 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIReader.cpp
@@ -18,11 +18,12 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstdarg>
#include <fstream>
#include <iostream>
#include <sstream>
-#include "types.h"
+#include "Color.h"
#include "DVIActions.h"
#include "DVIReader.h"
#include "Font.h"
@@ -31,13 +32,15 @@
#include "SignalHandler.h"
#include "VectorStream.h"
#include "macros.h"
+#include "types.h"
+
using namespace std;
bool DVIReader::COMPUTE_PAGE_LENGTH = false;
-DVIReader::DVIReader (istream &is, DVIActions *a) : StreamReader(is), _actions(a)
+DVIReader::DVIReader (istream &is, DVIActions *a) : StreamReader(is), _dviFormat(DVI_NONE), _actions(a)
{
_inPage = false;
_pageHeight = _pageWidth = 0;
@@ -96,7 +99,8 @@ int DVIReader::evalCommand (bool compute_size, CommandHandler &handler, int &len
{&DVIReader::cmdFontNum, 1}, {&DVIReader::cmdFontNum, 2}, {&DVIReader::cmdFontNum, 3}, {&DVIReader::cmdFontNum, 4}, // 235-238
{&DVIReader::cmdXXX, 1}, {&DVIReader::cmdXXX, 2}, {&DVIReader::cmdXXX, 3}, {&DVIReader::cmdXXX, 4}, // 239-242
{&DVIReader::cmdFontDef, 1}, {&DVIReader::cmdFontDef, 2}, {&DVIReader::cmdFontDef, 3}, {&DVIReader::cmdFontDef, 4}, // 243-246
- {&DVIReader::cmdPre, 0}, {&DVIReader::cmdPost, 0}, {&DVIReader::cmdPostPost, 0} // 247-249
+ {&DVIReader::cmdPre, 0}, {&DVIReader::cmdPost, 0}, {&DVIReader::cmdPostPost, 0}, // 247-249
+ {&DVIReader::cmdXPic, 0}, {&DVIReader::cmdXFontDef, 0},{&DVIReader::cmdXGlyphA, 0}, {&DVIReader::cmdXGlyphS, 0} // 251-254
};
const int opcode = in().get();
@@ -114,6 +118,20 @@ int DVIReader::evalCommand (bool compute_size, CommandHandler &handler, int &len
length = 0;
param = opcode-171;
}
+ else if (opcode >= 251 && opcode <= 254 && _dviFormat == DVI_XDV) { // XDV command?
+ static const CommandHandler handlers[] = {
+ &DVIReader::cmdXPic,
+ &DVIReader::cmdXFontDef,
+ &DVIReader::cmdXGlyphA,
+ &DVIReader::cmdXGlyphS
+ };
+ handler = handlers[opcode-251];
+ param = 0;
+ }
+ else if (opcode == 255 && _dviFormat == DVI_PTEX) { // direction command set by pTeX?
+ handler = &DVIReader::cmdDir;
+ length = 1;
+ }
else if (opcode >= 250) {
ostringstream oss;
oss << "undefined DVI command (opcode " << opcode << ')';
@@ -161,9 +179,9 @@ int DVIReader::executeCommand () {
streampos pos = in().tellg();
int opcode = evalCommand(false, handler, len, param);
(this->*handler)(param);
- if (_currPos.v+_ty != _prevYPos) {
+ if (_dviState.v+_ty != _prevYPos) {
_tx = _ty = 0;
- _prevYPos = _currPos.v;
+ _prevYPos = _dviState.v;
}
if (COMPUTE_PAGE_LENGTH && _inPage && _actions) {
// ensure progress() is called at 0%
@@ -195,28 +213,6 @@ void DVIReader::executeAll () {
}
-#if 0
-/** Executes all DVI commands from the preamble to postpost. */
-bool DVIReader::executeDocument () {
- in().clear(); // reset all status bits
- if (!in())
- return false;
- in().seekg(0); // move file pointer to first byte of the input stream
- while (!in().eof() && executeCommand() != 249); // stop reading after postpost (249)
- return true;
-}
-
-bool DVIReader::executeAllPages () {
- in().clear(); // reset all status bits
- if (!in())
- return false;
- in().seekg(0); // move file pointer to first byte of the input stream
- while (!in().eof() && executeCommand() != 248); // stop reading when postamble (248) is reached
- return true;
-}
-#endif
-
-
/** Reads and executes the commands of a single page.
* This methods stops reading after the page's eop command has been executed.
* @param[in] n number of page to be executed
@@ -236,10 +232,10 @@ bool DVIReader::executePage (unsigned n) {
if (n < 1 || n > _totalPages)
return false;
in().seekg(_prevBop, ios_base::beg); // now on last bop
- _inPostamble = false; // we jumped out of the postamble
+ _inPostamble = false; // we jumped out of the postamble
unsigned pageCount = _totalPages;
for (; pageCount > n && _prevBop > 0; pageCount--) {
- in().seekg(41, ios_base::cur); // skip bop and 10*4 \count bytes => now on pointer to prev bop
+ in().seekg(41, ios_base::cur); // skip bop and 10*4 \count bytes => now on pointer to prev bop
_prevBop = readSigned(4);
in().seekg(_prevBop, ios_base::beg);
}
@@ -266,10 +262,10 @@ bool DVIReader::executePages (unsigned first, unsigned last) {
first = max(1u, min(first, _totalPages));
last = max(1u, min(last, _totalPages));
in().seekg(_prevBop, ios_base::beg); // now on last bop
- _inPostamble = false; // we jumped out of the postamble
+ _inPostamble = false; // we jumped out of the postamble
unsigned count = _totalPages;
for (; count > first && _prevBop > 0; count--) {
- in().seekg(41, ios_base::cur); // skip bop and 10*4 \count bytes => now on pointer to prev bop
+ in().seekg(41, ios_base::cur); // skip bop and 10*4 \count bytes => now on pointer to prev bop
_prevBop = readSigned(4);
in().seekg(_prevBop, ios_base::beg);
}
@@ -311,14 +307,14 @@ void DVIReader::executePostamble () {
/** Returns the current x coordinate in TeX point units.
* This is the horizontal position where the next output would be placed. */
double DVIReader::getXPos () const {
- return _currPos.h+_tx;
+ return _dviState.h+_tx;
}
/** Returns the current y coordinate in TeX point units.
* This is the vertical position where the next output would be placed. */
double DVIReader::getYPos () const {
- return _currPos.v+_ty;
+ return _dviState.v+_ty;
}
@@ -331,21 +327,31 @@ double DVIReader::getPageWidth () const {
return _pageWidth;
}
+
+void DVIReader::verifyDVIFormat (int id) const {
+ switch (id) {
+ case DVI_STANDARD:
+ case DVI_PTEX:
+ case DVI_XDV:
+ break;
+ default:
+ ostringstream oss;
+ oss << "DVI format version " << id << " not supported";
+ throw DVIException(oss.str());
+ }
+}
+
/////////////////////////////////////
/** Reads and executes DVI preamble command. */
void DVIReader::cmdPre (int) {
- UInt32 i = readUnsigned(1); // identification number (should be 2)
+ _dviFormat = max(_dviFormat, (DVIFormat)readUnsigned(1)); // identification number
+ verifyDVIFormat(_dviFormat);
UInt32 num = readUnsigned(4); // numerator units of measurement
UInt32 den = readUnsigned(4); // denominator units of measurement
_mag = readUnsigned(4); // magnification
UInt32 k = readUnsigned(1); // length of following comment
string cmt = readString(k); // comment
- if (i != 2) {
- ostringstream oss;
- oss << "DVI format version " << i << " not supported";
- throw DVIException(oss.str());
- }
// 1 dviunit * num/den == multiples of 0.0000001m
// 1 dviunit * _scaleFactor: length of 1 dviunit in TeX points * _mag/1000
_scaleFactor = num/25400000.0*7227.0/den*_mag/1000.0;
@@ -367,7 +373,7 @@ void DVIReader::cmdPost (int) {
// 1 dviunit * num/den == multiples of 0.0000001m
// 1 dviunit * _scaleFactor: length of 1 dviunit in TeX points * _mag/1000
_scaleFactor = num/25400000.0*7227.0/den*_mag/1000.0;
- _pageHeight *= _scaleFactor; // to pt units
+ _pageHeight *= _scaleFactor; // to pt units
_pageWidth *= _scaleFactor;
_inPostamble = true;
if (_actions)
@@ -378,12 +384,10 @@ void DVIReader::cmdPost (int) {
/** Reads and executes DVI postpost command. */
void DVIReader::cmdPostPost (int) {
_inPostamble = false;
- readUnsigned(4); // pointer to begin of postamble
- UInt32 i = readUnsigned(1); // identification byte (should be 2)
- if (i == 2)
- while (readUnsigned(1) == 223); // skip fill bytes (223), eof bit should be set now
- else
- throw DVIException("invalid identification value in postpost");
+ readUnsigned(4); // pointer to begin of postamble
+ _dviFormat = max(_dviFormat, (DVIFormat)readUnsigned(1)); // identification byte
+ verifyDVIFormat(_dviFormat);
+ while (readUnsigned(1) == 223); // skip fill bytes (223), eof bit should be set now
}
@@ -393,9 +397,9 @@ void DVIReader::cmdBop (int) {
for (int i=0; i < 10; i++)
c[i] = readSigned(4);
readSigned(4); // pointer to peceeding bop (-1 in case of first page)
- _currPos.reset(); // set all DVI registers to 0
- while (!_posStack.empty())
- _posStack.pop();
+ _dviState.reset(); // set all DVI registers to 0
+ while (!_stateStack.empty())
+ _stateStack.pop();
_currFontNum = 0;
_inPage = true;
_pageLength = 0;
@@ -421,7 +425,7 @@ void DVIReader::cmdBop (int) {
/** Reads and executes End-Of-Page command. */
void DVIReader::cmdEop (int) {
- if (!_posStack.empty())
+ if (!_stateStack.empty())
throw DVIException("stack not empty at end of page");
_inPage = false;
endPage(_currPageNum);
@@ -432,23 +436,25 @@ void DVIReader::cmdEop (int) {
/** Reads and executes push command. */
void DVIReader::cmdPush (int) {
- _posStack.push(_currPos);
+ _stateStack.push(_dviState);
}
/** Reads and executes pop command (restores pushed position information). */
void DVIReader::cmdPop (int) {
- if (_posStack.empty())
+ if (_stateStack.empty())
throw DVIException("stack empty at pop command");
else {
- DVIPosition prevPos = _currPos;
- _currPos = _posStack.top();
- _posStack.pop();
+ DVIState prevState = _dviState;
+ _dviState = _stateStack.top();
+ _stateStack.pop();
if (_actions) {
- if (prevPos.h != _currPos.h)
- _actions->moveToX(_currPos.h + _tx);
- if (prevPos.v != _currPos.v)
- _actions->moveToY(_currPos.v + _ty);
+ if (prevState.h != _dviState.h)
+ _actions->moveToX(_dviState.h + _tx);
+ if (prevState.v != _dviState.v)
+ _actions->moveToY(_dviState.v + _ty);
+ if (prevState.d != _dviState.d)
+ _actions->setTextOrientation(_dviState.d != WMODE_LR);
}
}
}
@@ -474,10 +480,10 @@ void DVIReader::putChar (UInt32 c, bool moveCursor) {
if (VirtualFont *vf = dynamic_cast<VirtualFont*>(font)) { // is current font a virtual font?
vector<UInt8> *dvi = const_cast<vector<UInt8>*>(vf->getDVI(c)); // get DVI snippet that describes character c
if (dvi) {
- DVIPosition pos = _currPos; // save current cursor position
- _currPos.x = _currPos.y = _currPos.w = _currPos.z = 0;
+ DVIState pos = _dviState; // save current cursor position
+ _dviState.x = _dviState.y = _dviState.w = _dviState.z = 0;
int save_fontnum = _currFontNum; // save current font number
- fm.enterVF(vf); // new font number context
+ fm.enterVF(vf); // new font number context
cmdFontNum0(fm.vfFirstFontNum(vf));
double save_scale = _scaleFactor;
_scaleFactor = vf->scaledSize()/(1 << 20);
@@ -494,14 +500,20 @@ void DVIReader::putChar (UInt32 c, bool moveCursor) {
_scaleFactor = save_scale; // restore previous scale factor
fm.leaveVF(); // restore previous font number context
cmdFontNum0(save_fontnum); // restore previous font number
- _currPos = pos; // restore previous cursor position
+ _dviState = pos; // restore previous cursor position
}
}
- else if (_actions) {
- _actions->setChar(_currPos.h+_tx, _currPos.v+_ty, c, font);
+ else if (_actions)
+ _actions->setChar(_dviState.h+_tx, _dviState.v+_ty, c, _dviState.d != WMODE_LR, font);
+
+ if (moveCursor) {
+ double dist = font->charWidth(c) * font->scaleFactor() * _mag/1000.0;
+ switch (_dviState.d) {
+ case WMODE_LR: _dviState.h += dist; break;
+ case WMODE_TB: _dviState.v += dist; break;
+ case WMODE_BT: _dviState.v -= dist; break;
+ }
}
- if (moveCursor)
- _currPos.h += font->charWidth(c) * font->scaleFactor() * _mag/1000.0;
}
@@ -546,10 +558,8 @@ void DVIReader::cmdSetRule (int) {
double height = _scaleFactor*readSigned(4);
double width = _scaleFactor*readSigned(4);
if (_actions && height > 0 && width > 0)
- _actions->setRule(_currPos.h+_tx, _currPos.v+_ty, height, width);
- _currPos.h += width;
- if (_actions && (height <= 0 || width <= 0))
- _actions->moveToX(_currPos.h+_tx);
+ _actions->setRule(_dviState.h+_tx, _dviState.v+_ty, height, width);
+ moveRight(width, (height <= 0 || width <= 0));
}
else
throw DVIException("set_rule outside of page");
@@ -564,25 +574,71 @@ void DVIReader::cmdPutRule (int) {
double height = _scaleFactor*readSigned(4);
double width = _scaleFactor*readSigned(4);
if (_actions && height > 0 && width > 0)
- _actions->setRule(_currPos.h+_tx, _currPos.v+_ty, height, width);
+ _actions->setRule(_dviState.h+_tx, _dviState.v+_ty, height, width);
}
else
throw DVIException("put_rule outside of page");
}
+void DVIReader::moveRight (double x, bool callAction) {
+ switch (_dviState.d) {
+ case WMODE_LR: _dviState.h += x; break;
+ case WMODE_TB: _dviState.v += x; break;
+ case WMODE_BT: _dviState.v -= x; break;
+ }
+ if (_actions && callAction) {
+ if (_dviState.d == WMODE_LR)
+ _actions->moveToX(x+_tx);
+ else
+ _actions->moveToY(x+_ty);
+ }
+}
+
+
+void DVIReader::moveDown (double y) {
+ switch (_dviState.d) {
+ case WMODE_LR: _dviState.v += y; break;
+ case WMODE_TB: _dviState.h -= y; break;
+ case WMODE_BT: _dviState.h += y; break;
+ }
+ if (_actions) {
+ if (_dviState.d == WMODE_LR)
+ _actions->moveToY(y+_ty);
+ else
+ _actions->moveToX(y+_tx);
+ }
+}
+
+
+void DVIReader::cmdRight (int len) {moveRight(_scaleFactor*readSigned(len));}
+void DVIReader::cmdDown (int len) {moveDown(_scaleFactor*readSigned(len));}
+void DVIReader::cmdX0 (int) {moveRight(_dviState.x);}
+void DVIReader::cmdY0 (int) {moveDown(_dviState.y);}
+void DVIReader::cmdW0 (int) {moveRight(_dviState.w);}
+void DVIReader::cmdZ0 (int) {moveDown(_dviState.z);}
+void DVIReader::cmdX (int len) {_dviState.x = _scaleFactor*readSigned(len); cmdX0(0);}
+void DVIReader::cmdY (int len) {_dviState.y = _scaleFactor*readSigned(len); cmdY0(0);}
+void DVIReader::cmdW (int len) {_dviState.w = _scaleFactor*readSigned(len); cmdW0(0);}
+void DVIReader::cmdZ (int len) {_dviState.z = _scaleFactor*readSigned(len); cmdZ0(0);}
void DVIReader::cmdNop (int) {}
-void DVIReader::cmdRight (int len) {_currPos.h += _scaleFactor*readSigned(len); if (_actions) _actions->moveToX(_currPos.h+_tx);}
-void DVIReader::cmdDown (int len) {_currPos.v += _scaleFactor*readSigned(len); if (_actions) _actions->moveToY(_currPos.v+_ty);}
-void DVIReader::cmdX0 (int) {_currPos.h += _currPos.x; if (_actions) _actions->moveToX(_currPos.h+_tx);}
-void DVIReader::cmdY0 (int) {_currPos.v += _currPos.y; if (_actions) _actions->moveToY(_currPos.v+_ty);}
-void DVIReader::cmdW0 (int) {_currPos.h += _currPos.w; if (_actions) _actions->moveToX(_currPos.h+_tx);}
-void DVIReader::cmdZ0 (int) {_currPos.v += _currPos.z; if (_actions) _actions->moveToY(_currPos.v+_ty);}
-void DVIReader::cmdX (int len) {_currPos.x = _scaleFactor*readSigned(len); cmdX0(0);}
-void DVIReader::cmdY (int len) {_currPos.y = _scaleFactor*readSigned(len); cmdY0(0);}
-void DVIReader::cmdW (int len) {_currPos.w = _scaleFactor*readSigned(len); cmdW0(0);}
-void DVIReader::cmdZ (int len) {_currPos.z = _scaleFactor*readSigned(len); cmdZ0(0);}
+
+/** Sets the text orientation (horizontal, vertical).
+ * This command is only available in DVI files of format 3 (created by pTeX) */
+void DVIReader::cmdDir (int) {
+ UInt8 wmode = readUnsigned(1);
+ if (wmode == 4) // yoko mode (4) equals default LR mode (0)
+ wmode = 0;
+ if (wmode == 2 || wmode > 3) {
+ ostringstream oss;
+ oss << "invalid writing mode value " << wmode << " (0, 1, or 3 expected)";
+ throw DVIException(oss.str());
+ }
+ _dviState.d = (WritingMode)wmode;
+ if (_actions)
+ _actions->setTextOrientation(_dviState.d != WMODE_LR);
+}
void DVIReader::cmdXXX (int len) {
@@ -688,3 +744,91 @@ void DVIReader::defineVFFont (UInt32 fontnum, string path, string name, UInt32 c
void DVIReader::defineVFChar (UInt32 c, vector<UInt8> *dvi) {
FontManager::instance().assignVfChar(c, dvi);
}
+
+
+/** XDV extension: include image or pdf file.
+ * parameters: box[1] matrix[4][6] p[2] len[2] path[l] */
+void DVIReader::cmdXPic (int) {
+ // just skip the parameters
+ readUnsigned(1); // box
+ for (int i=0; i < 6; i++) // matrix
+ readSigned(4);
+ readSigned(2); // page number
+ UInt16 len = readUnsigned(2);
+ readString(len); // path to image/pdf file
+}
+
+
+void DVIReader::cmdXFontDef (int) {
+ Int32 fontnum = readSigned(4);
+ double ptsize = _scaleFactor*readUnsigned(4);
+ UInt16 flags = readUnsigned(2);
+ UInt8 psname_len = readUnsigned(1);
+ UInt8 fmname_len = readUnsigned(1);
+ UInt8 stname_len = readUnsigned(1);
+ string fontname = readString(psname_len);
+ readString(fmname_len);
+ readString(stname_len);
+ FontStyle style;
+ Color color;
+ if (flags & 0x0100) { // vertical?
+ }
+ if (flags & 0x0200) { // colored?
+ UInt32 rgba = readUnsigned(4);
+ color.set(UInt8(rgba >> 24), UInt8((rgba >> 16) & 0xff), UInt8((rgba >> 8) & 0xff));
+ }
+ if (flags & 0x1000) // extend?
+ style.extend = _scaleFactor*readSigned(4);
+ if (flags & 0x2000) // slant?
+ style.slant = _scaleFactor*readSigned(4);
+ if (flags & 0x4000) // embolden?
+ style.bold = _scaleFactor*readSigned(4);
+ if (flags & 0x0800) { // variations?
+ UInt16 num_variations = readSigned(2);
+ for (int i=0; i < num_variations; i++)
+ readUnsigned(4);
+ }
+ if (_inPage && _actions && _actions->fontProcessingEnabled()) {
+ FontManager::instance().registerFont(fontnum, fontname, ptsize, style, color);
+// if (NativeFont *font = dynamic_cast<NativeFont*>(FontManager::instance().getFontById(id))) {
+// font->setStyle(style);
+// }
+ }
+}
+
+
+void DVIReader::cmdXGlyphA (int) {
+ putGlyphArray(false);
+}
+
+
+void DVIReader::cmdXGlyphS (int) {
+ putGlyphArray(true);
+}
+
+
+void DVIReader::putGlyphArray (bool xonly) {
+ double strwidth = _scaleFactor*readSigned(4);
+ UInt16 num_glyphs = readUnsigned(2);
+ vector<Int32> x(num_glyphs);
+ vector<Int32> y(num_glyphs);
+ for (int i=0; i < num_glyphs; i++) {
+ x[i] = readSigned(4);
+ y[i] = xonly ? 0 : readSigned(4);
+ }
+ if (_actions && _actions->fontProcessingEnabled()) {
+ if (Font *font = FontManager::instance().getFont(_currFontNum)) {
+ for (int i=0; i < num_glyphs; i++) {
+ UInt16 glyph_index = readUnsigned(2);
+ double xx = _dviState.h + x[i]*_scaleFactor + _tx;
+ double yy = _dviState.v + y[i]*_scaleFactor + _ty;
+ _actions->setChar(xx, yy, glyph_index, false, font);
+ }
+ }
+ }
+ else {
+ for (int i=0; i < num_glyphs; i++)
+ readUnsigned(2);
+ }
+ moveRight(strwidth);
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIReader.h
index 2d24d6b24f6..cbf8703ced7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIReader.h
@@ -47,13 +47,16 @@ struct FileFinder;
class DVIReader : public StreamReader, protected VFActions
{
typedef void (DVIReader::*CommandHandler)(int);
+ enum DVIFormat {DVI_NONE=0, DVI_STANDARD=2, DVI_PTEX=3, DVI_XDV=5};
+ enum WritingMode {WMODE_LR=0, WMODE_TB=1, WMODE_BT=3};
- struct DVIPosition
+ struct DVIState
{
- double h, v;
- double x, w, y, z;
- DVIPosition () {reset();}
- void reset () {h = v = x = w = y = z = 0.0;}
+ double h, v; ///< horizontal and vertical cursor position
+ double x, w, y, z; ///< additional registers to store horizontal (x, w) and vertical (y, z) positions
+ WritingMode d; ///< direction: 0: horizontal, 1: vertical(top->bottom), 3: vertical (bottom->top)
+ DVIState () {reset();}
+ void reset () {h = v = x = w = y = z = 0.0; d=WMODE_LR;}
};
public:
@@ -70,8 +73,8 @@ class DVIReader : public StreamReader, protected VFActions
double getXPos () const;
double getYPos () const;
void finishLine () {_prevYPos = std::numeric_limits<double>::min();}
- void translateToX (double x) {_tx=x-_currPos.h-_tx;}
- void translateToY (double y) {_ty=y-_currPos.v-_ty;}
+ void translateToX (double x) {_tx=x-_dviState.h-_tx;}
+ void translateToY (double y) {_ty=y-_dviState.v-_ty;}
double getPageWidth () const;
double getPageHeight () const;
int getCurrentFontNumber () const {return _currFontNum;}
@@ -81,9 +84,13 @@ class DVIReader : public StreamReader, protected VFActions
DVIActions* replaceActions (DVIActions *a);
protected:
+ void verifyDVIFormat (int id) const;
int executeCommand ();
int evalCommand (bool compute_size, CommandHandler &handler, int &length, int &param);
+ void moveRight (double x, bool callAction=true);
+ void moveDown (double y);
void putChar (UInt32 c, bool moveCursor);
+ void putGlyphArray (bool xonly);
void defineFont (UInt32 fontnum, const std::string &name, UInt32 cs, double ds, double ss);
virtual void beginPage (unsigned pageno, Int32 *c) {}
virtual void endPage (unsigned pageno) {}
@@ -104,6 +111,7 @@ class DVIReader : public StreamReader, protected VFActions
void cmdEop (int len);
void cmdPush (int len);
void cmdPop (int len);
+ void cmdDir (int len);
void cmdRight (int len);
void cmdDown (int len);
void cmdX0 (int len);
@@ -121,8 +129,13 @@ class DVIReader : public StreamReader, protected VFActions
void cmdPre (int len);
void cmdPost (int len);
void cmdPostPost (int len);
+ void cmdXPic (int len);
+ void cmdXFontDef (int len);
+ void cmdXGlyphA (int len);
+ void cmdXGlyphS (int len);
private:
+ DVIFormat _dviFormat; ///< format of DVI file currently processed
DVIActions *_actions; ///< actions to be performed on various DVI events
bool _inPage; ///< true if between bop and eop
unsigned _totalPages; ///< total number of pages in dvi file
@@ -133,8 +146,8 @@ class DVIReader : public StreamReader, protected VFActions
bool _inPostamble; ///< true if stream pointer is inside the postamble
Int32 _prevBop; ///< pointer to previous bop
double _pageHeight, _pageWidth; ///< page height and width in TeX points
- DVIPosition _currPos; ///< current cursor position
- std::stack<DVIPosition> _posStack;
+ DVIState _dviState; ///< current cursor position
+ std::stack<DVIState> _stateStack;
double _prevYPos; ///< previous vertical cursor position
double _tx, _ty; ///< tranlation of cursor position
size_t _pageLength; ///< number of bytes between current bop end eop
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVG.cpp
index 5265a592199..fadf3d73b9b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVG.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVG.cpp
@@ -18,17 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#ifdef HAVE_CONFIG_H
- #include "config.h"
- #ifdef TARGET_SYSTEM
- #define VERSION_STR VERSION " (" TARGET_SYSTEM ")"
- #else
- #define VERSION_STR VERSION
- #endif
-#else
- #define VERSION_STR ""
-#endif
-
+#include <config.h>
#include <cstdlib>
#include <ctime>
#include <fstream>
@@ -64,8 +54,15 @@
#include "PsSpecialHandler.h"
#endif
#include "TpicSpecialHandler.h"
+
///////////////////////////////////
+#ifdef TARGET_SYSTEM
+ #define VERSION_STR VERSION " (" TARGET_SYSTEM ")"
+#else
+ #define VERSION_STR VERSION
+#endif
+
using namespace std;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVG.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVG.h
index b69bfeca297..b69bfeca297 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVG.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVG.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVGActions.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVGActions.cpp
index c46352a6001..d5d8fb2e768 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVGActions.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVGActions.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstring>
#include <ctime>
#include "BoundingBox.h"
@@ -31,11 +32,11 @@
#include "XMLNode.h"
#include "XMLString.h"
+
using namespace std;
double DVIToSVGActions::PROGRESSBAR_DELAY=1000; // initial delay in seconds (values >= 1000 disable the progressbar)
-bool DVIToSVGActions::EXACT_BBOX = false;
DVIToSVGActions::DVIToSVGActions (DVIToSVG &dvisvg, SVGTree &svg)
@@ -85,7 +86,7 @@ void DVIToSVGActions::moveToY (double y) {
* @param[in] y vertical position of the character's baseline
* @param[in] c character code relative to the current font
* @param[in] font font to be used */
-void DVIToSVGActions::setChar (double x, double y, unsigned c, const Font *font) {
+void DVIToSVGActions::setChar (double x, double y, unsigned c, bool vertical, const Font *font) {
// If we use SVG fonts there is no need to record all font name/char/size combinations
// because the SVG font mechanism handles this automatically. It's sufficient to
// record font names and chars. The various font sizes can be ignored here.
@@ -95,41 +96,62 @@ void DVIToSVGActions::setChar (double x, double y, unsigned c, const Font *font)
// However, we record all required fonts
_usedFonts.insert(font);
-
_svg.appendChar(c, x, y, *font);
- // update bounding box
- double wl=0, wr=0, h=0, d=0; // left/right width, height, and depth of character c
+
static string fontname;
GlyphTracerMessages callback(fontname != font->name(), false);
fontname = font->name();
+
BoundingBox charbox;
- const PhysicalFont *ph_font = dynamic_cast<const PhysicalFont*>(font);
- if (EXACT_BBOX && ph_font && ph_font->getGlyphBox(c, charbox, &callback)) {
- if ((wl = charbox.minX()) > 0) wl=0;
- if ((wr = charbox.maxX()) < 0) wr=0;
- if ((h = charbox.maxY()) < 0) h=0;
- if ((d = -charbox.minY()) < 0) d=0;
- }
- else {
- double s = font->scaleFactor();
- wr = s*(font->charWidth(c) + font->italicCorr(c));
- h = s*font->charHeight(c);
- d = s*font->charDepth(c);
+ GlyphMetrics metrics;
+ font->getGlyphMetrics(c, vertical, metrics);
+ const PhysicalFont* pf = dynamic_cast<const PhysicalFont*>(font);
+ if (PhysicalFont::EXACT_BBOX && pf) {
+ GlyphMetrics exact_metrics;
+ pf->getExactGlyphBox(c, exact_metrics, vertical, &callback);
+ if (vertical) {
+ // move top of bbox to upper margin of glyph (just an approximation yet)
+ y += (metrics.d-exact_metrics.h-exact_metrics.d)/2;
+ }
+ metrics = exact_metrics;
}
+ BoundingBox bbox(x-metrics.wl, y-metrics.h, x+metrics.wr, y+metrics.d);
- BoundingBox bbox(x+wl, y-h, x+wr, y+d);
-/* XMLElementNode *rect = new XMLElementNode("rect");
- rect->addAttribute("x", x+wl);
- rect->addAttribute("y", y-h);
- rect->addAttribute("width", (-wl+wr));
- rect->addAttribute("height", (h+d));
- rect->addAttribute("fill", "none");
- rect->addAttribute("stroke", "red");
- rect->addAttribute("stroke-width", "0.5");
- _svg.appendToPage(rect);*/
+ // update bounding box
if (!getMatrix().isIdentity())
bbox.transform(getMatrix());
embed(bbox);
+#if 0
+ XMLElementNode *rect = new XMLElementNode("rect");
+ rect->addAttribute("x", x-metrics.wl);
+ rect->addAttribute("y", y-metrics.h);
+ rect->addAttribute("width", metrics.wl+metrics.wr);
+ rect->addAttribute("height", metrics.h+metrics.d);
+ rect->addAttribute("fill", "none");
+ rect->addAttribute("stroke", "red");
+ rect->addAttribute("stroke-width", "0.5");
+ _svg.appendToPage(rect);
+ if (metrics.d > 0) {
+ XMLElementNode *line = new XMLElementNode("line");
+ line->addAttribute("x1", x-metrics.wl);
+ line->addAttribute("y1", y);
+ line->addAttribute("x2", x+metrics.wr);
+ line->addAttribute("y2", y);
+ line->addAttribute("stroke", "blue");
+ line->addAttribute("stroke-width", "0.5");
+ _svg.appendToPage(line);
+ }
+ if (metrics.wl > 0) {
+ XMLElementNode *line = new XMLElementNode("line");
+ line->addAttribute("x1", x);
+ line->addAttribute("y1", y-metrics.h);
+ line->addAttribute("x2", x);
+ line->addAttribute("y2", y+metrics.d);
+ line->addAttribute("stroke", "blue");
+ line->addAttribute("stroke-width", "0.5");
+ _svg.appendToPage(line);
+ }
+#endif
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVGActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVGActions.h
index 731aedc9a31..01fd54fbe1d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DVIToSVGActions.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DVIToSVGActions.h
@@ -47,7 +47,7 @@ class DVIToSVGActions : public DVIActions, public SpecialActions, public Special
DVIToSVGActions (DVIToSVG &dvisvg, SVGTree &svg);
~DVIToSVGActions ();
void reset ();
- void setChar (double x, double y, unsigned c, const Font *f);
+ void setChar (double x, double y, unsigned c, bool vertical, const Font *f);
void setRule (double x, double y, double height, double width);
void setBgColor (const Color &color);
void setColor (const Color &color) {_svg.setColor(color);}
@@ -60,6 +60,7 @@ class DVIToSVGActions : public DVIActions, public SpecialActions, public Special
void prependToPage (XMLNode *node) {_svg.prependToPage(node);}
void pushContextElement (XMLElementNode *node) {_svg.pushContextElement(node);}
void popContextElement () {_svg.popContextElement();}
+ void setTextOrientation(bool vertical) {_svg.setVertical(vertical);}
void moveToX (double x);
void moveToY (double y);
void setFont (int num, const Font *font);
@@ -87,7 +88,6 @@ class DVIToSVGActions : public DVIActions, public SpecialActions, public Special
public:
static double PROGRESSBAR_DELAY; ///< progress bar doesn't appear before this time has elapsed (in sec)
- static bool EXACT_BBOX;
private:
SVGTree &_svg;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Directory.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Directory.cpp
index c13ebe35a38..0715ebd45ae 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Directory.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Directory.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "Directory.h"
using namespace std;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Directory.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Directory.h
index 6420bec6d19..2bed74d7038 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Directory.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Directory.h
@@ -24,7 +24,6 @@
#include <string>
#ifdef __WIN32__
#include <windows.h>
- #undef max
#else
#include <dirent.h>
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DvisvgmSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DvisvgmSpecialHandler.cpp
index 11e3c0fc42a..9909b2e99fc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DvisvgmSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DvisvgmSpecialHandler.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstring>
#include "DvisvgmSpecialHandler.h"
#include "InputBuffer.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DvisvgmSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DvisvgmSpecialHandler.h
index 93e726fe634..93e726fe634 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/DvisvgmSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/DvisvgmSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSFile.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSFile.cpp
index cbeb5600366..adb05cc3093 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSFile.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSFile.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstring>
#include <istream>
#include <limits>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSFile.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSFile.h
index 60a4c007d39..60a4c007d39 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSFile.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSFile.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSToSVG.cpp
index f8dccd2b9a4..b29061654cd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSToSVG.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSToSVG.cpp
@@ -18,17 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#ifdef HAVE_CONFIG_H
- #include "config.h"
- #ifdef TARGET_SYSTEM
- #define VERSION_STR VERSION " (" TARGET_SYSTEM ")"
- #else
- #define VERSION_STR VERSION
- #endif
-#else
- #define VERSION_STR ""
-#endif
-
+#include <config.h>
#include <fstream>
#include <istream>
#include <sstream>
@@ -39,6 +29,12 @@
#include "PsSpecialHandler.h"
#include "SVGOutputBase.h"
+#ifdef TARGET_SYSTEM
+ #define VERSION_STR VERSION " (" TARGET_SYSTEM ")"
+#else
+ #define VERSION_STR VERSION
+#endif
+
using namespace std;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSToSVG.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSToSVG.h
index 46360e820a5..46360e820a5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EPSToSVG.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EPSToSVG.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EmSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EmSpecialHandler.cpp
index dbd1fd4b169..5004e500882 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EmSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EmSpecialHandler.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <sstream>
#include "EmSpecialHandler.h"
#include "InputBuffer.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EmSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EmSpecialHandler.h
index 56cb934b385..56cb934b385 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EmSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EmSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EncFile.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EncFile.cpp
index ea8dc418cf5..a0380f2e4b2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EncFile.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EncFile.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <fstream>
#include "Font.h"
#include "EncFile.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EncFile.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EncFile.h
index 29a11b0b352..3dee313b1aa 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/EncFile.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/EncFile.h
@@ -29,7 +29,7 @@
#include "types.h"
-class EncFile : public FontEncoding
+class EncFile : public NamedFontEncoding
{
public:
EncFile (const std::string &name);
@@ -39,6 +39,7 @@ class EncFile : public FontEncoding
const char* name () const {return _encname.c_str();}
const char* charName (UInt32 c) const;
Character decode (UInt32 c) const {return Character(charName(c));}
+ bool mapsToCharIndex () const {return false;}
const char* path () const;
private:
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileFinder.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileFinder.cpp
index 0fec710b4ac..ea0ad9e48a4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileFinder.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileFinder.cpp
@@ -18,9 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#ifdef MIKTEX
#include "MessageException.h"
@@ -75,7 +73,7 @@ void FileFinder::init (const char *argv0, const char *progname, bool enable_mkte
// enable tfm and mf generation (actually invoked by calls of kpse_make_tex)
kpse_set_program_enabled(kpse_tfm_format, 1, kpse_src_env);
kpse_set_program_enabled(kpse_mf_format, 1, kpse_src_env);
- kpse_make_tex_discard_errors = false; // don't suppress messages of mktexFOO tools
+ kpse_make_tex_discard_errors = true; // suppress messages from mktexFOO tools
#ifdef TEXLIVEWIN32
texlive_gs_init();
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileFinder.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileFinder.h
index b958303bd55..b958303bd55 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileFinder.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileFinder.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FilePath.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FilePath.cpp
index 2d7e676772a..5869d060c6c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FilePath.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FilePath.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cctype>
#include "FilePath.h"
#include "FileSystem.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FilePath.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FilePath.h
index 5bd3fdf98e2..5bd3fdf98e2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FilePath.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FilePath.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileSystem.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileSystem.cpp
index ea45b65a7ee..ef43b58377e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileSystem.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileSystem.cpp
@@ -18,10 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
+#include <config.h>
#include <cstdlib>
#include <cstring>
#include <fstream>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileSystem.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileSystem.h
index c920a5046e6..c920a5046e6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FileSystem.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FileSystem.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Font.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Font.cpp
index f477fbecad1..a0d1a779a7d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Font.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Font.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstdlib>
#include <iostream>
#include <fstream>
@@ -28,7 +29,6 @@
#include "Font.h"
#include "FontEncoding.h"
#include "FontEngine.h"
-#include "FontMap.h"
#include "GFGlyphTracer.h"
#include "Glyph.h"
#include "Message.h"
@@ -40,6 +40,7 @@
#include "SVGTree.h"
#include "macros.h"
+
using namespace std;
@@ -47,13 +48,18 @@ using namespace std;
* XML version 1.0 doesn't allow various unicode character references
* (&#1; for example). */
static bool valid_unicode (UInt32 unicode) {
+ if ((unicode & 0xffff) == 0xfffe || (unicode & 0xffff) == 0xffff)
+ return false;
+
UInt32 ranges[] = {
0x0000, 0x0020,
0x007f, 0x0084,
0x0086, 0x009f,
- 0xfdd0, 0xfddf
+ 0x202a, 0x202e, // bidi control characters
+ 0xd800, 0xdfff,
+ 0xfdd0, 0xfdef,
};
- for (int i=0; i < 4; i++)
+ for (size_t i=0; i < sizeof(ranges)/sizeof(UInt32)/2; i++)
if (unicode >= ranges[2*i] && unicode <= ranges[2*i+1])
return false;
return true;
@@ -66,41 +72,55 @@ UInt32 Font::unicode (UInt32 c) const {
}
-/** Retrieves the encoding pair assigned to this font. The first encoding
- * is the main one assigned in the map file. The second encoding is optional
- * and computed implicitely if a non-CID-based font has a CMap assigned in the
- * font map. In this case, the second encoding maps from the CIDs that result
- * from the first encoding to the char codes of the font. That requires the
- * selection of a compatible encoding table provided by the font file.
- * @param[out] encpair the encoding pair assigned to this font
- * @return true if an encoding is assigned to this font */
-bool Font::encodings (FontEncodingPair &encpair) const {
+/** Returns the encoding object of this font which is asigned in a map file.
+ * If there's no encoding assigned, the function returns 0. */
+const FontEncoding* Font::encoding () const {
+ if (const FontMap::Entry *entry = fontMapEntry())
+ return FontEncoding::encoding(entry->encname);
+ return 0;
+}
+
+
+const FontMap::Entry* Font::fontMapEntry () const {
string fontname = name();
size_t pos = fontname.rfind('.');
if (pos != string::npos)
fontname = fontname.substr(0, pos); // strip extension
- if (const FontMap::Entry *entry = FontMap::instance().lookup(fontname)) {
- if ((encpair.first = FontEncoding::encoding(entry->encname))) {
- encpair.second = entry->bfmap;
- return true;
+ return FontMap::instance().lookup(fontname);
+}
+
+
+/** Compute the extents of a given glyph.
+ * @param[in] c character code of glyph
+ * @param[in] vertical true if is glyph is part of vertical aligned text
+ * @param[out] metrics the resulting extents */
+void Font::getGlyphMetrics (int c, bool vertical, GlyphMetrics &metrics) const {
+ double s = scaleFactor();
+ if (vertical) { // get metrics for vertical text flow?
+ if (verticalLayout()) { // is the font designed for vertical texts?
+ metrics.wl = s*charDepth(c);
+ metrics.wr = s*charHeight(c);
+ metrics.h = 0;
+ metrics.d = s*charWidth(c);
+ }
+ else { // rotate box by 90 degrees for alphabetic text
+ metrics.wl = s*charDepth(c);
+ metrics.wr = s*charHeight(c);
+ metrics.h = 0;
+ metrics.d = s*(charWidth(c)+italicCorr(c));
}
}
- return false;
+ else {
+ metrics.wl = 0;
+ metrics.wr = s*(charWidth(c)+italicCorr(c));
+ metrics.h = s*charHeight(c);
+ metrics.d = s*charDepth(c);
+ }
}
-/** Returns the encoding object of this font which is asigned in a map file.
- * If there's no encoding assigned, the function returns 0. */
-FontEncoding* Font::encoding () const {
- FontEncodingPair encpair;
- if (encodings(encpair))
- return encpair.first;
- return 0;
-}
-
///////////////////////////////////////////////////////////////////////////////////////
-
TFMFont::TFMFont (string name, UInt32 cs, double ds, double ss)
: _metrics(0), _fontname(name), _checksum(cs), _dsize(ds), _ssize(ss)
{
@@ -134,8 +154,10 @@ const FontMetrics* TFMFont::getMetrics () const {
double TFMFont::charWidth (int c) const {
double w = getMetrics() ? getMetrics()->getCharWidth(c) : 0;
- if (style())
+ if (style()) {
w *= style()->extend;
+ w += fabs(style()->slant*charHeight(c)); // slant := tan(phi) = dx/height
+ }
return w;
}
@@ -162,6 +184,7 @@ bool TFMFont::verifyChecksums () const {
//////////////////////////////////////////////////////////////////////////////
// static class variables
+bool PhysicalFont::EXACT_BBOX = false;
bool PhysicalFont::KEEP_TEMP_FILES = false;
const char *PhysicalFont::CACHE_PATH = 0;
double PhysicalFont::METAFONT_MAG = 4;
@@ -186,8 +209,11 @@ const char* PhysicalFont::path () const {
case TTC: ext = "ttc"; break;
case TTF: ext = "ttf"; break;
case MF : ext = "mf"; break;
+ default : ext = 0;
}
- return FileFinder::lookup(name()+"."+ext);
+ if (ext)
+ return FileFinder::lookup(name()+"."+ext);
+ return FileFinder::lookup(name());
}
@@ -200,18 +226,24 @@ bool PhysicalFont::isCIDFont () const {
}
+/** Retrieve the IDs of all charachter maps available in the font file.
+ * @param[out] charMapIDs IDs of the found character maps
+ * @return number of found character maps */
+int PhysicalFont::collectCharMapIDs (std::vector<CharMapID> &charMapIDs) const {
+ if (type() == MF)
+ return 0;
+ FontEngine::instance().setFont(*this);
+ return FontEngine::instance().getCharMapIDs(charMapIDs);
+}
+
+
/** Decodes a character code used in the DVI file to the code required to
* address the correct character in the font.
* @param[in] c DVI character to decode
* @return target character code or name */
Character PhysicalFont::decodeChar (UInt32 c) const {
- FontEncodingPair encpair;
- if (encodings(encpair)) {
- Character chr = encpair.first->decode(c);
- if (!encpair.second)
- return chr;
- return encpair.second->decode(chr.number());
- }
+ if (const FontEncoding *enc = encoding())
+ return enc->decode(c);
return Character(Character::CHRCODE, c);
}
@@ -240,24 +272,40 @@ double PhysicalFont::hAdvance (int c) const {
if (type() == MF)
return unitsPerEm()*charWidth(c)/designSize();
FontEngine::instance().setFont(*this);
- if (const FontMap::Entry *map_entry = FontMap::instance().lookup(name()))
- if (Subfont *sf = map_entry->subfont)
+ if (const FontMap::Entry *entry = fontMapEntry())
+ if (Subfont *sf = entry->subfont)
c = sf->decode(c);
return FontEngine::instance().getHAdvance(decodeChar(c));
}
+double PhysicalFont::vAdvance (int c) const {
+ if (type() == MF)
+ return unitsPerEm()*charWidth(c)/designSize();
+ FontEngine::instance().setFont(*this);
+ if (const FontMap::Entry *entry = fontMapEntry())
+ if (Subfont *sf = entry->subfont)
+ c = sf->decode(c);
+ return FontEngine::instance().getVAdvance(decodeChar(c));
+}
+
+
string PhysicalFont::glyphName (int c) const {
if (type() == MF)
return "";
FontEngine::instance().setFont(*this);
- if (const FontMap::Entry *map_entry = FontMap::instance().lookup(name()))
- if (Subfont *sf = map_entry->subfont)
+ if (const FontMap::Entry *entry = fontMapEntry())
+ if (Subfont *sf = entry->subfont)
c = sf->decode(c);
return FontEngine::instance().getGlyphName(decodeChar(c));
}
+double PhysicalFont::scaledAscent() const {
+ return ascent()*scaledSize()/unitsPerEm();
+}
+
+
int PhysicalFont::ascent () const {
if (type() == MF)
return 0;
@@ -274,17 +322,6 @@ int PhysicalFont::descent () const {
}
-/** Retrieve the IDs of all charachter maps available in the font file.
- * @param[out] charMapIDs IDs of the found character maps
- * @return number of found character maps */
-int PhysicalFont::collectCharMapIDs (std::vector<CharMapID> &charMapIDs) const {
- if (type() == MF)
- return 0;
- FontEngine::instance().setFont(*this);
- return FontEngine::instance().getCharMapIDs(charMapIDs);
-}
-
-
/** Extracts the glyph outlines of a given character.
* @param[in] c character code of requested glyph
* @param[out] glyph path segments of the glyph outline
@@ -327,8 +364,8 @@ bool PhysicalFont::getGlyph (int c, GraphicPath<Int32> &glyph, GFGlyphTracer::Ca
else { // vector fonts (OTF, PFB, TTF, TTC)
bool ok=true;
FontEngine::instance().setFont(*this);
- if (const FontMap::Entry *map_entry = FontMap::instance().lookup(name()))
- if (Subfont *sf = map_entry->subfont)
+ if (const FontMap::Entry *entry = fontMapEntry())
+ if (Subfont *sf = entry->subfont)
c = sf->decode(c);
ok = FontEngine::instance().traceOutline(decodeChar(c), glyph, false);
glyph.closeOpenSubPaths();
@@ -389,7 +426,7 @@ int PhysicalFont::traceAllGlyphs (bool includeCached, GFGlyphTracer::Callback *c
* @param[out] bbox the computed bounding box
* @param[in] optional calback object forwarded to the tracer
* @return true if the box could be computed successfully */
-bool PhysicalFont::getGlyphBox(int c, BoundingBox& bbox, GFGlyphTracer::Callback* cb) const {
+bool PhysicalFont::getExactGlyphBox(int c, BoundingBox& bbox, GFGlyphTracer::Callback* cb) const {
Glyph glyph;
if (getGlyph(c, glyph, cb)) {
glyph.computeBBox(bbox);
@@ -401,6 +438,32 @@ bool PhysicalFont::getGlyphBox(int c, BoundingBox& bbox, GFGlyphTracer::Callback
}
+bool PhysicalFont::getExactGlyphBox (int c, GlyphMetrics &metrics, bool vertical, GFGlyphTracer::Callback *cb) const {
+ BoundingBox charbox;
+ if (!getExactGlyphBox(c, charbox, cb))
+ return false;
+ if ((metrics.wl = -charbox.minX()) < 0) metrics.wl=0;
+ if ((metrics.wr = charbox.maxX()) < 0) metrics.wr=0;
+ if ((metrics.h = charbox.maxY()) < 0) metrics.h=0;
+ if ((metrics.d = -charbox.minY()) < 0) metrics.d=0;
+ if (vertical) { // vertical text orientation
+ if (verticalLayout()) { // font designed for vertical layout?
+ metrics.wl = metrics.wr = (metrics.wl+metrics.wr)/2;
+ metrics.d += metrics.h;
+ metrics.h = 0;
+ }
+ else {
+ double depth = metrics.d;
+ metrics.d = metrics.wr;
+ metrics.wr = metrics.h;
+ metrics.h = metrics.wl;
+ metrics.wl = depth;
+ }
+ }
+ return true;
+}
+
+
Font* VirtualFont::create (string name, UInt32 checksum, double dsize, double ssize) {
return new VirtualFontImpl(name, checksum, dsize, ssize);
}
@@ -410,7 +473,8 @@ Font* VirtualFont::create (string name, UInt32 checksum, double dsize, double ss
PhysicalFontImpl::PhysicalFontImpl (string name, int fontindex, UInt32 cs, double ds, double ss, PhysicalFont::Type type)
- : TFMFont(name, cs, ds, ss), _filetype(type), _fontIndex(fontindex), _style(0), _charmap(0)
+ : TFMFont(name, cs, ds, ss),
+ _filetype(type), _fontIndex(fontindex), _fontMapEntry(Font::fontMapEntry()), _encodingPair(Font::encoding()), _localCharMap(0)
{
}
@@ -420,37 +484,58 @@ PhysicalFontImpl::~PhysicalFontImpl () {
_cache.write(CACHE_PATH);
if (!KEEP_TEMP_FILES)
tidy();
- delete _style;
- delete _charmap;
+ delete _localCharMap;
+}
+
+
+const FontEncoding* PhysicalFontImpl::encoding () const {
+ if (!_encodingPair.enc1())
+ return 0;
+ return &_encodingPair;
+}
+
+
+bool PhysicalFontImpl::findAndAssignBaseFontMap () {
+ const FontEncoding *enc = encoding();
+ if (enc && enc->mapsToCharIndex()) {
+ // try to find a base font map that maps from character indexes to a suitable
+ // target encoding supported by the font file
+ if (const FontEncoding *bfmap = enc->findCompatibleBaseFontMap(this, _charmapID))
+ _encodingPair.assign(bfmap);
+ else
+ return false;
+ }
+ else if (type() != MF) {
+ FontEngine::instance().setFont(*this);
+ if ((_localCharMap = FontEngine::instance().createCustomToUnicodeMap()) != 0)
+ _charmapID = FontEngine::instance().setCustomCharMap();
+ else
+ _charmapID = FontEngine::instance().setUnicodeCharMap();
+ }
+ return true;
}
UInt32 PhysicalFontImpl::unicode (UInt32 c) const {
if (type() == MF)
return Font::unicode(c);
+ Character chr = decodeChar(c);
+ if (chr.type() == Character::NAME || chr.number() == 0)
+ return Font::unicode(c);
- if (_charmap == 0) {
- FontEngine &fe = FontEngine::instance();
- if (fe.setFont(*this)) {
- _charmap = new map<UInt32,UInt32>;
- fe.buildTranslationMap(*_charmap);
- }
+ if (_localCharMap) {
+ if (UInt32 mapped_char = (*_localCharMap)[chr.number()])
+ return mapped_char;
+ // No unicode equivalent found in font file.
+ // Now we should look for a smart alternative but at the moment
+ // it's sufficient to simply choose a valid unused unicode value...
+ // Can we use the charcode itself as a unicode replacement?
+ if (!_localCharMap->valueExists(chr.number()) && valid_unicode(chr.number()))
+ return chr.number();
}
- typedef map<UInt32,UInt32>::const_iterator ConstIterator;
- ConstIterator it = _charmap->find(c);
- if (it != _charmap->end())
- return it->second;
-
- // No unicode equivalent found in font file.
- // Now we should look for a smart alternative but at the moment
- // it's sufficient to simply choose a valid unused unicode value...
- map<UInt32,UInt32> reverse_map;
- FORALL(*_charmap, ConstIterator, it)
- reverse_map[it->second] = it->first;
- // can we use charcode itself as unicode replacement?
- if (valid_unicode(c) && (reverse_map.empty() || reverse_map.find(c) != reverse_map.end()))
- return c;
- return 0x3400+c;
+ if (valid_unicode(chr.number()))
+ return chr.number();
+ return Font::unicode(chr.number());
}
@@ -465,18 +550,84 @@ void PhysicalFontImpl::tidy () const {
}
}
+//////////////////////////////////////////////////////////////////////////////
-void PhysicalFontImpl::setStyle (double bold, double extend, double slant) {
- if (_style) {
- _style->bold = bold;
- _style->extend = extend;
- _style->slant = slant;
+string NativeFont::uniqueName (const string &path, const FontStyle &style) {
+ static map<string, int> ids;
+ ostringstream oss;
+ oss << path << "b" << style.bold << "e" << style.extend << "s" << style.slant;
+ map<string, int>::iterator it = ids.find(oss.str());
+ int id = ids.size();
+ if (it == ids.end())
+ ids[oss.str()] = id;
+ else
+ id = it->second;
+ oss.str("");
+ oss << "nf" << id;
+ return oss.str();
+}
+
+
+string NativeFont::name () const {
+ return uniqueName(path(), _style);
+}
+
+
+PhysicalFont::Type NativeFont::type () const {
+ if (const char *filepath = path()) {
+ if (const char *p =strrchr(filepath, '.')) {
+ string ext = p+1;
+ if (ext == "otf")
+ return PhysicalFont::OTF;
+ if (ext == "ttf")
+ return PhysicalFont::TTF;
+ if (ext == "pfb")
+ return PhysicalFont::PFB;
+ }
}
- else if (bold != 0 || extend != 1 || slant != 0)
- _style = new Style(bold, extend, slant);
+ return PhysicalFont::UNKNOWN;
+}
+
+
+double NativeFont::charWidth (int c) const {
+ FontEngine::instance().setFont(*this);
+ double w = scaledSize()*FontEngine::instance().getAdvance(c)/FontEngine::instance().getUnitsPerEM()*_style.extend;
+ w += fabs(_style.slant*charHeight(c));
+ return w;
+}
+
+
+double NativeFont::charHeight (int c) const {
+ FontEngine::instance().setFont(*this);
+ return scaledSize()*FontEngine::instance().getAscender()/FontEngine::instance().getUnitsPerEM();
}
+double NativeFont::charDepth (int c) const {
+ FontEngine::instance().setFont(*this);
+ return -scaledSize()*FontEngine::instance().getDescender()/FontEngine::instance().getUnitsPerEM();
+}
+
+
+UInt32 NativeFont::unicode (UInt32 c) const {
+ UInt32 ucode = decodeChar(c).number();
+ return valid_unicode(ucode) ? ucode : 0x3400+ucode;
+}
+
+
+bool NativeFontImpl::findAndAssignBaseFontMap () {
+ FontEngine &fe = FontEngine::instance();
+ fe.setFont(*this);
+ fe.buildCharMap(true, _toUnicodeMap);
+ _charmapID = fe.setUnicodeCharMap();
+ return true;
+}
+
+
+Character NativeFontImpl::decodeChar (UInt32 c) const {
+ return Character(Character::CHRCODE, _toUnicodeMap[c]);
+}
+
//////////////////////////////////////////////////////////////////////////////
VirtualFontImpl::VirtualFontImpl (string name, UInt32 cs, double ds, double ss)
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Font.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Font.h
index 330f6af868f..a9171f818ce 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Font.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Font.h
@@ -25,8 +25,13 @@
#include <string>
#include <vector>
#include "Character.h"
+#include "CharMap.h"
#include "CharMapID.h"
+#include "Color.h"
#include "FontCache.h"
+#include "FontEncoding.h"
+#include "FontMap.h"
+#include "FontMetrics.h"
#include "GFGlyphTracer.h"
#include "Glyph.h"
#include "GraphicPath.h"
@@ -34,44 +39,47 @@
#include "VFActions.h"
#include "VFReader.h"
#include "types.h"
+#include "CharMap.h"
-struct FontEncoding;
-struct FontMetrics;
+struct FontStyle;
+
+
+struct GlyphMetrics
+{
+ GlyphMetrics () : wl(0), wr(0), h(0), d(0) {}
+ GlyphMetrics (double wwl, double wwr, double hh, double dd) : wl(wwl), wr(wwr), h(hh), d(dd) {}
+ double wl, wr, h, d;
+};
-typedef std::pair<FontEncoding*, const FontEncoding*> FontEncodingPair;
/** Abstract base for all font classes. */
struct Font {
- struct Style {
- Style () : bold(0), extend(0), slant(0) {}
- Style (float b, float e, float s) : bold(b), extend(e), slant(s) {}
- double bold; ///< stroke width in pt used to draw the glyph outlines
- double extend; ///< factor to strech/shrink the glyphs horizontally
- double slant; ///< horizontal slanting/skewing value (= tan(phi))
- };
-
virtual ~Font () {}
virtual Font* clone (double ds, double sc) const =0;
virtual const Font* uniqueFont () const =0;
virtual std::string name () const =0;
virtual double designSize () const =0;
virtual double scaledSize () const =0;
- virtual double scaleFactor () const {return scaledSize()/designSize();}
+ virtual double scaleFactor () const {return scaledSize()/designSize();}
virtual double charWidth (int c) const =0;
virtual double charDepth (int c) const =0;
virtual double charHeight (int c) const =0;
virtual double italicCorr (int c) const =0;
virtual const FontMetrics* getMetrics () const =0;
virtual const char* path () const =0;
- virtual FontEncoding* encoding () const;
- virtual bool encodings (FontEncodingPair &encpair) const;
+ virtual const FontEncoding* encoding () const;
virtual bool getGlyph (int c, Glyph &glyph, GFGlyphTracer::Callback *cb=0) const =0;
+ virtual void getGlyphMetrics (int c, bool vertical, GlyphMetrics &metrics) const;
virtual UInt32 unicode (UInt32 c) const;
virtual void tidy () const {}
- virtual bool verifyChecksums () const {return true;}
- virtual int fontIndex () const {return 0;}
- virtual const Style* style () const {return 0;}
+ virtual bool findAndAssignBaseFontMap () {return true;}
+ virtual bool verticalLayout () const {return getMetrics() ? getMetrics()->verticalLayout() : false;}
+ virtual bool verifyChecksums () const {return true;}
+ virtual int fontIndex () const {return 0;}
+ virtual const FontStyle* style () const {return 0;}
+ virtual Color color () const {return Color::BLACK;}
+ virtual const FontMap::Entry* fontMapEntry () const;
};
@@ -104,33 +112,35 @@ struct EmptyFont : public Font
class PhysicalFont : public virtual Font
{
public:
- enum Type {MF, OTF, PFB, TTC, TTF};
+ enum Type {MF, OTF, PFB, TTC, TTF, UNKNOWN};
static Font* create (std::string name, UInt32 checksum, double dsize, double ssize, PhysicalFont::Type type);
static Font* create (std::string name, int fontindex, UInt32 checksum, double dsize, double ssize);
virtual Type type () const =0;
virtual bool getGlyph (int c, Glyph &glyph, GFGlyphTracer::Callback *cb=0) const;
- virtual bool getGlyphBox (int c, BoundingBox &bbox, GFGlyphTracer::Callback *cb=0) const;
+ virtual bool getExactGlyphBox (int c, BoundingBox &bbox, GFGlyphTracer::Callback *cb=0) const;
+ virtual bool getExactGlyphBox (int c, GlyphMetrics &metrics, bool vertical, GFGlyphTracer::Callback *cb=0) const;
virtual bool isCIDFont () const;
virtual int hAdvance () const;
virtual double hAdvance (int c) const;
+ virtual double vAdvance (int c) const;
std::string glyphName (int c) const;
virtual int unitsPerEm () const;
+ virtual double scaledAscent () const;
virtual int ascent () const;
virtual int descent () const;
virtual int traceAllGlyphs (bool includeCached, GFGlyphTracer::Callback *cb=0) const;
- virtual void setStyle (double bold, double extend, double slant) {}
+ virtual int collectCharMapIDs (std::vector<CharMapID> &charmapIDs) const;
+ virtual CharMapID getCharMapID () const =0;
+ virtual void setCharMapID (const CharMapID &id) {}
+ virtual Character decodeChar (UInt32 c) const;
const char* path () const;
- int collectCharMapIDs (std::vector<CharMapID> &charmapIDs) const;
- void setCharMapID (const CharMapID &id) {_charmapID = id;}
- CharMapID getCharMapID () const {return _charmapID;}
protected:
bool createGF (std::string &gfname) const;
- Character decodeChar (UInt32 c) const;
public:
- CharMapID _charmapID; ///< ID of the font's charmap to use
+ static bool EXACT_BBOX;
static bool KEEP_TEMP_FILES;
static const char *CACHE_PATH; ///< path to cache directory (0 if caching is disabled)
static double METAFONT_MAG; ///< magnification factor for Metafont calls
@@ -185,20 +195,24 @@ class PhysicalFontProxy : public PhysicalFont
{
friend class PhysicalFontImpl;
public:
- Font* clone (double ds, double sc) const {return new PhysicalFontProxy(*this, ds, sc);}
- const Font* uniqueFont () const {return _pf;}
- std::string name () const {return _pf->name();}
- double designSize () const {return _dsize;}
- double scaledSize () const {return _ssize;}
- double charWidth (int c) const {return _pf->charWidth(c);}
- double charDepth (int c) const {return _pf->charDepth(c);}
- double charHeight (int c) const {return _pf->charHeight(c);}
- double italicCorr (int c) const {return _pf->italicCorr(c);}
- const FontMetrics* getMetrics () const {return _pf->getMetrics();}
- Type type () const {return _pf->type();}
- UInt32 unicode (UInt32 c) const {return _pf->unicode(c);}
- int fontIndex () const {return _pf->fontIndex();}
- const Style* style () const {return _pf->style();}
+ Font* clone (double ds, double sc) const {return new PhysicalFontProxy(*this, ds, sc);}
+ const Font* uniqueFont () const {return _pf;}
+ std::string name () const {return _pf->name();}
+ double designSize () const {return _dsize;}
+ double scaledSize () const {return _ssize;}
+ double charWidth (int c) const {return _pf->charWidth(c);}
+ double charDepth (int c) const {return _pf->charDepth(c);}
+ double charHeight (int c) const {return _pf->charHeight(c);}
+ double italicCorr (int c) const {return _pf->italicCorr(c);}
+ const FontMetrics* getMetrics () const {return _pf->getMetrics();}
+ Type type () const {return _pf->type();}
+ UInt32 unicode (UInt32 c) const {return _pf->unicode(c);}
+ int fontIndex () const {return _pf->fontIndex();}
+ const FontStyle* style () const {return _pf->style();}
+ const FontMap::Entry* fontMapEntry () const {return _pf->fontMapEntry();}
+ const FontEncoding* encoding () const {return _pf->encoding();}
+ CharMapID getCharMapID () const {return _pf->getCharMapID();}
+ int collectCharMapIDs (std::vector<CharMapID> &charmapIDs) const {return _pf->collectCharMapIDs(charmapIDs);}
protected:
PhysicalFontProxy (const PhysicalFont *font, double ds, double ss) : _pf(font), _dsize(ds), _ssize(ss) {}
@@ -216,14 +230,17 @@ class PhysicalFontImpl : public PhysicalFont, public TFMFont
friend class PhysicalFont;
public:
~PhysicalFontImpl();
- Font* clone (double ds, double ss) const {return new PhysicalFontProxy(this, ds, ss);}
- const Font* uniqueFont () const {return this;}
- Type type () const {return _filetype;}
- int fontIndex() const {return _fontIndex;}
- const Style* style () const {return _style;}
- void setStyle (double bold, double extend, double slant);
+ Font* clone (double ds, double ss) const {return new PhysicalFontProxy(this, ds, ss);}
+ const Font* uniqueFont () const {return this;}
+ Type type () const {return _filetype;}
+ int fontIndex() const {return _fontIndex;}
+ const FontStyle* style () const {return _fontMapEntry ? &_fontMapEntry->style : 0;}
+ const FontMap::Entry* fontMapEntry () const {return _fontMapEntry;}
+ const FontEncoding* encoding () const;
UInt32 unicode (UInt32 c) const;
+ bool findAndAssignBaseFontMap ();
void tidy () const;
+ CharMapID getCharMapID () const {return _charmapID;}
protected:
PhysicalFontImpl (std::string name, int fontindex, UInt32 checksum, double dsize, double ssize, PhysicalFont::Type type);
@@ -231,8 +248,87 @@ class PhysicalFontImpl : public PhysicalFont, public TFMFont
private:
Type _filetype;
int _fontIndex;
- Style *_style;
- mutable std::map<UInt32,UInt32> *_charmap;
+ const FontMap::Entry *_fontMapEntry;
+ FontEncodingPair _encodingPair;
+ CharMapID _charmapID; ///< ID of the font's charmap to use
+ const CharMap *_localCharMap;
+};
+
+
+class NativeFont : public PhysicalFont
+{
+ public:
+ virtual NativeFont* clone (double ptsize, const FontStyle &style, Color color) const =0;
+ virtual Font* clone (double ds, double sc) const =0;
+ std::string name () const;
+ Type type () const;
+ UInt32 unicode (UInt32 c) const;
+ double designSize () const {return _ptsize;}
+ double scaledSize () const {return _ptsize;}
+ double charWidth (int c) const;
+ double charDepth (int c) const;
+ double charHeight (int c) const;
+ double italicCorr (int c) const {return 0;}
+ const FontMetrics* getMetrics () const {return 0;}
+ const FontStyle* style () const {return &_style;}
+ Color color () const {return _color;}
+ const FontMap::Entry* fontMapEntry () const {return 0;}
+ static std::string uniqueName (const std::string &path, const FontStyle &style);
+
+ protected:
+ NativeFont (double ptsize, const FontStyle &style, Color color) : _ptsize(ptsize), _style(style), _color(color) {}
+
+ private:
+ double _ptsize;
+ FontStyle _style;
+ Color _color;
+};
+
+
+class NativeFontProxy : public NativeFont
+{
+ friend class NativeFontImpl;
+ public:
+ NativeFont* clone (double ptsize, const FontStyle &style, Color color) const {
+ return new NativeFontProxy(this, ptsize, style, color);
+ }
+
+ Font* clone (double ds, double sc) const {return new NativeFontProxy(this , sc, *style(), color());}
+ const Font* uniqueFont () const {return _nfont;}
+ const char* path () const {return _nfont->path();}
+ Character decodeChar (UInt32 c) const {return _nfont->decodeChar(c);}
+ CharMapID getCharMapID () const {return _nfont->getCharMapID();}
+
+ protected:
+ NativeFontProxy (const NativeFont *nfont, double ptsize, const FontStyle &style, Color color)
+ : NativeFont(ptsize, style, color), _nfont(nfont) {}
+
+ private:
+ const NativeFont *_nfont;
+};
+
+
+class NativeFontImpl : public NativeFont
+{
+ public:
+ NativeFontImpl (const std::string &fname, double ptsize, const FontStyle &style, Color color)
+ : NativeFont(ptsize, style, color), _path(fname) {}
+
+ NativeFont* clone (double ptsize, const FontStyle &style, Color color) const {
+ return new NativeFontProxy(this, ptsize, style, color);
+ }
+
+ Font* clone (double ds, double sc) const {return new NativeFontProxy(this , sc, *style(), color());}
+ const Font* uniqueFont () const {return this;}
+ const char* path () const {return _path.c_str();}
+ bool findAndAssignBaseFontMap ();
+ CharMapID getCharMapID () const {return _charmapID;}
+ Character decodeChar (UInt32 c) const;
+
+ private:
+ std::string _path;
+ CharMap _toUnicodeMap; ///< maps from char indexes to unicode point
+ CharMapID _charmapID; ///< unicode charmap ID
};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontCache.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontCache.cpp
index a36df9afa82..394a5506078 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontCache.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontCache.cpp
@@ -18,6 +18,8 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+
+#include <config.h>
#include <algorithm>
#include <cstring>
#include <fstream>
@@ -30,7 +32,6 @@
#include "Pair.h"
#include "StreamReader.h"
#include "StreamWriter.h"
-//#include "gzstream.h"
#include "types.h"
using namespace std;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontCache.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontCache.h
index cf4cbef7ec2..cf4cbef7ec2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontCache.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontCache.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEncoding.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEncoding.cpp
index fe6a8819ed8..a5f75e3338b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEncoding.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEncoding.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "CMap.h"
#include "CMapManager.h"
#include "EncFile.h"
@@ -57,3 +58,41 @@ FontEncoding* FontEncoding::encoding (const string &encname) {
return cmap;
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////
+
+Character FontEncodingPair::decode (UInt32 c) const {
+ if (_enc1) {
+ Character chr = _enc1->decode(c);
+ if (_enc2 && chr.type() != Character::NAME)
+ chr = _enc2->decode(chr.number());
+ return chr;
+ }
+ return Character(Character::INDEX, 0);
+}
+
+
+bool FontEncodingPair::mapsToCharIndex () const {
+ if (_enc2)
+ return _enc2->mapsToCharIndex();
+ if (_enc1)
+ return _enc1->mapsToCharIndex();
+ return false;
+}
+
+
+const FontEncoding* FontEncodingPair::findCompatibleBaseFontMap (const PhysicalFont *font, CharMapID &charmapID) const {
+ if (_enc2)
+ return _enc2->findCompatibleBaseFontMap(font, charmapID);
+ if (_enc1)
+ return _enc1->findCompatibleBaseFontMap(font, charmapID);
+ return 0;
+}
+
+
+void FontEncodingPair::assign (const FontEncoding *enc) {
+ if (!_enc1)
+ _enc1 = enc;
+ else
+ _enc2 = enc;
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEncoding.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEncoding.h
new file mode 100644
index 00000000000..a8ea57c55e8
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEncoding.h
@@ -0,0 +1,65 @@
+/*************************************************************************
+** FontEncoding.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 FONTENCODING_H
+#define FONTENCODING_H
+
+#include <string>
+#include "Character.h"
+#include "types.h"
+
+
+struct CharMapID;
+class PhysicalFont;
+
+struct FontEncoding
+{
+ virtual ~FontEncoding () {}
+ virtual Character decode (UInt32 c) const =0;
+ virtual bool mapsToCharIndex () const =0;
+ virtual const FontEncoding* findCompatibleBaseFontMap (const PhysicalFont *font, CharMapID &charmapID) const {return 0;}
+ static FontEncoding* encoding (const std::string &fontname);
+};
+
+
+struct NamedFontEncoding : public FontEncoding
+{
+ virtual const char* name () const =0;
+ virtual const char* path () const =0;
+};
+
+
+class FontEncodingPair : public FontEncoding
+{
+ public:
+ FontEncodingPair (const FontEncoding *enc1) : _enc1(enc1), _enc2(0) {}
+ FontEncodingPair (const FontEncoding *enc1, const FontEncoding *enc2) : _enc1(enc1), _enc2(enc2) {}
+ Character decode (UInt32 c) const;
+ bool mapsToCharIndex () const;
+ const FontEncoding* findCompatibleBaseFontMap (const PhysicalFont *font, CharMapID &charmapID) const;
+ const FontEncoding* enc1 () const {return _enc1;}
+ const FontEncoding* enc2 () const {return _enc2;}
+ void assign (const FontEncoding *enc);
+
+ private:
+ const FontEncoding *_enc1, *_enc2;
+};
+
+#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEngine.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEngine.cpp
index ae1f2090498..1b9d63e08c4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEngine.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEngine.cpp
@@ -18,15 +18,18 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <iostream>
#include <sstream>
#include <ft2build.h>
+#include FT_ADVANCES_H
#include FT_GLYPH_H
#include FT_OUTLINE_H
#include FT_TRUETYPE_TABLES_H
#include FT_TYPES_H
#include "Font.h"
#include "FontEngine.h"
+#include "FontStyle.h"
#include "Message.h"
using namespace std;
@@ -42,6 +45,12 @@ static inline FT_Fixed to_16dot16 (int val) {
return static_cast<FT_Fixed>(val) << 16;
}
+
+static inline double conv_16dot16_to_double (FT_Fixed fixed) {
+ return static_cast<double>(fixed)/(1 << 16);
+}
+
+
/** Converts a floating point value to a 26.6 fixed point value. */
static inline FT_F26Dot6 to_26dot6 (double val) {
return static_cast<FT_F26Dot6>(val*64.0 + 0.5);
@@ -96,20 +105,6 @@ void FontEngine::setDeviceResolution (int x, int y) {
}
-/** Builds a table that maps glyph indexes to char codes.
- * @param[in] face font face to be used
- * @param[out] reverseMap the resulting map */
-static void build_reverse_map (FT_Face face, map<UInt32, UInt32> &reverseMap) {
- FT_UInt glyphIndex;
- UInt32 charcode = FT_Get_First_Char(face, &glyphIndex);
- while (glyphIndex) {
-// if (reverseMap.find(glyphIndex) == reverseMap.end())
- reverseMap[glyphIndex] = charcode;
- charcode = FT_Get_Next_Char(face, charcode, &glyphIndex);
- }
-}
-
-
/** Sets the font to be used.
* @param[in] fname path to font file
* @param[in] fontindex index of font in font collection (multi-font files, like TTC)
@@ -119,34 +114,16 @@ bool FontEngine::setFont (const string &fname, int fontindex, const CharMapID &c
Message::estream(true) << "FontEngine: error reading file " << fname << '\n';
return false;
}
- if (charMapID.valid()) {
- for (int i=0; i < _currentFace->num_charmaps; i++) {
- FT_CharMap ft_cmap = _currentFace->charmaps[i];
- if (ft_cmap->platform_id == charMapID.platform_id && ft_cmap->encoding_id == charMapID.encoding_id) {
- FT_Set_Charmap(_currentFace, ft_cmap);
- return true;
- }
- }
- return false;
- }
- else {
- // look for a custom character map
- for (int i=0; i < _currentFace->num_charmaps; i++) {
- FT_CharMap charmap = _currentFace->charmaps[i];
- if (charmap->encoding == FT_ENCODING_ADOBE_CUSTOM) {
- FT_Set_Charmap(_currentFace, charmap);
- break;
- }
- }
- }
+ if (charMapID.valid())
+ setCharMap(charMapID);
return true;
}
bool FontEngine::setFont (const Font &font) {
if (!_currentFont || _currentFont->name() != font.name()) {
- _currentFont = &font;
const PhysicalFont *pf = dynamic_cast<const PhysicalFont*>(&font);
+ _currentFont = &font;
return setFont(font.path(), font.fontIndex(), pf ? pf->getCharMapID() : CharMapID());
}
return true;
@@ -159,29 +136,57 @@ bool FontEngine::isCIDFont() const {
}
-void FontEngine::buildTranslationMap (map<UInt32, UInt32> &translationMap) const {
- FT_CharMap unicodeMap=0, customMap=0;
- for (int i=0; i < _currentFace->num_charmaps; i++) {
- FT_CharMap charmap = _currentFace->charmaps[i];
- if (charmap->encoding == FT_ENCODING_ADOBE_CUSTOM)
- customMap = charmap;
- else if (charmap->encoding == FT_ENCODING_UNICODE)
- unicodeMap = charmap;
+bool FontEngine::setCharMap (const CharMapID &charMapID) {
+ for (int i=0; i < _currentFace->num_charmaps; i++) {
+ FT_CharMap ft_cmap = _currentFace->charmaps[i];
+ if (ft_cmap->platform_id == charMapID.platform_id && ft_cmap->encoding_id == charMapID.encoding_id) {
+ FT_Set_Charmap(_currentFace, ft_cmap);
+ return true;
+ }
+ }
+ return false;
+}
+
+
+/** Returns a character map that maps from character codes of the current
+ * encoding to character indexes, or vice versa.
+ * @param[in] invert if true, the resulting charmap maps from char indexes to char codes
+ * @param[out] charmap the resultig charmap */
+void FontEngine::buildCharMap (bool invert, CharMap &charmap) {
+ charmap.clear();
+ FT_UInt glyph_index;
+ UInt32 charcode = FT_Get_First_Char(_currentFace, &glyph_index);
+ while (glyph_index) {
+ if (invert)
+ charmap.append(glyph_index, charcode);
+ else
+ charmap.append(charcode, glyph_index);
+ charcode = FT_Get_Next_Char(_currentFace, charcode, &glyph_index);
}
- if (unicodeMap == 0 || customMap == 0)
- return;
-
- map<UInt32,UInt32> reverseMap;
- build_reverse_map(_currentFace, reverseMap);
-
- FT_Set_Charmap(_currentFace, unicodeMap);
- FT_UInt glyphIndex;
- UInt32 charcode = FT_Get_First_Char(_currentFace, &glyphIndex);
- while (glyphIndex) {
- translationMap[reverseMap[glyphIndex]] = charcode;
- charcode = FT_Get_Next_Char(_currentFace, charcode, &glyphIndex);
+ charmap.sort();
+}
+
+
+/** Creates a charmap that maps from the custom character encoding to unicode.
+ * @return pointer to charmap if is could be created, 0 otherwise */
+const CharMap* FontEngine::createCustomToUnicodeMap () {
+ FT_CharMap ftcharmap = _currentFace->charmap;
+ if (FT_Select_Charmap(_currentFace, FT_ENCODING_ADOBE_CUSTOM) != 0)
+ return 0;
+ CharMap index_to_source_chrcode;
+ buildCharMap(true, index_to_source_chrcode);
+ if (FT_Select_Charmap(_currentFace, FT_ENCODING_UNICODE) != 0)
+ return 0;
+ CharMap *charmap = new CharMap;
+ FT_UInt glyph_index;
+ UInt32 charcode = FT_Get_First_Char(_currentFace, &glyph_index);
+ while (glyph_index) {
+ charmap->append(index_to_source_chrcode[glyph_index], charcode);
+ charcode = FT_Get_Next_Char(_currentFace, charcode, &glyph_index);
}
- FT_Set_Charmap(_currentFace, customMap);
+ charmap->sort();
+ FT_Set_Charmap(_currentFace, ftcharmap);
+ return charmap;
}
@@ -200,16 +205,28 @@ int FontEngine::getUnitsPerEM () const {
}
+/** Returns the ascender of the current font in font units. */
int FontEngine::getAscender () const {
return _currentFace ? _currentFace->ascender : 0;
}
+/** Returns the descender of the current font in font units. */
int FontEngine::getDescender () const {
return _currentFace ? _currentFace->descender : 0;
}
+int FontEngine::getAdvance (int c) const {
+ if (_currentFace) {
+ FT_Fixed adv=0;
+ FT_Get_Advance(_currentFace, c, FT_LOAD_NO_SCALE, &adv);
+ return adv;
+ }
+ return 0;
+}
+
+
int FontEngine::getHAdvance () const {
if (_currentFace) {
TT_OS2 *table = static_cast<TT_OS2*>(FT_Get_Sfnt_Table(_currentFace, ft_sfnt_os2));
@@ -228,6 +245,17 @@ int FontEngine::getHAdvance (const Character &c) const {
}
+int FontEngine::getVAdvance (const Character &c) const {
+ if (_currentFace) {
+ FT_Load_Glyph(_currentFace, charIndex(c), FT_LOAD_NO_SCALE);
+ if (FT_HAS_VERTICAL(_currentFace))
+ return _currentFace->glyph->metrics.vertAdvance;
+ return _currentFace->glyph->metrics.horiAdvance;
+ }
+ return 0;
+}
+
+
int FontEngine::charIndex (const Character &c) const {
switch (c.type()) {
case Character::CHRCODE:
@@ -285,15 +313,28 @@ vector<int> FontEngine::getPanose () const {
int FontEngine::getCharMapIDs (vector<CharMapID> &charmapIDs) const {
- int num_charmaps=0;
+ charmapIDs.clear();
if (_currentFace) {
- num_charmaps = _currentFace->num_charmaps;
- for (int i=0; i < num_charmaps; i++) {
+ for (int i=0; i < _currentFace->num_charmaps; i++) {
FT_CharMap charmap = _currentFace->charmaps[i];
charmapIDs.push_back(CharMapID(charmap->platform_id, charmap->encoding_id));
}
}
- return num_charmaps;
+ return charmapIDs.size();
+}
+
+
+CharMapID FontEngine::setUnicodeCharMap () {
+ if (_currentFace && FT_Select_Charmap(_currentFace, FT_ENCODING_UNICODE) == 0)
+ return CharMapID(_currentFace->charmap->platform_id, _currentFace->charmap->encoding_id);
+ return CharMapID();
+}
+
+
+CharMapID FontEngine::setCustomCharMap () {
+ if (_currentFace && FT_Select_Charmap(_currentFace, FT_ENCODING_ADOBE_CUSTOM) == 0)
+ return CharMapID(_currentFace->charmap->platform_id, _currentFace->charmap->encoding_id);
+ return CharMapID();
}
@@ -355,7 +396,7 @@ static bool trace_outline (FT_Face face, const Font *font, int index, Glyph &gly
}
FT_Outline outline = face->glyph->outline;
// apply style parameters if set
- if (const Font::Style *style = font->style()) {
+ if (const FontStyle *style = font->style()) {
FT_Matrix matrix = {to_16dot16(style->extend), to_16dot16(style->slant), 0, to_16dot16(1)};
FT_Outline_Transform(&outline, &matrix);
if (style->bold != 0)
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEngine.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEngine.h
index 27cc7284eb8..75e36ec4aae 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontEngine.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontEngine.h
@@ -28,6 +28,7 @@
#include <string>
#include <vector>
#include "Character.h"
+#include "CharMap.h"
#include "CharMapID.h"
#include "Font.h"
#include "Glyph.h"
@@ -51,15 +52,21 @@ class FontEngine
int getUnitsPerEM () const;
int getAscender () const;
int getDescender () const;
+ int getAdvance (int c) const;
int getHAdvance () const;
int getHAdvance (const Character &c) const;
+ int getVAdvance (const Character &c) const;
int getFirstChar () const;
int getNextChar () const;
int getCharMapIDs (std::vector<CharMapID> &charmapIDs) const;
+ CharMapID setUnicodeCharMap ();
+ CharMapID setCustomCharMap ();
std::vector<int> getPanose () const;
std::string getGlyphName (const Character &c) const;
int getCharByGlyphName (const char *name) const;
- void buildTranslationMap (std::map<UInt32,UInt32> &translationMap) const;
+ bool setCharMap (const CharMapID &charMapID);
+ void buildCharMap (bool invert, CharMap &charmap);
+ const CharMap* createCustomToUnicodeMap ();
protected:
FontEngine ();
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontManager.cpp
index 1a13de50420..b80211402c7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontManager.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstring>
#include <cstdlib>
#include <fstream>
@@ -27,6 +28,7 @@
#include "FontManager.h"
#include "FontMap.h"
#include "FileFinder.h"
+#include "FileSystem.h"
#include "Message.h"
#include "macros.h"
#include "CMapManager.h"
@@ -204,22 +206,13 @@ int FontManager::registerFont (UInt32 fontnum, string name, UInt32 checksum, dou
for (const char **p = exts; *p && !newfont; ++p)
newfont = create_font(filename+"."+*p, name, fontindex, checksum, dsize, ssize);
}
- if (map_entry) {
- if (PhysicalFont *pf = dynamic_cast<PhysicalFont*>(newfont)) {
- pf->setStyle(map_entry->bold, map_entry->extend, map_entry->slant);
- CMap *cmap = dynamic_cast<CMap*>(pf->encoding());
- if (cmap && !pf->isCIDFont()) {
- CharMapID charMapID;
- if (CMap *bfmap = CMapManager::instance().findCompatibleBaseFontMap(pf, cmap, charMapID)) {
- FontMap::instance().setBaseFontMap(name, bfmap);
- pf->setCharMapID(charMapID);
- }
- else
- Message::wstream(true) << "no suitable encoding table found for font " << filename << "\n";
- }
- }
+ if (newfont) {
+ if (!newfont->findAndAssignBaseFontMap())
+ Message::wstream(true) << "no suitable encoding table found for font " << filename << "\n";
+ if (!newfont->verifyChecksums())
+ Message::wstream(true) << "checksum mismatch in font " << name << '\n';
}
- if (!newfont) {
+ else {
// create dummy font as a placeholder if the proper font is not available
newfont = new EmptyFont(name);
if (filename.rfind(".") == string::npos)
@@ -231,8 +224,6 @@ int FontManager::registerFont (UInt32 fontnum, string name, UInt32 checksum, dou
missing_fonts.insert(filename);
}
}
- else if (!newfont->verifyChecksums())
- Message::wstream(true) << "checksum mismatch in font " << name << '\n';
_name2id[name] = newid;
}
_fonts.push_back(newfont);
@@ -248,6 +239,48 @@ int FontManager::registerFont (UInt32 fontnum, string name, UInt32 checksum, dou
}
+
+int FontManager::registerFont (UInt32 fontnum, string filename, double ptsize, const FontStyle &style, Color color) {
+ int id = fontID(fontnum);
+ if (id >= 0)
+ return id;
+
+ if (!filename.empty() && filename[0] == '[' && filename[filename.size()-1] == ']')
+ filename = filename.substr(1, filename.size()-2);
+ string fontname = NativeFont::uniqueName(filename, style);
+ const char *path = filename.c_str();
+ Font *newfont=0;
+ const int newid = _fonts.size(); // the new font gets this ID
+ Name2IdMap::iterator it = _name2id.find(fontname);
+ if (it != _name2id.end()) { // font with same name already registered?
+ if (NativeFont *font = dynamic_cast<NativeFont*>(_fonts[it->second]))
+ newfont = font->clone(ptsize, style, color);
+ }
+ else {
+ if (!FileSystem::exists(path))
+ path = FileFinder::lookup(filename, false);
+ if (path) {
+ newfont = new NativeFontImpl(path, ptsize, style, color);
+ newfont->findAndAssignBaseFontMap();
+ }
+ if (!newfont) {
+ // create dummy font as a placeholder if the proper font is not available
+ newfont = new EmptyFont(filename);
+ // print warning message about missing font file (only once for each filename)
+ static set<string> missing_fonts;
+ if (missing_fonts.find(filename) == missing_fonts.end()) {
+ Message::wstream(true) << "font file '" << filename << "' not found\n";
+ missing_fonts.insert(filename);
+ }
+ }
+ _name2id[fontname] = newid;
+ }
+ _fonts.push_back(newfont);
+ _num2id[fontnum] = newid;
+ return newid;
+}
+
+
/** Enters a new virtual font frame.
* This method must be called before processing a VF character.
* @param[in] vf virtual font */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontManager.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontManager.h
index 9207ecba460..a765a868d96 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontManager.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontManager.h
@@ -27,6 +27,8 @@
#include <string>
#include <stack>
#include <vector>
+#include "Color.h"
+#include "FontStyle.h"
#include "types.h"
@@ -51,6 +53,7 @@ class FontManager
~FontManager ();
static FontManager& instance ();
int registerFont (UInt32 fontnum, std::string fontname, UInt32 checksum, double dsize, double scale);
+ int registerFont (UInt32 fontnum, std::string fname, double ptsize, const FontStyle &style, Color color);
Font* getFont (int n) const;
Font* getFont (const std::string &name) const;
Font* getFontById (int id) const;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMap.cpp
index 64db5cb73da..d7f32808e26 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMap.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstring>
#include <fstream>
#include <iostream>
@@ -295,17 +296,10 @@ void FontMap::clear (bool unlocked_only) {
}
}
-
-void FontMap::setBaseFontMap (const std::string &fontname, const CMap *bfmap) {
- Iterator it = _entries.find(fontname);
- if (it != _entries.end())
- it->second->bfmap = bfmap;
-}
-
/////////////////////////////////////////////////
FontMap::Entry::Entry (const MapLine &mapline, Subfont *sf)
- : fontname(mapline.fontfname()), encname(mapline.encname()), bfmap(0), subfont(sf), fontindex(mapline.fontindex()),
- locked(false), bold(mapline.bold()), slant(mapline.slant()), extend(mapline.extend())
+ : fontname(mapline.fontfname()), encname(mapline.encname()), subfont(sf), fontindex(mapline.fontindex()),
+ locked(false), style(mapline.bold(), mapline.extend(), mapline.slant())
{
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMap.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMap.h
index b9372a281f1..6ff9c21ad58 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMap.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMap.h
@@ -24,8 +24,10 @@
#include <map>
#include <ostream>
#include <string>
+#include "FontStyle.h"
-struct CMap;
+
+struct FontEncoding;
class MapLine;
class Subfont;
@@ -37,11 +39,10 @@ class FontMap
Entry (const MapLine &mapline, Subfont *subfont=0);
std::string fontname; ///< target font name
std::string encname; ///< name of font encoding
- const CMap *bfmap; ///< base font map to map from CID to another encoding
Subfont *subfont;
int fontindex; ///< index of font in multi-font file
bool locked;
- double bold, slant, extend;
+ FontStyle style;
};
protected:
@@ -64,7 +65,6 @@ class FontMap
bool remove (const MapLine &mapline);
void lockFont (const std::string &fontname);
void clear (bool unlocked_only=false);
- void setBaseFontMap (const std::string &fontname, const CMap *bfmap);
std::ostream& write (std::ostream &os) const;
const Entry* lookup(const std::string &fontname) const;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMetrics.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMetrics.cpp
index 2348b21508b..7dbe4e0ff24 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMetrics.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMetrics.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <fstream>
#include "FileFinder.h"
#include "FontMetrics.h"
@@ -37,4 +38,4 @@ FontMetrics* FontMetrics::read (const char *fontname) {
if (id == 9 || id == 11) // Japanese font metric file?
return new JFM(ifs);
return new TFM(ifs);
-} \ No newline at end of file
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMetrics.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMetrics.h
index f75dd9e97bd..1ce1b15dc8f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/FontMetrics.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontMetrics.h
@@ -33,6 +33,7 @@ struct FontMetrics
virtual double getCharHeight (int c) const =0;
virtual double getCharDepth (int c) const =0;
virtual double getItalicCorr (int c) const =0;
+ virtual bool verticalLayout () const =0;
virtual UInt32 getChecksum () const =0;
virtual UInt16 firstChar () const =0;
virtual UInt16 lastChar () const =0;
@@ -47,6 +48,7 @@ struct NullFontMetric : public FontMetrics
double getCharHeight (int c) const {return 0;}
double getCharDepth (int c) const {return 0;}
double getItalicCorr (int c) const {return 0;}
+ bool verticalLayout () const {return false;}
UInt32 getChecksum () const {return 0;}
UInt16 firstChar () const {return 0;}
UInt16 lastChar () const {return 0;}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontStyle.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontStyle.h
new file mode 100644
index 00000000000..932c09291cc
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/FontStyle.h
@@ -0,0 +1,12 @@
+#ifndef FONTSTYLE
+#define FONTSTYLE
+
+struct FontStyle {
+ FontStyle () : bold(0), extend(1), slant(0) {}
+ FontStyle (float b, float e, float s) : bold(b), extend(e), slant(s) {}
+ double bold; ///< stroke width in pt used to draw the glyph outlines
+ double extend; ///< factor to strech/shrink the glyphs horizontally
+ double slant; ///< horizontal slanting/skewing value (= tan(phi))
+};
+
+#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFGlyphTracer.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFGlyphTracer.cpp
index c40702e595f..470b7a9b160 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFGlyphTracer.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFGlyphTracer.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "GFGlyphTracer.h"
#include "Pair.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFGlyphTracer.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFGlyphTracer.h
index 379ed1d98c8..379ed1d98c8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFGlyphTracer.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFGlyphTracer.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFReader.cpp
index 1bb6c426549..ed1b9381f56 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFReader.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <iostream>
#include <sstream>
#include "GFReader.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFReader.h
index 0d9a7bb0e32..0d9a7bb0e32 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFTracer.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFTracer.cpp
index 69a078456a0..c7fb3bca11c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFTracer.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFTracer.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <iostream>
#include <fstream>
#include <sstream>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFTracer.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFTracer.h
index ba15961db65..ba15961db65 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GFTracer.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GFTracer.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Ghostscript.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Ghostscript.cpp
index 7da863cbc82..8d2538457c9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Ghostscript.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Ghostscript.cpp
@@ -18,13 +18,12 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "Ghostscript.h"
#if !defined(DISABLE_GS)
-
#include <cstring>
#include <iomanip>
#include <sstream>
-
#if defined(HAVE_LIBGS)
#include <ghostscript/ierrors.h>
#else
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Ghostscript.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Ghostscript.h
index ccfd5b0b0f4..6d4dea23f32 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Ghostscript.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Ghostscript.h
@@ -21,10 +21,7 @@
#ifndef GHOSTSCRIPT_H
#define GHOSTSCRIPT_H
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
+#include <config.h>
#include <string>
#if defined(DISABLE_GS)
@@ -90,7 +87,7 @@ class Ghostscript
static std::string LIBGS_NAME;
protected:
- Ghostscript (const Ghostscript &gs) {}
+ Ghostscript (const Ghostscript &gs) : _inst(0) {}
int init_with_args (int argc, char **argv);
int new_instance (void **psinst, void *caller);
void delete_instance ();
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Glyph.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Glyph.h
index b598dc5002d..b598dc5002d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Glyph.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Glyph.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GlyphTracerMessages.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GlyphTracerMessages.h
index 2b0cedcd8b6..2b0cedcd8b6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GlyphTracerMessages.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GlyphTracerMessages.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GraphicPath.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GraphicPath.h
index 46a3b0cc335..46a3b0cc335 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/GraphicPath.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/GraphicPath.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/HtmlSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/HtmlSpecialHandler.cpp
index 0d4a3bb14c5..7422e9f778d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/HtmlSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/HtmlSpecialHandler.cpp
@@ -18,8 +18,8 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <sstream>
-
#include "HtmlSpecialHandler.h"
#include "InputReader.h"
#include "Message.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/HtmlSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/HtmlSpecialHandler.h
index 6e1e0e40c53..6e1e0e40c53 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/HtmlSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/HtmlSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputBuffer.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputBuffer.cpp
index ad99305fa3c..a01449bb3f3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputBuffer.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputBuffer.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cmath>
#include <cstring>
#include "InputBuffer.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputBuffer.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputBuffer.h
index c25df9a1452..c25df9a1452 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputBuffer.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputBuffer.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputReader.cpp
index c2eaa249ff0..10a4fca01c6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputReader.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cmath>
#include <vector>
#include "InputReader.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputReader.h
index 7d1ee838110..7d1ee838110 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/InputReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/InputReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/JFM.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/JFM.cpp
index 922f064f080..cca5b9f0d18 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/JFM.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/JFM.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstring>
#include <fstream>
#include <sstream>
@@ -36,6 +37,7 @@ JFM::JFM (istream &is) {
oss << "invalid JFM identifier " << id << " (9 or 11 expected)";
throw FontMetricException(oss.str());
}
+ _vertical = (id == 9);
UInt16 nt = UInt16(sr.readUnsigned(2)); // length of character type table
UInt16 lf = UInt16(sr.readUnsigned(2)); // length of entire file in 4 byte words
UInt16 lh = UInt16(sr.readUnsigned(2)); // length of header in 4 byte words
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/JFM.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/JFM.h
index 2a59c486104..dd4ca212c49 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/JFM.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/JFM.h
@@ -29,13 +29,15 @@ class JFM : public TFM
{
public:
JFM (std::istream &is);
+ bool verticalLayout () const {return _vertical;}
protected:
void readTables (StreamReader &sr, int nt, int nw, int nh, int nd, int ni);
int charIndex (int c) const;
private:
- UInt16 _minchar; ///< character code of first entry in character type table
+ UInt16 _minchar; ///< character code of first entry in character type table
+ bool _vertical; ///< true if metrics refer to vertical text layout
std::vector<UInt16> _charTypeTable;
};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Length.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Length.cpp
index aae20b74e59..fb9a1ae3158 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Length.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Length.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <sstream>
#include "InputReader.h"
#include "Length.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Length.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Length.h
index 995ba068cee..995ba068cee 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Length.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Length.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Makefile.am
new file mode 100644
index 00000000000..53187f58f60
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Makefile.am
@@ -0,0 +1,53 @@
+:## 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 Character.h CharMap.h CharMapID.h CMap.h \
+ CMapManager.h CMapReader.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 EncFile.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 FontMetrics.h \
+ FontStyle.h GFReader.h GFTracer.h GFGlyphTracer.h Ghostscript.h Glyph.h GlyphTracerMessages.h GraphicPath.h HtmlSpecialHandler.h \
+ InputBuffer.h InputReader.h JFM.h Length.h macros.h MapLine.h Matrix.h Message.h MessageException.h MetafontWrapper.h \
+ NoPsSpecialHandler.h PageRanges.h PageSize.h Pair.h PdfSpecialHandler.h Process.h PSFilter.h PSInterpreter.h PSPattern.h \
+ PSPreviewFilter.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 XMLDocument.h XMLNode.h XMLString.h \
+ BgColorSpecialHandler.cpp Bitmap.cpp BoundingBox.cpp Calculator.cpp CharMap.cpp CharMapID.cpp CMap.cpp CMapManager.cpp \
+ CMapReader.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 EncFile.cpp \
+ EPSFile.cpp EPSToSVG.cpp FileFinder.cpp FilePath.cpp FileSystem.cpp Font.cpp FontCache.cpp FontEncoding.cpp FontEngine.cpp \
+ FontManager.cpp FontMap.cpp FontMetrics.cpp GFReader.cpp GFGlyphTracer.cpp GFTracer.cpp Ghostscript.cpp HtmlSpecialHandler.cpp \
+ InputBuffer.cpp InputReader.cpp JFM.cpp Length.cpp MapLine.cpp Matrix.cpp Message.cpp MetafontWrapper.cpp NoPsSpecialHandler.cpp \
+ PageRanges.cpp PageSize.cpp PdfSpecialHandler.cpp Process.cpp psdefs.cpp PSInterpreter.cpp PSPattern.cpp PSPreviewFilter.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.4/src/MapLine.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MapLine.cpp
index 99dce4f9547..845fc20acc2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MapLine.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MapLine.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstring>
#include <sstream>
#include "InputBuffer.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MapLine.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MapLine.h
index 87451dc912d..87451dc912d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MapLine.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MapLine.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Matrix.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Matrix.cpp
index fb22448be28..42008d7552d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Matrix.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Matrix.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cmath>
#include <limits>
#include <sstream>
@@ -162,10 +163,16 @@ Matrix& Matrix::rotate (double deg) {
}
-Matrix& Matrix::xskew (double deg) {
- double t = tan(deg2rad(deg));
- if (t != 0) {
- double v[] = {1, t};
+Matrix& Matrix::xskewByAngle (double deg) {
+ if (fmod(fabs(deg)-90, 180) != 0)
+ return xskewByRatio(tan(deg2rad(deg)));
+ return *this;
+}
+
+
+Matrix& Matrix::xskewByRatio (double xyratio) {
+ if (xyratio != 0) {
+ double v[] = {1, xyratio};
Matrix t(v, 2);
rmultiply(t);
}
@@ -173,10 +180,16 @@ Matrix& Matrix::xskew (double deg) {
}
-Matrix& Matrix::yskew (double deg) {
- double t = tan(deg2rad(deg));
- if (t != 0) {
- double v[] = {1, 0, 0, t};
+Matrix& Matrix::yskewByAngle (double deg) {
+ if (fmod(fabs(deg)-90, 180) != 0)
+ return yskewByRatio(tan(deg2rad(deg)));
+ return *this;
+}
+
+
+Matrix& Matrix::yskewByRatio (double xyratio) {
+ if (xyratio != 0) {
+ double v[] = {1, 0, 0, xyratio};
Matrix t(v, 4);
rmultiply(t);
}
@@ -386,9 +399,9 @@ Matrix& Matrix::parse (istream &is, Calculator &calc) {
throw ParserException(oss.str());
}
if (c == 'X')
- xskew(a);
+ xskewByAngle(a);
else
- yskew(a);
+ yskewByAngle(a);
break;
}
case 'M': {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Matrix.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Matrix.h
index b452f3cc88f..fedeff90695 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Matrix.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Matrix.h
@@ -59,8 +59,10 @@ class Matrix
Matrix& translate (double tx, double ty);
Matrix& scale (double sx, double sy);
Matrix& rotate (double deg);
- Matrix& xskew (double deg);
- Matrix& yskew (double deg);
+ Matrix& xskewByAngle (double deg);
+ Matrix& yskewByAngle (double deg);
+ Matrix& xskewByRatio (double xyratio);
+ Matrix& yskewByRatio (double xyratio);
Matrix& flip (bool h, double a);
Matrix& operator *= (double c);
DPair operator * (const DPair &p) const;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Message.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Message.cpp
index 38407ad5f6d..bf70b1eff04 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Message.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Message.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstdarg>
#include <cstdlib>
#include <cstring>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Message.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Message.h
index bc4a9ed016c..bc4a9ed016c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Message.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Message.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MessageException.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MessageException.h
index e6c4ace019f..e6c4ace019f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MessageException.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MessageException.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MetafontWrapper.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MetafontWrapper.cpp
index 37e3b68f92f..6653bf8ee33 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MetafontWrapper.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MetafontWrapper.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstdlib>
#include <cctype>
#include <fstream>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MetafontWrapper.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MetafontWrapper.h
index 2a69654ff95..2a69654ff95 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MetafontWrapper.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MetafontWrapper.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MiKTeXCom.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MiKTeXCom.cpp
index 18a36666f9a..09fa598990c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MiKTeXCom.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MiKTeXCom.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <comdef.h>
#include <string>
#include "MessageException.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MiKTeXCom.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MiKTeXCom.h
index 3f387c8204b..3f387c8204b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/MiKTeXCom.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/MiKTeXCom.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/NoPsSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/NoPsSpecialHandler.cpp
index e996ca24dea..89b16609331 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/NoPsSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/NoPsSpecialHandler.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "Message.h"
#include "NoPsSpecialHandler.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/NoPsSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/NoPsSpecialHandler.h
index e2f38302186..e2f38302186 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/NoPsSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/NoPsSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSFilter.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSFilter.h
index abb707b86e5..abb707b86e5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSFilter.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSFilter.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSInterpreter.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSInterpreter.cpp
index db48ca933be..855e951036d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSInterpreter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSInterpreter.cpp
@@ -18,7 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#include "PSInterpreter.h"
+#include <config.h>
#include <cstring>
#include <fstream>
#include <iostream>
@@ -27,6 +27,7 @@
#include "InputReader.h"
#include "Message.h"
#include "PSFilter.h"
+#include "PSInterpreter.h"
#include "SignalHandler.h"
using namespace std;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSInterpreter.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSInterpreter.h
index 1414b8623af..b6f28d0f9d9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSInterpreter.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSInterpreter.h
@@ -21,11 +21,11 @@
#ifndef PSINTERPRETER_H
#define PSINTERPRETER_H
-#include "Ghostscript.h"
#include <cstring>
#include <istream>
#include <string>
#include <vector>
+#include "Ghostscript.h"
#include "InputReader.h"
#include "MessageException.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPattern.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPattern.cpp
index 52fbf16c589..b031cb69975 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPattern.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPattern.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <sstream>
#include <vector>
#include "BoundingBox.h"
@@ -175,4 +176,4 @@ XMLElementNode* PSUncoloredTilingPattern::createClipNode() const {
if (_colors.empty())
return PSTilingPattern::createClipNode();
return 0;
-} \ No newline at end of file
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPattern.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPattern.h
index 7e2848dea3b..7e2848dea3b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPattern.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPattern.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPreviewFilter.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPreviewFilter.cpp
index cdbee3ce28a..fc1815a20d2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPreviewFilter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPreviewFilter.cpp
@@ -18,8 +18,8 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <vector>
-
#include "InputBuffer.h"
#include "InputReader.h"
#include "PSInterpreter.h"
@@ -29,7 +29,8 @@
using namespace std;
-PSPreviewFilter::PSPreviewFilter (PSInterpreter &psi) : PSFilter(psi), _active(false), _tightpage(false)
+PSPreviewFilter::PSPreviewFilter (PSInterpreter &psi)
+ : PSFilter(psi), _active(false), _tightpage(false), _dvi2pt(1.0/65536.0)
{
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPreviewFilter.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPreviewFilter.h
index 7662dfa74cc..7662dfa74cc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PSPreviewFilter.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PSPreviewFilter.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageRanges.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageRanges.cpp
index 8a20a35d52b..392be0acf33 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageRanges.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageRanges.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <sstream>
#include "InputBuffer.h"
#include "InputReader.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageRanges.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageRanges.h
index 0e5cd58e5ff..0e5cd58e5ff 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageRanges.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageRanges.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageSize.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageSize.cpp
index 7ff9eb42c0f..4625af066a8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageSize.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageSize.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <algorithm>
#include <cctype>
#include <cmath>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageSize.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageSize.h
index bb7a55c7cdc..bb7a55c7cdc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PageSize.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PageSize.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Pair.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Pair.h
index a3dc5a12af3..a3dc5a12af3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Pair.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Pair.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PdfSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PdfSpecialHandler.cpp
index f3d8464704c..8dc7d7fd13d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PdfSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PdfSpecialHandler.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstring>
#include "InputReader.h"
#include "MapLine.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PdfSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PdfSpecialHandler.h
index 43cdd1045de..43cdd1045de 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PdfSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PdfSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Process.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Process.cpp
index c9f38b004d0..03e3261de6d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Process.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Process.cpp
@@ -18,6 +18,8 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
+
#ifdef __WIN32__
#include <windows.h>
#else
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Process.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Process.h
index caf80de4c14..caf80de4c14 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Process.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Process.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PsSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PsSpecialHandler.cpp
index 22eae549c39..9e1b64faef1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PsSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PsSpecialHandler.cpp
@@ -18,13 +18,14 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#include "Ghostscript.h"
+#include <config.h>
#include <cmath>
#include <fstream>
#include <iostream>
#include <sstream>
#include "EPSFile.h"
#include "FileFinder.h"
+#include "Ghostscript.h"
#include "Message.h"
#include "PSPattern.h"
#include "PSPreviewFilter.h"
@@ -33,10 +34,8 @@
#include "XMLNode.h"
#include "XMLString.h"
-
using namespace std;
-
static inline double str2double (const string &str) {
double ret;
istringstream iss(str);
@@ -144,8 +143,8 @@ void PsSpecialHandler::moveToDVIPos () {
static void exec_and_syncpos (PSInterpreter &psi, istream &is, const DPair &pos, SpecialActions *actions) {
psi.execute(is);
psi.execute("\nquerypos "); // retrieve current PS position (stored in 'pos')
- const double pt = 72.27/72.0; // bp -> pt
if (actions) {
+ const double pt = 72.27/72.0; // bp -> pt
actions->setX(pos.x()*pt);
actions->setY(pos.y()*pt);
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PsSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PsSpecialHandler.h
index fcdede1da7a..fcdede1da7a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/PsSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/PsSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SVGOutputBase.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SVGOutputBase.h
index f53815c0a28..f53815c0a28 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SVGOutputBase.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SVGOutputBase.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SVGTree.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SVGTree.cpp
index a0e434a093c..626d81da133 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SVGTree.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SVGTree.cpp
@@ -18,6 +18,8 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
+#include <algorithm>
#include <sstream>
#include <string>
#include "BoundingBox.h"
@@ -38,7 +40,7 @@ bool SVGTree::USE_FONTS=true;
bool SVGTree::CREATE_USE_ELEMENTS=false;
-SVGTree::SVGTree () : _font(0), _color(Color::BLACK), _matrix(1) {
+SVGTree::SVGTree () : _vertical(false), _font(0), _color(Color::BLACK), _matrix(1) {
_xchanged = _ychanged = false;
_fontnum = 0;
reset();
@@ -118,7 +120,7 @@ void SVGTree::appendChar (int c, double x, double y, const Font &font) {
XMLElementNode *node=_span;
if (USE_FONTS) {
// changes of fonts and transformations require a new text element
- if (!_text || _font.changed() || _matrix.changed()) {
+ if (!_text || _font.changed() || _matrix.changed() || _vertical.changed()) {
newTextNode(x, y);
node = _text;
_color.changed(true);
@@ -127,6 +129,12 @@ void SVGTree::appendChar (int c, double x, double y, const Font &font) {
// if drawing position was explicitly changed, create a new tspan element
_span = new XMLElementNode("tspan");
if (_xchanged) {
+ if (_vertical) {
+ // align glyphs designed for horizontal layout properly
+ if (const PhysicalFont *pf = dynamic_cast<const PhysicalFont*>(_font.get()))
+ if (!pf->getMetrics()->verticalLayout())
+ x += pf->scaledAscent()/2.5; // move vertical baseline to the right by strikethrough offset
+ }
_span->addAttribute("x", x);
_xchanged = false;
}
@@ -166,9 +174,32 @@ void SVGTree::appendChar (int c, double x, double y, const Font &font) {
else if (_color.get() == Color::BLACK && _matrix.get().isIdentity())
node = _span = 0;
}
-
if (!node)
node = _pageContainerStack.empty() ? _page : _pageContainerStack.top();
+ if (font.verticalLayout()) {
+ // move glyph graphics so that its origin is located at the top center position
+ GlyphMetrics metrics;
+ font.getGlyphMetrics(c, _vertical, metrics);
+ x -= metrics.wl;
+ if (const PhysicalFont *pf = dynamic_cast<const PhysicalFont*>(&font)) {
+ // Center glyph between top and bottom border of the TFM box.
+ // This is just an approximation used until I find a way to compute
+ // the exact location in vertical mode.
+ GlyphMetrics exact_metrics;
+ pf->getExactGlyphBox(c, exact_metrics, false);
+ y += exact_metrics.h+(metrics.d-exact_metrics.h-exact_metrics.d)/2;
+ }
+ else
+ y += metrics.d;
+ }
+ Matrix rotation(1);
+ if (_vertical && !font.verticalLayout()) {
+ // alphabetic text designed for horizontal mode
+ // must be rotated by 90 degrees if in vertical mode
+ rotation.translate(-x, -y);
+ rotation.rotate(90);
+ rotation.translate(x, y);
+ }
if (CREATE_USE_ELEMENTS) {
ostringstream oss;
oss << "#g" << FontManager::instance().fontID(_font) << '-' << c;
@@ -176,18 +207,22 @@ void SVGTree::appendChar (int c, double x, double y, const Font &font) {
use->addAttribute("x", XMLString(x));
use->addAttribute("y", XMLString(y));
use->addAttribute("xlink:href", oss.str());
+ if (!rotation.isIdentity())
+ use->addAttribute("transform", rotation.getSVG());
node->append(use);
}
else {
Glyph glyph;
- const PhysicalFont *font = dynamic_cast<const PhysicalFont*>(_font.get());
- if (font && font->getGlyph(c, glyph)) {
- double sx = font->scaledSize()/font->unitsPerEm();
+ const PhysicalFont *pf = dynamic_cast<const PhysicalFont*>(&font);
+ if (pf && pf->getGlyph(c, glyph)) {
+ double sx = pf->scaledSize()/pf->unitsPerEm();
double sy = -sx;
ostringstream oss;
glyph.writeSVG(oss, sx, sy, x, y);
XMLElementNode *glyph_node = new XMLElementNode("path");
glyph_node->addAttribute("d", oss.str());
+ if (!rotation.isIdentity())
+ glyph_node->addAttribute("transform", rotation.getSVG());
node->append(glyph_node);
}
}
@@ -208,6 +243,17 @@ void SVGTree::newTextNode (double x, double y) {
else {
_text->addAttribute("font-family", font->name());
_text->addAttribute("font-size", font->scaledSize());
+ if (font->color() != Color::BLACK)
+ _text->addAttribute("fill", font->color().rgbString());
+ }
+ if (_vertical) {
+ _text->addAttribute("writing-mode", "tb");
+ // align glyphs designed for horizontal layout properly
+ if (const PhysicalFont *pf = dynamic_cast<const PhysicalFont*>(_font.get()))
+ if (!pf->getMetrics()->verticalLayout()) { // alphabetic text designed for horizontal layout?
+ x += pf->scaledAscent()/2.5; // move vertical baseline to the right by strikethrough offset
+ _text->addAttribute("glyph-orientation-vertical", 90); // ensure rotation
+ }
}
}
_text->addAttribute("x", x);
@@ -215,6 +261,7 @@ void SVGTree::newTextNode (double x, double y) {
if (!_matrix.get().isIdentity())
_text->addAttribute("transform", _matrix.get().getSVG());
appendToPage(_text);
+ _vertical.changed(false);
_font.changed(false);
_matrix.changed(false);
_xchanged = false;
@@ -225,6 +272,9 @@ void SVGTree::newTextNode (double x, double y) {
void SVGTree::setFont (int num, const Font *font) {
_font.set(font);
_fontnum = num;
+ // set default color assigned to the font
+ if (!USE_FONTS && _color.get() != font->color())
+ setColor(font->color());
}
@@ -251,9 +301,11 @@ static XMLElementNode* createGlyphNode (int c, const PhysicalFont &font, GFGlyph
double upem = font.unitsPerEm();
XMLElementNode *glyph_node=0;
if (SVGTree::USE_FONTS) {
+ double extend = font.style() ? font.style()->extend : 1;
glyph_node = new XMLElementNode("glyph");
glyph_node->addAttribute("unicode", XMLString(font.unicode(c), false));
- glyph_node->addAttribute("horiz-adv-x", XMLString(font.hAdvance(c)));
+ glyph_node->addAttribute("horiz-adv-x", XMLString(font.hAdvance(c)*extend));
+ glyph_node->addAttribute("vert-adv-y", XMLString(font.vAdvance(c)));
string name = font.glyphName(c);
if (!name.empty())
glyph_node->addAttribute("glyph-name", name);
@@ -288,7 +340,10 @@ void SVGTree::appendFontStyles (const set<const Font*> &fonts) {
FORALL(sortmap, SortMap::const_iterator, it) {
style << "text.f" << it->first << ' '
<< "{font-family:" << it->second->name()
- << ";font-size:" << it->second->scaledSize() << "}\n";
+ << ";font-size:" << it->second->scaledSize() << "px";
+ if (it->second->color() != Color::BLACK)
+ style << ";fill:" << it->second->color().rgbString();
+ style << "}\n";
}
XMLCDataNode *cdata = new XMLCDataNode(style.str());
styleNode->append(cdata);
@@ -313,7 +368,7 @@ void SVGTree::append (const PhysicalFont &font, const set<int> &chars, GFGlyphTr
XMLElementNode *faceNode = new XMLElementNode("font-face");
faceNode->addAttribute("font-family", fontname);
faceNode->addAttribute("units-per-em", XMLString(font.unitsPerEm()));
- if (font.type() != PhysicalFont::MF) {
+ if (font.type() != PhysicalFont::MF && !font.verticalLayout()) {
faceNode->addAttribute("ascent", XMLString(font.ascent()));
faceNode->addAttribute("descent", XMLString(font.descent()));
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SVGTree.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SVGTree.h
index 0aa5f46499b..041d97d21d8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SVGTree.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SVGTree.h
@@ -81,6 +81,7 @@ class SVGTree
void setY (double y) {_ychanged = true;}
void setMatrix (const Matrix &m) {_matrix.set(m);}
void setColor (const Color &c) {_color.set(c);}
+ void setVertical (bool state) {_vertical.set(state);}
void transformPage (const Matrix *m);
const Color& getColor () const {return _color.get();}
const Matrix& getMatrix () const {return _matrix.get();}
@@ -98,6 +99,7 @@ class SVGTree
XMLDocument _doc;
XMLElementNode *_root, *_page, *_text, *_span, *_defs;
bool _xchanged, _ychanged;
+ Property<bool> _vertical; ///< true if in vertical writing mode
Property<const Font*> _font;
Property<Color> _color;
Property<Matrix> _matrix;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SignalHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SignalHandler.cpp
index ffcd66165e0..494c87b8e90 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SignalHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SignalHandler.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cerrno>
#include <csignal>
#include <cstdlib>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SignalHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SignalHandler.h
index e7473f567d8..e7473f567d8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SignalHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SignalHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialActions.h
index a3cbafeefe3..a3cbafeefe3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialActions.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialActions.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialHandler.h
index 0883b4cf326..0883b4cf326 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialManager.cpp
index 9b96d87c6a1..2f1641393a0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialManager.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <iomanip>
#include <sstream>
#include "SpecialActions.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialManager.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialManager.h
index fc609569ce7..fc609569ce7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/SpecialManager.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/SpecialManager.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamReader.cpp
index 6e726e4016e..7b56222e852 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamReader.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "CRC32.h"
#include "StreamReader.h"
#include "macros.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamReader.h
index 3bb25dacca9..3bb25dacca9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamWriter.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamWriter.cpp
index bdd378f9993..72ffd5b5eac 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamWriter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamWriter.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "CRC32.h"
#include "StreamWriter.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamWriter.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamWriter.h
index 6217800dae6..6217800dae6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/StreamWriter.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/StreamWriter.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Subfont.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Subfont.cpp
index aa552d029f6..7b005d00aa9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Subfont.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Subfont.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cstdlib>
#include <cstring>
#include <fstream>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Subfont.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Subfont.h
index b099bc76897..b099bc76897 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Subfont.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Subfont.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/System.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/System.cpp
index 40ee98a130c..816f3dc02a1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/System.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/System.cpp
@@ -18,10 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
+#include <config.h>
#include <ctime>
#include "System.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/System.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/System.h
index 775d6358dd7..775d6358dd7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/System.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/System.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/TFM.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/TFM.cpp
index 596ed52e7ca..1d97600361d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/TFM.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/TFM.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <iostream>
#include <fstream>
#include <vector>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/TFM.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/TFM.h
index 954a619fdbf..a46d2560c22 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/TFM.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/TFM.h
@@ -40,9 +40,10 @@ class TFM : public FontMetrics
double getCharHeight (int c) const;
double getCharDepth (int c) const;
double getItalicCorr (int c) const;
- UInt32 getChecksum () const {return _checksum;}
- UInt16 firstChar () const {return _firstChar;}
- UInt16 lastChar () const {return _lastChar;}
+ bool verticalLayout () const {return false;}
+ UInt32 getChecksum () const {return _checksum;}
+ UInt16 firstChar () const {return _firstChar;}
+ UInt16 lastChar () const {return _lastChar;}
protected:
TFM () : _checksum(0), _firstChar(0), _lastChar(0), _designSize(0) {}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Terminal.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Terminal.cpp
index 82c91d575be..6d61bea78d4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Terminal.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Terminal.cpp
@@ -18,10 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
#include "Terminal.h"
#ifdef HAVE_TERMIOS_H
@@ -208,4 +205,4 @@ void Terminal::cursor (bool visible) {
SetConsoleCursorInfo(h, &cursor_info);
}
#endif
-} \ No newline at end of file
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Terminal.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Terminal.h
index 0a876272c91..0a876272c91 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/Terminal.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/Terminal.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/TpicSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/TpicSpecialHandler.cpp
index f44b89277b7..8d160e9d9a4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/TpicSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/TpicSpecialHandler.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cmath>
#include <cstring>
#include <sstream>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/TpicSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/TpicSpecialHandler.h
index e055e2e0a69..e055e2e0a69 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/TpicSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/TpicSpecialHandler.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/VFActions.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/VFActions.h
index ba25639b337..ba25639b337 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/VFActions.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/VFActions.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/VFReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/VFReader.cpp
index 5980a63054a..20c7fef457c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/VFReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/VFReader.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <sstream>
#include "Font.h"
#include "VFActions.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/VFReader.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/VFReader.h
index 25689dec2c8..25689dec2c8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/VFReader.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/VFReader.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/VectorStream.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/VectorStream.h
index e57dad43ad1..e57dad43ad1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/VectorStream.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/VectorStream.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLDocument.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLDocument.cpp
index 6844ecb9e60..00517b218ff 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLDocument.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLDocument.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "macros.h"
#include "XMLDocument.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLDocument.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLDocument.h
index 31cf9dea303..31cf9dea303 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLDocument.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLDocument.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLNode.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLNode.cpp
index d69b4a9b049..e7c9f295d89 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLNode.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLNode.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include "macros.h"
#include "XMLNode.h"
#include "XMLString.h"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLNode.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLNode.h
index 324bea068aa..324bea068aa 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLNode.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLNode.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLString.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLString.cpp
index 9175c068269..2b46d049db6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLString.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLString.cpp
@@ -18,6 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
+#include <config.h>
#include <cmath>
#include <cstdlib>
#include <iomanip>
@@ -30,6 +31,37 @@ using namespace std;
int XMLString::DECIMAL_PLACES = 0;
+
+/** Converts a unicode value to a UTF-8 byte sequence.
+ * @param[in] c character code
+ * @return utf8 seqence consisting of 1-4 bytes */
+static string to_utf8 (Int32 c) {
+ string utf8;
+ if (c >= 0) {
+ if (c < 0x80)
+ utf8 += c;
+ else if (c < 0x800) {
+ utf8 += 0xC0 + (c >> 6);
+ utf8 += 0x80 + (c & 0x3F);
+ }
+ else if (c == 0xFFFE || c == 0xFFFF)
+ utf8 += (c & 0xFF);
+ else if (c < 0x10000) {
+ utf8 += 0xE0 + (c >> 12);
+ utf8 += 0x80 + ((c >> 6) & 0x3F);
+ utf8 += 0x80 + (c & 0x3F);
+ }
+ else if (c < 0x110000) {
+ utf8 += 0xF0 + (c >> 18);
+ utf8 += 0x80 + ((c >> 12) & 0x3F);
+ utf8 += 0x80 + ((c >> 6) & 0x3F);
+ utf8 += 0x80 + (c & 0x3F);
+ }
+ }
+ return utf8;
+}
+
+
static string translate (UInt32 c) {
switch (c) {
case '<' : return "&lt;";
@@ -37,32 +69,13 @@ static string translate (UInt32 c) {
case '"' : return "&quot;";
case '\'': return "&apos;";
}
- ostringstream oss;
- if (c >= 32 && c <= 126)
- oss << char(c);
- else
- oss <<"&#" << UInt32(c) << ';';
- return oss.str();
-}
-
-
-#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;
+ return to_utf8(c);
}
-#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)
+ * @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};
@@ -108,6 +121,8 @@ XMLString::XMLString (double x) {
stringstream ss;
if (DECIMAL_PLACES > 0)
x = round(x, DECIMAL_PLACES);
+ else if (fabs(x) < 1e-8)
+ x = 0;
ss << x;
ss >> *this;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLString.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLString.h
index b1496b4a503..b1496b4a503 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/XMLString.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/XMLString.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/dvisvgm.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/dvisvgm.cpp
index cc3304e8125..ef873835365 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/dvisvgm.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/dvisvgm.cpp
@@ -18,14 +18,7 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#include "PSInterpreter.h"
-#endif
-#ifndef TARGET_SYSTEM
-#define TARGET_SYSTEM ""
-#endif
-
+#include <config.h>
#include <cmath>
#include <fstream>
#include <iomanip>
@@ -49,6 +42,7 @@
#include "InputReader.h"
#include "Message.h"
#include "PageSize.h"
+#include "PSInterpreter.h"
#include "SignalHandler.h"
#include "SpecialManager.h"
#include "SVGOutputBase.h"
@@ -170,10 +164,10 @@ static string remove_path (string fname) {
}
-static string ensure_suffix (string fname, const string &suffix) {
+static string ensure_suffix (string fname, bool eps) {
size_t dotpos = remove_path(fname).rfind('.');
if (dotpos == string::npos)
- fname += "."+suffix;
+ fname += (eps ? ".eps" : ".dvi");
return fname;
}
@@ -291,12 +285,12 @@ static void print_version (bool extended) {
if (extended) {
if (strlen(TARGET_SYSTEM) > 0)
oss << " (" TARGET_SYSTEM ")";
- oss << "\n" << string(oss.str().length(), '-') << "\n"
+ int len = oss.str().length();
+ oss << "\n" << string(len, '-') << "\n"
"freetype: " << FontEngine::version() << "\n";
- string gsver;
Ghostscript gs;
- gsver = gs.revision(true);
+ string gsver = gs.revision(true);
if (!gsver.empty())
oss << "Ghostscript: " << gsver + "\n";
oss <<
@@ -385,16 +379,16 @@ int main (int argc, char *argv[]) {
SVGTree::CREATE_STYLE = !args.no_styles_given();
SVGTree::USE_FONTS = !args.no_fonts_given();
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::EXACT_BBOX = args.exact_given();
PhysicalFont::KEEP_TEMP_FILES = args.keep_given();
PhysicalFont::METAFONT_MAG = args.mag_arg();
XMLString::DECIMAL_PLACES = max(0, min(6, args.precision_arg()));
if (!HtmlSpecialHandler::setLinkMarker(args.linkmark_arg()))
Message::wstream(true) << "invalid argument '"+args.linkmark_arg()+"' supplied for option --linkmark\n";
double start_time = System::time();
- string inputfile = ensure_suffix(args.file(0), args.eps_given() ? "eps" : "dvi");
+ string inputfile = ensure_suffix(args.file(0), args.eps_given());
ifstream ifs(inputfile.c_str(), ios_base::binary|ios_base::in);
if (!ifs) {
Message::estream(true) << "can't open file '" << inputfile << "' for reading\n";
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/gzstream.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/gzstream.cpp
index 2893c299891..2893c299891 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/gzstream.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/gzstream.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/gzstream.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/gzstream.h
index 60f38c4fac7..60f38c4fac7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/gzstream.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/gzstream.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/iapi.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/iapi.h
index 8e29d938d03..8e29d938d03 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/iapi.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/iapi.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/ierrors.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/ierrors.h
index 3184341177e..3184341177e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/ierrors.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/ierrors.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/macros.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/macros.h
index 8935b9babe9..8935b9babe9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/macros.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/macros.h
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/options.xml b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/options.xml
index ea0a6f6db95..ea0a6f6db95 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/options.xml
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/options.xml
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/psdefs.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/psdefs.cpp
index 9742ca1cd7a..9742ca1cd7a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/psdefs.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/psdefs.cpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/types.h b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/types.h
index c22d0e1bf47..c22d0e1bf47 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.4/src/types.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.5/src/types.h
diff --git a/Build/source/texk/dvisvgm/version.ac b/Build/source/texk/dvisvgm/version.ac
index b0bfbb79f62..526a275408a 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.4])
+m4_define([dvisvgm_version], [1.5])
diff --git a/Build/source/texk/lcdf-typetools/ChangeLog b/Build/source/texk/lcdf-typetools/ChangeLog
index 65839057ef1..99fb18ad5c4 100644
--- a/Build/source/texk/lcdf-typetools/ChangeLog
+++ b/Build/source/texk/lcdf-typetools/ChangeLog
@@ -1,7 +1,7 @@
2013-09-10 Peter Breitenlohner <peb@mppmu.mpg.de>
Import lcdf-typetools-2.99.
- * version.ac: Adjusted.
+ * version.ac: Adapted.
2013-09-02 Peter Breitenlohner <peb@mppmu.mpg.de>