summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm/dvisvgm-src
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-16 18:32:08 +0000
committerKarl Berry <karl@freefriends.org>2024-01-16 18:32:08 +0000
commit84b532c711d3e644d6ba05e8118356310fd68fbf (patch)
tree33d34c031bb6342b29a3801d2cc1f9208f637920 /Build/source/texk/dvisvgm/dvisvgm-src
parent32d816973b284f3e5a0bd28a7ad5ef73e3102b34 (diff)
dvisvgm 3.2
git-svn-id: svn://tug.org/texlive/trunk@69453 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src')
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/ChangeLog11166
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/Makefile.am2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/Makefile.in4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/NEWS65
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/README9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/aminclude_static.am2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/config.h.in3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/configure.ac12
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/doc/Makefile.am2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/doc/Makefile.in2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-man.xsl36
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-pdf.xsl114
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1196
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.txt.in73
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/doc/tweak-db-refentry.xsl86
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/doc/tweak-dblatex-pdf.xsl44
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/Makefile.am2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.am5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.in41
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/constants.c2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/constants.h3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/context.c2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/dictionary.c8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.c3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.h173
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/shared_dictionary_internal.h75
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/transform.c2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/version.h37
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.c100
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.h9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_hq.c200
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_hq.h11
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_inc.h36
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/bit_cost.c15
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/bit_cost.h9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter.c51
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter.h9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter_inc.h131
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.c242
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.h17
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster.c19
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster.h13
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster_inc.h45
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.c2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.h9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compound_dictionary.c207
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compound_dictionary.h74
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.c176
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.h39
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.c186
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.h24
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/dictionary_hash.c4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c875
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.c615
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.h120
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode.c5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode.h3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode_static.h7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.c2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.h3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/find_match_length.h37
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash.h330
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_composite_inc.h37
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_forgetful_chain_inc.h38
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match64_inc.h73
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match_inc.h16
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match_quickly_inc.h8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_rolling_inc.h8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_to_binary_tree_inc.h11
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/histogram.c8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/histogram.h13
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/literal_cost.c35
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/literal_cost.h6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/memory.c34
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/memory.h21
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock.c130
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock.h17
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock_inc.h14
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/params.h7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/prefix.h5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/quality.h43
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/ringbuffer.h7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/state.h104
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.c64
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.h5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict_lut.h2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/utf8_util.c2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/utf8_util.h3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/write_bits.h3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/decode.h69
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/encode.h57
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/port.h39
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/shared_dictionary.h100
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/defs.am16
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/md5/Makefile.am3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/md5/Makefile.in13
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/potrace/Makefile.in2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/store_bytes.h16
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/woff2_common.cc12
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxh3.h2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxhash.c2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxhash.h2960
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/AGLTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Bezier.cpp6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Bezier.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/BgColorSpecialHandler.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/BgColorSpecialHandler.hpp7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Bitmap.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Bitmap.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CLCommandLine.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CLCommandLine.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CLOption.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CMap.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CMap.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CMapManager.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CMapManager.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CMapReader.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CMapReader.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Calculator.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Calculator.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CharMapID.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CharMapID.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Character.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Color.cpp31
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Color.hpp3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ColorSpecialHandler.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ColorSpecialHandler.hpp7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/CommandLine.hpp10
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DLLoader.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DLLoader.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIActions.hpp3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.cpp9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.cpp78
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.hpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Directory.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Directory.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.cpp150
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.hpp11
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/EPSToSVG.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/EllipticalArc.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/EllipticalArc.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/EmSpecialHandler.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/EmSpecialHandler.hpp9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/EncFile.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/EncFile.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FileFinder.cpp3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FileFinder.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FixWord.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Font.cpp24
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Font.hpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontEncoding.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontEncoding.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontEngine.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontEngine.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.cpp9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.cpp41
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.hpp15
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontStyle.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontWriter.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/FontWriter.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/GFTracer.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/GFTracer.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Ghostscript.cpp7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Ghostscript.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Glyph.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/GlyphTracerMessages.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/GraphicsPath.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/GraphicsPathParser.hpp21
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/HtmlSpecialHandler.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/HtmlSpecialHandler.hpp7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/HyperlinkManager.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/HyperlinkManager.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.cpp7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.hpp8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/InputBuffer.cpp47
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/InputBuffer.hpp24
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.hpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/JFM.cpp41
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/JFM.hpp11
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Length.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/MD5HashFunction.hpp10
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.am67
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.in141
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/MapLine.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/MapLine.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Message.cpp11
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Message.hpp5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/MessageException.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/MiKTeXCom.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/MiKTeXCom.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.hpp7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/NumericRanges.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/OFM.cpp270
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/OFM.hpp135
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Opacity.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Opacity.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PDFHandler.cpp35
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PDFHandler.hpp3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PDFParser.cpp8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PDFParser.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PSFilter.hpp41
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PSInterpreter.cpp25
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PSInterpreter.hpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewHandler.cpp (renamed from Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewFilter.cpp)87
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewHandler.hpp (renamed from Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewFilter.hpp)27
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PageRanges.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PageRanges.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PageSize.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PageSize.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Pair.hpp3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PapersizeSpecialHandler.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PapersizeSpecialHandler.hpp7
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PathClipper.cpp14
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PathClipper.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PdfSpecialHandler.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PdfSpecialHandler.hpp9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PreScanDVIReader.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PreScanDVIReader.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Process.cpp13
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Process.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp46
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp15
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/RangeMap.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/RangeMap.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharPathHandler.cpp27
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharPathHandler.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharTspanTextHandler.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharTspanTextHandler.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGElement.cpp11
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGElement.hpp5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGOutput.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGOutput.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGSingleCharTextHandler.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGSingleCharTextHandler.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.hpp6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ShadingPatch.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ShadingPatch.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SignalHandler.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SignalHandler.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.cpp111
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.hpp8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialHandler.hpp19
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.hpp12
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp30
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.hpp3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/StreamWriter.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/StreamWriter.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/System.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/System.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/TFM.cpp62
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/TFM.hpp14
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/TensorProductPatch.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/TensorProductPatch.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Terminal.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Terminal.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ToUnicodeMap.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ToUnicodeMap.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/TpicSpecialHandler.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/TpicSpecialHandler.hpp9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/TriangularPatch.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/TriangularPatch.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Unicode.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/Unicode.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/VFActions.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/VectorIterator.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/VectorStream.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/XMLParser.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/XMLParser.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/XMLString.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/XMLString.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/XXHashFunction.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ZLibOutputStream.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/dvisvgm.cpp19
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/fonts/Base14Fonts.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/fonts/Base14Fonts.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/macros.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/ClipPathReassigner.cpp3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/ClipPathReassigner.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/DependencyGraph.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/GroupCollapser.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/GroupCollapser.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/Makefile.in12
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/OptimizerModule.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/RedundantElementRemover.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/RedundantElementRemover.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/SVGOptimizer.cpp70
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/SVGOptimizer.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TextSimplifier.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TextSimplifier.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TransformSimplifier.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TransformSimplifier.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/WSNodeRemover.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/WSNodeRemover.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/options.dtd4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/options.xml388
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp255
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/CmapTable.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/CmapTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/GlyfTable.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/GlyfTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HeadTable.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HeadTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HheaTable.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HheaTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HmtxTable.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HmtxTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/LocaTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.in12
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/MaxpTable.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/MaxpTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/NameTable.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/NameTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/OS2Table.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/OS2Table.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/PostTable.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/PostTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFAutohint.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFAutohint.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFWriter.cpp12
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFWriter.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VheaTable.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VheaTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VmtxTable.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VmtxTable.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/utility.cpp84
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/version.hpp.in2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/windows.hpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/BezierTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/BitmapTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/BoundingBoxTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapManagerTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/CalculatorTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/ColorSpecialTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/ColorTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/CommandLineTest.cpp4
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/DVIReaderTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/DependencyGraphTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/DirectoryTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/DvisvgmSpecialTest.cpp30
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/EllipticalArcTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/EmSpecialTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/FileFinderTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/FilePathTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/FileSystemTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/FontCacheTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/FontManagerTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/FontMapTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/GFGlyphTracerTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/GFReaderTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/GhostscriptTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/GraphicsPathParserTest.cpp29
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/GraphicsPathTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/HashFunctionTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/JFMReaderTest.cpp9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/Makefile.am21
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/Makefile.in209
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/MapLineTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/MatrixTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/MessageExceptionTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/OFMReaderTest.cpp128
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/PDFParserTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/PSInterpreterTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/PageRagesTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/PageSizeTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/PairTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/PapersizeSpecialTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/RangeMapTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/SVGOutputTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/ShadingPatchTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/SpecialManagerTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/SplittedCharInputBufferTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamInputBufferTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamReaderTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamWriterTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/StringMatcherTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/SubfontTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/TFMReaderTest.cpp9
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/TensorProductPatchTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/ToUnicodeMapTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/TpicSpecialTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/TriangularPatchTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/UnicodeTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/UtilityTest.cpp40
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/VectorIteratorTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/VectorStreamTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/XMLNodeTest.cpp2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/XMLStringTest.cpp2
-rwxr-xr-xBuild/source/texk/dvisvgm/dvisvgm-src/tests/check-conv2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/data/Makefile.am6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/data/Makefile.in6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/data/omarab.ofmbin0 -> 12576 bytes
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/data/upjf-g.ofmbin0 -> 292 bytes
-rwxr-xr-xBuild/source/texk/dvisvgm/dvisvgm-src/tests/genhashcheck.py2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/normalize.xsl222
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/tests/testmain.cpp2
454 files changed, 8576 insertions, 15262 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/ChangeLog b/Build/source/texk/dvisvgm/dvisvgm-src/ChangeLog
deleted file mode 100644
index 2533c9a1e00..00000000000
--- a/Build/source/texk/dvisvgm/dvisvgm-src/ChangeLog
+++ /dev/null
@@ -1,11166 +0,0 @@
-2022-08-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontWriter.cpp, src/HashFunction.hpp, src/HyperlinkManager.hpp,
- src/Opacity.hpp, src/SVGElement.hpp, src/TFM.cpp,
- src/optimizer/Makefile.am, src/utility.hpp:
- fixed indentations
-
-2022-08-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.14
-
- * configure.ac:
- removed redundant macros from configure.ac
-
-2022-07-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CLCommandLine.cpp, src/CMap.cpp, src/DVIReader.cpp,
- src/DvisvgmSpecialHandler.cpp, src/FileFinder.cpp, src/FilePath.cpp,
- src/Font.cpp, src/FontMap.cpp, src/HyperlinkManager.cpp, src/MapLine.cpp,
- src/MetafontWrapper.cpp, src/PDFParser.cpp, src/PageSize.cpp,
- src/PapersizeSpecialHandler.cpp, src/PsSpecialHandler.cpp,
- src/SVGOutput.cpp, src/SVGTree.cpp, src/Unicode.cpp, src/XMLNode.cpp,
- src/XMLParser.cpp, src/XMLString.cpp, src/dvisvgm.cpp, src/utility.cpp:
- adapted types of variables used for string positions
-
- * src/DvisvgmSpecialHandler.cpp:
- reordered if/else statement
-
- * src/MiKTeXCom.cpp:
- replaced C-style cast
-
-2022-07-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPathParser.hpp:
- updated year in copyright statement
-
- * src/XMLParser.cpp:
- handle GraphicsPathParserExceptions in XMLParser
-
- * src/GraphicsPathParser.hpp:
- improved position information of GraphicsPathParserException
-
-2022-07-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/include/woff2/encode.h, libs/woff2/include/woff2/output.h,
- libs/woff2/src/font.cc, libs/woff2/src/glyph.cc, libs/woff2/src/glyph.h,
- libs/woff2/src/normalize.cc, libs/woff2/src/transform.cc,
- libs/woff2/src/woff2_enc.cc, libs/woff2/src/woff2_out.cc:
- applied latest upstream changes to woff2
- library
-https://github.com/google/woff2/commit/62ae7a4c1ec7fb38adbf1294924db5924489889a
-
- * libs/woff2/src/normalize.cc, libs/woff2/src/woff2_enc.cc:
- woff2: removed unused variables to prevent compiler warnings
-
- * libs/woff2/src/font.cc, libs/woff2/src/normalize.cc:
- woff2: adapted variable types to prevent warnings
-
- * src/dvisvgm.cpp:
- added prefix to XML error messages
-
-2022-07-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/MiKTeXCom.cpp:
- updated output of MiKTeX version number
-
- * src/PDFParser.cpp:
- prevent warning about [[nodiscard]] return value
-
-2022-07-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPathParser.hpp:
- minor code tweaks in GraphicsPathParser
-
- * src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/Makefile.am, src/XMLParser.cpp, src/XMLParser.hpp,
- tests/DvisvgmSpecialTest.cpp:
- moved XMLParser from DvisvgmSpecialHandler to separate class
-
- * src/XMLParser.cpp:
- parse and reformat definitions of raw graphics paths
-
-2022-06-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLNode.cpp, src/XMLNode.hpp, src/optimizer/GroupCollapser.cpp:
- optimizer: improved removal of redundant group elements
-
- * src/XMLNode.cpp, src/XMLNode.hpp, src/optimizer/AttributeExtractor.cpp,
- src/optimizer/AttributeExtractor.hpp, src/optimizer/GroupCollapser.cpp,
- src/optimizer/TextSimplifier.cpp:
- moved inheritability check of attributes to Attribute struct
-
-2022-06-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontWriter.cpp:
- ensure proper representation of empty glyphs in SFD files
-
-2022-06-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp, src/FontManager.cpp:
- ignore letter case when looking up file suffixes
-
- * src/FileFinder.cpp:
- MiKTeX: handle lookup of TrueType files similar to kpathsea
-Look for
- .ttf, .ttc, and .dfont suffixes
-
- * src/FontManager.cpp:
- XFontDef: lookup font formats rather than specific suffixes
-
-2022-06-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontManager.cpp:
- XFontDef: added support for font filenames without suffix
-
-2022-05-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * README.md:
- Removed paragraph about Ghostscript's new PDF interpreter
-
-because the
- old interpreter is still available in recent GS releases and can be
- reactivated by dvisvgm.
-
-2022-04-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.13.4
-
- * NEWS:
- updated NEWS
-
-2022-04-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSInterpreter.cpp:
- updated URL to GS documentation of -dNEWPDF
-
-2022-04-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * m4/ax_cxx_compile_stdcxx.m4:
- updated ax_cxx_compile_stdcxx.m4 to version 14
-
-2022-03-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- updated FreeType to version 2.12
-
-2022-03-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- updated zlib to version 1.2.12
-
- * src/PSInterpreter.cpp:
- disable new PDF interpreter when using GS >= 9.56.0
-
-2022-03-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/ImageToSVG.cpp:
- reset bounding box before converting next PDF page
-closes #182
-
-2022-02-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.13.3
-
- * NEWS:
- updated NEWS
-
-2022-02-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in, src/optimizer/ClipPathReassigner.cpp,
- src/optimizer/ClipPathReassigner.hpp, src/optimizer/Makefile.am,
- src/optimizer/SVGOptimizer.cpp:
- added optimizer module to remove identical clipPath elements
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in, src/optimizer/SVGOptimizer.cpp:
- renamed optimizer module 'remove-clippath' to 'remove-clippaths'
-
- * src/optimizer/Makefile.am:
- added missing include path
-
-2022-02-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BoundingBox.cpp, src/BoundingBox.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp:
- avoid adding clip-path attributes to all elements created from EPS/PDF
- files
-
-2022-02-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- moved 'transform' attribute of 'svg' element to wrapping group
-closes
- #178
-
- * src/PsSpecialHandler.cpp:
- properly wrap 'svg' element with group
-
-2022-02-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.13.2
-
- * NEWS:
- updated NEWS
-
-2022-02-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- removed redundant space is PS code
-
- * src/BoundingBox.cpp, src/BoundingBox.hpp, src/DvisvgmSpecialHandler.cpp,
- src/PSPattern.cpp, src/PsSpecialHandler.cpp, src/SVGTree.cpp,
- tests/BoundingBoxTest.cpp, tests/DvisvgmSpecialTest.cpp,
- tests/EmSpecialTest.cpp, tests/PapersizeSpecialTest.cpp:
- renamed BoundingBox::toSVGViewBox to BoundingBox::svgViewBoxString
-
-2022-02-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- use overflow='hidden' to clip included EPS/PDF graphics
-
-2022-01-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.13.1
-
- * NEWS:
- updated NEWS
-
- * README.md:
- added Copr status badge to README
-
-2022-01-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSPattern.cpp:
- added explicit std::move to fix build issues with older compilers
-closes
- #173
-
-2022-01-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * README.md:
- removed Travis badge from README
-
- * libs/xxHash/xxhash.h:
- do no longer depend on <assert.h> for
- XXH_STATIC_ASSERT
-https://github.com/Cyan4973/xxHash/commit/6189ecd3d44a693460f86280ccf49d33cb4b18e1
-
-2022-01-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- apply bounding box parameters given with pdffile special
-closes #174
-
- * src/DvisvgmSpecialHandler.cpp:
- added evaluation of {?(...)} to dvisvgm:rawdef special
-closes #175
-
-2022-01-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * .github/workflows/c-cpp.yml:
- CI: ensure latest package updates are installed
-
- * README.md:
- updated README
-
-2022-01-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in:
- reworded some sentences of the manual page
-closes #159
-
- * .appveyor.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.13
-
-2022-01-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS:
- updated NEWS
-
-2022-01-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, README, README.md, configure.ac, doc/Makefile.am,
- doc/conf-dblatex-man.xsl, doc/conf-dblatex-pdf.xsl, doc/db2html.xsl,
- doc/dvisvgm.txt.in, doc/tweak-db-article.xsl, doc/tweak-db-refentry.xsl,
- doc/tweak-dblatex-pdf.xsl, libs/Makefile.am,
- libs/ff-woff/fontforge/tmpfile2.cpp, src/AGLTable.hpp,
- src/BasicDVIReader.cpp, src/BasicDVIReader.hpp, src/Bezier.cpp,
- src/Bezier.hpp, src/BgColorSpecialHandler.cpp,
- src/BgColorSpecialHandler.hpp, src/Bitmap.cpp, src/Bitmap.hpp,
- src/BoundingBox.cpp, src/BoundingBox.hpp, src/CLCommandLine.cpp,
- src/CLCommandLine.hpp, src/CLOption.hpp, src/CMap.cpp, src/CMap.hpp,
- src/CMapManager.cpp, src/CMapManager.hpp, src/CMapReader.cpp,
- src/CMapReader.hpp, src/Calculator.cpp, src/Calculator.hpp,
- src/CharMapID.cpp, src/CharMapID.hpp, src/Character.hpp, src/Color.cpp,
- src/Color.hpp, src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.hpp,
- src/CommandLine.hpp, src/DLLoader.cpp, src/DLLoader.hpp,
- src/DVIActions.hpp, src/DVIReader.cpp, src/DVIReader.hpp,
- src/DVIToSVG.cpp, src/DVIToSVG.hpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.hpp, src/Directory.cpp, src/Directory.hpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/EPSFile.cpp, src/EPSFile.hpp, src/EPSToSVG.hpp,
- src/EllipticalArc.cpp, src/EllipticalArc.hpp, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.hpp, src/EncFile.cpp, src/EncFile.hpp,
- src/FileFinder.cpp, src/FileFinder.hpp, src/FilePath.cpp,
- src/FilePath.hpp, src/FileSystem.cpp, src/FileSystem.hpp,
- src/FixWord.hpp, src/Font.cpp, src/Font.hpp, src/FontCache.cpp,
- src/FontCache.hpp, src/FontEncoding.cpp, src/FontEncoding.hpp,
- src/FontEngine.cpp, src/FontEngine.hpp, src/FontManager.cpp,
- src/FontManager.hpp, src/FontMap.cpp, src/FontMap.hpp,
- src/FontMetrics.cpp, src/FontMetrics.hpp, src/FontStyle.hpp,
- src/FontWriter.cpp, src/FontWriter.hpp, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.hpp, src/GFReader.cpp, src/GFReader.hpp,
- src/GFTracer.cpp, src/GFTracer.hpp, src/Ghostscript.cpp,
- src/Ghostscript.hpp, src/Glyph.hpp, src/GlyphTracerMessages.hpp,
- src/GraphicsPath.hpp, src/HashFunction.cpp, src/HashFunction.hpp,
- src/HtmlSpecialHandler.cpp, src/HtmlSpecialHandler.hpp,
- src/HyperlinkManager.cpp, src/HyperlinkManager.hpp, src/ImageToSVG.cpp,
- src/ImageToSVG.hpp, src/InputBuffer.cpp, src/InputBuffer.hpp,
- src/InputReader.cpp, src/InputReader.hpp, src/JFM.cpp, src/JFM.hpp,
- src/Length.cpp, src/Length.hpp, src/MD5HashFunction.hpp, src/Makefile.am,
- src/MapLine.cpp, src/MapLine.hpp, src/Matrix.cpp, src/Matrix.hpp,
- src/Message.cpp, src/Message.hpp, src/MessageException.hpp,
- src/MetafontWrapper.cpp, src/MetafontWrapper.hpp, src/MiKTeXCom.cpp,
- src/MiKTeXCom.hpp, src/NoPsSpecialHandler.cpp,
- src/NoPsSpecialHandler.hpp, src/NumericRanges.hpp, src/Opacity.cpp,
- src/Opacity.hpp, src/PDFParser.cpp, src/PDFParser.hpp, src/PDFToSVG.hpp,
- src/PSFilter.hpp, src/PSInterpreter.cpp, src/PSInterpreter.hpp,
- src/PSPattern.cpp, src/PSPattern.hpp, src/PSPreviewFilter.cpp,
- src/PSPreviewFilter.hpp, src/PageRanges.cpp, src/PageRanges.hpp,
- src/PageSize.cpp, src/PageSize.hpp, src/Pair.hpp,
- src/PapersizeSpecialHandler.cpp, src/PapersizeSpecialHandler.hpp,
- src/PathClipper.cpp, src/PathClipper.hpp, src/PdfSpecialHandler.cpp,
- src/PdfSpecialHandler.hpp, src/PreScanDVIReader.cpp,
- src/PreScanDVIReader.hpp, src/Process.cpp, src/Process.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/RangeMap.cpp,
- src/RangeMap.hpp, src/SVGCharHandler.cpp, src/SVGCharHandler.hpp,
- src/SVGCharHandlerFactory.cpp, src/SVGCharHandlerFactory.hpp,
- src/SVGCharPathHandler.cpp, src/SVGCharPathHandler.hpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGCharTspanTextHandler.hpp,
- src/SVGElement.cpp, src/SVGElement.hpp, src/SVGOutput.cpp,
- src/SVGOutput.hpp, src/SVGSingleCharTextHandler.cpp,
- src/SVGSingleCharTextHandler.hpp, src/SVGTree.cpp, src/SVGTree.hpp,
- src/ShadingPatch.cpp, src/ShadingPatch.hpp, src/SignalHandler.cpp,
- src/SignalHandler.hpp, src/SourceInput.cpp, src/SourceInput.hpp,
- src/SpecialActions.hpp, src/SpecialHandler.hpp, src/SpecialManager.cpp,
- src/SpecialManager.hpp, src/StreamReader.cpp, src/StreamReader.hpp,
- src/StreamWriter.cpp, src/StreamWriter.hpp, src/Subfont.cpp,
- src/Subfont.hpp, src/System.cpp, src/System.hpp, src/TFM.cpp,
- src/TFM.hpp, src/TTFAutohint.cpp, src/TTFAutohint.hpp,
- src/TensorProductPatch.cpp, src/TensorProductPatch.hpp, src/Terminal.cpp,
- src/Terminal.hpp, src/ToUnicodeMap.cpp, src/ToUnicodeMap.hpp,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.hpp,
- src/TriangularPatch.cpp, src/TriangularPatch.hpp, src/TrueTypeFont.cpp,
- src/TrueTypeFont.hpp, src/Unicode.cpp, src/Unicode.hpp,
- src/VFActions.hpp, src/VFReader.cpp, src/VFReader.hpp,
- src/VectorIterator.hpp, src/VectorStream.hpp, src/XMLDocument.cpp,
- src/XMLDocument.hpp, src/XMLNode.cpp, src/XMLNode.hpp, src/XMLString.cpp,
- src/XMLString.hpp, src/XXHashFunction.hpp, src/ZLibOutputStream.hpp,
- src/dvisvgm.cpp, src/ffwrapper.c, src/ffwrapper.h, src/macros.hpp,
- src/optimizer/AttributeExtractor.cpp,
- src/optimizer/AttributeExtractor.hpp, src/optimizer/DependencyGraph.hpp,
- src/optimizer/GroupCollapser.cpp, src/optimizer/GroupCollapser.hpp,
- src/optimizer/OptimizerModule.hpp,
- src/optimizer/RedundantElementRemover.cpp,
- src/optimizer/RedundantElementRemover.hpp,
- src/optimizer/SVGOptimizer.cpp, src/optimizer/SVGOptimizer.hpp,
- src/optimizer/TextSimplifier.cpp, src/optimizer/TextSimplifier.hpp,
- src/optimizer/TransformSimplifier.cpp,
- src/optimizer/TransformSimplifier.hpp, src/optimizer/WSNodeRemover.cpp,
- src/optimizer/WSNodeRemover.hpp, src/options.dtd, src/options.xml,
- src/psdefs.cpp, src/utility.cpp, src/utility.hpp, src/version.hpp.in,
- src/windows.hpp, tests/BezierTest.cpp, tests/BitmapTest.cpp,
- tests/BoundingBoxTest.cpp, tests/CMapManagerTest.cpp,
- tests/CMapReaderTest.cpp, tests/CMapTest.cpp, tests/CalculatorTest.cpp,
- tests/ColorSpecialTest.cpp, tests/ColorTest.cpp,
- tests/CommandLineTest.cpp, tests/DVIReaderTest.cpp,
- tests/DependencyGraphTest.cpp, tests/DirectoryTest.cpp,
- tests/DvisvgmSpecialTest.cpp, tests/EllipticalArcTest.cpp,
- tests/EmSpecialTest.cpp, tests/FileFinderTest.cpp,
- tests/FilePathTest.cpp, tests/FileSystemTest.cpp,
- tests/FontCacheTest.cpp, tests/FontManagerTest.cpp,
- tests/FontMapTest.cpp, tests/GFGlyphTracerTest.cpp,
- tests/GFReaderTest.cpp, tests/GhostscriptTest.cpp,
- tests/GraphicsPathTest.cpp, tests/HashFunctionTest.cpp,
- tests/JFMReaderTest.cpp, tests/LengthTest.cpp, tests/Makefile.am,
- tests/MapLineTest.cpp, tests/MatrixTest.cpp,
- tests/MessageExceptionTest.cpp, tests/PDFParserTest.cpp,
- tests/PSInterpreterTest.cpp, tests/PageRagesTest.cpp,
- tests/PageSizeTest.cpp, tests/PairTest.cpp,
- tests/PapersizeSpecialTest.cpp, tests/RangeMapTest.cpp,
- tests/SVGOutputTest.cpp, tests/ShadingPatchTest.cpp,
- tests/SpecialManagerTest.cpp, tests/SplittedCharInputBufferTest.cpp,
- tests/StreamInputBufferTest.cpp, tests/StreamReaderTest.cpp,
- tests/StreamWriterTest.cpp, tests/StringMatcherTest.cpp,
- tests/SubfontTest.cpp, tests/TFMReaderTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/ToUnicodeMapTest.cpp,
- tests/TpicSpecialTest.cpp, tests/TriangularPatchTest.cpp,
- tests/UnicodeTest.cpp, tests/UtilityTest.cpp,
- tests/VectorIteratorTest.cpp, tests/VectorStreamTest.cpp,
- tests/XMLNodeTest.cpp, tests/XMLStringTest.cpp, tests/check-conv,
- tests/create-makefile, tests/data/Makefile.am, tests/genhashcheck.py,
- tests/normalize.xsl, tests/testmain.cpp:
- updated year in copyright statements to 2022
-
-2022-01-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am:
- don't build manpage in parallel
-closes #171
-
-2021-12-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/brotli/enc/encode.c:
- fixed parameter type warning in Brotli library
-
-2021-12-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- updated Windows platform toolset to version 143
-
-2021-12-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in, src/dvisvgm.cpp:
- allow for conversion of multiple given EPS files
-
- * src/DVIToSVG.cpp:
- fixed setting of hash algorithm given on command-line
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in, src/SVGOutput.cpp, src/SVGOutput.hpp,
- src/dvisvgm.cpp:
- added variables n and N to option --output
-
-2021-12-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/InputReader.cpp:
- replaced deprecated std::ptr_fun
-
-2021-11-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/xxHash/xxh3.h, libs/xxHash/xxhash.h:
- updated xxHash to version 0.8.1
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in:
- manpage: extended introduction of section 'supported specials'
-
-2021-11-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp, src/FontEngine.cpp, src/FontEngine.hpp:
- use glyph metrics from font file to compute height and depth
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in:
- manpage: slightly changed wording regarding the bgcolor handler
-
-2021-11-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml:
- removed Travis configuration
-
-2021-10-30 Naveen M K <naveen521kk@gmail.com>
-
- * src/FileSystem.cpp:
- mingw: fix for gcc 11
-
-2021-09-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/optimizer/GroupCollapser.cpp, src/optimizer/GroupCollapser.hpp,
- src/optimizer/SVGOptimizer.cpp:
- simplify transform attributes only if 'simplify-transform' is given
-
-2021-09-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/UtilityTest.cpp:
- prevent creating temporaries in test loop
-
-2021-09-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/gtest/include/gtest/gtest-death-test.h,
- tests/gtest/include/gtest/gtest-matchers.h,
- tests/gtest/include/gtest/gtest-message.h,
- tests/gtest/include/gtest/gtest-param-test.h,
- tests/gtest/include/gtest/gtest-printers.h,
- tests/gtest/include/gtest/gtest-spi.h,
- tests/gtest/include/gtest/gtest-test-part.h,
- tests/gtest/include/gtest/gtest-typed-test.h,
- tests/gtest/include/gtest/gtest.h,
- tests/gtest/include/gtest/gtest_pred_impl.h,
- tests/gtest/include/gtest/gtest_prod.h,
- tests/gtest/include/gtest/internal/custom/gtest-port.h,
- tests/gtest/include/gtest/internal/custom/gtest-printers.h,
- tests/gtest/include/gtest/internal/custom/gtest.h,
- tests/gtest/include/gtest/internal/gtest-death-test-internal.h,
- tests/gtest/include/gtest/internal/gtest-filepath.h,
- tests/gtest/include/gtest/internal/gtest-internal.h,
- tests/gtest/include/gtest/internal/gtest-param-util.h,
- tests/gtest/include/gtest/internal/gtest-port-arch.h,
- tests/gtest/include/gtest/internal/gtest-port.h,
- tests/gtest/include/gtest/internal/gtest-string.h,
- tests/gtest/include/gtest/internal/gtest-type-util.h,
- tests/gtest/src/gtest-death-test.cc, tests/gtest/src/gtest-filepath.cc,
- tests/gtest/src/gtest-internal-inl.h, tests/gtest/src/gtest-matchers.cc,
- tests/gtest/src/gtest-port.cc, tests/gtest/src/gtest-printers.cc,
- tests/gtest/src/gtest-test-part.cc, tests/gtest/src/gtest-typed-test.cc,
- tests/gtest/src/gtest.cc, tests/gtest/src/gtest_main.cc,
- tests/testutil.hpp:
- updated gtest to version 1.11
-
-2021-08-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/optimizer/GroupCollapser.cpp, src/optimizer/GroupCollapser.hpp:
- GroupCollapser: simplify transform attributes after combining them
-
-2021-08-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.12
-
- * NEWS:
- updated NEWS
-
-2021-08-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- skip fill actions if colorspace with unsupported pattern type is active
-
-2021-08-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp:
- ensure adding color attribute to tiling patterns
-(closes #158)
-
-2021-07-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- updated FreeType to version 2.11
-
-2021-07-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FilePath.cpp:
- prevent out-of-bounds access
-
- * src/InputBuffer.hpp:
- delete unused assignment operator
-
-2021-06-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * .gitattributes:
- Update .gitattributes
-
-marked all files in libs and its subfolders as
- vendored code
-
-2021-06-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FilePath.cpp:
- fixed handling of root directories in file paths
-
- * src/FilePath.cpp, src/FileSystem.cpp, tests/FilePathTest.cpp:
- improved handling of drive letters on Windows
-
-2021-06-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- fixed displaced graphics if PDF MediaBox isn't located at origin
-
- * tests/data/Makefile.am:
- added missing test data file to Makefile
-
-2021-06-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * m4/ax_cxx_compile_stdcxx.m4:
- ax_cxx_compile_stdcxx.m4 to version 12
-
-2021-05-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.hpp:
- simplified boolean expression
-
- * src/Font.hpp, src/SVGCharPathHandler.cpp:
- removed default parameter from virtual methods
-
-2021-05-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSPattern.hpp, src/PsSpecialHandler.cpp:
- removed dynamic casting in processing of PS patterns
-
- * src/PdfSpecialHandler.cpp:
- replaced dynamic_cast with static_cast as type is unambiguous
-
- * src/TensorProductPatch.cpp, src/TriangularPatch.cpp:
- replaced dynamic casts of shading patches with PS type comparisons
-
- * src/CMapManager.cpp:
- replaced dynamic cast of CMap type test with existing method
- mapsToUnicode()
-
-2021-05-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/DVIToSVG.cpp, src/DVIToSVGActions.cpp,
- src/Font.cpp, src/Font.hpp, src/FontEngine.cpp, src/FontManager.cpp,
- src/SVGCharHandler.cpp, src/SVGCharPathHandler.cpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGTree.cpp, src/utility.hpp,
- tests/FontManagerTest.cpp, tests/data/lmmono12-regular.otf:
- added font_cast to replace dynamic casts of Font pointers
-
-2021-05-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/FontMetrics.hpp, src/JFM.hpp:
- replaced dynamic cast to test for JFM with dedicated method
-
-2021-04-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- fixed PS error thrown when trying to set a shading pattern
-
- * src/PsSpecialHandler.cpp, src/SVGElement.cpp, src/SVGElement.hpp:
- always add fill attribute to pattern paths
-
-2021-04-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in:
- reworded few parts of the manual page
-
-2021-04-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- restore proper context node at end of pattern definition
-
-2021-03-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPath.hpp:
- use std::equal to check equality of GraphicsPaths
-
- * src/EllipticalArc.cpp, src/Matrix.cpp, src/Matrix.hpp,
- tests/MatrixTest.cpp:
- Matrix: added default constructor; explicit init list constructor
-
- * src/GFReader.cpp, src/Message.cpp, src/VectorIterator.hpp:
- removed redundant index checks
-
- * src/DVIToSVG.cpp, src/DVIToSVG.hpp:
- initialize basic members outside constructor body
-
- * src/DvisvgmSpecialHandler.cpp:
- two small code improvements
-
- * src/FontManager.cpp:
- removed redundant check
-
- * src/GFGlyphTracer.cpp, src/GFGlyphTracer.hpp, src/HyperlinkManager.hpp,
- src/PSInterpreter.cpp, src/PsSpecialHandler.cpp:
- added missing const to reference parameters
-
- * src/InputBuffer.hpp:
- prevent unwanted copying of input buffers
-
-2021-03-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.1:
- fixed typo in manual
-
- * src/PSInterpreter.cpp:
- fixed expression to check current GS running mode
-
- * src/SVGSingleCharTextHandler.cpp:
- reset change flag of color and opacity properties unconditionally
-
- * src/SVGCharTspanTextHandler.cpp:
- create initial tspan if opacity values differ from defaults
-
- * src/Ghostscript.cpp, src/Ghostscript.hpp, src/PSInterpreter.cpp,
- src/PSInterpreter.hpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- update opacity settings on grestore
-Requires GS >= 9.52 because earlier
- versions only provide operators to set the
-opacity/blendmode values and
- none to retrieve them.
-
- * src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PsSpecialHandler.hpp,
- src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- renamed PS operator setisshapealpha
-
- * src/dvisvgm.cpp:
- added missing parenthesis in info message
-
-2021-03-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/optimizer/GroupCollapser.cpp, src/optimizer/TextSimplifier.cpp:
- minor loop optimizations
-
- * src/XMLNode.cpp:
- don't create newlines inside text elements
-since they may lead to
- additional whitespace, e.g. between tspans that lack absolute coordinates
-
- * src/SVGCharPathHandler.cpp, src/SVGElement.cpp, src/SVGElement.hpp:
- don't add style attributes to groups because they're not inheritable
-
-2021-03-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Makefile.am, src/Opacity.cpp, src/Opacity.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp:
- combined alpha and blendmode values into dedicated class
-
- * src/SVGCharHandler.hpp:
- added default and move constructor to CharProperty
-
- * src/DVIToSVGActions.hpp, src/ImageToSVG.hpp, src/Opacity.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp,
- src/SVGCharHandler.hpp, src/SVGCharPathHandler.cpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGSingleCharTextHandler.cpp,
- src/SVGTree.hpp, src/SpecialActions.hpp:
- added opacity properties to text elements
-
- * src/SVGCharHandler.cpp, src/SVGCharHandler.hpp,
- src/SVGCharPathHandler.cpp, src/SVGCharTspanTextHandler.cpp,
- src/SVGSingleCharTextHandler.cpp:
- added shorthand operator for CharProperty::get()
-
- * src/Opacity.hpp, src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp:
- PS handler: replaced isolated opacity variables with Opacity class
-
- * src/Makefile.am, src/Opacity.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/SVGElement.cpp, src/SVGElement.hpp,
- src/XMLNode.hpp:
- added class to handle SVG attributes in a uniform manner
-
- * src/DVIToSVGActions.cpp, src/DVIToSVGActions.hpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/EmSpecialHandler.cpp, src/HyperlinkManager.cpp, src/ImageToSVG.hpp,
- src/PSPattern.cpp, src/PsSpecialHandler.cpp, src/SVGCharHandler.cpp,
- src/SVGCharHandler.hpp, src/SVGCharPathHandler.cpp,
- src/SVGCharPathHandler.hpp, src/SVGCharTspanTextHandler.cpp,
- src/SVGCharTspanTextHandler.hpp, src/SVGElement.cpp, src/SVGElement.hpp,
- src/SVGSingleCharTextHandler.cpp, src/SVGTree.cpp, src/SVGTree.hpp,
- src/SpecialActions.hpp, src/TpicSpecialHandler.cpp,
- tests/TpicSpecialTest.cpp:
- added opacity properties to graphics elements created outside the PS
- handler
-(closes #148)
-
- * src/EmSpecialHandler.cpp, src/SVGElement.cpp, src/SVGElement.hpp,
- src/TpicSpecialHandler.cpp, tests/EmSpecialTest.cpp,
- tests/TpicSpecialTest.cpp:
- unified handling of "point" attributes
-
- * src/EmSpecialHandler.cpp, src/SVGCharHandler.cpp,
- src/SVGCharPathHandler.cpp, src/SVGElement.cpp, src/SVGTree.cpp,
- src/TpicSpecialHandler.cpp:
- removed redundant casts to XMLString
-
-2021-03-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * .github/workflows/c-cpp.yml:
- added GitHub CI configuration
-
- * .github/workflows/c-cpp.yml:
- removed distcheck from CI
-
- * README.md:
- added GitHub CI badge; removed Copr badge
-
-2021-03-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.cpp, src/BoundingBox.cpp,
- src/DvisvgmSpecialHandler.cpp, src/EllipticalArc.cpp,
- src/EmSpecialHandler.cpp, src/FontCache.cpp, src/FontEngine.cpp,
- src/FontManager.cpp, src/FontWriter.cpp, src/PSInterpreter.cpp,
- src/PapersizeSpecialHandler.cpp, src/RangeMap.cpp, src/Subfont.cpp,
- src/TpicSpecialHandler.cpp, src/TrueTypeFont.cpp, src/XMLDocument.cpp,
- src/XMLNode.cpp, src/dvisvgm.cpp, src/utility.cpp:
- avoid copying objects in emplace methods
-
-2021-02-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * .gitignore:
- added .pyc to ignored file suffixes
-
-2021-02-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FilePath.cpp, src/FileSystem.cpp, src/FileSystem.hpp:
- improved handling of differing drive letters in Windows file paths
-
-2021-01-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- fixed typo in manual
-
-2021-01-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/tweak-dblatex-tex.py:
- updated tweak-dblatex-tex to Python 3
-
-2021-01-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.11.1
-
- * NEWS:
- updated NEWS
-
-2021-01-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, README, README.md, configure.ac, doc/Makefile.am,
- doc/conf-dblatex-man.xsl, doc/conf-dblatex-pdf.xsl, doc/db2html.xsl,
- doc/dvisvgm.1, doc/dvisvgm.txt.in, doc/tweak-db-article.xsl,
- doc/tweak-db-refentry.xsl, doc/tweak-dblatex-pdf.xsl, libs/Makefile.am,
- libs/ff-woff/fontforge/tmpfile2.cpp, src/AGLTable.hpp,
- src/BasicDVIReader.cpp, src/BasicDVIReader.hpp, src/Bezier.cpp,
- src/Bezier.hpp, src/BgColorSpecialHandler.cpp,
- src/BgColorSpecialHandler.hpp, src/Bitmap.cpp, src/Bitmap.hpp,
- src/BoundingBox.cpp, src/BoundingBox.hpp, src/CLCommandLine.cpp,
- src/CLCommandLine.hpp, src/CLOption.hpp, src/CMap.cpp, src/CMap.hpp,
- src/CMapManager.cpp, src/CMapManager.hpp, src/CMapReader.cpp,
- src/CMapReader.hpp, src/Calculator.cpp, src/Calculator.hpp,
- src/CharMapID.cpp, src/CharMapID.hpp, src/Character.hpp, src/Color.cpp,
- src/Color.hpp, src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.hpp,
- src/CommandLine.hpp, src/DLLoader.cpp, src/DLLoader.hpp,
- src/DVIActions.hpp, src/DVIReader.cpp, src/DVIReader.hpp,
- src/DVIToSVG.cpp, src/DVIToSVG.hpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.hpp, src/Directory.cpp, src/Directory.hpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/EPSFile.cpp, src/EPSFile.hpp, src/EPSToSVG.hpp,
- src/EllipticalArc.cpp, src/EllipticalArc.hpp, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.hpp, src/EncFile.cpp, src/EncFile.hpp,
- src/FileFinder.cpp, src/FileFinder.hpp, src/FilePath.cpp,
- src/FilePath.hpp, src/FileSystem.cpp, src/FileSystem.hpp,
- src/FixWord.hpp, src/Font.cpp, src/Font.hpp, src/FontCache.cpp,
- src/FontCache.hpp, src/FontEncoding.cpp, src/FontEncoding.hpp,
- src/FontEngine.cpp, src/FontEngine.hpp, src/FontManager.cpp,
- src/FontManager.hpp, src/FontMap.cpp, src/FontMap.hpp,
- src/FontMetrics.cpp, src/FontMetrics.hpp, src/FontStyle.hpp,
- src/FontWriter.cpp, src/FontWriter.hpp, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.hpp, src/GFReader.cpp, src/GFReader.hpp,
- src/GFTracer.cpp, src/GFTracer.hpp, src/Ghostscript.cpp,
- src/Ghostscript.hpp, src/Glyph.hpp, src/GlyphTracerMessages.hpp,
- src/GraphicsPath.hpp, src/HashFunction.cpp, src/HashFunction.hpp,
- src/HtmlSpecialHandler.cpp, src/HtmlSpecialHandler.hpp,
- src/HyperlinkManager.cpp, src/HyperlinkManager.hpp, src/ImageToSVG.cpp,
- src/ImageToSVG.hpp, src/InputBuffer.cpp, src/InputBuffer.hpp,
- src/InputReader.cpp, src/InputReader.hpp, src/JFM.cpp, src/JFM.hpp,
- src/Length.cpp, src/Length.hpp, src/MD5HashFunction.hpp, src/Makefile.am,
- src/MapLine.cpp, src/MapLine.hpp, src/Matrix.cpp, src/Matrix.hpp,
- src/Message.cpp, src/Message.hpp, src/MessageException.hpp,
- src/MetafontWrapper.cpp, src/MetafontWrapper.hpp, src/MiKTeXCom.cpp,
- src/MiKTeXCom.hpp, src/NoPsSpecialHandler.cpp,
- src/NoPsSpecialHandler.hpp, src/NumericRanges.hpp, src/PDFParser.cpp,
- src/PDFParser.hpp, src/PDFToSVG.hpp, src/PSFilter.hpp,
- src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PSPattern.cpp,
- src/PSPattern.hpp, src/PSPreviewFilter.cpp, src/PSPreviewFilter.hpp,
- src/PageRanges.cpp, src/PageRanges.hpp, src/PageSize.cpp,
- src/PageSize.hpp, src/Pair.hpp, src/PapersizeSpecialHandler.cpp,
- src/PapersizeSpecialHandler.hpp, src/PathClipper.cpp,
- src/PathClipper.hpp, src/PdfSpecialHandler.cpp,
- src/PdfSpecialHandler.hpp, src/PreScanDVIReader.cpp,
- src/PreScanDVIReader.hpp, src/Process.cpp, src/Process.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/RangeMap.cpp,
- src/RangeMap.hpp, src/SVGCharHandler.cpp, src/SVGCharHandler.hpp,
- src/SVGCharHandlerFactory.cpp, src/SVGCharHandlerFactory.hpp,
- src/SVGCharPathHandler.cpp, src/SVGCharPathHandler.hpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGCharTspanTextHandler.hpp,
- src/SVGOutput.cpp, src/SVGOutput.hpp, src/SVGSingleCharTextHandler.cpp,
- src/SVGSingleCharTextHandler.hpp, src/SVGTree.cpp, src/SVGTree.hpp,
- src/ShadingPatch.cpp, src/ShadingPatch.hpp, src/SignalHandler.cpp,
- src/SignalHandler.hpp, src/SourceInput.cpp, src/SourceInput.hpp,
- src/SpecialActions.hpp, src/SpecialHandler.hpp, src/SpecialManager.cpp,
- src/SpecialManager.hpp, src/StreamReader.cpp, src/StreamReader.hpp,
- src/StreamWriter.cpp, src/StreamWriter.hpp, src/Subfont.cpp,
- src/Subfont.hpp, src/System.cpp, src/System.hpp, src/TFM.cpp,
- src/TFM.hpp, src/TTFAutohint.cpp, src/TTFAutohint.hpp,
- src/TensorProductPatch.cpp, src/TensorProductPatch.hpp, src/Terminal.cpp,
- src/Terminal.hpp, src/ToUnicodeMap.cpp, src/ToUnicodeMap.hpp,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.hpp,
- src/TriangularPatch.cpp, src/TriangularPatch.hpp, src/TrueTypeFont.cpp,
- src/TrueTypeFont.hpp, src/Unicode.cpp, src/Unicode.hpp,
- src/VFActions.hpp, src/VFReader.cpp, src/VFReader.hpp,
- src/VectorIterator.hpp, src/VectorStream.hpp, src/XMLDocument.cpp,
- src/XMLDocument.hpp, src/XMLNode.cpp, src/XMLNode.hpp, src/XMLString.cpp,
- src/XMLString.hpp, src/XXHashFunction.hpp, src/ZLibOutputStream.hpp,
- src/dvisvgm.cpp, src/ffwrapper.c, src/ffwrapper.h, src/macros.hpp,
- src/optimizer/AttributeExtractor.cpp,
- src/optimizer/AttributeExtractor.hpp, src/optimizer/DependencyGraph.hpp,
- src/optimizer/GroupCollapser.cpp, src/optimizer/GroupCollapser.hpp,
- src/optimizer/OptimizerModule.hpp,
- src/optimizer/RedundantElementRemover.cpp,
- src/optimizer/RedundantElementRemover.hpp,
- src/optimizer/SVGOptimizer.cpp, src/optimizer/SVGOptimizer.hpp,
- src/optimizer/TextSimplifier.cpp, src/optimizer/TextSimplifier.hpp,
- src/optimizer/TransformSimplifier.cpp,
- src/optimizer/TransformSimplifier.hpp, src/optimizer/WSNodeRemover.cpp,
- src/optimizer/WSNodeRemover.hpp, src/options.dtd, src/options.xml,
- src/psdefs.cpp, src/utility.cpp, src/utility.hpp, src/version.hpp,
- src/version.hpp.in, src/windows.hpp, tests/BezierTest.cpp,
- tests/BitmapTest.cpp, tests/BoundingBoxTest.cpp,
- tests/CMapManagerTest.cpp, tests/CMapReaderTest.cpp, tests/CMapTest.cpp,
- tests/CalculatorTest.cpp, tests/ColorSpecialTest.cpp,
- tests/ColorTest.cpp, tests/CommandLineTest.cpp, tests/DVIReaderTest.cpp,
- tests/DependencyGraphTest.cpp, tests/DirectoryTest.cpp,
- tests/DvisvgmSpecialTest.cpp, tests/EllipticalArcTest.cpp,
- tests/EmSpecialTest.cpp, tests/FileFinderTest.cpp,
- tests/FilePathTest.cpp, tests/FileSystemTest.cpp,
- tests/FontCacheTest.cpp, tests/FontManagerTest.cpp,
- tests/FontMapTest.cpp, tests/GFGlyphTracerTest.cpp,
- tests/GFReaderTest.cpp, tests/GhostscriptTest.cpp,
- tests/GraphicsPathTest.cpp, tests/HashFunctionTest.cpp,
- tests/JFMReaderTest.cpp, tests/LengthTest.cpp, tests/Makefile.am,
- tests/MapLineTest.cpp, tests/MatrixTest.cpp,
- tests/MessageExceptionTest.cpp, tests/PDFParserTest.cpp,
- tests/PSInterpreterTest.cpp, tests/PageRagesTest.cpp,
- tests/PageSizeTest.cpp, tests/PairTest.cpp,
- tests/PapersizeSpecialTest.cpp, tests/RangeMapTest.cpp,
- tests/SVGOutputTest.cpp, tests/ShadingPatchTest.cpp,
- tests/SpecialManagerTest.cpp, tests/SplittedCharInputBufferTest.cpp,
- tests/StreamInputBufferTest.cpp, tests/StreamReaderTest.cpp,
- tests/StreamWriterTest.cpp, tests/StringMatcherTest.cpp,
- tests/SubfontTest.cpp, tests/TFMReaderTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/ToUnicodeMapTest.cpp,
- tests/TpicSpecialTest.cpp, tests/TriangularPatchTest.cpp,
- tests/UnicodeTest.cpp, tests/UtilityTest.cpp,
- tests/VectorIteratorTest.cpp, tests/VectorStreamTest.cpp,
- tests/XMLNodeTest.cpp, tests/XMLStringTest.cpp, tests/check-conv,
- tests/create-makefile, tests/data/Makefile.am, tests/genhashcheck.py,
- tests/normalize.xsl, tests/testmain.cpp:
- updated year in copyright statements to 2021
-
-2020-12-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Calculator.cpp, tests/CalculatorTest.cpp:
- fixed a comment and added minor calculator tests
-
- * src/Calculator.cpp, src/Calculator.hpp, tests/CalculatorTest.cpp:
- use variant type for token objects in class Calculator
-
-2020-12-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontEngine.cpp:
- renamed some local variables
-
-2020-12-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontEngine.cpp:
- ensure unambiguity of GID to charcode mappings
-(fixes #147)
-
- * src/Font.cpp, src/FontEngine.cpp, src/FontEngine.hpp:
- Renamed FontEngine::buildCharMap()
-
-2020-11-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.11
-
- * NEWS:
- updated NEWS
-
-2020-11-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BasicDVIReader.cpp, src/BasicDVIReader.hpp, src/DVIReader.cpp,
- src/DVIReader.hpp:
- moved low-level DVIReader functions to BasicDVIReader
-and some code
- cleanup
-
- * src/BasicDVIReader.cpp, src/BasicDVIReader.hpp, src/DVIReader.cpp,
- src/DVIToSVG.cpp, src/PdfSpecialHandler.cpp, src/PdfSpecialHandler.hpp:
- process mapline specials before fontdefs
-to ensure all mapline
- definitions are present when registering fonts
-
-2020-11-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontMap.cpp, src/Subfont.cpp, src/Subfont.hpp,
- tests/SubfontTest.cpp:
- SubfontDefinition: replaced reference parameter with return value
-
-2020-11-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMap.cpp, src/CMap.hpp, src/Font.cpp, src/FontEncoding.cpp,
- src/FontEncoding.hpp:
- keep selected Unicode fontmap if assigned CMap maps to Unicode
-
- * src/DVIReader.cpp, src/FontManager.cpp, src/FontManager.hpp:
- added fallback for missing characters in JFM-based virtual fonts
-(closes
- #144)
-
-2020-11-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Unicode.cpp, src/Unicode.hpp, tests/UnicodeTest.cpp:
- added functions to convert surrogate pairs
-
- * src/CMap.cpp, src/CMap.hpp, src/CMapReader.cpp:
- consider surrogates when reading CMap files
-
-2020-10-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- updated FreeType to version 2.10.4
-
-2020-10-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- updated FreeType to version 2.10.3
-
-2020-09-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.10.1
-
- * NEWS:
- updated NEWS
-
-2020-09-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- added support for new GS transparency operators
-.setfillconstantalpha
- and .setstrokeconstantalpha
-
-2020-09-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLNode.cpp:
- renamed local variable
-
-2020-08-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/brotli/common/version.h:
- updated brotli to version 1.0.9
-the encoder is not affected by this
- update so the bundled subset
-only bumps the version number.
-
-2020-08-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/brotli/Makefile.am, libs/brotli/common/constants.c,
- libs/brotli/common/constants.h, libs/brotli/common/context.c,
- libs/brotli/common/context.h, libs/brotli/common/dictionary.c,
- libs/brotli/common/platform.c, libs/brotli/common/platform.h,
- libs/brotli/common/transform.c, libs/brotli/common/transform.h,
- libs/brotli/common/version.h, libs/brotli/enc/backward_references.c,
- libs/brotli/enc/backward_references.h,
- libs/brotli/enc/backward_references_hq.c,
- libs/brotli/enc/backward_references_hq.h,
- libs/brotli/enc/backward_references_inc.h,
- libs/brotli/enc/block_splitter.c, libs/brotli/enc/block_splitter_inc.h,
- libs/brotli/enc/brotli_bit_stream.c, libs/brotli/enc/cluster_inc.h,
- libs/brotli/enc/command.c, libs/brotli/enc/command.h,
- libs/brotli/enc/compress_fragment_two_pass.c,
- libs/brotli/enc/dictionary_hash.c, libs/brotli/enc/dictionary_hash.h,
- libs/brotli/enc/encode.c, libs/brotli/enc/encoder_dict.c,
- libs/brotli/enc/encoder_dict.h, libs/brotli/enc/entropy_encode.c,
- libs/brotli/enc/entropy_encode.h, libs/brotli/enc/fast_log.c,
- libs/brotli/enc/fast_log.h, libs/brotli/enc/find_match_length.h,
- libs/brotli/enc/hash.h, libs/brotli/enc/hash_composite_inc.h,
- libs/brotli/enc/hash_forgetful_chain_inc.h,
- libs/brotli/enc/hash_longest_match64_inc.h,
- libs/brotli/enc/hash_longest_match_inc.h,
- libs/brotli/enc/hash_longest_match_quickly_inc.h,
- libs/brotli/enc/hash_rolling_inc.h,
- libs/brotli/enc/hash_to_binary_tree_inc.h, libs/brotli/enc/memory.h,
- libs/brotli/enc/metablock.c, libs/brotli/enc/metablock_inc.h,
- libs/brotli/enc/params.h, libs/brotli/enc/ringbuffer.h,
- libs/brotli/enc/utf8_util.c, libs/brotli/enc/write_bits.h,
- libs/brotli/include/brotli/encode.h, libs/brotli/include/brotli/port.h:
- updated brotli to version 1.0.8
-
-2020-08-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in:
- manpage: few additions to --bbox and --font-format
-
-2020-08-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * .mailmap:
- removed redundant file
-
-2020-08-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Ghostscript.cpp:
- updated GS versioning scheme introduced with GS
- 9.53.0
-http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=0e98e2a27ed19fcc138215afe17ab1a173aeed7b
-
-2020-08-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.10
-
- * NEWS:
- updated NEWS
-
-2020-07-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in, libs/xxHash/xxh3.h,
- libs/xxHash/xxhash.h:
- updated xxHash to version 0.8
-
-2020-07-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- redefine internal GS operators .fillstroke and .eofillstroke
-They are
- used to implement PDF operators B and B*.
-(closes #139)
-
-2020-07-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/optimizer/TransformSimplifier.cpp:
- don't unwind transform attributes of image elements
-
- * src/optimizer/GroupCollapser.cpp:
- collapse groups w/o attributes first
-in order to recurse into their
- descendants.
-
- * src/optimizer/TransformSimplifier.cpp:
- optimizer: unwind transform attributes of image elements
-if it consists
- only of scaling and translations. Merge the scaled translation
-into x and
- y, and simplify the remaining matrix(...) expression to scale(...)
-
-2020-07-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLNode.cpp, src/XMLNode.hpp, src/optimizer/GroupCollapser.cpp,
- src/optimizer/RedundantElementRemover.cpp,
- src/optimizer/WSNodeRemover.cpp:
- renamed XMLNode::remove to XMLNode::detach
-
-2020-07-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/optimizer/GroupCollapser.cpp:
- don't move inner transforms to outer clipping paths
-
- * src/XMLNode.cpp:
- fixed XMLElement::unwrap
-
- * src/optimizer/GroupCollapser.cpp:
- improved optimizer module GroupCollapser
-
-2020-07-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/optimizer/SVGOptimizer.cpp:
- simplify transforms before optimizing groups
-
- * src/DvisvgmSpecialHandler.cpp:
- fixed error message about invalid closing tags
-
- * src/DVIToSVGActions.cpp:
- handle XML parser errors thrown in EOP
-
- * src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp:
- reduced number of successive XML error messages
-
- * src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp:
- renamed XMLParser::flush to XMLParser::finish
-
-2020-07-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontCache.cpp, src/HashFunction.cpp, src/HashFunction.hpp,
- src/MD5HashFunction.hpp, src/XXHashFunction.hpp,
- tests/HashFunctionTest.cpp:
- renamed HashFunction::digestValue() to HashFunction::digestBytes()
-
- * src/XXHashFunction.hpp:
- added XXHashFunction::digestValue() to get the value as encoded by
- xxhash
-
- * src/FileSystem.cpp, src/FileSystem.hpp:
- create dedicated temp folders with each call of dvisvgm
-
-2020-06-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/xxHash/xxh3.h, libs/xxHash/xxhash.c, libs/xxHash/xxhash.h:
- updated xxHash to version 0.7.4
-
-2020-06-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DvisvgmSpecialHandler.cpp, tests/DvisvgmSpecialTest.cpp:
- fixed computation of string boundaries after expanding {?(...)}
-(closes
- #136)
-
-2020-05-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- updated FreeType to version 2.10.2
-
-2020-05-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/dvisvgm.cpp:
- fixed indentation
-
-2020-04-24 John Bowman <bowman@ualberta.ca>
-
- * src/dvisvgm.cpp:
- Fix indentation.
-
-2020-04-23 John Bowman <bowman@ualberta.ca>
-
- * src/dvisvgm.cpp:
- Return error codes to shell.
-
-2020-04-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PathClipper.cpp, src/PathClipper.hpp, src/PsSpecialHandler.cpp:
- changed signature of PathClipper::intersect()
-
- * src/PathClipper.cpp, src/PathClipper.hpp:
- added unite operation to PathClipper
-
- * src/GraphicsPath.hpp, src/PsSpecialHandler.cpp:
- fixed handling of clippath/eoclip combinations
-
-2020-04-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVGActions.cpp:
- fixed bbox debug rectangles
-
- * src/Font.cpp, src/Font.hpp:
- added italic correction for fake slant
-
- * src/DVIReader.cpp, src/DVIReader.hpp, src/FontManager.cpp:
- added evaluation of LuaTeX native font definitions
-
- * src/DVIReader.cpp:
- minor code improvements
-
-2020-04-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- fixed PS operator 'eoclip'
-
-2020-03-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/optimizer/TransformSimplifier.cpp:
- optimizer: fixed omission of second scale() parameter
-
-2020-03-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Matrix.cpp:
- fixed parsing of "scale(s)"
-fixes #131
-
- * .appveyor.yml, .travis.yml, configure.ac, doc/dvisvgm.1, src/Doxyfile,
- src/version.hpp:
- set version to 2.9.1
-
- * NEWS:
- updated NEWS
-
-2020-03-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Calculator.cpp, tests/CalculatorTest.cpp:
- calculator: allow to omit '*' before '('
-
-2020-03-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.1, doc/dvisvgm.txt.in, src/DvisvgmSpecialHandler.cpp,
- tests/DvisvgmSpecialTest.cpp:
- added macro {?(expr)} to enable math expressions in raw specials
-closes
- #130
-
-2020-03-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am, doc/conf-dblatex-pdf.xsl, doc/dvisvgm.txt.in,
- doc/generate-dvisvgm-sty.xsl, doc/tweak-dblatex-tex.py:
- optimize line breaks and code blocks in pdf manpage
-
-2020-03-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/conf-dblatex-pdf.xsl:
- small font changes in pdf version of manual page
-- changed body font to
- Source Serif Pro
-- scaled monospace font by 0.9
-
- * src/PageRanges.cpp, src/PageRanges.hpp:
- removed redundant #includes
-
- * src/NumericRanges.hpp:
- replaced explicit iterator type with auto
-
-2020-03-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS:
- updated NEWS and vc/README
-
-2020-03-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.1:
- added generated man page to repo
-
-2020-03-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- fixed xshow, yshow, and xyshow for multi-byte characters
-
-2020-03-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Matrix.cpp:
- replaced istream::ignore() with istream::get()
-to make gcc on NetBSD
- happy
-
- * .travis.yml:
- travis: added packages required to build man page
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.9
-
-2020-03-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- create image files in tmpdir instead of cwd
-
- * src/PsSpecialHandler.cpp:
- fixed mime type of JPEG images
-
- * src/utility.hpp:
- base64_copy: added parameter to set line length
-
- * src/XMLNode.cpp:
- wrap lines with base64 image data (200 chars/line)
-
- * doc/Makefile.am:
- make install: use existing dvisvgm.1 if it can't be rebuilt
-However,
- "make dist" and "make distcheck" should still fail if the man page
-can't
- be built in order to ensure the tarball always contains a recent version.
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp:
- some code cleanup
-
-2020-03-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/PSInterpreter.cpp:
- added bitmap format 'none' to disable image processing
-
-2020-03-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/psdefs.cpp:
- added image support for various JPEG and PNG variants
-
- * doc/dvisvgm.txt.in, src/CommandLine.hpp, src/dvisvgm.cpp,
- src/options.xml:
- added command-line option --bitmap-format
-
- * doc/generate-dvisvgm-sty.xsl:
- manual page: reduce distance of table rows
-
-2020-03-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/xxHash/xxh3.h, libs/xxHash/xxhash.c, libs/xxHash/xxhash.h,
- tests/HashFunctionTest.cpp:
- updated xxhash to version 0.7.3
-
-2020-03-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GlyphTracerMessages.hpp:
- suppress tracer messages if no font info available
-
- * src/MetafontWrapper.cpp, src/MetafontWrapper.hpp:
- added fallback method to get GF resolution applied by Metafont
-
-2020-02-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- fixed potential segfault
-
- * src/Bezier.cpp, src/BoundingBox.cpp, src/Font.cpp, src/FontWriter.cpp,
- src/Matrix.cpp, src/TensorProductPatch.cpp, src/TriangularPatch.cpp:
- replaced fabs() with std::abs()
-
-2020-02-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLNode.cpp:
- fixed copy constructor of XMLElement
-
- * src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- fixed broken handling of PS tiling patterns
-
- * src/PSPattern.cpp:
- simplified loop expression
-
- * src/XMLNode.cpp, src/optimizer/RedundantElementRemover.cpp:
- don't remove clipPath elements if referenced in patterns
-
- * src/PsSpecialHandler.cpp:
- don't add clip path to path elements in pattern definitions
-
-2020-02-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- store image counter in globaldict
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/XMLNode.cpp,
- src/XMLNode.hpp, src/dvisvgm.cpp:
- don't keep encoded image data in memory
-To prevent memory issues, add
- the base64-encoded image data when serializing
-the XML tree.
-
- * src/PsSpecialHandler.cpp:
- prevent access to invalid vector component
-
- * src/XMLNode.cpp, src/XMLNode.hpp:
- prevent deep destructor recursion of XML nodes
-
- * src/psdefs.cpp:
- PS handler: prevent write access to protected pattern dictionary
-
-2020-02-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- don't access DataSource for shading types < 4
-
-2020-02-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- apply clip path to image if present
-
- * src/optimizer/TransformSimplifier.cpp:
- TransformSimplifier: prevent width/height from getting negative
-
- * src/Font.cpp, src/GraphicsPath.hpp, src/PsSpecialHandler.cpp,
- tests/GraphicsPathTest.cpp:
- changed signature of GraphicsPath::computeBBox()
-
-2020-02-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- image operator: reset output device correctly
-
-2020-02-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp, src/psdefs.cpp:
- stop image processing if PNG devices are unavailable
-Handling of PS
- operator 'image' relies on the GS output devices 'png16m' and
-'pnggray'
- (depending on the current color space). If they are unavailable,
- the
-image processing is stopped now instead of leaving GS with an
- internal error.
-
- * src/PsSpecialHandler.cpp:
- adapt bounding box to enclose embedded bitmaps
-
-2020-02-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/EPSToSVG.hpp, src/ImageToSVG.cpp, src/ImageToSVG.hpp,
- src/PDFToSVG.hpp:
- fixed getCurrentPageNumber() for EPS and PDF files
-
- * src/FilePath.cpp, src/FilePath.hpp, tests/FilePathTest.cpp:
- FilePath::suffix("") now removes the suffix if present
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/psdefs.cpp:
- sync location and base name of temporary PNG files with SVG file
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/dvisvgm.cpp,
- src/psdefs.cpp:
- remove temporary PNG files if --keep is not given
-
-2020-02-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- added evaluation of PS Level 1 image operators
-
-2020-02-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Matrix.cpp, tests/MatrixTest.cpp:
- fixed row/column issue in Matrix::invert()
-
- * src/FontWriter.cpp, src/utility.hpp:
- added wrapper function for util::base64_copy()
-
- * src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- added processing of PS image operator
-
-2020-02-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- manpage: added info on default values listed by --help
-
-2020-01-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPathParser.hpp, src/Makefile.am,
- tests/GraphicsPathParserTest.cpp, tests/Makefile.am:
- added class to parse SVG path commands
-
-2020-01-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPath.hpp:
- arcto: use template type for rx and ry instead of double
-
-2020-01-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PageSize.cpp:
- replaced floor(x+0.5) with round(x)
-
-2020-01-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Ghostscript.cpp:
- added check for libgs.dylib.N (Mac only)
-
-2020-01-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, README, README.md, configure.ac, doc/Makefile.am,
- doc/conf-dblatex-man.xsl, doc/conf-dblatex-pdf.xsl, doc/db2html.xsl,
- doc/dvisvgm.txt.in, doc/tweak-db-article.xsl, doc/tweak-db-refentry.xsl,
- doc/tweak-dblatex-pdf.xsl, libs/Makefile.am,
- libs/ff-woff/fontforge/tmpfile2.cpp, src/AGLTable.hpp,
- src/BasicDVIReader.cpp, src/BasicDVIReader.hpp, src/Bezier.cpp,
- src/Bezier.hpp, src/BgColorSpecialHandler.cpp,
- src/BgColorSpecialHandler.hpp, src/Bitmap.cpp, src/Bitmap.hpp,
- src/BoundingBox.cpp, src/BoundingBox.hpp, src/CLCommandLine.cpp,
- src/CLCommandLine.hpp, src/CLOption.hpp, src/CMap.cpp, src/CMap.hpp,
- src/CMapManager.cpp, src/CMapManager.hpp, src/CMapReader.cpp,
- src/CMapReader.hpp, src/Calculator.cpp, src/Calculator.hpp,
- src/CharMapID.cpp, src/CharMapID.hpp, src/Character.hpp, src/Color.cpp,
- src/Color.hpp, src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.hpp,
- src/CommandLine.hpp, src/DLLoader.cpp, src/DLLoader.hpp,
- src/DVIActions.hpp, src/DVIReader.cpp, src/DVIReader.hpp,
- src/DVIToSVG.cpp, src/DVIToSVG.hpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.hpp, src/Directory.cpp, src/Directory.hpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/EPSFile.cpp, src/EPSFile.hpp, src/EPSToSVG.hpp,
- src/EllipticalArc.cpp, src/EllipticalArc.hpp, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.hpp, src/EncFile.cpp, src/EncFile.hpp,
- src/FileFinder.cpp, src/FileFinder.hpp, src/FilePath.cpp,
- src/FilePath.hpp, src/FileSystem.cpp, src/FileSystem.hpp,
- src/FixWord.hpp, src/Font.cpp, src/Font.hpp, src/FontCache.cpp,
- src/FontCache.hpp, src/FontEncoding.cpp, src/FontEncoding.hpp,
- src/FontEngine.cpp, src/FontEngine.hpp, src/FontManager.cpp,
- src/FontManager.hpp, src/FontMap.cpp, src/FontMap.hpp,
- src/FontMetrics.cpp, src/FontMetrics.hpp, src/FontStyle.hpp,
- src/FontWriter.cpp, src/FontWriter.hpp, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.hpp, src/GFReader.cpp, src/GFReader.hpp,
- src/GFTracer.cpp, src/GFTracer.hpp, src/Ghostscript.cpp,
- src/Ghostscript.hpp, src/Glyph.hpp, src/GlyphTracerMessages.hpp,
- src/GraphicsPath.hpp, src/HashFunction.cpp, src/HashFunction.hpp,
- src/HtmlSpecialHandler.cpp, src/HtmlSpecialHandler.hpp,
- src/HyperlinkManager.cpp, src/HyperlinkManager.hpp, src/ImageToSVG.cpp,
- src/ImageToSVG.hpp, src/InputBuffer.cpp, src/InputBuffer.hpp,
- src/InputReader.cpp, src/InputReader.hpp, src/JFM.cpp, src/JFM.hpp,
- src/Length.cpp, src/Length.hpp, src/MD5HashFunction.hpp, src/Makefile.am,
- src/MapLine.cpp, src/MapLine.hpp, src/Matrix.cpp, src/Matrix.hpp,
- src/Message.cpp, src/Message.hpp, src/MessageException.hpp,
- src/MetafontWrapper.cpp, src/MetafontWrapper.hpp, src/MiKTeXCom.cpp,
- src/MiKTeXCom.hpp, src/NoPsSpecialHandler.cpp,
- src/NoPsSpecialHandler.hpp, src/NumericRanges.hpp, src/PDFParser.cpp,
- src/PDFParser.hpp, src/PDFToSVG.hpp, src/PSFilter.hpp,
- src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PSPattern.cpp,
- src/PSPattern.hpp, src/PSPreviewFilter.cpp, src/PSPreviewFilter.hpp,
- src/PageRanges.cpp, src/PageRanges.hpp, src/PageSize.cpp,
- src/PageSize.hpp, src/Pair.hpp, src/PapersizeSpecialHandler.cpp,
- src/PapersizeSpecialHandler.hpp, src/PathClipper.cpp,
- src/PathClipper.hpp, src/PdfSpecialHandler.cpp,
- src/PdfSpecialHandler.hpp, src/PreScanDVIReader.cpp,
- src/PreScanDVIReader.hpp, src/Process.cpp, src/Process.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/RangeMap.cpp,
- src/RangeMap.hpp, src/SVGCharHandler.cpp, src/SVGCharHandler.hpp,
- src/SVGCharHandlerFactory.cpp, src/SVGCharHandlerFactory.hpp,
- src/SVGCharPathHandler.cpp, src/SVGCharPathHandler.hpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGCharTspanTextHandler.hpp,
- src/SVGOutput.cpp, src/SVGOutput.hpp, src/SVGSingleCharTextHandler.cpp,
- src/SVGSingleCharTextHandler.hpp, src/SVGTree.cpp, src/SVGTree.hpp,
- src/ShadingPatch.cpp, src/ShadingPatch.hpp, src/SignalHandler.cpp,
- src/SignalHandler.hpp, src/SourceInput.cpp, src/SourceInput.hpp,
- src/SpecialActions.hpp, src/SpecialHandler.hpp, src/SpecialManager.cpp,
- src/SpecialManager.hpp, src/StreamReader.cpp, src/StreamReader.hpp,
- src/StreamWriter.cpp, src/StreamWriter.hpp, src/Subfont.cpp,
- src/Subfont.hpp, src/System.cpp, src/System.hpp, src/TFM.cpp,
- src/TFM.hpp, src/TTFAutohint.cpp, src/TTFAutohint.hpp,
- src/TensorProductPatch.cpp, src/TensorProductPatch.hpp, src/Terminal.cpp,
- src/Terminal.hpp, src/ToUnicodeMap.cpp, src/ToUnicodeMap.hpp,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.hpp,
- src/TriangularPatch.cpp, src/TriangularPatch.hpp, src/TrueTypeFont.cpp,
- src/TrueTypeFont.hpp, src/Unicode.cpp, src/Unicode.hpp,
- src/VFActions.hpp, src/VFReader.cpp, src/VFReader.hpp,
- src/VectorIterator.hpp, src/VectorStream.hpp, src/XMLDocument.cpp,
- src/XMLDocument.hpp, src/XMLNode.cpp, src/XMLNode.hpp, src/XMLString.cpp,
- src/XMLString.hpp, src/XXHashFunction.hpp, src/ZLibOutputStream.hpp,
- src/dvisvgm.cpp, src/ffwrapper.c, src/ffwrapper.h, src/macros.hpp,
- src/optimizer/AttributeExtractor.cpp,
- src/optimizer/AttributeExtractor.hpp, src/optimizer/DependencyGraph.hpp,
- src/optimizer/GroupCollapser.cpp, src/optimizer/GroupCollapser.hpp,
- src/optimizer/OptimizerModule.hpp,
- src/optimizer/RedundantElementRemover.cpp,
- src/optimizer/RedundantElementRemover.hpp,
- src/optimizer/SVGOptimizer.cpp, src/optimizer/SVGOptimizer.hpp,
- src/optimizer/TextSimplifier.cpp, src/optimizer/TextSimplifier.hpp,
- src/optimizer/TransformSimplifier.cpp,
- src/optimizer/TransformSimplifier.hpp, src/optimizer/WSNodeRemover.cpp,
- src/optimizer/WSNodeRemover.hpp, src/options.dtd, src/options.xml,
- src/psdefs.cpp, src/utility.cpp, src/utility.hpp, src/version.hpp,
- src/version.hpp.in, src/windows.hpp, tests/BezierTest.cpp,
- tests/BitmapTest.cpp, tests/BoundingBoxTest.cpp,
- tests/CMapManagerTest.cpp, tests/CMapReaderTest.cpp, tests/CMapTest.cpp,
- tests/CalculatorTest.cpp, tests/ColorSpecialTest.cpp,
- tests/ColorTest.cpp, tests/CommandLineTest.cpp, tests/DVIReaderTest.cpp,
- tests/DependencyGraphTest.cpp, tests/DirectoryTest.cpp,
- tests/DvisvgmSpecialTest.cpp, tests/EllipticalArcTest.cpp,
- tests/EmSpecialTest.cpp, tests/FileFinderTest.cpp,
- tests/FilePathTest.cpp, tests/FileSystemTest.cpp,
- tests/FontCacheTest.cpp, tests/FontManagerTest.cpp,
- tests/FontMapTest.cpp, tests/GFGlyphTracerTest.cpp,
- tests/GFReaderTest.cpp, tests/GhostscriptTest.cpp,
- tests/GraphicsPathTest.cpp, tests/HashFunctionTest.cpp,
- tests/JFMReaderTest.cpp, tests/LengthTest.cpp, tests/Makefile.am,
- tests/MapLineTest.cpp, tests/MatrixTest.cpp,
- tests/MessageExceptionTest.cpp, tests/PDFParserTest.cpp,
- tests/PSInterpreterTest.cpp, tests/PageRagesTest.cpp,
- tests/PageSizeTest.cpp, tests/PairTest.cpp,
- tests/PapersizeSpecialTest.cpp, tests/RangeMapTest.cpp,
- tests/SVGOutputTest.cpp, tests/ShadingPatchTest.cpp,
- tests/SpecialManagerTest.cpp, tests/SplittedCharInputBufferTest.cpp,
- tests/StreamInputBufferTest.cpp, tests/StreamReaderTest.cpp,
- tests/StreamWriterTest.cpp, tests/StringMatcherTest.cpp,
- tests/SubfontTest.cpp, tests/TFMReaderTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/ToUnicodeMapTest.cpp,
- tests/TpicSpecialTest.cpp, tests/TriangularPatchTest.cpp,
- tests/UnicodeTest.cpp, tests/UtilityTest.cpp,
- tests/VectorIteratorTest.cpp, tests/VectorStreamTest.cpp,
- tests/XMLNodeTest.cpp, tests/XMLStringTest.cpp, tests/check-conv,
- tests/create-makefile, tests/data/Makefile.am, tests/genhashcheck.py,
- tests/normalize.xsl, tests/testmain.cpp:
- updated year in copyright statements to 2020
-
-2019-12-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- few additions to the manual page
-
-2019-12-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS:
- updated NEWS
-
-2019-12-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.8.2
-
-2019-12-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileSystem.cpp:
- convert path separators only in Windows binaries
-
- * src/Process.cpp:
- Subprocess: handle absolute path to executable correctly
-
- * src/FileFinder.cpp, src/FileFinder.hpp:
- added FileFinder::lookupExecutable()
-
- * src/MetafontWrapper.cpp:
- call 'mf-nowin' instead of 'mf' if available (closes #121)
-
-2019-12-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSInterpreter.cpp:
- adapt path separators before passing them to Ghostscript
-closes #123
-
- * src/FilePath.cpp, src/FileSystem.cpp, src/FileSystem.hpp,
- src/PSInterpreter.cpp, src/PsSpecialHandler.cpp, src/dvisvgm.cpp:
- renamed adaptPathSeperators() to ensureForwardSlashes()
-
- * src/Calculator.hpp, src/CharMapID.hpp, src/Color.hpp, src/Directory.cpp,
- src/Directory.hpp, src/FixWord.hpp, src/FontStyle.hpp,
- src/GFGlyphTracer.cpp, src/GFGlyphTracer.hpp, src/GFReader.cpp,
- src/GFReader.hpp, src/GFTracer.cpp, src/GFTracer.hpp,
- src/GlyphTracerMessages.hpp, src/HtmlSpecialHandler.hpp,
- src/HyperlinkManager.hpp, src/Length.hpp, src/NoPsSpecialHandler.hpp,
- src/PSPreviewFilter.cpp, src/PSPreviewFilter.hpp, src/PathClipper.hpp,
- src/PreScanDVIReader.cpp, src/PreScanDVIReader.hpp, src/Process.cpp,
- src/PsSpecialHandler.hpp, src/RangeMap.hpp, src/SVGOutput.cpp,
- src/SVGOutput.hpp, src/SignalHandler.cpp, src/SignalHandler.hpp,
- src/TFM.hpp, src/VFReader.cpp, src/VFReader.hpp, src/VectorStream.hpp:
- simplified constructors, avoid constant initializers
-
- * src/FileSystem.cpp, src/FileSystem.hpp:
- removed redundant class variable
-
- * src/MiKTeXCom.cpp:
- fixed type mismatch of FindFile expression
-
-2019-12-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- fixed handling of 'nulldevice' in PS operator 'restore'
-closes #122
-
-2019-11-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPath.hpp:
- added missing namespace prefix to pow()
-
-2019-11-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, README.md:
- updated NEWS and README
-
-2019-11-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.8.1
-
- * doc/dvisvgm.txt.in:
- some minor changes of the manual page
-
-2019-11-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- added newline at end of file
-
-2019-11-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/optimizer/GroupCollapser.hpp:
- made GroupCollapser::moveAttributes() static
-
- * doc/dvisvgm.txt.in, src/optimizer/Makefile.am,
- src/optimizer/SVGOptimizer.cpp, src/optimizer/TextSimplifier.cpp,
- src/optimizer/TextSimplifier.hpp:
- added optimizer module TextSimplifier
-
- * doc/dvisvgm.txt.in, src/XMLNode.hpp,
- src/optimizer/AttributeExtractor.hpp, src/optimizer/TextSimplifier.cpp:
- extended functionality of optimizer module 'simplify-text'
-- common
- attributes of tspans are moved to the enclosing text element
-- tspans
- without attributes are unwrapped
-
-2019-11-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVGActions.cpp, src/DVIToSVGActions.hpp,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.hpp:
- removed some constant initializers from constructors
-
- * src/DVIToSVGActions.cpp, src/DVIToSVGActions.hpp,
- src/EmSpecialHandler.cpp, src/PSInterpreter.cpp, src/PSInterpreter.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp,
- src/SpecialActions.hpp, src/TpicSpecialHandler.cpp, src/psdefs.cpp,
- tests/PSInterpreterTest.cpp:
- added support for PS operator 'nulldevice'
-
-2019-10-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp:
- added PNG, JPEG, and SVG to supported formats of FileFinder
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp:
- psfile: create absolute or relative paths to reference images
-depending
- on the file location and the file path given by the user
-
-2019-10-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FilePath.cpp, src/FilePath.hpp:
- added method to check if a path is absolute or relative
-
-2019-10-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMapReader.cpp, src/CMapReader.hpp, tests/CMapReaderTest.cpp:
- CMapReader: extracted common code; added test for 'begincidchar'
-
-2019-10-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/Makefile.am, tests/create-makefile:
- added missing gtest file to distribution
-
- * tests/FontCacheTest.cpp:
- remove temporary files created by FontCacheTest
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.8
-
- * NEWS:
- updated NEWS
-
-2019-10-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMapReader.cpp, src/CMapReader.hpp:
- CMapReader: added support for operator 'begincidchar' (patch by Akira
- Kakuto)
-
-2019-10-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/DVIToSVG.hpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.hpp, src/FilePath.cpp, src/FilePath.hpp,
- src/HyperlinkManager.cpp, src/ImageToSVG.cpp, src/ImageToSVG.hpp,
- src/PDFToSVG.hpp, src/SVGOutput.cpp, src/SVGOutput.hpp,
- src/SpecialActions.hpp, tests/FilePathTest.cpp, tests/SVGOutputTest.cpp:
- SVGOutput: renamed 'filename' to 'filepath'; changed return type to
- FilePath
-
-2019-10-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/gtest/include/gtest/gtest-death-test.h,
- tests/gtest/include/gtest/gtest-matchers.h,
- tests/gtest/include/gtest/gtest-message.h,
- tests/gtest/include/gtest/gtest-param-test.h,
- tests/gtest/include/gtest/gtest-printers.h,
- tests/gtest/include/gtest/gtest-spi.h,
- tests/gtest/include/gtest/gtest-test-part.h,
- tests/gtest/include/gtest/gtest-typed-test.h,
- tests/gtest/include/gtest/gtest.h,
- tests/gtest/include/gtest/gtest_pred_impl.h,
- tests/gtest/include/gtest/internal/gtest-death-test-internal.h,
- tests/gtest/include/gtest/internal/gtest-filepath.h,
- tests/gtest/include/gtest/internal/gtest-internal.h,
- tests/gtest/include/gtest/internal/gtest-param-util.h,
- tests/gtest/include/gtest/internal/gtest-port-arch.h,
- tests/gtest/include/gtest/internal/gtest-port.h,
- tests/gtest/include/gtest/internal/gtest-string.h,
- tests/gtest/include/gtest/internal/gtest-type-util.h,
- tests/gtest/src/gtest-all.cc, tests/gtest/src/gtest-death-test.cc,
- tests/gtest/src/gtest-filepath.cc, tests/gtest/src/gtest-internal-inl.h,
- tests/gtest/src/gtest-matchers.cc, tests/gtest/src/gtest-port.cc,
- tests/gtest/src/gtest-printers.cc, tests/gtest/src/gtest-test-part.cc,
- tests/gtest/src/gtest-typed-test.cc, tests/gtest/src/gtest.cc,
- tests/gtest/src/gtest_main.cc, tests/testutil.hpp:
- updated gtest to version 1.10
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp:
- psfile: added support for PDF, JPG, PNG, and SVG files
-
- * src/optimizer/TransformSimplifier.cpp,
- src/optimizer/TransformSimplifier.hpp:
- try to incorporate transformations into positional and size attributes
-
- * src/PsSpecialHandler.cpp:
- PS handler: minor code enhancements
-
-2019-10-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSInterpreter.cpp:
- call GS with -dDELAYSAFER if GS version >= 9.50
-Ghostscript 9.50
- introduced incompatible changes regarding SAFER which is now
-active by
- default. This conflicts with DELAYBIND and WRITESYSTEMDICT, which
- are
-necessary for dvisvgm to work
- correctly.
-https://www.ghostscript.com/doc/9.50/Use.htm#Safer
-
- * tests/HashFunctionTest.cpp:
- adapted XXH128 tests to changes in xxhash 0.7.2
-
-2019-10-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/xxHash/xxh3.h, libs/xxHash/xxhash.c, libs/xxHash/xxhash.h:
- updated xxhash to version 0.7.2
-
-2019-10-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/EllipticalArc.cpp:
- minor changes in EllipticalArc.cpp
-
-2019-09-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PathClipper.cpp:
- prevent warnings about uninitialized variables
-
-2019-09-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/potrace/auxiliary.h, libs/potrace/bitmap.h, libs/potrace/config.h,
- libs/potrace/curve.c, libs/potrace/curve.h, libs/potrace/decompose.c,
- libs/potrace/decompose.h, libs/potrace/lists.h,
- libs/potrace/potracelib.c, libs/potrace/potracelib.h,
- libs/potrace/progress.h, libs/potrace/trace.c, libs/potrace/trace.h:
- updated potrace to version 1.16
-
- * src/Bitmap.cpp, src/Bitmap.hpp:
- minor code cleanup of Bitmap class
-
-2019-09-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPath.hpp:
- renamed misspelled variables 'largeArgFlag' to 'largeArcFlag'
-
- * src/EllipticalArc.cpp:
- removed #include "debug.h"
-
-2019-09-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/src/glyph.cc, libs/woff2/src/normalize.cc:
- fixed two compiler warnings in libwoff2
-regarding signed/unsigned
- comparison
-
-2019-08-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XXHashFunction.hpp, tests/HashFunctionTest.cpp:
- simplified implementation of XXHashFunction::digestValue() and tests
-
-2019-08-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/StreamReader.cpp, src/StreamReader.hpp, src/VFReader.cpp,
- tests/StreamReaderTest.cpp:
- removed vector reference from StreamReader::readBytes()
-
- * src/CRC32.cpp, src/CRC32.hpp, src/FontCache.cpp, src/FontCache.hpp,
- src/HashFunction.cpp, src/HashFunction.hpp, src/Makefile.am,
- src/StreamReader.cpp, src/StreamReader.hpp, src/StreamWriter.cpp,
- src/StreamWriter.hpp, src/XXHashFunction.hpp, src/utility.hpp,
- tests/CRC32Test.cpp, tests/FontCacheTest.cpp, tests/Makefile.am,
- tests/StreamReaderTest.cpp, tests/StreamWriterTest.cpp:
- replaced CRC32 cache checksums with XXH32 hashes
-
-2019-08-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, libs/xxHash/xxhash.h, src/HashFunction.cpp,
- src/XXHashFunction.hpp, tests/HashFunctionTest.cpp:
- added support for the experimental 128-bit XXH3 algorithm
-
-2019-08-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPath.hpp:
- avoid redundant sequences of closepath (z/Z) commands
-
-2019-08-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPath.hpp, tests/GraphicsPathTest.cpp:
- added short versions of 'quadto' and 'cubicto' to GraphicsPath
-
-2019-08-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TpicSpecialHandler.cpp, tests/TpicSpecialTest.cpp:
- use class EllipticalArc to process arcs in tpic handler
-
-2019-08-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/xxHash/Makefile.am, libs/xxHash/xxh3.h, libs/xxHash/xxhash.c,
- libs/xxHash/xxhash.h:
- updated xxhash to version 0.7.1
-
- * src/DVIToSVG.cpp:
- print error message on wrong page hash arguments
-
-2019-08-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/EllipticalArc.cpp, src/EllipticalArc.hpp, src/GraphicsPath.hpp,
- tests/EllipticalArcTest.cpp, tests/GraphicsPathTest.cpp:
- added GraphicsPath::approximateArcs()
-
-2019-08-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bezier.cpp, src/Bezier.hpp, src/EllipticalArc.cpp,
- src/EllipticalArc.hpp, src/GraphicsPath.hpp, src/Makefile.am,
- src/Pair.hpp, src/utility.cpp, src/utility.hpp,
- tests/EllipticalArcTest.cpp, tests/Makefile.am:
- added support of 'arcto' command to class GraphicsPath
-
-2019-08-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bezier.cpp, src/Bezier.hpp, src/PsSpecialHandler.cpp,
- src/ShadingPatch.hpp, src/TensorProductPatch.cpp,
- src/TensorProductPatch.hpp, src/TriangularPatch.cpp,
- src/TriangularPatch.hpp, tests/BezierTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/TriangularPatchTest.cpp:
- getBBox(): replaced reference parameter with return value
-
- * src/PsSpecialHandler.cpp, src/ShadingPatch.hpp,
- src/TensorProductPatch.cpp, src/TensorProductPatch.hpp,
- src/TriangularPatch.cpp, src/TriangularPatch.hpp,
- tests/TensorProductPatchTest.cpp, tests/TriangularPatchTest.cpp:
- getBoundaryPath(): replaced reference parameter with return value
-
-2019-08-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.cpp, src/Pair.hpp:
- use std::hypot() to compute length of vector
-
-2019-08-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/MD5HashFunction.hpp:
- removed 'explicit' from default constructor
-Work around for C++11 bug in
- GCC 4.8:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58255
-
- * src/FontCache.cpp, src/FontEngine.cpp, src/FontWriter.cpp,
- src/GraphicsPath.hpp, src/Pair.hpp, src/PathClipper.cpp,
- src/TpicSpecialHandler.cpp, src/optimizer/CMakeLists.txt,
- src/optimizer/Makefile.am, tests/FontCacheTest.cpp,
- tests/GraphicsPathTest.cpp:
- redesigned implementation of class GraphicsPath
-- use variant instances
- to store path commands instead of plain structs
-- process commands in
- visitor objects
-- removed GraphicsPath::Actions::draw() that exposed
- implemenation details
-- simplify iterate() method
-
-2019-07-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontCache.cpp:
- use direct string concatenation instead of temporary string stream
-
-2019-07-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am:
- added missing dependency to Makefile rule
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.7.4
-
- * NEWS:
- updated NEWS
-
-2019-07-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am:
- moved generation of dvisvgm.sty to separate rule
-
-2019-07-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.cpp:
- use std::round to round color value (fixes #116)
-
- * doc/Makefile.am, doc/dvisvgm.sty, doc/dvisvgm.txt.in,
- doc/generate-dvisvgm-sty.xsl, doc/tweak-db-article.xsl,
- doc/tweak-db-refentry.xsl:
- show revision date given in doc/dvisvgm.txt on manual page
-rather than
- the build date
-
-2019-07-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TrueTypeFont.cpp:
- call ofstream constructor with std::string instead of C string
-
-2019-07-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/MetafontWrapper.cpp:
- replaced atoi() with stoi()
-
-2019-07-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/MetafontWrapper.cpp:
- don't access moved string
-
- * doc/dvisvgm.txt.in, src/dvisvgm.cpp:
- changed cache location to $XDG_CACHE_HOME/dvisvgm
-or ~/.cache/dvisvgm if
- $XDG_CACHE_HOME is not set (closes #112)
-
-2019-07-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.7.3
-
- * NEWS:
- updated NEWS
-
-2019-07-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLString.cpp, src/utility.cpp, src/utility.hpp,
- tests/UtilityTest.cpp:
- added util::to_string(double) that strips trailing zeros
-(in contrast to
- std::to_string)
-
- * src/CMapManager.cpp, src/CMapReader.cpp, src/DVIReader.cpp,
- src/GFReader.cpp, src/JFM.cpp, src/Length.cpp, src/MapLine.cpp,
- src/Matrix.cpp, src/PDFParser.cpp, src/SVGOutput.cpp, src/VFReader.cpp:
- replaced some string streams with plain strings
-
-2019-07-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * README.md:
- updated badges in README
-
- * src/Font.cpp, src/Font.hpp, src/dvisvgm.cpp:
- changed type of CACHE_PATH to std::string
-
-2019-07-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * .github/FUNDING.yml:
- added funding.yml
-
-2019-07-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp:
- properly assign collected chars to unique fonts (fixes #110)
-
-2019-06-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- manpage: updated \special example
-
-2019-06-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BasicDVIReader.cpp:
- replaced string streams with plain strings
-
-2019-06-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/genhashcheck.py:
- use range-based loop to iterate over C array
-
-2019-06-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.7.2
-
- * NEWS:
- updated NEWS
-
-2019-05-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- 'GS_PDF_ProcSet' and 'pdfdict' are private as of GS 9.27
-As a workaround
- 'runpdfbegin' and 'runpdfend' can be used to enter/leave the
- dictionaries.
-
-2019-05-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.7.1
-
- * NEWS:
- updated NEWS
-
-2019-05-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .gitignore, src/MiKTeXCom.hpp:
- added files required to access the MiKTeX session object
-
-2019-05-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- pop unused operand in PS operator 'setmatrix' (closes #106)
-
-2019-04-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/optimizer/AttributeExtractor.cpp, src/optimizer/GroupCollapser.cpp,
- src/utility.hpp:
- removed util::make_array() due to compatibility
- issues
-https://trac.macports.org/ticket/58347
-
-2019-04-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md:
- updated URL of FontForge website
-
-2019-04-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * README.md:
- removed Coverity badge as the service seems to be dead
-
-2019-04-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Makefile.am:
- add file windows.hpp to source tarball
-
-2019-04-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.7
-
- * NEWS:
- updated NEWS
-
-2019-04-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/DvisvgmSpecialHandler.cpp:
- added specials "bbox lock" and "bbox unlock" to lock/unlock the page
- bbox
-(closes #105)
-
- * doc/dvisvgm.txt.in, src/DvisvgmSpecialHandler.cpp:
- added optional modifier 'transform' to the dvisvgm:bbox specials
-
- * doc/dvisvgm.txt.in, src/DvisvgmSpecialHandler.cpp:
- added macro {?matrix} to raw specials
-
-2019-04-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bezier.cpp, src/BoundingBox.hpp, src/CMap.hpp, src/CMapReader.hpp,
- src/Character.hpp, src/Color.hpp, src/DLLoader.hpp, src/Directory.cpp,
- src/Directory.hpp, src/DvisvgmSpecialHandler.cpp, src/EPSFile.hpp,
- src/EncFile.hpp, src/FilePath.hpp, src/Font.hpp, src/FontEncoding.hpp,
- src/FontMap.hpp, src/FontWriter.cpp, src/FontWriter.hpp,
- src/GFTracer.hpp, src/GlyphTracerMessages.hpp, src/GraphicsPath.hpp,
- src/InputBuffer.hpp, src/InputReader.hpp, src/JFM.hpp, src/Length.hpp,
- src/MD5HashFunction.hpp, src/MapLine.hpp, src/Matrix.cpp, src/Matrix.hpp,
- src/Message.hpp, src/PDFParser.cpp, src/PDFParser.hpp, src/PSPattern.hpp,
- src/PSPreviewFilter.hpp, src/PageSize.hpp, src/Pair.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp,
- src/SVGCharHandler.hpp, src/SVGCharTspanTextHandler.hpp,
- src/SVGOutput.hpp, src/SVGSingleCharTextHandler.hpp,
- src/ShadingPatch.hpp, src/SourceInput.hpp, src/StreamReader.hpp,
- src/StreamWriter.hpp, src/TFM.hpp, src/TensorProductPatch.hpp,
- src/TriangularPatch.hpp, src/TrueTypeFont.hpp, src/VFReader.cpp,
- src/VFReader.hpp, src/VectorIterator.hpp, src/VectorStream.hpp,
- src/XMLDocument.hpp, src/XMLString.hpp, src/XXHashFunction.hpp,
- src/optimizer/DependencyGraph.hpp:
- marked most constructors 'explicit' if they may be called with a single
- parameter
-
- * src/DVIReader.cpp, src/DVIToSVG.cpp, src/DVIToSVGActions.cpp,
- src/Font.cpp, src/FontEngine.cpp, src/FontManager.cpp,
- src/HyperlinkManager.cpp, src/ImageToSVG.cpp, src/PDFParser.hpp,
- src/PSInterpreter.cpp, src/PdfSpecialHandler.cpp,
- src/PsSpecialHandler.cpp, src/SVGCharHandler.cpp,
- src/SVGCharPathHandler.cpp, src/SVGCharTspanTextHandler.cpp,
- src/SVGTree.cpp, src/TensorProductPatch.cpp, src/TriangularPatch.cpp,
- src/TrueTypeFont.cpp:
- use automatic type deduction in conjunction with casts
-
- * src/EPSFile.cpp, src/EmSpecialHandler.cpp, src/EncFile.cpp,
- src/InputReader.cpp, src/PSInterpreter.cpp, src/PsSpecialHandler.cpp,
- src/SpecialManager.cpp, src/StreamReader.cpp, src/Subfont.cpp,
- src/Unicode.cpp, src/dvisvgm.cpp:
- explicitly cast integers representing characeters to char
-
- * src/CLCommandLine.hpp, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.hpp, src/EncFile.cpp, src/Font.cpp,
- src/Font.hpp, src/MetafontWrapper.cpp, src/MetafontWrapper.hpp,
- src/Process.cpp, src/Process.hpp, src/SVGOutput.cpp, src/SVGOutput.hpp,
- src/Subfont.cpp, src/Subfont.hpp:
- if possible, move string parameters instead of copying them
-
- * src/Color.cpp, src/FontEngine.cpp, src/PathClipper.cpp:
- use std::lround() rather than truncation
-
- * src/DVIActions.hpp, src/DVIToSVGActions.hpp, src/Font.hpp,
- src/PSInterpreter.cpp, src/SignalHandler.cpp, src/System.cpp:
- replaced 0 and NULL with nullptr
-
- * src/Message.cpp, src/Message.hpp:
- drop 'const' from char parameter
-
- * src/EPSFile.cpp:
- replaced C array with std::array
-
- * src/SpecialManager.hpp, src/ZLibOutputStream.hpp:
- made deleted constructor public; use 'default' with default constructor
-
- * src/PageSize.cpp:
- removed redundant semicolons
-
-2019-04-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/RangeMap.cpp, tests/RangeMapTest.cpp:
- use std::accumulate() to compute the number of values mapped by a
- RangeMap
-
-2019-04-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- reworded some paragraphs on the manpage
-
-2019-04-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DvisvgmSpecialHandler.cpp, src/HtmlSpecialHandler.cpp,
- src/InputReader.cpp, src/InputReader.hpp, src/PsSpecialHandler.cpp,
- tests/StreamInputBufferTest.cpp:
- optionally allow 'flags' (attributes w/o values) in attribute lists
-
- * src/PsSpecialHandler.cpp:
- psfile/pdffile: evaluate boolean attribute 'clip'
-If given, the drawing
- region is clipped to the bounding box of the
-EPS/PDF page being
- processed.
-(closes #104)
-
- * .appveyor.yml:
- AppVeyor: switched build image to VS 2019 Preview
-
-2019-04-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- AppVeyor: updated release number of ttfautohint-dll
-
- * m4/ax_cxx_compile_stdcxx.m4:
- updated ax_cxx_compile_stdcxx.m4 to version 11
-
-2019-04-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- AppVeyor: set freetype version to 2.10.0; use current image of VS 2017
- again
-
- * src/SVGTree.cpp:
- fixed gcc 5 failure regarding initializer lists
-
- * src/FileFinder.cpp:
- pdffile special: look for pdf files in texmf tree too (closes #103)
-
-2019-04-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/optimizer/GroupCollapser.cpp:
- group collapser: unwrap groups without attributes
-
- * src/DVIToSVGActions.hpp, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.hpp, src/EmSpecialHandler.cpp,
- src/HyperlinkManager.cpp, src/ImageToSVG.hpp, src/PSPattern.cpp,
- src/PsSpecialHandler.cpp, src/SpecialActions.hpp,
- src/TpicSpecialHandler.cpp, tests/DvisvgmSpecialTest.cpp,
- tests/EmSpecialTest.cpp, tests/TpicSpecialTest.cpp:
- reduced interface of SpecialActions
-- removed append/prepend and context
- functions
-- added direct access to the SVGTree object
-
-2019-03-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLNode.cpp, src/XMLNode.hpp, src/optimizer/AttributeExtractor.cpp,
- src/optimizer/AttributeExtractor.hpp, src/optimizer/GroupCollapser.cpp,
- src/optimizer/RedundantElementRemover.cpp,
- src/optimizer/TransformSimplifier.cpp, src/optimizer/WSNodeRemover.cpp,
- tests/BoundingBoxTest.cpp, tests/TpicSpecialTest.cpp,
- tests/XMLNodeTest.cpp:
- refactored the implementation of the XML node classes
-for easier
- modifications of the XML tree
-
-2019-03-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/ff-woff/Makefile.am:
- added missing zlib include path to ff-woff
-
- * src/CMapReader.cpp:
- properly release memory if CMap throws an exception
-
-2019-03-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPath.hpp:
- skip redundant line drawing commands in path elements
-
-2019-03-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLString.cpp, tests/DVIReaderTest.cpp, tests/GFGlyphTracerTest.cpp,
- tests/MatrixTest.cpp:
- replace "0." by "." in floating point numbers |x| < 1
-
- * src/GraphicsPath.hpp, tests/GFGlyphTracerTest.cpp:
- avoid redundant space characters in SVG paths
-
- * src/GraphicsPath.hpp, tests/TpicSpecialTest.cpp:
- take precision into account when checking for reflection points
-
-2019-03-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Matrix.cpp, src/Matrix.hpp, tests/MatrixTest.cpp:
- made Matrix::parse() a static member
-
- * configure.ac, doc/dvisvgm.txt.in, src/CommandLine.hpp, src/DVIToSVG.cpp,
- src/DependencyGraph.hpp, src/ImageToSVG.cpp, src/Makefile.am,
- src/SVGOptimizer.cpp, src/SVGOptimizer.hpp, src/SVGTree.cpp,
- src/XMLNode.cpp, src/dvisvgm.cpp, src/optimizer/AttributeExtractor.cpp,
- src/optimizer/AttributeExtractor.hpp, src/optimizer/CMakeLists.txt,
- src/optimizer/DependencyGraph.hpp, src/optimizer/GroupCollapser.cpp,
- src/optimizer/GroupCollapser.hpp, src/optimizer/Makefile.am,
- src/optimizer/OptimizerModule.hpp,
- src/optimizer/RedundantElementRemover.cpp,
- src/optimizer/RedundantElementRemover.hpp,
- src/optimizer/SVGOptimizer.cpp, src/optimizer/SVGOptimizer.hpp,
- src/optimizer/TransformSimplifier.cpp,
- src/optimizer/TransformSimplifier.hpp, src/optimizer/WSNodeRemover.cpp,
- src/optimizer/WSNodeRemover.hpp, src/options.xml,
- tests/DependencyGraphTest.cpp, tests/Makefile.am, tests/create-makefile:
- moved optimizer classes to subdirectory
-
-2019-03-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Matrix.cpp, src/Matrix.hpp, src/PsSpecialHandler.cpp,
- tests/MatrixTest.cpp:
- swapped Matrix::lmultiply and Matrix::rmultiply
-
- * src/Matrix.cpp, src/Matrix.hpp, src/SVGOptimizer.cpp,
- src/SVGOptimizer.hpp, src/utility.hpp, tests/MatrixTest.cpp:
- added optimizer to simplify 'transform' attributes
-
-2019-03-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/SVGOptimizer.cpp, src/SVGOptimizer.hpp, src/XMLNode.cpp,
- src/XMLNode.hpp:
- remove whitespace nodes before collapsing group elements
-
-2019-03-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/InputBuffer.hpp:
- added StringInputBuffer::assign() to assign a different string
-
- * src/InputReader.cpp, tests/StreamInputBufferTest.cpp:
- replaced constraints for attribute names
-- must start with a letter
--
- may contain selected non-alphanumeric characters, like '-', '_', and '.'
-
- * doc/dvisvgm.txt.in, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.hpp, src/SVGTree.cpp, src/XMLNode.cpp,
- tests/DvisvgmSpecialTest.cpp:
- allow split tags distributed over several dvisvgm:raw specials
-
-2019-03-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.cpp, src/PSPattern.cpp, src/PageRanges.cpp,
- src/PathClipper.cpp, src/RangeMap.cpp:
- use type 'auto' for local iterator variables
-
- * src/FilePath.hpp, src/Font.hpp, src/ImageToSVG.hpp, src/PDFParser.hpp,
- src/SVGOutput.hpp, src/Subfont.hpp, src/XMLNode.cpp, src/XMLNode.hpp:
- use move semantics to initialize string members
-
-2019-03-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BasicDVIReader.hpp, src/DVIToSVG.hpp, src/Subfont.hpp:
- deleted constructors should be public
-
- * src/Bezier.cpp, src/Bezier.hpp, src/CMap.hpp, src/CMapReader.cpp,
- src/Color.cpp, src/DVIToSVG.hpp, src/DVIToSVGActions.cpp,
- src/EmSpecialHandler.cpp, src/EncFile.cpp, src/FileFinder.cpp,
- src/FileFinder.hpp, src/FileSystem.cpp, src/Font.cpp, src/FontCache.cpp,
- src/FontEncoding.cpp, src/FontEncoding.hpp, src/FontEngine.cpp,
- src/FontEngine.hpp, src/FontManager.cpp, src/FontManager.hpp,
- src/FontWriter.hpp, src/GFGlyphTracer.cpp, src/GFGlyphTracer.hpp,
- src/Ghostscript.cpp, src/Ghostscript.hpp, src/ImageToSVG.cpp,
- src/MapLine.cpp, src/MapLine.hpp, src/Message.cpp, src/Message.hpp,
- src/NoPsSpecialHandler.hpp, src/PDFParser.cpp, src/PSInterpreter.cpp,
- src/PSInterpreter.hpp, src/PathClipper.cpp, src/Process.hpp,
- src/SVGCharHandler.hpp, src/SVGCharPathHandler.cpp,
- src/SVGCharPathHandler.hpp, src/SVGCharTspanTextHandler.cpp,
- src/SVGTree.hpp, src/VFReader.cpp, src/VFReader.hpp, src/XMLNode.cpp,
- src/dvisvgm.cpp:
- use nullptr instead of 0
-
- * src/BoundingBox.hpp, src/CLCommandLine.hpp, src/CMapReader.hpp,
- src/Calculator.hpp, src/Font.hpp, src/FontMetrics.hpp,
- src/FontWriter.hpp, src/GFReader.hpp, src/Length.hpp, src/MapLine.hpp,
- src/Matrix.hpp, src/MessageException.hpp, src/PDFParser.hpp,
- src/PSInterpreter.hpp, src/PageSize.hpp, src/ShadingPatch.hpp,
- src/SpecialHandler.hpp, src/StreamReader.hpp, src/TrueTypeFont.hpp,
- src/VFReader.hpp, src/VectorIterator.hpp, src/ZLibOutputStream.hpp:
- made constructors of exception classes explicit
-
- * src/ZLibOutputStream.hpp:
- few modifications of class ZLibOutputStream
-
- * src/CharMapID.hpp, src/Color.hpp, src/FontCache.hpp, src/Message.cpp,
- src/Message.hpp:
- ensure initializations of static members don't throw exceptions
-
- * src/BoundingBox.cpp, src/CMapManager.cpp, src/ColorSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.cpp, src/PathClipper.cpp, src/RangeMap.cpp:
- replaced some index-based loops with range-based ones
-
- * src/FilePath.cpp, src/FilePath.hpp:
- fixed type used to store directories in class FilePath
-
- * src/CLCommandLine.cpp:
- use emplace_back() instead of push_back()
-
- * src/FileFinder.cpp, src/Font.hpp, src/TensorProductPatch.hpp,
- src/dvisvgm.cpp:
- removed redundant 'virtual' modifiers and calls of c_str()
-
- * src/FontManager.cpp, src/HyperlinkManager.cpp, src/PageSize.cpp:
- use spezialized string::find() to look for single characters
-
- * doc/dvisvgm.txt.in, src/CommandLine.hpp, src/dvisvgm.cpp,
- src/options.xml, tests/CommandLineTest.cpp:
- renamed option --exact to --exact-bbox
-This change is downward
- compatible due to partial matching of long options.
-
- * src/DVIToSVGActions.cpp, src/DvisvgmSpecialHandler.cpp, src/Matrix.cpp,
- src/Matrix.hpp, src/PSPattern.cpp, src/PsSpecialHandler.cpp,
- src/SVGCharHandler.cpp, src/SVGCharPathHandler.cpp, src/SVGTree.cpp,
- tests/MatrixTest.cpp:
- renamed and slightly refactored Matrix::getSVG()
-
-2019-03-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/DVIToSVGActions.hpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/HyperlinkManager.cpp, src/ImageToSVG.hpp, src/SVGTree.cpp,
- src/SVGTree.hpp, src/SpecialActions.hpp, tests/DvisvgmSpecialTest.cpp:
- added context stack for SVG defs section
-
- * src/DVIToSVG.cpp, src/ImageToSVG.cpp, src/SVGOptimizer.cpp,
- src/SVGOptimizer.hpp, src/SVGTree.cpp, src/SVGTree.hpp:
- moved removal of redundant clipPath elements to SVGOptimizer
-
- * doc/dvisvgm.txt.in, src/CommandLine.hpp, src/SVGOptimizer.cpp,
- src/SVGOptimizer.hpp, src/dvisvgm.cpp, src/options.xml:
- added command-line option --group-attributes
-
-2019-03-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Makefile.am:
- reformatted file list in Makefile
-
-2019-03-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- added processing of PS operators xshow, yshow, and xyshow
-
-2019-03-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/xxHash/xxhash.c, libs/xxHash/xxhash.h:
- updated xxhash to version 0.7.0
-
-2019-03-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Makefile.am, src/SVGOptimizer.cpp, src/SVGOptimizer.hpp,
- src/SVGTree.cpp, src/XMLNode.cpp, src/XMLNode.hpp, src/utility.hpp:
- added algorithms to move common attributes to group elements
-
-2019-03-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVGActions.hpp, src/ImageToSVG.hpp, src/PSPattern.cpp,
- src/PSPattern.hpp, src/SVGCharHandler.cpp, src/SVGCharHandler.hpp,
- src/SVGTree.cpp, src/SVGTree.hpp, src/SpecialActions.hpp,
- src/SpecialManager.cpp, src/SpecialManager.hpp, src/XMLDocument.cpp,
- src/XMLDocument.hpp, src/XMLNode.cpp, src/XMLNode.hpp,
- tests/DvisvgmSpecialTest.cpp, tests/EmSpecialTest.cpp,
- tests/TpicSpecialTest.cpp:
- take unique_ptrs by value instead of rvalue reference
-
-2019-03-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BoundingBox.cpp, src/BoundingBox.hpp, src/DVIToSVG.cpp,
- src/DVIToSVG.hpp, src/DVIToSVGActions.cpp, src/DVIToSVGActions.hpp,
- src/DvisvgmSpecialHandler.cpp, src/EmSpecialHandler.cpp,
- src/HyperlinkManager.cpp, src/ImageToSVG.cpp, src/ImageToSVG.hpp,
- src/PSPattern.cpp, src/PSPattern.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/SVGCharHandler.cpp, src/SVGCharHandler.hpp,
- src/SVGCharPathHandler.cpp, src/SVGCharPathHandler.hpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGCharTspanTextHandler.hpp,
- src/SVGTree.cpp, src/SVGTree.hpp, src/SpecialActions.hpp,
- src/TpicSpecialHandler.cpp, src/XMLDocument.cpp, src/XMLDocument.hpp,
- src/XMLNode.cpp, src/XMLNode.hpp, tests/DvisvgmSpecialTest.cpp,
- tests/EmSpecialTest.cpp, tests/TpicSpecialTest.cpp,
- tests/XMLNodeTest.cpp:
- renamed XML node classes
-
- * src/XMLDocument.cpp, src/XMLNode.cpp, src/XMLNode.hpp,
- tests/XMLNodeTest.cpp:
- replaced dynamic casts of XML nodes with dedicated cast methods
-
-2019-03-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am:
- rebuild manpage if configure.ac was updated
-A potential change of the
- version number should be propagated to the manpage.
-
- * doc/dvisvgm.txt.in:
- manpage: added link to SVG color names
-
-2019-03-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- imgfile: improved and simplifed code
-- compute transformation matrix
- only once (for image and bbox)
-- compute and update bbox only if
- necessary
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.6.3
-
- * NEWS:
- updated NEWS
-
-2019-03-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/dvisvgm.cpp:
- option --bbox: check validity of paper format arguments corretcly
-
- * src/PsSpecialHandler.cpp:
- ensure forward slashes in file paths passed to PS oparator 'run'
-
- * src/PsSpecialHandler.cpp, src/psdefs.cpp:
- psfile/pdffile: adapt opposite orientation of y-coordinates properly
-
-2019-02-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/InputReader.cpp, src/InputReader.hpp,
- tests/StreamInputBufferTest.cpp, tests/StringMatcherTest.cpp:
- added StringMatcher::read()
-
- * src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/InputReader.cpp, tests/DvisvgmSpecialTest.cpp:
- parse raw specials and create proper XML nodes
-
-2019-02-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DvisvgmSpecialHandler.cpp, src/FontWriter.cpp:
- replaced lookup loops with std::find_if
-
-2019-02-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * m4/Makefile.am:
- add ax_check_compile_flag.m4 to distributed source archives
-
-2019-02-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, m4/ax_check_compile_flag.m4, src/Makefile.am:
- add -Wno-mismatched-tags only if compiler supports
- -Wmismatched-tags
-(closes #101)
-
-2019-02-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Calculator.hpp, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.hpp, src/InputReader.cpp, src/InputReader.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp,
- tests/StreamInputBufferTest.cpp:
- replaced some unordered maps with ordered ones
-
- * src/HtmlSpecialHandler.cpp, src/InputReader.cpp, src/InputReader.hpp,
- src/MapLine.cpp, src/PsSpecialHandler.cpp,
- tests/StreamInputBufferTest.cpp:
- accept alternative bounding chars in getQuotedString()
-
-2019-02-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLNode.cpp, src/XMLNode.hpp, tests/DvisvgmSpecialTest.cpp,
- tests/EmSpecialTest.cpp, tests/TpicSpecialTest.cpp:
- store attributes in vectors instead of maps
-
-2019-02-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/Color.cpp, tests/ColorSpecialTest.cpp,
- tests/ColorTest.cpp, tests/EmSpecialTest.cpp, tests/ShadingPatchTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/TpicSpecialTest.cpp,
- tests/TriangularPatchTest.cpp:
- use short RGB hex values if possible
-
-2019-02-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontEngine.cpp, src/Ghostscript.cpp:
- replaced C casts with const_cast
-
-2019-02-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * README.md:
- added some links to README
-
-2019-01-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/gtest/include/gtest/gtest-death-test.h,
- tests/gtest/include/gtest/gtest-message.h,
- tests/gtest/include/gtest/gtest-param-test.h,
- tests/gtest/include/gtest/gtest-printers.h,
- tests/gtest/include/gtest/gtest-spi.h,
- tests/gtest/include/gtest/gtest-test-part.h,
- tests/gtest/include/gtest/gtest-typed-test.h,
- tests/gtest/include/gtest/gtest.h,
- tests/gtest/include/gtest/gtest_pred_impl.h,
- tests/gtest/include/gtest/gtest_prod.h,
- tests/gtest/include/gtest/internal/custom/gtest-port.h,
- tests/gtest/include/gtest/internal/custom/gtest-printers.h,
- tests/gtest/include/gtest/internal/custom/gtest.h,
- tests/gtest/include/gtest/internal/gtest-death-test-internal.h,
- tests/gtest/include/gtest/internal/gtest-filepath.h,
- tests/gtest/include/gtest/internal/gtest-internal.h,
- tests/gtest/include/gtest/internal/gtest-linked_ptr.h,
- tests/gtest/include/gtest/internal/gtest-param-util-generated.h,
- tests/gtest/include/gtest/internal/gtest-param-util.h,
- tests/gtest/include/gtest/internal/gtest-port-arch.h,
- tests/gtest/include/gtest/internal/gtest-port.h,
- tests/gtest/include/gtest/internal/gtest-string.h,
- tests/gtest/include/gtest/internal/gtest-tuple.h,
- tests/gtest/include/gtest/internal/gtest-type-util.h,
- tests/gtest/src/gtest-all.cc, tests/gtest/src/gtest-death-test.cc,
- tests/gtest/src/gtest-filepath.cc, tests/gtest/src/gtest-internal-inl.h,
- tests/gtest/src/gtest-port.cc, tests/gtest/src/gtest-printers.cc,
- tests/gtest/src/gtest-test-part.cc, tests/gtest/src/gtest-typed-test.cc,
- tests/gtest/src/gtest.cc, tests/gtest/src/gtest_main.cc:
- updated gtest to version 1.8.1
-
-2019-01-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- put struct PatchVertex in corresponding method
-
-2019-01-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, configure.ac, m4/Makefile.am:
- add m4 files to source tarball
-
-2019-01-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, README, README.md:
- updated NEWS and README
-
- * .travis.yml:
- Travis: switched to xenial environment
-
-2019-01-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/psdefs.cpp:
- ensure a path loaded by 'clippath' is considered by clip/eoclip
-
- * src/PsSpecialHandler.cpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- changed semantics of operand of 'newpath'
-It now denotes whether method
- 'newpath' was triggered by PS operator 'newpath'
-or one of the
- drawing/clipping operators.
-
- * src/GraphicsPath.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, tests/FontCacheTest.cpp,
- tests/GraphicsPathTest.cpp:
- only create new clipPath element if the new clip path differs
-
-2019-01-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Ghostscript.cpp:
- fixed formatting of GS version number
-
- * src/PsSpecialHandler.cpp:
- use nullptr instead of 0
-
-2019-01-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- execute 'show' if called internally by another PS operator (e.g.
- charpath)
-
- * src/psdefs.cpp:
- don't propagate local transformations to the PS handler
-PS operators
- like 'charpath' may perform local transformations, e.g. by
-calling
- 'scale'. These must not be forwarded to the PS handler.
-
- * libs/variant/Makefile.am, libs/variant/include/mpark/config.hpp,
- libs/variant/include/mpark/in_place.hpp,
- libs/variant/include/mpark/lib.hpp,
- libs/variant/include/mpark/variant.hpp:
- updated mpark::variant to version 1.4.0
-
- * src/psdefs.cpp:
- PS handler: draw glyph paths with 'fill' rather than 'eofill'
-
- * .appveyor.yml:
- AppVeyor: updated ttfautohint revision to 1.8.2-2
-
-2019-01-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.6.2
-
-2019-01-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- properly apply current scale values to line properties
-
- * src/psdefs.cpp:
- prevent visible side-effects of PS operator 'stringwidth'
-According to
- the PS manual, p. 699, stringwidth may execute the path operators
-of the
- glyph descriptions. This led to visible fragments in the SVG graphics.
-
-2019-01-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/db2html.xsl:
- manpage: fixed wrongly nested list elements
-
- * Makefile.am, README, README.md, configure.ac, doc/Makefile.am,
- doc/conf-dblatex-man.xsl, doc/conf-dblatex-pdf.xsl, doc/db2html.xsl,
- doc/dvisvgm.txt.in, doc/tweak-db-article.xsl, doc/tweak-db-refentry.xsl,
- doc/tweak-dblatex-pdf.xsl, libs/Makefile.am,
- libs/ff-woff/fontforge/tmpfile2.cpp, src/AGLTable.hpp,
- src/BasicDVIReader.cpp, src/BasicDVIReader.hpp, src/Bezier.cpp,
- src/Bezier.hpp, src/BgColorSpecialHandler.cpp,
- src/BgColorSpecialHandler.hpp, src/Bitmap.cpp, src/Bitmap.hpp,
- src/BoundingBox.cpp, src/BoundingBox.hpp, src/CLCommandLine.cpp,
- src/CLCommandLine.hpp, src/CLOption.hpp, src/CMap.cpp, src/CMap.hpp,
- src/CMapManager.cpp, src/CMapManager.hpp, src/CMapReader.cpp,
- src/CMapReader.hpp, src/CRC32.cpp, src/CRC32.hpp, src/Calculator.cpp,
- src/Calculator.hpp, src/CharMapID.cpp, src/CharMapID.hpp,
- src/Character.hpp, src/Color.cpp, src/Color.hpp,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.hpp,
- src/CommandLine.hpp, src/DLLoader.cpp, src/DLLoader.hpp,
- src/DVIActions.hpp, src/DVIReader.cpp, src/DVIReader.hpp,
- src/DVIToSVG.cpp, src/DVIToSVG.hpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.hpp, src/DependencyGraph.hpp, src/Directory.cpp,
- src/Directory.hpp, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.hpp, src/EPSFile.cpp, src/EPSFile.hpp,
- src/EPSToSVG.hpp, src/EmSpecialHandler.cpp, src/EmSpecialHandler.hpp,
- src/EncFile.cpp, src/EncFile.hpp, src/FileFinder.cpp, src/FileFinder.hpp,
- src/FilePath.cpp, src/FilePath.hpp, src/FileSystem.cpp,
- src/FileSystem.hpp, src/FixWord.hpp, src/Font.cpp, src/Font.hpp,
- src/FontCache.cpp, src/FontCache.hpp, src/FontEncoding.cpp,
- src/FontEncoding.hpp, src/FontEngine.cpp, src/FontEngine.hpp,
- src/FontManager.cpp, src/FontManager.hpp, src/FontMap.cpp,
- src/FontMap.hpp, src/FontMetrics.cpp, src/FontMetrics.hpp,
- src/FontStyle.hpp, src/FontWriter.cpp, src/FontWriter.hpp,
- src/GFGlyphTracer.cpp, src/GFGlyphTracer.hpp, src/GFReader.cpp,
- src/GFReader.hpp, src/GFTracer.cpp, src/GFTracer.hpp,
- src/Ghostscript.cpp, src/Ghostscript.hpp, src/Glyph.hpp,
- src/GlyphTracerMessages.hpp, src/GraphicsPath.hpp, src/HashFunction.cpp,
- src/HashFunction.hpp, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.hpp, src/HyperlinkManager.cpp,
- src/HyperlinkManager.hpp, src/ImageToSVG.cpp, src/ImageToSVG.hpp,
- src/InputBuffer.cpp, src/InputBuffer.hpp, src/InputReader.cpp,
- src/InputReader.hpp, src/JFM.cpp, src/JFM.hpp, src/Length.cpp,
- src/Length.hpp, src/MD5HashFunction.hpp, src/Makefile.am,
- src/MapLine.cpp, src/MapLine.hpp, src/Matrix.cpp, src/Matrix.hpp,
- src/Message.cpp, src/Message.hpp, src/MessageException.hpp,
- src/MetafontWrapper.cpp, src/MetafontWrapper.hpp, src/MiKTeXCom.cpp,
- src/MiKTeXCom.hpp, src/NoPsSpecialHandler.cpp,
- src/NoPsSpecialHandler.hpp, src/NumericRanges.hpp, src/PDFParser.cpp,
- src/PDFParser.hpp, src/PDFToSVG.hpp, src/PSFilter.hpp,
- src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PSPattern.cpp,
- src/PSPattern.hpp, src/PSPreviewFilter.cpp, src/PSPreviewFilter.hpp,
- src/PageRanges.cpp, src/PageRanges.hpp, src/PageSize.cpp,
- src/PageSize.hpp, src/Pair.hpp, src/PapersizeSpecialHandler.cpp,
- src/PapersizeSpecialHandler.hpp, src/PathClipper.cpp,
- src/PathClipper.hpp, src/PdfSpecialHandler.cpp,
- src/PdfSpecialHandler.hpp, src/PreScanDVIReader.cpp,
- src/PreScanDVIReader.hpp, src/Process.cpp, src/Process.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/RangeMap.cpp,
- src/RangeMap.hpp, src/SVGCharHandler.cpp, src/SVGCharHandler.hpp,
- src/SVGCharHandlerFactory.cpp, src/SVGCharHandlerFactory.hpp,
- src/SVGCharPathHandler.cpp, src/SVGCharPathHandler.hpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGCharTspanTextHandler.hpp,
- src/SVGOutput.cpp, src/SVGOutput.hpp, src/SVGSingleCharTextHandler.cpp,
- src/SVGSingleCharTextHandler.hpp, src/SVGTree.cpp, src/SVGTree.hpp,
- src/ShadingPatch.cpp, src/ShadingPatch.hpp, src/SignalHandler.cpp,
- src/SignalHandler.hpp, src/SourceInput.cpp, src/SourceInput.hpp,
- src/SpecialActions.hpp, src/SpecialHandler.hpp, src/SpecialManager.cpp,
- src/SpecialManager.hpp, src/StreamReader.cpp, src/StreamReader.hpp,
- src/StreamWriter.cpp, src/StreamWriter.hpp, src/Subfont.cpp,
- src/Subfont.hpp, src/System.cpp, src/System.hpp, src/TFM.cpp,
- src/TFM.hpp, src/TTFAutohint.cpp, src/TTFAutohint.hpp,
- src/TensorProductPatch.cpp, src/TensorProductPatch.hpp, src/Terminal.cpp,
- src/Terminal.hpp, src/ToUnicodeMap.cpp, src/ToUnicodeMap.hpp,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.hpp,
- src/TriangularPatch.cpp, src/TriangularPatch.hpp, src/TrueTypeFont.cpp,
- src/TrueTypeFont.hpp, src/Unicode.cpp, src/Unicode.hpp,
- src/VFActions.hpp, src/VFReader.cpp, src/VFReader.hpp,
- src/VectorIterator.hpp, src/VectorStream.hpp, src/XMLDocument.cpp,
- src/XMLDocument.hpp, src/XMLNode.cpp, src/XMLNode.hpp, src/XMLString.cpp,
- src/XMLString.hpp, src/XXHashFunction.hpp, src/ZLibOutputStream.hpp,
- src/dvisvgm.cpp, src/ffwrapper.c, src/ffwrapper.h, src/macros.hpp,
- src/options.dtd, src/options.xml, src/psdefs.cpp, src/utility.cpp,
- src/utility.hpp, src/version.hpp, src/version.hpp.in, src/windows.hpp,
- tests/BezierTest.cpp, tests/BitmapTest.cpp, tests/BoundingBoxTest.cpp,
- tests/CMapManagerTest.cpp, tests/CMapReaderTest.cpp, tests/CMapTest.cpp,
- tests/CRC32Test.cpp, tests/CalculatorTest.cpp,
- tests/ColorSpecialTest.cpp, tests/ColorTest.cpp,
- tests/CommandLineTest.cpp, tests/DVIReaderTest.cpp,
- tests/DependencyGraphTest.cpp, tests/DirectoryTest.cpp,
- tests/DvisvgmSpecialTest.cpp, tests/EmSpecialTest.cpp,
- tests/FileFinderTest.cpp, tests/FilePathTest.cpp,
- tests/FileSystemTest.cpp, tests/FontCacheTest.cpp,
- tests/FontManagerTest.cpp, tests/FontMapTest.cpp,
- tests/GFGlyphTracerTest.cpp, tests/GFReaderTest.cpp,
- tests/GhostscriptTest.cpp, tests/GraphicsPathTest.cpp,
- tests/HashFunctionTest.cpp, tests/JFMReaderTest.cpp,
- tests/LengthTest.cpp, tests/Makefile.am, tests/MapLineTest.cpp,
- tests/MatrixTest.cpp, tests/MessageExceptionTest.cpp,
- tests/PDFParserTest.cpp, tests/PSInterpreterTest.cpp,
- tests/PageRagesTest.cpp, tests/PageSizeTest.cpp, tests/PairTest.cpp,
- tests/PapersizeSpecialTest.cpp, tests/RangeMapTest.cpp,
- tests/SVGOutputTest.cpp, tests/ShadingPatchTest.cpp,
- tests/SpecialManagerTest.cpp, tests/SplittedCharInputBufferTest.cpp,
- tests/StreamInputBufferTest.cpp, tests/StreamReaderTest.cpp,
- tests/StreamWriterTest.cpp, tests/StringMatcherTest.cpp,
- tests/SubfontTest.cpp, tests/TFMReaderTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/ToUnicodeMapTest.cpp,
- tests/TpicSpecialTest.cpp, tests/TriangularPatchTest.cpp,
- tests/UnicodeTest.cpp, tests/UtilityTest.cpp,
- tests/VectorIteratorTest.cpp, tests/VectorStreamTest.cpp,
- tests/XMLNodeTest.cpp, tests/XMLStringTest.cpp, tests/check-conv,
- tests/create-makefile, tests/data/Makefile.am, tests/genhashcheck.py,
- tests/normalize.xsl, tests/testmain.cpp:
- updated year in copyright statements to 2019
-
-2018-12-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/potrace/CMakeLists.txt, libs/variant/CMakeLists.txt:
- removed redundant files
-
-2018-11-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CommandLine.hpp, src/options.xml:
- updated description in --help output
-
-2018-11-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, doc/Makefile.am, libs/defs.am, src/Makefile.am,
- tests/Makefile.am, tests/create-makefile:
- Makefiles: replaced $(top_srcdir) with $(dvisvgm_srcdir)
-to simplify
- maintenance of dvisvgm in TeX Live
-
-2018-11-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * m4/ax_cxx_compile_stdcxx.m4:
- updated ax_cxx_compile_stdcxx.m4 to version 10
-
-2018-10-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/brotli/Makefile.am, libs/defs.am, libs/potrace/Makefile.am,
- libs/woff2/Makefile.am, libs/xxHash/Makefile.am:
- use negation in Makefile conditionals
-
-2018-10-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/brotli/common/platform.h, libs/brotli/common/transform.c,
- libs/brotli/common/version.h, libs/brotli/enc/backward_references_hq.c,
- libs/brotli/enc/backward_references_hq.h,
- libs/brotli/enc/backward_references_inc.h, libs/brotli/enc/encode.c,
- libs/brotli/enc/hash.h, libs/brotli/enc/hash_composite_inc.h,
- libs/brotli/enc/hash_longest_match64_inc.h,
- libs/brotli/enc/hash_longest_match_inc.h,
- libs/brotli/enc/hash_rolling_inc.h,
- libs/brotli/enc/hash_to_binary_tree_inc.h:
- updated brotli to version 1.0.7
-
-2018-10-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS:
- updated NEWS
-
-2018-10-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am:
- only create intermediate XML files if dvisvgm.txt.1 has changed
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.6.1
-
-2018-10-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am:
- ensure dvisvgm.txt.in is distributed with the tarball
-
- * configure.ac, libs/brotli/Makefile.am, libs/defs.am,
- libs/potrace/Makefile.am, libs/woff2/Makefile.am,
- libs/xxHash/Makefile.am, src/Makefile.am, tests/Makefile.am,
- tests/create-makefile:
- relaxed semantics of config option --disable-bundled-libs
-If some of the
- system libraries brotli, potrace, woff2, and xxhash can't be
-found, the
- bundled libraries are used as a fallback, even if
- option
---disable-bundled-libs is given. (closes #94)
-
-2018-10-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac:
- added configuration option --disable-manpage (closes #93)
-
-2018-10-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, doc/Makefile.am:
- don't update man page if asciidoc file hasn't changed
-
-2018-09-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/brotli/common/platform.h, libs/brotli/common/version.h,
- libs/brotli/enc/metablock.c:
- updated brotli to version 1.0.6
-
-2018-09-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XXHashFunction.hpp:
- fixed constexpr issue occured with gcc 4.8
-
-2018-09-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am:
- add dvisvgm.sty to distributed files
-
-2018-09-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Ghostscript.cpp:
- call RegGetValueA() with correct buffer size
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.6
-
- * NEWS:
- updated NEWS
-
-2018-09-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/DVIToSVG.hpp, src/dvisvgm.cpp:
- use enums for hash parameters rather than strings
-
- * doc/dvisvgm.txt.in, src/DVIToSVG.cpp, src/DVIToSVG.hpp:
- added optional parameter 'replace' to --page-hashes
-
-2018-09-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/DVIToSVG.cpp:
- reset hash function before computing a page hash
-
-2018-09-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/clipper/clipper.cpp:
- clipper: initialize TEdge by constructor instead of memset()
-
-2018-09-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac:
- removed redundant check for potrace from configure
-
-2018-08-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/variant/include/mpark/config.hpp:
- VC: fixed failing compilation of
- mpark::variant
-https://github.com/mpark/variant/commit/4e3e7f88f03f513622daa973
-
-2018-08-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- AppVeyor: use VS 2017 version 15.7 instead of 15.8
-Version 15.8 of
- Visual Studio 2017 introduced a compiler bug that prevents
-compiling
- mpark::variant (https://github.com/mpark/variant/issues/48).
-
-2018-08-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XXHashFunction.hpp, src/dvisvgm.cpp:
- use wrapper class to get the xxhash version number
-
- * src/HashFunction.cpp, src/HashFunction.hpp, src/MD5HashFunction.hpp,
- src/XXHashFunction.hpp, tests/HashFunctionTest.cpp:
- added extended create functions to hash classes
-
- * doc/dvisvgm.txt.in, src/CommandLine.hpp, src/DVIToSVG.cpp,
- src/DVIToSVG.hpp, src/SVGOutput.cpp, src/SVGOutput.hpp, src/dvisvgm.cpp,
- src/options.xml, tests/SVGOutputTest.cpp:
- replaced pattern variable %h with %hd; added %ho and %hc
-In order to
- recognize changes in the command-line options that may affect the
-SVG
- output, %ho and %hc have been introduced. The former expands to a
- 32-bit
-hash reflecting the command-line options, the latter combines this
- information
-with the hash computed from the DVI page data.
-
-2018-08-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/DVIToSVG.hpp, src/dvisvgm.cpp:
- option --page-hashes accepts multiple modifiers now
-
-2018-08-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/DVIToSVG.cpp, src/DVIToSVG.hpp,
- src/HashFunction.cpp, src/HashFunction.hpp, src/SVGOutput.hpp,
- src/dvisvgm.cpp, tests/CommandLineTest.cpp:
- added optional parameter 'list' to option --page-hashes
-
- * src/dvisvgm.cpp:
- fixed wrong directory separators shown in output of --cache
-
-2018-08-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/CommandLine.hpp, src/DVIToSVG.hpp,
- src/dvisvgm.cpp, src/options.xml:
- added command-line option --page-hashes to enable hashing functionality
-
-2018-08-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * AUTHORS, README, README.md, configure.ac, libs/Makefile.am,
- libs/md5/Makefile.am, libs/md5/md5.c, libs/md5/md5.h,
- src/HashFunction.cpp, src/HashFunction.hpp, src/MD5HashFunction.hpp,
- src/Makefile.am, src/XXHashFunction.hpp, tests/HashFunctionTest.cpp,
- tests/Makefile.am, tests/create-makefile:
- added classes to compute MD5, XXH32, and XXH64 hash values
-
- * src/BasicDVIReader.hpp, src/DVIReader.cpp:
- added validity checks for bop offsets
-
- * src/DVIReader.cpp, src/DVIReader.hpp, src/DVIToSVG.cpp,
- src/DVIToSVG.hpp, src/HashFunction.cpp, src/HashFunction.hpp,
- src/SVGOutput.cpp, src/SVGOutput.hpp:
- added optional computation and evaluation of page hashes
-If this
- functionality is enabled, a hash value based on the contents of
- the
-corresponding DVI page is added to the SVG file names. Furthermore,
- dvisvgm
-skips the conversion of these pages in subsequent calls if the
- resulting SVG
-files already exist.
-
-2018-08-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp:
- DVI postamble: relaxed plausibility check of the total page count
-
-2018-08-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac:
- correctly evaluate config option --disable-bundled-libs (closes #91)
-
-2018-08-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BasicDVIReader.hpp, src/DVIToSVG.cpp, src/DVIToSVG.hpp,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.hpp,
- src/PsSpecialHandler.cpp:
- getPageTransformation: replaced reference parameter with return value
-
- * src/DVIToSVGActions.hpp, src/ImageToSVG.hpp, src/PsSpecialHandler.cpp,
- src/SpecialActions.hpp:
- renamed getPageTransform; return unity matrix by default
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.5
-
- * NEWS:
- updated NEWS
-
-2018-08-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp, src/FilePath.cpp, src/FilePath.hpp,
- src/Ghostscript.cpp:
- TL32: also look for gsdll32.dll in the corresponding TL bin folder
-The
- changes are based on a patch sent by Akira Kakuto.
-
-2018-08-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * README:
- updated README
-
- * .appveyor.yml, .travis.yml:
- updated CI configurations; dropped potrace as an external dependency
-
- * configure.ac, src/SourceInput.cpp:
- set umask before calling mkstemp()
-Coverity complains about calling
- mkstemp() without securely setting umask first.
-If umask() is available,
- it's now called so that the permissions of temporary
-files result to
- 0600.
-
- * src/BoundingBox.cpp:
- show lock state when printing a bounding box object
-
- * src/DVIToSVG.cpp:
- apply user transformations even if the bounding box is locked
-
-2018-07-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/ImageToSVG.cpp, src/ImageToSVG.hpp, src/dvisvgm.cpp:
- apply --transform commands in --eps and --pdf mode too
-
- * src/DVIToSVG.cpp, src/Length.cpp, src/Length.hpp, tests/LengthTest.cpp:
- added function to retrieve all units supported by the Length class
-
- * doc/dvisvgm.txt.in, src/DVIToSVG.cpp, src/ImageToSVG.cpp,
- tests/CalculatorTest.cpp:
- allow to use all supported units in --transform commands
-
- * Makefile.am:
- propagate --enable-bundled-libs to "distcheck"
-
- * AUTHORS, README.md, configure.ac, libs/Makefile.am,
- libs/potrace/CMakeLists.txt, libs/potrace/Makefile.am,
- libs/potrace/auxiliary.h, libs/potrace/bitmap.h, libs/potrace/config.h,
- libs/potrace/curve.c, libs/potrace/curve.h, libs/potrace/decompose.c,
- libs/potrace/decompose.h, libs/potrace/lists.h,
- libs/potrace/potracelib.c, libs/potrace/potracelib.h,
- libs/potrace/progress.h, libs/potrace/trace.c, libs/potrace/trace.h,
- src/Makefile.am:
- added potrace to the bundled libraries again
-
- * tests/Makefile.am, tests/create-makefile:
- link tests only against bundled libs if configured with
- --enable-bundled-libs
-
- * src/ImageToSVG.cpp:
- changed type of exception thrown in case of invalid EPS/PDF files
-
-2018-07-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- replaced internal PS operator @getpdfpagebox with PSInterpreter method
-
-2018-07-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/dvisvgm.cpp:
- removed redundant code from main()
-
- * README.md, doc/dvisvgm.txt.in, src/EPSToSVG.hpp, src/ImageToSVG.cpp,
- src/ImageToSVG.hpp, src/PDFToSVG.hpp, src/PSInterpreter.cpp,
- src/PSInterpreter.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/dvisvgm.cpp, src/psdefs.cpp:
- PDF conversion: allow to specify the pages to process
-
-2018-07-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, README.md, configure.ac, libs/brotli/Makefile.am,
- libs/woff2/Makefile.am, libs/xxHash/Makefile.am, src/Makefile.am,
- src/dvisvgm.cpp:
- added config option --enable-bundled-libs
-If this option is given, the
- bundled libraries brotli, woff2, and xxhash are
-built and statically
- linked. Otherwise, the configure script looks for the
-corresponing system
- libraries and links dvisvgm against those. (closes #90)
-
-2018-07-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS:
- fixed date in NEWS
-
-2018-07-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, doc/Makefile.am:
- don't try to build manpage if required tools are missing
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.4.2
-
- * NEWS:
- updated NEWS
-
-2018-07-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/HyperlinkManager.cpp:
- reduced extent of hyperlinked areas to get a tight bbox
-
-2018-07-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- use unique_ptr in bbox debug code
-
- * src/PSPreviewFilter.cpp, src/PSPreviewFilter.hpp:
- removed redundant method PSPreviewFilter::getBorders()
-
- * src/PSPreviewFilter.cpp, src/PsSpecialHandler.cpp:
- fixed computation of preview extents (closes #89)
-
- * src/PsSpecialHandler.cpp:
- prevent warning about missing psfile "/dev/null"
-
-2018-07-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS:
- updated NEWS
-
- * .gitattributes:
- added linguist settings to
- .gitattributes
-
-https://github.com/github/linguist
-
-2018-07-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/brotli/Makefile.am, libs/brotli/common/dictionary.c,
- libs/brotli/common/platform.h, libs/brotli/common/transform.c,
- libs/brotli/common/version.h, libs/brotli/enc/backward_references.c,
- libs/brotli/enc/brotli_bit_stream.h, libs/brotli/enc/command.h,
- libs/brotli/enc/compress_fragment.c,
- libs/brotli/enc/compress_fragment_two_pass.c, libs/brotli/enc/encode.c,
- libs/brotli/enc/encoder_dict.h, libs/brotli/enc/fast_log.h,
- libs/brotli/enc/hash.h, libs/brotli/enc/hash_composite_inc.h,
- libs/brotli/enc/hash_rolling_inc.h, libs/brotli/enc/quality.h,
- libs/brotli/enc/static_dict.c, libs/brotli/enc/write_bits.h,
- libs/brotli/include/brotli/port.h, libs/brotli/include/brotli/types.h:
- updated brotli to version 1.0.5
-
- * README, README.md, doc/dvisvgm.txt.in, libs/ff-woff/README.md:
- updated links to new project website dvisvgm.de
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.4.1
-
-2018-07-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- manpage: updated external links
-
-2018-06-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/include/woff2/version.h, libs/woff2/src/font.cc,
- libs/woff2/src/normalize.cc, libs/woff2/src/woff2_enc.cc:
- updated woff2 to 1.0.2
-
-2018-06-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/SourceInput.cpp, src/SourceInput.hpp:
- moved handling of temporary files to separate class
-
-2018-05-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVGActions.cpp, src/ImageToSVG.cpp:
- fixed evaluation of progress delay
-
-2018-05-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- minor fixes in manpage
-
-2018-05-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/conf-dblatex-pdf.xsl:
- list options and specials in PDF bookmarks of manpage
-
- * doc/dvisvgm.txt.in:
- manpage: ordered options alphabetically according to long name
-
-2018-05-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, README, README.md:
- updated NEWS and README
-
-2018-05-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Calculator.cpp:
- catch exception by reference rather than by value
-
-2018-04-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/EPSFile.cpp, src/EPSFile.hpp, src/EPSToSVG.cpp:
- changed signature of EPSFile::bbox()
-
- * src/CLCommandLine.cpp:
- cmdline: fixed handling of 'usage' section
-
- * src/EPSToSVG.cpp, src/EPSToSVG.hpp, src/ImageToSVG.cpp,
- src/ImageToSVG.hpp, src/Makefile.am:
- derive EPSToSVG from abstract class ImageToSVG
-
- * doc/dvisvgm.txt.in, src/CommandLine.hpp, src/Makefile.am,
- src/PDFToSVG.hpp, src/PSInterpreter.cpp, src/PSInterpreter.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/dvisvgm.cpp,
- src/options.xml, src/psdefs.cpp, tests/CommandLineTest.cpp,
- tests/PSInterpreterTest.cpp:
- added option --pdf to convert PDF files to SVG
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.4
-
-2018-04-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BoundingBox.cpp:
- swap wrongly assigned variables (doesn't affect behavior)
-
-2018-04-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- psfile: use operator 'run' to simplify execution of (E)PS files
-
- * src/PSInterpreter.cpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- added special pdffile to embed PDF graphics
-
- * src/PsSpecialHandler.cpp:
- apply outer transformations to psfile/pdffile graphics
-
-2018-04-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Ghostscript.cpp, src/Ghostscript.hpp, src/dvisvgm.cpp,
- tests/GhostscriptTest.cpp:
- added function to get numeric GS revision
-
- * src/PSInterpreter.cpp, src/PSInterpreter.hpp:
- moved GS init options to init method
-
- * src/PsSpecialHandler.cpp:
- replaced str2double() with stod(); added check for zero bbox
-
- * src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.hpp,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.hpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.hpp,
- src/HtmlSpecialHandler.cpp, src/HtmlSpecialHandler.hpp,
- src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.hpp,
- src/PapersizeSpecialHandler.cpp, src/PapersizeSpecialHandler.hpp,
- src/PdfSpecialHandler.cpp, src/PdfSpecialHandler.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp,
- src/SpecialHandler.hpp, src/SpecialManager.cpp,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.hpp,
- tests/ColorSpecialTest.cpp, tests/DvisvgmSpecialTest.cpp,
- tests/PapersizeSpecialTest.cpp, tests/TpicSpecialTest.cpp:
- changed type of \special prefix from const char* to string
-
- * src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.hpp,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.hpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.hpp,
- src/HtmlSpecialHandler.cpp, src/HtmlSpecialHandler.hpp,
- src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.hpp,
- src/PapersizeSpecialHandler.cpp, src/PapersizeSpecialHandler.hpp,
- src/PdfSpecialHandler.cpp, src/PdfSpecialHandler.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp,
- src/SpecialHandler.hpp, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.hpp:
- removed const from result vector of SpecialHandler::prefixes()
-
-2018-04-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/xxHash/xxhash.c, libs/xxHash/xxhash.h:
- updated xxHash to version 0.6.5
-
- * src/psdefs.cpp:
- fixed handling of PS operator 'setgstate'
-
-2018-04-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * m4/ax_cxx_compile_stdcxx.m4:
- updated ax_cxx_compile_stdcxx.m4 to version 8
-
-2018-04-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.hpp, src/DvisvgmSpecialHandler.hpp,
- src/EmSpecialHandler.hpp, src/HtmlSpecialHandler.hpp,
- src/NoPsSpecialHandler.hpp, src/PapersizeSpecialHandler.hpp,
- src/PdfSpecialHandler.hpp, src/PsSpecialHandler.hpp,
- src/SpecialHandler.hpp, src/SpecialManager.cpp, src/SpecialManager.hpp,
- src/TpicSpecialHandler.hpp:
- merged listener methods into SpecialHandler class
-
- * src/CommandLine.hpp:
- made opt2cpp compatible with Python 3
-
-2018-04-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/brotli/Makefile.am, libs/brotli/common/constants.h,
- libs/brotli/common/platform.h, libs/brotli/common/version.h,
- libs/brotli/enc/backward_references.c,
- libs/brotli/enc/backward_references_hq.c, libs/brotli/enc/command.h,
- libs/brotli/enc/context.h, libs/brotli/enc/encode.c,
- libs/brotli/enc/memory.h, libs/brotli/enc/metablock.c,
- libs/brotli/enc/metablock.h, libs/brotli/enc/params.h,
- libs/brotli/enc/port.h, libs/brotli/enc/quality.h,
- libs/brotli/enc/write_bits.h, libs/brotli/include/brotli/decode.h,
- libs/brotli/include/brotli/encode.h:
- updated brotli to version 1.0.4
-
-2018-03-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/SVGOutput.cpp, src/ZLibOutputStream.hpp,
- src/dvisvgm.cpp:
- enabled to output compressed SVG data to stdout
-
- * src/dvisvgm.cpp:
- renamed SourceInput variable
-
-2018-03-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/dvisvgm.cpp:
- simplified main() function
-
-2018-03-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/CLCommandLine.cpp, src/CLCommandLine.hpp,
- src/CommandLine.hpp, src/EPSFile.cpp, src/EPSFile.hpp, src/EPSToSVG.cpp,
- src/EPSToSVG.hpp, src/FileSystem.cpp, src/Makefile.am,
- src/PsSpecialHandler.cpp, src/SVGOutput.cpp, src/SVGOutput.hpp,
- src/SourceInput.cpp, src/SourceInput.hpp, src/dvisvgm.cpp,
- src/options.xml, tests/CommandLineTest.cpp, tests/SVGOutputTest.cpp:
- added option to read DVI/EPS input from stdin (closes #86)
-
-2018-03-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- PS handler: added processing of .setshapealpha and .setblendmode
-
-2018-03-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Matrix.cpp, src/Matrix.hpp, tests/MatrixTest.cpp:
- added initlist constructor to class Matrix
-
- * src/PSInterpreter.cpp, src/PSInterpreter.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- psfile special: added evaluation of operator 'setpagedevice'
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.3.5
-
- * NEWS:
- updated NEWS
-
-2018-03-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- added missing PS header required to evaluate color names
-
- * src/PSInterpreter.cpp, src/psdefs.cpp:
- drop GS option -dSAFER to stay compatible with GS 9.23
-
-2018-03-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.3.4
-
- * NEWS:
- updated NEWS
-
-2018-03-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/data/Makefile.am:
- add required test file cmr10.pfb to source tarballs (closes #87)
-
-2018-03-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/EmSpecialHandler.hpp, src/XMLDocument.hpp, src/dvisvgm.cpp:
- replaced memory-inefficient lists with vectors
-
- * src/XMLNode.cpp, src/XMLNode.hpp:
- replaced lists of XML element pointers with deques
-
- * src/CLCommandLine.cpp:
- fixed message printed if command-line contains an isolated '-'
-
-2018-03-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/brotli/Makefile.am, libs/brotli/common/constants.h,
- libs/brotli/common/context.h, libs/brotli/common/dictionary.h,
- libs/brotli/common/platform.h, libs/brotli/common/transform.h,
- libs/brotli/common/version.h, libs/brotli/enc/backward_references.c,
- libs/brotli/enc/backward_references.h,
- libs/brotli/enc/backward_references_hq.c,
- libs/brotli/enc/backward_references_hq.h,
- libs/brotli/enc/backward_references_inc.h, libs/brotli/enc/bit_cost.c,
- libs/brotli/enc/bit_cost.h, libs/brotli/enc/block_encoder_inc.h,
- libs/brotli/enc/block_splitter.c, libs/brotli/enc/block_splitter.h,
- libs/brotli/enc/block_splitter_inc.h,
- libs/brotli/enc/brotli_bit_stream.c, libs/brotli/enc/brotli_bit_stream.h,
- libs/brotli/enc/cluster.c, libs/brotli/enc/cluster.h,
- libs/brotli/enc/command.h, libs/brotli/enc/compress_fragment.c,
- libs/brotli/enc/compress_fragment.h,
- libs/brotli/enc/compress_fragment_two_pass.c,
- libs/brotli/enc/compress_fragment_two_pass.h,
- libs/brotli/enc/dictionary_hash.c, libs/brotli/enc/encode.c,
- libs/brotli/enc/encoder_dict.c, libs/brotli/enc/encoder_dict.h,
- libs/brotli/enc/entropy_encode.c, libs/brotli/enc/entropy_encode.h,
- libs/brotli/enc/entropy_encode_static.h, libs/brotli/enc/fast_log.h,
- libs/brotli/enc/find_match_length.h, libs/brotli/enc/hash.h,
- libs/brotli/enc/hash_forgetful_chain_inc.h,
- libs/brotli/enc/hash_longest_match64_inc.h,
- libs/brotli/enc/hash_longest_match_inc.h,
- libs/brotli/enc/hash_longest_match_quickly_inc.h,
- libs/brotli/enc/hash_to_binary_tree_inc.h, libs/brotli/enc/histogram.c,
- libs/brotli/enc/histogram.h, libs/brotli/enc/histogram_inc.h,
- libs/brotli/enc/literal_cost.c, libs/brotli/enc/literal_cost.h,
- libs/brotli/enc/memory.c, libs/brotli/enc/memory.h,
- libs/brotli/enc/metablock.c, libs/brotli/enc/metablock.h,
- libs/brotli/enc/metablock_inc.h, libs/brotli/enc/params.h,
- libs/brotli/enc/prefix.h, libs/brotli/enc/quality.h,
- libs/brotli/enc/ringbuffer.h, libs/brotli/enc/static_dict.c,
- libs/brotli/enc/static_dict.h, libs/brotli/enc/static_dict_lut.h,
- libs/brotli/enc/utf8_util.c, libs/brotli/enc/utf8_util.h,
- libs/brotli/enc/write_bits.h, libs/brotli/include/brotli/decode.h,
- libs/brotli/include/brotli/encode.h, libs/brotli/include/brotli/port.h:
- updated brotli to version 1.0.3
-
-2018-02-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- minor changes of the manpage
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.3.3
-
- * NEWS:
- updated NEWS
-
-2018-02-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PdfSpecialHandler.cpp, src/PdfSpecialHandler.hpp:
- don't remove fontmap definitions before processing pdf:mapXXX specials
-
- * src/FontEngine.cpp:
- prevent creating string from nullptr
-
-2018-02-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileSystem.cpp, src/FontCache.cpp, src/FontMap.cpp,
- src/GFGlyphTracer.cpp, src/MetafontWrapper.cpp, src/PsSpecialHandler.cpp,
- src/utility.cpp, tests/DVIReaderTest.cpp, tests/GFReaderTest.cpp,
- tests/JFMReaderTest.cpp, tests/TFMReaderTest.cpp:
- removed calls of c_str() redundant since C++11
-
- * src/StreamReader.cpp:
- replaced c_str() with data() in StreamReader
-
-2018-02-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.3.2
-
- * src/TpicSpecialHandler.cpp:
- prevent potential division by 0
-
- * src/dvisvgm.cpp:
- prevent dereferencing nullptr (CACHE_PATH)
-
- * NEWS:
- updated NEWS
-
-2018-02-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIActions.hpp, src/DVIReader.cpp, src/DVIReader.hpp,
- src/DVIToSVG.cpp, src/DVIToSVG.hpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.hpp:
- don't update the SVG position after DVIActions::setChar()
-Otherwise, all
- characters get an explicit x position assigned even if it's
-already
- reached by applying the character's advance width.
-
-2018-01-27 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
-
- * src/JFM.cpp:
- JFM.cpp: support new JFM spec introduced in TeX Live r46452
-
- * src/JFM.cpp, src/JFM.hpp, tests/JFMReaderTest.cpp:
- adapted types to conform new JFM format
-
- * src/options.xml:
- updated year in options.xml
-
- * src/FileFinder.cpp, src/Process.cpp:
- relaxed reading from process pipe; fixed getting output of kpsewhich
- (Win only)
-
-2018-01-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMap.hpp, src/RangeMap.hpp, src/ToUnicodeMap.cpp,
- tests/RangeMapTest.cpp, tests/ToUnicodeMapTest.cpp:
- renamed RangeMap::size() to RangeMap::numRanges()
-
-2018-01-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/RangeMap.cpp, src/RangeMap.hpp:
- added iterator and some getters to RangeMap
-
-2018-01-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- AppVeyor: updated to FreeType 2.9 and ttfautohint 1.8.1
-
- * .appveyor.yml:
- AppVeyor: fixed download link of ttfautohint-dll
-
- * NEWS:
- updated NEWS
-
-2018-01-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- manpage: reworded info about option --bbox=preview (closes #83)
-
-2018-01-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.3.1
-
-2018-01-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMapReader.cpp, src/Directory.cpp, src/Directory.hpp,
- src/DvisvgmSpecialHandler.cpp, src/FileFinder.cpp, src/FileFinder.hpp,
- src/FilePath.cpp, src/FilePath.hpp, src/FileSystem.cpp,
- src/FileSystem.hpp, src/Font.cpp, src/FontCache.cpp, src/FontCache.hpp,
- src/FontMap.cpp, src/FontMetrics.cpp, src/FontMetrics.hpp,
- src/MetafontWrapper.cpp:
- replaced some C string parameters with C++ strings
-
-2018-01-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, README, README.md, configure.ac, doc/Makefile.am,
- doc/conf-dblatex-man.xsl, doc/conf-dblatex-pdf.xsl, doc/db2html.xsl,
- doc/dvisvgm.txt.in, doc/tweak-db-article.xsl, doc/tweak-db-refentry.xsl,
- doc/tweak-dblatex-pdf.xsl, libs/Makefile.am,
- libs/ff-woff/fontforge/tmpfile2.cpp, src/AGLTable.hpp,
- src/BasicDVIReader.cpp, src/BasicDVIReader.hpp, src/Bezier.cpp,
- src/Bezier.hpp, src/BgColorSpecialHandler.cpp,
- src/BgColorSpecialHandler.hpp, src/Bitmap.cpp, src/Bitmap.hpp,
- src/BoundingBox.cpp, src/BoundingBox.hpp, src/CLCommandLine.cpp,
- src/CLCommandLine.hpp, src/CLOption.hpp, src/CMap.cpp, src/CMap.hpp,
- src/CMapManager.cpp, src/CMapManager.hpp, src/CMapReader.cpp,
- src/CMapReader.hpp, src/CRC32.cpp, src/CRC32.hpp, src/Calculator.cpp,
- src/Calculator.hpp, src/CharMapID.cpp, src/CharMapID.hpp,
- src/Character.hpp, src/Color.cpp, src/Color.hpp,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.hpp,
- src/CommandLine.hpp, src/DLLoader.cpp, src/DLLoader.hpp,
- src/DVIActions.hpp, src/DVIReader.cpp, src/DVIReader.hpp,
- src/DVIToSVG.cpp, src/DVIToSVG.hpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.hpp, src/DependencyGraph.hpp, src/Directory.cpp,
- src/Directory.hpp, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.hpp, src/EPSFile.cpp, src/EPSFile.hpp,
- src/EPSToSVG.cpp, src/EPSToSVG.hpp, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.hpp, src/EncFile.cpp, src/EncFile.hpp,
- src/FileFinder.cpp, src/FileFinder.hpp, src/FilePath.cpp,
- src/FilePath.hpp, src/FileSystem.cpp, src/FileSystem.hpp,
- src/FixWord.hpp, src/Font.cpp, src/Font.hpp, src/FontCache.cpp,
- src/FontCache.hpp, src/FontEncoding.cpp, src/FontEncoding.hpp,
- src/FontEngine.cpp, src/FontEngine.hpp, src/FontManager.cpp,
- src/FontManager.hpp, src/FontMap.cpp, src/FontMap.hpp,
- src/FontMetrics.cpp, src/FontMetrics.hpp, src/FontStyle.hpp,
- src/FontWriter.cpp, src/FontWriter.hpp, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.hpp, src/GFReader.cpp, src/GFReader.hpp,
- src/GFTracer.cpp, src/GFTracer.hpp, src/Ghostscript.cpp,
- src/Ghostscript.hpp, src/Glyph.hpp, src/GlyphTracerMessages.hpp,
- src/GraphicsPath.hpp, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.hpp, src/HyperlinkManager.cpp,
- src/HyperlinkManager.hpp, src/InputBuffer.cpp, src/InputBuffer.hpp,
- src/InputReader.cpp, src/InputReader.hpp, src/JFM.cpp, src/JFM.hpp,
- src/Length.cpp, src/Length.hpp, src/Makefile.am, src/MapLine.cpp,
- src/MapLine.hpp, src/Matrix.cpp, src/Matrix.hpp, src/Message.cpp,
- src/Message.hpp, src/MessageException.hpp, src/MetafontWrapper.cpp,
- src/MetafontWrapper.hpp, src/MiKTeXCom.cpp, src/MiKTeXCom.hpp,
- src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.hpp,
- src/NumericRanges.hpp, src/PDFParser.cpp, src/PDFParser.hpp,
- src/PSFilter.hpp, src/PSInterpreter.cpp, src/PSInterpreter.hpp,
- src/PSPattern.cpp, src/PSPattern.hpp, src/PSPreviewFilter.cpp,
- src/PSPreviewFilter.hpp, src/PageRanges.cpp, src/PageRanges.hpp,
- src/PageSize.cpp, src/PageSize.hpp, src/Pair.hpp,
- src/PapersizeSpecialHandler.cpp, src/PapersizeSpecialHandler.hpp,
- src/PathClipper.cpp, src/PathClipper.hpp, src/PdfSpecialHandler.cpp,
- src/PdfSpecialHandler.hpp, src/PreScanDVIReader.cpp,
- src/PreScanDVIReader.hpp, src/Process.cpp, src/Process.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/RangeMap.cpp,
- src/RangeMap.hpp, src/SVGCharHandler.cpp, src/SVGCharHandler.hpp,
- src/SVGCharHandlerFactory.cpp, src/SVGCharHandlerFactory.hpp,
- src/SVGCharPathHandler.cpp, src/SVGCharPathHandler.hpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGCharTspanTextHandler.hpp,
- src/SVGOutput.cpp, src/SVGOutput.hpp, src/SVGSingleCharTextHandler.cpp,
- src/SVGSingleCharTextHandler.hpp, src/SVGTree.cpp, src/SVGTree.hpp,
- src/ShadingPatch.cpp, src/ShadingPatch.hpp, src/SignalHandler.cpp,
- src/SignalHandler.hpp, src/SpecialActions.hpp, src/SpecialHandler.hpp,
- src/SpecialManager.cpp, src/SpecialManager.hpp, src/StreamReader.cpp,
- src/StreamReader.hpp, src/StreamWriter.cpp, src/StreamWriter.hpp,
- src/Subfont.cpp, src/Subfont.hpp, src/System.cpp, src/System.hpp,
- src/TFM.cpp, src/TFM.hpp, src/TTFAutohint.cpp, src/TTFAutohint.hpp,
- src/TensorProductPatch.cpp, src/TensorProductPatch.hpp, src/Terminal.cpp,
- src/Terminal.hpp, src/ToUnicodeMap.cpp, src/ToUnicodeMap.hpp,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.hpp,
- src/TriangularPatch.cpp, src/TriangularPatch.hpp, src/TrueTypeFont.cpp,
- src/TrueTypeFont.hpp, src/Unicode.cpp, src/Unicode.hpp,
- src/VFActions.hpp, src/VFReader.cpp, src/VFReader.hpp,
- src/VectorIterator.hpp, src/VectorStream.hpp, src/XMLDocument.cpp,
- src/XMLDocument.hpp, src/XMLNode.cpp, src/XMLNode.hpp, src/XMLString.cpp,
- src/XMLString.hpp, src/ZLibOutputStream.hpp, src/dvisvgm.cpp,
- src/ffwrapper.c, src/ffwrapper.h, src/macros.hpp, src/options.dtd,
- src/options.xml, src/psdefs.cpp, src/utility.cpp, src/utility.hpp,
- src/version.hpp, src/version.hpp.in, src/windows.hpp,
- tests/BezierTest.cpp, tests/BitmapTest.cpp, tests/BoundingBoxTest.cpp,
- tests/CMapManagerTest.cpp, tests/CMapReaderTest.cpp, tests/CMapTest.cpp,
- tests/CRC32Test.cpp, tests/CalculatorTest.cpp,
- tests/ColorSpecialTest.cpp, tests/ColorTest.cpp,
- tests/CommandLineTest.cpp, tests/DVIReaderTest.cpp,
- tests/DependencyGraphTest.cpp, tests/DirectoryTest.cpp,
- tests/DvisvgmSpecialTest.cpp, tests/EmSpecialTest.cpp,
- tests/FileFinderTest.cpp, tests/FilePathTest.cpp,
- tests/FileSystemTest.cpp, tests/FontCacheTest.cpp,
- tests/FontManagerTest.cpp, tests/FontMapTest.cpp,
- tests/GFGlyphTracerTest.cpp, tests/GFReaderTest.cpp,
- tests/GhostscriptTest.cpp, tests/GraphicsPathTest.cpp,
- tests/JFMReaderTest.cpp, tests/LengthTest.cpp, tests/Makefile.am,
- tests/MapLineTest.cpp, tests/MatrixTest.cpp,
- tests/MessageExceptionTest.cpp, tests/PDFParserTest.cpp,
- tests/PSInterpreterTest.cpp, tests/PageRagesTest.cpp,
- tests/PageSizeTest.cpp, tests/PairTest.cpp,
- tests/PapersizeSpecialTest.cpp, tests/RangeMapTest.cpp,
- tests/SVGOutputTest.cpp, tests/ShadingPatchTest.cpp,
- tests/SpecialManagerTest.cpp, tests/SplittedCharInputBufferTest.cpp,
- tests/StreamInputBufferTest.cpp, tests/StreamReaderTest.cpp,
- tests/StreamWriterTest.cpp, tests/StringMatcherTest.cpp,
- tests/SubfontTest.cpp, tests/TFMReaderTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/ToUnicodeMapTest.cpp,
- tests/TpicSpecialTest.cpp, tests/TriangularPatchTest.cpp,
- tests/UnicodeTest.cpp, tests/UtilityTest.cpp,
- tests/VectorIteratorTest.cpp, tests/VectorStreamTest.cpp,
- tests/XMLNodeTest.cpp, tests/XMLStringTest.cpp, tests/check-conv,
- tests/create-makefile, tests/data/Makefile.am, tests/genhashcheck.py,
- tests/normalize.xsl, tests/testmain.cpp:
- updated year in copyright statements to 2018
-
- * src/dvisvgm.cpp:
- avoid potential dangling string pointer to --fontmap argument
-
- * src/Font.cpp:
- fixed char width of fonts slanted by style option (closes #82)
-
-2017-12-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TTFAutohint.hpp:
- don't declare member variables of TTFAutohint if ttfautohint is not
- available
-
- * src/FontWriter.cpp:
- keep unhinted TTF if autohinting failed
-
-2017-12-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- AppVeyor: download and install ttfautohint headers
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.3
-
- * NEWS, README, README.md:
- updated README and NEWS
-
-2017-12-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DLLoader.cpp, src/DLLoader.hpp, src/Ghostscript.cpp,
- src/TTFAutohint.cpp:
- simplify function to load a symbol from a dynamic library
-
-2017-12-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/DLLoader.cpp, src/DLLoader.hpp, src/FontWriter.cpp,
- src/Makefile.am, src/TTFAutohint.cpp, src/TTFAutohint.hpp,
- src/dvisvgm.cpp:
- added code to load libttfautohint dynamically at runtime
-
-2017-12-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/xxHash/xxhash.c, libs/xxHash/xxhash.h:
- updated xxHash to version 0.6.4
-
-2017-12-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/gtest/include/gtest/gtest-param-test.h,
- tests/gtest/include/gtest/gtest-printers.h,
- tests/gtest/include/gtest/gtest-spi.h,
- tests/gtest/include/gtest/gtest-typed-test.h,
- tests/gtest/include/gtest/gtest.h,
- tests/gtest/include/gtest/internal/custom/gtest-port.h,
- tests/gtest/include/gtest/internal/custom/gtest.h,
- tests/gtest/include/gtest/internal/gtest-internal.h,
- tests/gtest/include/gtest/internal/gtest-param-util-generated.h,
- tests/gtest/include/gtest/internal/gtest-param-util.h,
- tests/gtest/include/gtest/internal/gtest-port-arch.h,
- tests/gtest/include/gtest/internal/gtest-port.h,
- tests/gtest/src/gtest-death-test.cc,
- tests/gtest/src/gtest-internal-inl.h, tests/gtest/src/gtest-port.cc,
- tests/gtest/src/gtest-printers.cc, tests/gtest/src/gtest.cc:
- updated gtest
-
-2017-12-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac:
- configure: dropped check of outdated Ghostscript version
-
- * configure.ac, src/Makefile.am:
- configure: added --with-kpathsea to set the path of the kpathsea devel
- files
-closes #71
-
-2017-12-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- psdefs: replaced '6 array' with 'matrix'
-
-2017-12-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/Makefile.am, libs/woff2/include/woff2/file.h,
- src/FontWriter.cpp, src/FontWriter.hpp, src/Makefile.am,
- src/StreamReader.hpp, src/StreamWriter.cpp, src/StreamWriter.hpp,
- src/TrueTypeFont.cpp, src/TrueTypeFont.hpp, src/ffwrapper.c,
- src/ffwrapper.h, src/utility.cpp, src/utility.hpp:
- replaced ff_sfd_to_woff() with TrueTypeFont::writeWOFF()
-
- * configure.ac, src/FontWriter.cpp, src/Makefile.am, src/dvisvgm.cpp:
- added optional support for ttfautohint
-
-2017-12-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, libs/Makefile.am, libs/brotli/LICENSE,
- libs/brotli/Makefile.am, libs/brotli/common/constants.h,
- libs/brotli/common/dictionary.c, libs/brotli/common/dictionary.h,
- libs/brotli/common/version.h, libs/brotli/enc/backward_references.c,
- libs/brotli/enc/backward_references.h,
- libs/brotli/enc/backward_references_hq.c,
- libs/brotli/enc/backward_references_hq.h,
- libs/brotli/enc/backward_references_inc.h, libs/brotli/enc/bit_cost.c,
- libs/brotli/enc/bit_cost.h, libs/brotli/enc/bit_cost_inc.h,
- libs/brotli/enc/block_encoder_inc.h, libs/brotli/enc/block_splitter.c,
- libs/brotli/enc/block_splitter.h, libs/brotli/enc/block_splitter_inc.h,
- libs/brotli/enc/brotli_bit_stream.c, libs/brotli/enc/brotli_bit_stream.h,
- libs/brotli/enc/cluster.c, libs/brotli/enc/cluster.h,
- libs/brotli/enc/cluster_inc.h, libs/brotli/enc/command.h,
- libs/brotli/enc/compress_fragment.c, libs/brotli/enc/compress_fragment.h,
- libs/brotli/enc/compress_fragment_two_pass.c,
- libs/brotli/enc/compress_fragment_two_pass.h, libs/brotli/enc/context.h,
- libs/brotli/enc/dictionary_hash.c, libs/brotli/enc/dictionary_hash.h,
- libs/brotli/enc/encode.c, libs/brotli/enc/entropy_encode.c,
- libs/brotli/enc/entropy_encode.h,
- libs/brotli/enc/entropy_encode_static.h, libs/brotli/enc/fast_log.h,
- libs/brotli/enc/find_match_length.h, libs/brotli/enc/hash.h,
- libs/brotli/enc/hash_forgetful_chain_inc.h,
- libs/brotli/enc/hash_longest_match64_inc.h,
- libs/brotli/enc/hash_longest_match_inc.h,
- libs/brotli/enc/hash_longest_match_quickly_inc.h,
- libs/brotli/enc/hash_to_binary_tree_inc.h, libs/brotli/enc/histogram.c,
- libs/brotli/enc/histogram.h, libs/brotli/enc/histogram_inc.h,
- libs/brotli/enc/literal_cost.c, libs/brotli/enc/literal_cost.h,
- libs/brotli/enc/memory.c, libs/brotli/enc/memory.h,
- libs/brotli/enc/metablock.c, libs/brotli/enc/metablock.h,
- libs/brotli/enc/metablock_inc.h, libs/brotli/enc/port.h,
- libs/brotli/enc/prefix.h, libs/brotli/enc/quality.h,
- libs/brotli/enc/ringbuffer.h, libs/brotli/enc/static_dict.c,
- libs/brotli/enc/static_dict.h, libs/brotli/enc/static_dict_lut.h,
- libs/brotli/enc/utf8_util.c, libs/brotli/enc/utf8_util.h,
- libs/brotli/enc/write_bits.h, libs/brotli/include/brotli/decode.h,
- libs/brotli/include/brotli/encode.h, libs/brotli/include/brotli/port.h,
- libs/brotli/include/brotli/types.h, libs/woff2/Makefile.am,
- libs/woff2/brotli/LICENSE, libs/woff2/brotli/Makefile.am,
- libs/woff2/brotli/common/constants.h,
- libs/woff2/brotli/common/dictionary.c,
- libs/woff2/brotli/common/dictionary.h,
- libs/woff2/brotli/common/version.h,
- libs/woff2/brotli/enc/backward_references.c,
- libs/woff2/brotli/enc/backward_references.h,
- libs/woff2/brotli/enc/backward_references_hq.c,
- libs/woff2/brotli/enc/backward_references_hq.h,
- libs/woff2/brotli/enc/backward_references_inc.h,
- libs/woff2/brotli/enc/bit_cost.c, libs/woff2/brotli/enc/bit_cost.h,
- libs/woff2/brotli/enc/bit_cost_inc.h,
- libs/woff2/brotli/enc/block_encoder_inc.h,
- libs/woff2/brotli/enc/block_splitter.c,
- libs/woff2/brotli/enc/block_splitter.h,
- libs/woff2/brotli/enc/block_splitter_inc.h,
- libs/woff2/brotli/enc/brotli_bit_stream.c,
- libs/woff2/brotli/enc/brotli_bit_stream.h,
- libs/woff2/brotli/enc/cluster.c, libs/woff2/brotli/enc/cluster.h,
- libs/woff2/brotli/enc/cluster_inc.h, libs/woff2/brotli/enc/command.h,
- libs/woff2/brotli/enc/compress_fragment.c,
- libs/woff2/brotli/enc/compress_fragment.h,
- libs/woff2/brotli/enc/compress_fragment_two_pass.c,
- libs/woff2/brotli/enc/compress_fragment_two_pass.h,
- libs/woff2/brotli/enc/context.h, libs/woff2/brotli/enc/dictionary_hash.c,
- libs/woff2/brotli/enc/dictionary_hash.h, libs/woff2/brotli/enc/encode.c,
- libs/woff2/brotli/enc/entropy_encode.c,
- libs/woff2/brotli/enc/entropy_encode.h,
- libs/woff2/brotli/enc/entropy_encode_static.h,
- libs/woff2/brotli/enc/fast_log.h,
- libs/woff2/brotli/enc/find_match_length.h, libs/woff2/brotli/enc/hash.h,
- libs/woff2/brotli/enc/hash_forgetful_chain_inc.h,
- libs/woff2/brotli/enc/hash_longest_match64_inc.h,
- libs/woff2/brotli/enc/hash_longest_match_inc.h,
- libs/woff2/brotli/enc/hash_longest_match_quickly_inc.h,
- libs/woff2/brotli/enc/hash_to_binary_tree_inc.h,
- libs/woff2/brotli/enc/histogram.c, libs/woff2/brotli/enc/histogram.h,
- libs/woff2/brotli/enc/histogram_inc.h,
- libs/woff2/brotli/enc/literal_cost.c,
- libs/woff2/brotli/enc/literal_cost.h, libs/woff2/brotli/enc/memory.c,
- libs/woff2/brotli/enc/memory.h, libs/woff2/brotli/enc/metablock.c,
- libs/woff2/brotli/enc/metablock.h, libs/woff2/brotli/enc/metablock_inc.h,
- libs/woff2/brotli/enc/port.h, libs/woff2/brotli/enc/prefix.h,
- libs/woff2/brotli/enc/quality.h, libs/woff2/brotli/enc/ringbuffer.h,
- libs/woff2/brotli/enc/static_dict.c, libs/woff2/brotli/enc/static_dict.h,
- libs/woff2/brotli/enc/static_dict_lut.h,
- libs/woff2/brotli/enc/utf8_util.c, libs/woff2/brotli/enc/utf8_util.h,
- libs/woff2/brotli/enc/write_bits.h,
- libs/woff2/brotli/include/brotli/decode.h,
- libs/woff2/brotli/include/brotli/encode.h,
- libs/woff2/brotli/include/brotli/port.h,
- libs/woff2/brotli/include/brotli/types.h, src/Makefile.am,
- tests/Makefile.am, tests/create-makefile:
- moved brotli from woff2 to libs folder
-
-2017-12-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/variant/include/mpark/config.hpp,
- libs/variant/include/mpark/lib.hpp,
- libs/variant/include/mpark/variant.hpp:
- updated mpark::variant to
- https://github.com/mpark/variant/commit/382014b
-fixes a build error
- introduced with MSVC 19.12
-
-2017-12-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.2.3
-
- * NEWS:
- updated NEWS
-
-2017-11-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/brotli/common/dictionary.h,
- libs/woff2/brotli/common/version.h,
- libs/woff2/brotli/enc/backward_references_hq.c,
- libs/woff2/brotli/enc/backward_references_hq.h,
- libs/woff2/brotli/enc/port.h, libs/woff2/brotli/enc/quality.h,
- libs/woff2/brotli/include/brotli/decode.h,
- libs/woff2/brotli/include/brotli/encode.h:
- updated brotli to version 1.0.2
-
-2017-11-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.cpp, src/BoundingBox.cpp, src/BoundingBox.hpp,
- src/Color.cpp, src/PathClipper.cpp, src/SVGTree.cpp,
- tests/BoundingBoxTest.cpp:
- minor code cleanup and improvements
-
- * src/DependencyGraph.hpp:
- simplified DependencyGraph::GraphNode
-
-2017-11-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/TpicSpecialTest.cpp:
- added missing initializers in TpicSpecialTest
-
- * tests/EmSpecialTest.cpp:
- added missing initializers in EmSpecialTest
-
- * src/DependencyGraph.hpp:
- fixed dangling pointer issue in DependencyGraph
-
- * src/Makefile.am, tests/Makefile.am, tests/create-makefile:
- suppress warnings regarding 'mismatched tags'
- (class/struct)
-https://gcc.gnu.org/wiki/FAQ#Why_GCC_does_not_warn_for_mismatch_between_struct_and_class_.28-Wmismatched-tags.29_.3F
-
-2017-11-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSPattern.cpp, src/SVGCharHandler.cpp, src/SVGTree.cpp,
- src/TpicSpecialHandler.cpp:
- removed redundant calls of std::move()
-
- * src/Subfont.cpp, src/Subfont.hpp, tests/CMapManagerTest.cpp,
- tests/FileFinderTest.cpp, tests/FontManagerTest.cpp, tests/Makefile.am,
- tests/MapLineTest.cpp, tests/SubfontTest.cpp, tests/create-makefile,
- tests/testmain.cpp, tests/testutil.hpp:
- tests: moved common initializations to testmain.cpp
-
- * src/DVIReader.hpp, tests/DVIReaderTest.cpp, tests/Makefile.am,
- tests/data/Makefile.am, tests/data/cmr10.pfb, tests/data/sample_v2.dvi,
- tests/data/sample_v3.dvi:
- added test for DVIReader
-
-2017-11-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am:
- removed redundant lcov statement from Makefile
-
-2017-11-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/CMapTest.cpp, tests/GFReaderTest.cpp, tests/JFMReaderTest.cpp,
- tests/RangeMapTest.cpp, tests/TFMReaderTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/ToUnicodeMapTest.cpp,
- tests/VectorStreamTest.cpp:
- tests: few code improvements
-
- * README.md:
- added donation badge to readme
-
-2017-11-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp, src/Font.hpp:
- prevent dangling pointers to font map entries (closes #79)
-
- * src/CMapManager.cpp, src/FileFinder.cpp, src/Font.cpp, src/Font.hpp,
- src/FontEngine.cpp, src/FontManager.cpp, src/FontMap.cpp,
- src/FontMap.hpp, src/Ghostscript.cpp, src/MiKTeXCom.cpp, src/XMLNode.cpp:
- replaced null pointer constants with 'nullptr'
-
- * src/XMLString.cpp, tests/TensorProductPatchTest.cpp,
- tests/XMLStringTest.cpp:
- avoid scientific notation when printing floats/doubles
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.2.2
-
- * NEWS:
- updated NEWS
-
-2017-11-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am:
- ensure tweak-db-refentry.xsl is put into the tarball
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.2.1
-
- * NEWS, README.md:
- updated NEWS and README
-
- * libs/variant/include/mpark/lib.hpp,
- libs/variant/include/mpark/variant.hpp:
- updated mpark::variant to commit
- ea542a0
-https://github.com/mpark/variant/commit/ea542a0fef86fb8c1696238b95bdaddb8ff2337c
-
-2017-11-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md, doc/dvisvgm.txt.in:
- minor additions/fixes of manpage and README
-
-2017-11-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am, doc/db2html.xsl, doc/tweak-db-refentry.xsl:
- manpage: avoid using 'stats' to improve portability (closes #72)
-
-2017-10-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/InputReader.cpp, src/InputReader.hpp, src/PSInterpreter.cpp:
- simplified code to lookup PS operators
-
-2017-10-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.hpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- properly apply CTM to linewidth (closes #77)
-
- * src/PsSpecialHandler.hpp, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- call applyscalevals on every change of the CTM
-
-2017-10-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/DVIToSVGActions.cpp, src/DVIToSVGActions.hpp,
- src/DvisvgmSpecialHandler.cpp, src/EPSToSVG.cpp, src/EPSToSVG.hpp,
- src/EmSpecialHandler.cpp, src/HyperlinkManager.cpp, src/PSPattern.cpp,
- src/PSPattern.hpp, src/PsSpecialHandler.cpp, src/SVGCharHandler.cpp,
- src/SVGCharHandler.hpp, src/SVGCharPathHandler.cpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGSingleCharTextHandler.cpp,
- src/SVGTree.cpp, src/SVGTree.hpp, src/ShadingPatch.hpp,
- src/SpecialActions.hpp, src/TpicSpecialHandler.cpp, src/XMLDocument.cpp,
- src/XMLDocument.hpp, src/XMLNode.cpp, src/XMLNode.hpp, src/utility.hpp,
- tests/DvisvgmSpecialTest.cpp, tests/EmSpecialTest.cpp,
- tests/TpicSpecialTest.cpp, tests/XMLNodeTest.cpp:
- replaced raw XMLNode pointers with unique_ptrs
-which helps to ensure
- proper ownership and simplifies deleting the corresponding objects
-
- * src/DependencyGraph.hpp, src/SVGTree.cpp, tests/DependencyGraphTest.cpp:
- manage heap memory in DependencyGraph with unique_ptrs
-
-2017-10-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/ff-woff/fontforge/macbinary.c:
- updated link to CTAN:/tools/macutils/crc
-
-2017-10-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/include/woff2/version.h:
- replaced CRLF line endings
-
-2017-10-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMapManager.cpp, src/CMapReader.cpp, src/CMapReader.hpp,
- src/DVIActions.hpp, src/DVIToSVG.cpp, src/DVIToSVG.hpp,
- src/DVIToSVGActions.hpp, src/FileFinder.cpp, src/Font.cpp, src/Font.hpp,
- src/FontEncoding.cpp, src/FontEncoding.hpp, src/FontEngine.cpp,
- src/FontEngine.hpp, src/FontManager.cpp, src/FontMetrics.cpp,
- src/FontMetrics.hpp, src/PSPattern.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.hpp, src/SVGCharHandlerFactory.cpp,
- src/SVGCharHandlerFactory.hpp, src/SVGOutput.cpp,
- src/SVGSingleCharTextHandler.hpp, src/SVGTree.cpp, src/ShadingPatch.cpp,
- src/ShadingPatch.hpp, src/SignalHandler.cpp, src/Subfont.cpp,
- src/Subfont.hpp, src/XMLNode.cpp, tests/CMapReaderTest.cpp,
- tests/ShadingPatchTest.cpp:
- replaced several bare new/delete statements with unique pointers
-
- * src/dvisvgm.cpp:
- fixed output of option --version
-
- * src/Length.hpp, src/PageSize.cpp:
- added user-defined literals for some length units
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.2
-
- * NEWS, README, README.md:
- updated NEWS and README
-
-2017-10-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontWriter.cpp:
- added missing #include of config.h
-
- * src/Message.cpp:
- check for '\0' at end of DVISVGM_COLORS
-
- * src/Subfont.cpp:
- don't access unique_ptr after it has been moved
-
-2017-10-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PDFParser.cpp, src/PDFParser.hpp:
- replaced shared_ptr with unique_ptr in PDFParser
-
-2017-10-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * AUTHORS, configure.ac, doc/dvisvgm.txt.in, libs/Makefile.am,
- libs/variant/CMakeLists.txt, libs/variant/LICENSE.md,
- libs/variant/Makefile.am, libs/variant/include/mpark/in_place.hpp,
- libs/variant/include/mpark/lib.hpp,
- libs/variant/include/mpark/variant.hpp, src/HyperlinkManager.cpp,
- src/HyperlinkManager.hpp, src/InputReader.hpp, src/Makefile.am,
- src/PDFParser.cpp, src/PDFParser.hpp, src/PdfSpecialHandler.cpp,
- src/PdfSpecialHandler.hpp, tests/Makefile.am, tests/PDFParserTest.cpp,
- tests/SpecialManagerTest.cpp, tests/create-makefile:
- added evaluation of PDF hyperlink specials (closes #74)
-
- * libs/variant/include/mpark/config.hpp:
- added missing config file
-
- * .travis.yml:
- Travis: use gcc 4.9 rather than 4.8 to compile mpark::variant correctly
-
- * tests/Makefile.am, tests/create-makefile, tests/testmain.cpp:
- add custom testmain to gtest.a
-
-2017-10-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/HtmlSpecialHandler.cpp, src/HtmlSpecialHandler.hpp,
- src/HyperlinkManager.cpp, src/HyperlinkManager.hpp, src/Makefile.am,
- src/dvisvgm.cpp:
- separated hyperlink functionality from HtmlSpecialHandler to
- HyperlinkManager
-
-2017-10-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/src/font.cc, libs/woff2/src/normalize.cc,
- libs/woff2/src/woff2_enc.cc:
- woff2: removed unused variables to prevent compiler warnings
-
- * libs/woff2/src/font.cc, libs/woff2/src/normalize.cc,
- libs/woff2/src/woff2_enc.cc:
- woff2: removed unused variables to prevent compiler warnings
-
-2017-10-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/Makefile.am, libs/woff2/include/woff2/decode.h,
- libs/woff2/include/woff2/encode.h, libs/woff2/include/woff2/file.h,
- libs/woff2/include/woff2/output.h, libs/woff2/include/woff2/version.h,
- libs/woff2/src/buffer.h, libs/woff2/src/file.h, libs/woff2/src/font.cc,
- libs/woff2/src/font.h, libs/woff2/src/glyph.cc, libs/woff2/src/glyph.h,
- libs/woff2/src/normalize.cc, libs/woff2/src/normalize.h,
- libs/woff2/src/port.h, libs/woff2/src/round.h,
- libs/woff2/src/store_bytes.h, libs/woff2/src/table_tags.cc,
- libs/woff2/src/table_tags.h, libs/woff2/src/transform.cc,
- libs/woff2/src/transform.h, libs/woff2/src/variable_length.cc,
- libs/woff2/src/variable_length.h, libs/woff2/src/woff2_common.cc,
- libs/woff2/src/woff2_common.h, libs/woff2/src/woff2_dec.h,
- libs/woff2/src/woff2_enc.cc, libs/woff2/src/woff2_enc.h,
- libs/woff2/src/woff2_out.cc, libs/woff2/src/woff2_out.h,
- src/FontWriter.cpp, src/Makefile.am, src/dvisvgm.cpp:
- updated woff2 to version 1.0.1
-
-2017-10-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CRC32.hpp, src/SpecialManager.hpp, src/Subfont.hpp, src/XMLNode.hpp:
- use delete/default to remove/implement constructors
-
- * src/XMLNode.cpp, src/XMLNode.hpp:
- added move constructor to XMLElementNode
-
- * src/Subfont.cpp, src/Subfont.hpp, src/utility.hpp:
- removed stream-based constructor of SubfontException
-
-2017-09-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/PapersizeSpecialHandler.cpp,
- src/PapersizeSpecialHandler.hpp, src/PdfSpecialHandler.cpp,
- src/PdfSpecialHandler.hpp, src/SpecialManager.cpp,
- src/SpecialManager.hpp, tests/PapersizeSpecialTest.cpp:
- added evaluation of pdf:pagesize specials
-
-2017-09-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/Length.hpp, src/PageSize.cpp, src/PageSize.hpp,
- src/utility.hpp, tests/PageSizeTest.cpp:
- use class Length in PageSize rather than plain numbers
-
- * src/BoundingBox.cpp, src/BoundingBox.hpp, src/DVIToSVG.cpp,
- src/utility.cpp, src/utility.hpp, tests/BoundingBoxTest.cpp,
- tests/UtilityTest.cpp:
- rewrite of BoundingBox::extractLengths()
-
-2017-09-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TpicSpecialHandler.cpp:
- use isxdigit() to check hex digits
-
- * src/InputReader.cpp, src/InputReader.hpp, tests/Makefile.am,
- tests/SplittedCharInputBufferTest.cpp, tests/StreamInputBufferTest.cpp,
- tests/StringMatcherTest.cpp:
- use Knuth-Morris-Pratt algorithm to find a string in a stream
-
- * libs/woff2/brotli/common/constants.h,
- libs/woff2/brotli/common/dictionary.c,
- libs/woff2/brotli/common/dictionary.h,
- libs/woff2/brotli/common/version.h,
- libs/woff2/brotli/enc/backward_references.c,
- libs/woff2/brotli/enc/backward_references_hq.c,
- libs/woff2/brotli/enc/backward_references_hq.h,
- libs/woff2/brotli/enc/backward_references_inc.h,
- libs/woff2/brotli/enc/block_splitter.c,
- libs/woff2/brotli/enc/block_splitter_inc.h,
- libs/woff2/brotli/enc/brotli_bit_stream.c,
- libs/woff2/brotli/enc/brotli_bit_stream.h,
- libs/woff2/brotli/enc/cluster_inc.h, libs/woff2/brotli/enc/command.h,
- libs/woff2/brotli/enc/compress_fragment.c,
- libs/woff2/brotli/enc/compress_fragment_two_pass.c,
- libs/woff2/brotli/enc/encode.c,
- libs/woff2/brotli/enc/find_match_length.h, libs/woff2/brotli/enc/hash.h,
- libs/woff2/brotli/enc/hash_forgetful_chain_inc.h,
- libs/woff2/brotli/enc/hash_longest_match64_inc.h,
- libs/woff2/brotli/enc/hash_longest_match_inc.h,
- libs/woff2/brotli/enc/hash_longest_match_quickly_inc.h,
- libs/woff2/brotli/enc/hash_to_binary_tree_inc.h,
- libs/woff2/brotli/enc/memory.h, libs/woff2/brotli/enc/port.h,
- libs/woff2/brotli/enc/write_bits.h,
- libs/woff2/brotli/include/brotli/decode.h,
- libs/woff2/brotli/include/brotli/encode.h:
- updated Brotli to version 1.0.1
-
-2017-09-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/SpecialManager.cpp, src/SpecialManager.hpp,
- src/utility.hpp, tests/Makefile.am, tests/SpecialManagerTest.cpp:
- use smart pointers to allocate/deallocate SpecialHandlers
-
- * src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.hpp,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.hpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.hpp,
- src/HtmlSpecialHandler.cpp, src/HtmlSpecialHandler.hpp,
- src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.hpp,
- src/PapersizeSpecialHandler.cpp, src/PapersizeSpecialHandler.hpp,
- src/PdfSpecialHandler.cpp, src/PdfSpecialHandler.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp,
- src/SpecialHandler.hpp, src/SpecialManager.cpp,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.hpp,
- tests/ColorSpecialTest.cpp, tests/PapersizeSpecialTest.cpp:
- changed return value of SpecialHandler::prefixes() to std::vector
-
- * .appveyor.yml:
- AppVeyor: updated FreeType to version 2.8.1
-
-2017-09-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/FileSystemTest.cpp:
- close streams before removing corresponding files
-
-2017-09-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/dvisvgm.cpp:
- fixed number of dashes printed by option -V1
-
-2017-09-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DependencyGraph.hpp, src/SVGTree.cpp, tests/DependencyGraphTest.cpp:
- DependencyGraph::getKeys(): return result, don't use reference parameter
-
- * src/FileFinder.cpp, src/Makefile.am:
- added missing #include; added windows.hpp to Makefile.am
-
- * tests/Makefile.am, tests/create-makefile, tests/testmain.cpp:
- define variable TEST_ARGV0 to make argv[0] of main() available in
- tests
-this is required to initialize kpathsea properly, for example
-
- * src/FileFinder.cpp, src/FileFinder.hpp, tests/CMapManagerTest.cpp,
- tests/FileFinderTest.cpp, tests/FontManagerTest.cpp,
- tests/MapLineTest.cpp, tests/SubfontTest.cpp:
- init libkpathsea correctly in tests to prevent assertion failures
-
- * libs/xxHash/xxhash.c, libs/xxHash/xxhash.h:
- updated xxHash to version 0.6.3
-
-2017-09-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/FontCacheTest.cpp, tests/Makefile.am, tests/create-makefile:
- fixed path issue in FontCacheTest
-
- * src/GFReader.cpp:
- fixed incorrect integer type in GFReader; insert CharInfos with emplace
-
- * src/MapLine.cpp, tests/MapLineTest.cpp:
- treat prefix "<<" in a mapline as "<[" (skip second char)
-
- * doc/dvisvgm.txt.in, src/dvisvgm.cpp:
- added pdftex.map to default mapfiles
-
-2017-09-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BasicDVIReader.cpp, src/BgColorSpecialHandler.cpp, src/Bitmap.cpp,
- src/BoundingBox.cpp, src/CMap.cpp, src/CMapReader.cpp, src/CRC32.cpp,
- src/Calculator.cpp, src/ColorSpecialHandler.cpp, src/DLLoader.cpp,
- src/DVIReader.cpp, src/Directory.cpp, src/EPSFile.cpp, src/EPSToSVG.cpp,
- src/EmSpecialHandler.cpp, src/EncFile.cpp, src/FileFinder.cpp,
- src/FilePath.cpp, src/Font.cpp, src/FontCache.cpp, src/FontEncoding.cpp,
- src/FontEngine.cpp, src/FontManager.cpp, src/FontMap.cpp,
- src/FontMap.hpp, src/FontMetrics.cpp, src/FontWriter.cpp,
- src/GFGlyphTracer.cpp, src/GFTracer.cpp, src/HtmlSpecialHandler.cpp,
- src/InputBuffer.cpp, src/InputReader.cpp, src/JFM.cpp, src/MapLine.cpp,
- src/Message.cpp, src/MetafontWrapper.cpp, src/MiKTeXCom.cpp,
- src/NoPsSpecialHandler.cpp, src/PSInterpreter.cpp, src/PSPattern.cpp,
- src/PSPreviewFilter.cpp, src/PageRanges.cpp, src/PageSize.cpp,
- src/PathClipper.cpp, src/PdfSpecialHandler.cpp, src/SVGTree.cpp,
- src/SpecialManager.cpp, src/StreamWriter.cpp, src/TFM.cpp,
- src/VFReader.cpp, src/XMLDocument.cpp, src/XMLNode.cpp,
- src/XMLString.cpp, src/dvisvgm.cpp:
- removed redundant #includes of config.h
-
- * src/DLLoader.hpp, src/Directory.cpp, src/Directory.hpp,
- src/FileSystem.cpp, src/MiKTeXCom.hpp, src/Process.cpp, src/Terminal.cpp,
- src/windows.hpp:
- disable macros min/max defined in windows.h
-
- * src/CLCommandLine.cpp, src/CMapManager.cpp, src/CMapManager.hpp,
- src/Calculator.cpp, src/Calculator.hpp, src/DVIToSVG.cpp,
- src/DVIToSVGActions.hpp, src/DependencyGraph.hpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.hpp,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.hpp, src/FileFinder.cpp,
- src/Font.cpp, src/Font.hpp, src/FontCache.hpp, src/FontEncoding.cpp,
- src/FontManager.cpp, src/FontManager.hpp, src/FontMap.hpp,
- src/GFReader.hpp, src/HtmlSpecialHandler.cpp, src/HtmlSpecialHandler.hpp,
- src/InputReader.cpp, src/InputReader.hpp, src/Message.cpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/SVGTree.cpp,
- src/SVGTree.hpp, src/SpecialManager.hpp, src/Subfont.cpp,
- src/Subfont.hpp, tests/StreamInputBufferTest.cpp:
- replaced std::map with std::unordered_map where possible to increase
- performance
-
-2017-09-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/DvisvgmSpecialTest.cpp:
- replaced constexpr with const to make clang happy
-
- * doc/dvisvgm.txt.in, src/DvisvgmSpecialHandler.cpp,
- tests/DvisvgmSpecialTest.cpp:
- allow all common length units in dvisvgm specials
-
-2017-08-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/AGLTable.hpp, src/CMapReader.cpp, src/Color.cpp,
- src/CommandLine.hpp, src/FontWriter.cpp, tests/genhashcheck.py:
- use list initialization on constant std::arrays
-
- * tests/MapLineTest.cpp:
- added braces to prevent compiler warnings
-
-2017-08-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMapManager.cpp, src/DvisvgmSpecialHandler.cpp, src/Font.cpp,
- src/Ghostscript.cpp, src/PsSpecialHandler.cpp, src/dvisvgm.cpp,
- tests/DvisvgmSpecialTest.cpp:
- use range-based for to iterate over a fixed sequence of items
-
-2017-08-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * m4/ax_code_coverage.m4:
- updated ax_code_coverage.m4 to version 25
-
-2017-08-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- AppVeyor: updated potrace to version 1.15
-
-2017-08-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/src/font.cc, libs/woff2/src/normalize.cc,
- libs/woff2/src/port.h, libs/woff2/src/store_bytes.h,
- libs/woff2/src/woff2_common.cc, libs/woff2/src/woff2_enc.cc:
- updated woff2 to https://github.com/google/woff2/commits/2e09253
-
-2017-06-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml:
- AppVeyor: changed build image to VS 2017; updated FreeType to 2.8
-
-2017-06-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- psfile: fixed sign of y coordinates
-
-2017-06-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.hpp:
- use bp units for line width and miter limit
-
-2017-06-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/EPSToSVG.cpp:
- remove redundant clipPath elements also when converting EPS files
-
-2017-05-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPath.hpp:
- replaced vector with deque in class GraphicsPath
-due to cheaper front
- insertions/deletions
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp:
- manage memory of ClippingStack with shared pointers
-- automatically
- deletes unreferenced path objects
-- avoids keeping popped (and no longer
- required) paths in the pool vector
-
-2017-05-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Pair.hpp, tests/PairTest.cpp:
- added abs() and negation operator to class Pair
-
- * src/Matrix.hpp, src/PsSpecialHandler.cpp:
- respect transformation of PS state in computation of psfile position
- (fixes #70)
-
- * src/FileFinder.cpp, src/PsSpecialHandler.cpp:
- lookup psfile in texmf tree if it's not present in cwd (fixes #69)
-
-2017-05-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/FontCacheTest.cpp, tests/Makefile.am, tests/create-makefile:
- FontCacheTest: write test output to $builddir/data
-$srcdir/data may be
- read-only so that the tests fail unintentionally
-
-2017-05-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/brotli/LICENSE, libs/woff2/brotli/Makefile.am,
- libs/woff2/brotli/common/constants.h,
- libs/woff2/brotli/common/dictionary.c,
- libs/woff2/brotli/common/dictionary.h,
- libs/woff2/brotli/common/version.h,
- libs/woff2/brotli/enc/backward_references.c,
- libs/woff2/brotli/enc/backward_references.h,
- libs/woff2/brotli/enc/backward_references_hq.c,
- libs/woff2/brotli/enc/backward_references_hq.h,
- libs/woff2/brotli/enc/backward_references_inc.h,
- libs/woff2/brotli/enc/block_splitter_inc.h,
- libs/woff2/brotli/enc/command.h,
- libs/woff2/brotli/enc/compress_fragment.c,
- libs/woff2/brotli/enc/compress_fragment.h,
- libs/woff2/brotli/enc/compress_fragment_two_pass.c,
- libs/woff2/brotli/enc/compress_fragment_two_pass.h,
- libs/woff2/brotli/enc/context.h, libs/woff2/brotli/enc/dictionary_hash.c,
- libs/woff2/brotli/enc/dictionary_hash.h, libs/woff2/brotli/enc/encode.c,
- libs/woff2/brotli/enc/fast_log.h, libs/woff2/brotli/enc/hash.h,
- libs/woff2/brotli/enc/hash_forgetful_chain_inc.h,
- libs/woff2/brotli/enc/hash_longest_match64_inc.h,
- libs/woff2/brotli/enc/hash_longest_match_inc.h,
- libs/woff2/brotli/enc/hash_longest_match_quickly_inc.h,
- libs/woff2/brotli/enc/hash_to_binary_tree_inc.h,
- libs/woff2/brotli/enc/histogram.c, libs/woff2/brotli/enc/literal_cost.c,
- libs/woff2/brotli/enc/memory.h, libs/woff2/brotli/enc/metablock.c,
- libs/woff2/brotli/enc/metablock.h, libs/woff2/brotli/enc/quality.h,
- libs/woff2/brotli/enc/static_dict.c, libs/woff2/brotli/enc/static_dict.h,
- libs/woff2/brotli/include/brotli/decode.h,
- libs/woff2/brotli/include/brotli/encode.h,
- libs/woff2/brotli/include/brotli/port.h,
- libs/woff2/brotli/include/brotli/types.h:
- updated brotli to version 0.6.0
-
-2017-05-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Process.cpp:
- close pipe if fork() fails
-
-2017-05-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/SignalHandler.cpp, src/SignalHandler.hpp:
- use sigaction() rather than signal() if possible
-
- * src/Process.cpp, src/Process.hpp:
- refactored Process class
-- use separate class to encapsulate
- system-dependent stuff and to ensure
- proper termination in case of
- signals or errors
-- prevent blocking if subprocess doesn't write anything
- to stdout/stderr
-
-2017-04-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Process.cpp:
- quit Process::run() if child process terminated unexpectedly (fixes #68)
-
-2017-04-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/Makefile.am, tests/create-makefile:
- added the FontWriter dependencies to the tests
-
-2017-04-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.cpp, src/Color.hpp, src/PSPattern.cpp,
- tests/ColorSpecialTest.cpp:
- avoid implicit conversion of Color object to RGB integer
-
- * src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.hpp,
- tests/Makefile.am, tests/TpicSpecialTest.cpp:
- improved the TPIC special handler and added tests for it
-
- * src/TpicSpecialHandler.cpp, tests/TpicSpecialTest.cpp:
- added evaluation of TPIC's 'tx' special command
-
-2017-04-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BasicDVIReader.hpp, src/BgColorSpecialHandler.hpp,
- src/CLCommandLine.hpp, src/CMapManager.hpp, src/DVIToSVGActions.hpp,
- src/DependencyGraph.hpp, src/DvisvgmSpecialHandler.hpp, src/FilePath.hpp,
- src/Font.hpp, src/FontCache.cpp, src/FontCache.hpp, src/FontEngine.cpp,
- src/FontManager.hpp, src/Ghostscript.hpp, src/Glyph.hpp,
- src/GraphicsPath.hpp, src/HtmlSpecialHandler.hpp, src/NumericRanges.hpp,
- src/PapersizeSpecialHandler.cpp, src/PapersizeSpecialHandler.hpp,
- src/PathClipper.cpp, src/PathClipper.hpp, src/PsSpecialHandler.hpp,
- src/RangeMap.hpp, src/SVGCharPathHandler.hpp, src/ShadingPatch.hpp,
- src/SpecialManager.hpp, src/Subfont.hpp, src/VFReader.hpp,
- src/XMLNode.cpp, src/XMLNode.hpp, src/dvisvgm.cpp:
- replaced typedefs with 'using' statements
-
-2017-04-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Ghostscript.cpp:
- simplify code for looking up libgs (closes #66)
-
-2017-04-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DLLoader.cpp, src/DLLoader.hpp:
- added DLLoader::loadLibrary() to assign a different library
-
- * src/DLLoader.cpp, src/DLLoader.hpp, src/Ghostscript.cpp:
- replaced c-string parameters of DLLoader() and loadLibrary() with
- std::string
-
-2017-04-13 Toby Fleming <tobywf@users.noreply.github.com>
-
- * src/Ghostscript.cpp:
- Auto-detect ghostscript dynamic library on macOS
-
-2017-03-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * m4/ax_code_coverage.m4, m4/ax_cxx_compile_stdcxx.m4:
- updated m4 scripts
-
-2017-03-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp, tests/FileFinderTest.cpp:
- fixed handling of absolute additional directories in FileFinder
-
- * tests/FilePathTest.cpp, tests/FontCacheTest.cpp,
- tests/SVGOutputTest.cpp:
- tests: minor path improvements
-
-2017-03-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/src/normalize.cc, libs/woff2/src/woff2_enc.cc:
- woff2: removed unused variables
-
- * src/Makefile.am, src/dvisvgm.cpp:
- improved generation of list showing the library versions
-
- * src/Color.cpp, src/FilePath.cpp, src/FontWriter.cpp, src/PageSize.cpp,
- src/dvisvgm.cpp, src/utility.cpp, src/utility.hpp, tests/UtilityTest.cpp:
- removed side-effect from util::to_lower(); returns new modified string
- instead
-
-2017-03-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/ff-woff/fontforge/nowakowskittfinstr.c:
- ff-woff: removed redundant variables
-
- * libs/woff2/Makefile.am, libs/woff2/brotli/Makefile.am,
- libs/woff2/brotli/common/constants.h,
- libs/woff2/brotli/common/dictionary.c,
- libs/woff2/brotli/common/dictionary.h,
- libs/woff2/brotli/common/version.h,
- libs/woff2/brotli/enc/backward_references.c,
- libs/woff2/brotli/enc/backward_references.cc,
- libs/woff2/brotli/enc/backward_references.h,
- libs/woff2/brotli/enc/backward_references_inc.h,
- libs/woff2/brotli/enc/bit_cost.c, libs/woff2/brotli/enc/bit_cost.h,
- libs/woff2/brotli/enc/bit_cost_inc.h,
- libs/woff2/brotli/enc/block_encoder_inc.h,
- libs/woff2/brotli/enc/block_splitter.c,
- libs/woff2/brotli/enc/block_splitter.cc,
- libs/woff2/brotli/enc/block_splitter.h,
- libs/woff2/brotli/enc/block_splitter_inc.h,
- libs/woff2/brotli/enc/brotli_bit_stream.c,
- libs/woff2/brotli/enc/brotli_bit_stream.cc,
- libs/woff2/brotli/enc/brotli_bit_stream.h,
- libs/woff2/brotli/enc/cluster.c, libs/woff2/brotli/enc/cluster.h,
- libs/woff2/brotli/enc/cluster_inc.h, libs/woff2/brotli/enc/command.h,
- libs/woff2/brotli/enc/compress_fragment.c,
- libs/woff2/brotli/enc/compress_fragment.cc,
- libs/woff2/brotli/enc/compress_fragment.h,
- libs/woff2/brotli/enc/compress_fragment_two_pass.c,
- libs/woff2/brotli/enc/compress_fragment_two_pass.cc,
- libs/woff2/brotli/enc/compress_fragment_two_pass.h,
- libs/woff2/brotli/enc/compressor.h, libs/woff2/brotli/enc/context.h,
- libs/woff2/brotli/enc/dictionary.cc, libs/woff2/brotli/enc/dictionary.h,
- libs/woff2/brotli/enc/dictionary_hash.h, libs/woff2/brotli/enc/encode.c,
- libs/woff2/brotli/enc/encode.cc, libs/woff2/brotli/enc/encode.h,
- libs/woff2/brotli/enc/encode_parallel.cc,
- libs/woff2/brotli/enc/encode_parallel.h,
- libs/woff2/brotli/enc/entropy_encode.c,
- libs/woff2/brotli/enc/entropy_encode.cc,
- libs/woff2/brotli/enc/entropy_encode.h,
- libs/woff2/brotli/enc/entropy_encode_static.h,
- libs/woff2/brotli/enc/fast_log.h,
- libs/woff2/brotli/enc/find_match_length.h, libs/woff2/brotli/enc/hash.h,
- libs/woff2/brotli/enc/hash_forgetful_chain_inc.h,
- libs/woff2/brotli/enc/hash_longest_match_inc.h,
- libs/woff2/brotli/enc/hash_longest_match_quickly_inc.h,
- libs/woff2/brotli/enc/histogram.c, libs/woff2/brotli/enc/histogram.cc,
- libs/woff2/brotli/enc/histogram.h, libs/woff2/brotli/enc/histogram_inc.h,
- libs/woff2/brotli/enc/literal_cost.c,
- libs/woff2/brotli/enc/literal_cost.cc,
- libs/woff2/brotli/enc/literal_cost.h, libs/woff2/brotli/enc/memory.c,
- libs/woff2/brotli/enc/memory.h, libs/woff2/brotli/enc/metablock.c,
- libs/woff2/brotli/enc/metablock.cc, libs/woff2/brotli/enc/metablock.h,
- libs/woff2/brotli/enc/metablock_inc.h, libs/woff2/brotli/enc/port.h,
- libs/woff2/brotli/enc/prefix.h, libs/woff2/brotli/enc/quality.h,
- libs/woff2/brotli/enc/ringbuffer.h, libs/woff2/brotli/enc/static_dict.c,
- libs/woff2/brotli/enc/static_dict.cc,
- libs/woff2/brotli/enc/static_dict.h,
- libs/woff2/brotli/enc/static_dict_lut.h,
- libs/woff2/brotli/enc/streams.cc, libs/woff2/brotli/enc/streams.h,
- libs/woff2/brotli/enc/transform.h, libs/woff2/brotli/enc/types.h,
- libs/woff2/brotli/enc/utf8_util.c, libs/woff2/brotli/enc/utf8_util.cc,
- libs/woff2/brotli/enc/utf8_util.h, libs/woff2/brotli/enc/write_bits.h,
- libs/woff2/brotli/include/brotli/decode.h,
- libs/woff2/brotli/include/brotli/encode.h,
- libs/woff2/brotli/include/brotli/port.h,
- libs/woff2/brotli/include/brotli/types.h, libs/woff2/src/buffer.h,
- libs/woff2/src/font.cc, libs/woff2/src/glyph.cc,
- libs/woff2/src/variable_length.cc, libs/woff2/src/woff2_dec.h,
- libs/woff2/src/woff2_enc.cc, src/Makefile.am:
- updated woff2 to https://github.com/google/woff2/commit/68e9ab5
-
-2017-02-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/BezierTest.cpp, tests/BitmapTest.cpp, tests/BoundingBoxTest.cpp,
- tests/CMapManagerTest.cpp, tests/CMapReaderTest.cpp, tests/CMapTest.cpp,
- tests/CRC32Test.cpp, tests/ColorTest.cpp, tests/CommandLineTest.cpp,
- tests/DirectoryTest.cpp, tests/FileSystemTest.cpp,
- tests/GraphicsPathTest.cpp, tests/JFMReaderTest.cpp,
- tests/MatrixTest.cpp, tests/PageRagesTest.cpp, tests/RangeMapTest.cpp,
- tests/SVGOutputTest.cpp, tests/SplittedCharInputBufferTest.cpp,
- tests/StreamInputBufferTest.cpp, tests/StreamReaderTest.cpp,
- tests/StreamWriterTest.cpp, tests/SubfontTest.cpp,
- tests/TFMReaderTest.cpp, tests/ToUnicodeMapTest.cpp,
- tests/UnicodeTest.cpp, tests/VectorIteratorTest.cpp,
- tests/XMLNodeTest.cpp:
- fixed signed/unsigned warnings in tests
-
-2017-02-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/woff2/brotli/tools/bro.cc, libs/woff2/brotli/tools/rfc-format.py,
- libs/woff2/brotli/tools/version.h:
- removed redundant files
-
-2017-02-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.1.3
-
- * NEWS:
- updated NEWS
-
-2017-02-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/ff-woff/inc/ffintl.h:
- ff-woff: removed redundant defines and prototypes to fix build failure
- on Solaris
-
- * tests/genhashcheck.py:
- reformatted genhashcheck
-
- * tests/BezierTest.cpp, tests/CRC32Test.cpp, tests/ToUnicodeMapTest.cpp,
- tests/UnicodeTest.cpp, tests/VectorIteratorTest.cpp,
- tests/XMLNodeTest.cpp:
- minor additions to some tests
-
-2017-02-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, libs/ff-woff/Makefile.am,
- libs/ff-woff/fontforge/fflocale.c, libs/ff-woff/fontforge/fflocale.h,
- libs/ff-woff/fontforge/sfd.c, libs/ff-woff/fontforge/splinefont.h,
- libs/ff-woff/fontforge/tottf.c:
- ff-woff: only call uselocale() if present, use setlocale() otherwise
-
-2017-02-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md:
- added information on required C++11 compiler to README
-
- * tests/genhashcheck.py:
- made genhashcheck.py compatible with Python 3 (plus few minor changes)
-
-2017-02-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/MapLine.cpp, src/MapLine.hpp, tests/ColorSpecialTest.cpp,
- tests/FontMapTest.cpp, tests/LengthTest.cpp, tests/MapLineTest.cpp:
- improved a couple of test cases
-
- * src/Color.cpp, src/Matrix.cpp, src/TpicSpecialHandler.cpp,
- src/utility.hpp:
- replaced non-standard constant M_PI with own definition
-
- * src/Color.cpp, src/Matrix.cpp, src/utility.hpp:
- replaced local copies of deg2rad with global function
-
-2017-02-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * .appveyor.yml, .travis.yml, appveyor.yml:
- exclude branch 'tmp' from CI builds
-
-2017-02-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/ff-woff/Makefile.am, libs/ff-woff/fontforge/fontforge.h,
- libs/ff-woff/inc/ffintl.h, libs/ff-woff/inc/intl.h:
- don't try to #include libintl.h
-
- * .travis.yml:
- Travis: enable clang builds again
-
- * NEWS:
- updated NEWS
-
-2017-02-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Calculator.cpp:
- fixed number parsing in Calculator class (failed on Mac)
-
- * tests/StreamReaderTest.cpp:
- clear istream flags to prevent failure of StreamReaderTest
-
- * libs/xxHash/xxhash.c, libs/xxHash/xxhash.h:
- removed 'restrict' keyword from xxHash
-
- * .travis.yml, appveyor.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.1.2
-
-2017-02-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * .gitignore, .travis.yml, Makefile.am, configure.ac, tests/Makefile.am,
- tests/create-makefile, tests/gtest/LICENSE,
- tests/gtest/include/gtest/gtest-death-test.h,
- tests/gtest/include/gtest/gtest-message.h,
- tests/gtest/include/gtest/gtest-param-test.h,
- tests/gtest/include/gtest/gtest-printers.h,
- tests/gtest/include/gtest/gtest-spi.h,
- tests/gtest/include/gtest/gtest-test-part.h,
- tests/gtest/include/gtest/gtest-typed-test.h,
- tests/gtest/include/gtest/gtest.h,
- tests/gtest/include/gtest/gtest_pred_impl.h,
- tests/gtest/include/gtest/gtest_prod.h,
- tests/gtest/include/gtest/internal/custom/gtest-port.h,
- tests/gtest/include/gtest/internal/custom/gtest-printers.h,
- tests/gtest/include/gtest/internal/custom/gtest.h,
- tests/gtest/include/gtest/internal/gtest-death-test-internal.h,
- tests/gtest/include/gtest/internal/gtest-filepath.h,
- tests/gtest/include/gtest/internal/gtest-internal.h,
- tests/gtest/include/gtest/internal/gtest-linked_ptr.h,
- tests/gtest/include/gtest/internal/gtest-param-util-generated.h,
- tests/gtest/include/gtest/internal/gtest-param-util.h,
- tests/gtest/include/gtest/internal/gtest-port-arch.h,
- tests/gtest/include/gtest/internal/gtest-port.h,
- tests/gtest/include/gtest/internal/gtest-string.h,
- tests/gtest/include/gtest/internal/gtest-tuple.h,
- tests/gtest/include/gtest/internal/gtest-type-util.h,
- tests/gtest/src/gtest-all.cc, tests/gtest/src/gtest-death-test.cc,
- tests/gtest/src/gtest-filepath.cc, tests/gtest/src/gtest-internal-inl.h,
- tests/gtest/src/gtest-port.cc, tests/gtest/src/gtest-printers.cc,
- tests/gtest/src/gtest-test-part.cc, tests/gtest/src/gtest-typed-test.cc,
- tests/gtest/src/gtest.cc, tests/gtest/src/gtest_main.cc:
- bundle gtest with the sources to simplify building and running the tests
-
- * src/Directory.cpp, tests/DirectoryTest.cpp:
- prevent calling closedir() with null pointer argument
-
- * src/VectorStream.hpp:
- don't access first vector component if the vector is empty
-
- * src/GFReader.cpp, src/StreamReader.cpp, tests/GFReaderTest.cpp,
- tests/StreamReaderTest.cpp:
- improved implementation of getString()
-
- * src/CLCommandLine.cpp:
- reset status flags before changing the sstream source
-
-2017-02-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/CommandLineTest.cpp:
- removed redundant function
-
- * src/XMLString.cpp, tests/EmSpecialTest.cpp, tests/GFGlyphTracerTest.cpp:
- avoid negative zeros (-0) in SVG output
-
- * src/BoundingBox.cpp:
- fixed memory issue in BoundingBox class
-
- * src/CMapReader.cpp, src/InputReader.cpp, src/InputReader.hpp,
- tests/SplittedCharInputBufferTest.cpp, tests/StreamInputBufferTest.cpp:
- fixed potential number overflow issue
-
- * tests/CMapReaderTest.cpp:
- fixed memory leak in CMapReaderTest
-
- * src/Subfont.cpp:
- fixed memory leak in Subfont class
-
- * src/XMLNode.cpp:
- fixed memory leak in class XMLElementNode
-
-2017-02-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac:
- replaced deprecated AC_CONFIG_HEADER
-
- * NEWS:
- updated NEWS
-
- * libs/clipper/License.txt:
- fixed line endings of clipper/License.txt
-
-2017-02-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, appveyor.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.1.1
-
-2017-02-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/FontCacheTest.cpp:
- fixed FontCacheTest ('make distcheck' failed)
-
-2017-02-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.cpp, src/Color.hpp, src/VectorIterator.hpp,
- tests/ColorTest.cpp, tests/VectorIteratorTest.cpp:
- increased coverage of ColorTest
-
- * configure.ac, libs/ff-woff/fontforge/splinefont.h:
- include xlocale.h in ff-woff if available (fixes #65)
-
-2017-02-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Makefile.am:
- removed spurious colon from src/Makefile.am
-
- * configure.ac:
- allow C++11 language extensions if necessary
-
- * src/Font.cpp, src/Font.hpp:
- report Metafont failures only once for each font
-
-2017-01-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md:
- README: updated links, added release badge
-
-2017-01-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/FontManagerTest.cpp, tests/data/cmr10.pfb:
- prevent FontManagerTest to fail due to missing font files
-
-2017-01-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Matrix.cpp, tests/MatrixTest.cpp:
- minor changes of matrix class; improved MatrixTest
-
-2017-01-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PapersizeSpecialHandler.cpp, src/PapersizeSpecialHandler.hpp,
- tests/Makefile.am, tests/PapersizeSpecialTest.cpp, tests/create-makefile:
- added PapersizeSpecialTest
-
- * tests/CMapManagerTest.cpp, tests/CMapReaderTest.cpp,
- tests/DvisvgmSpecialTest.cpp, tests/EmSpecialTest.cpp,
- tests/FileFinderTest.cpp, tests/FontManagerTest.cpp,
- tests/JFMReaderTest.cpp, tests/MapLineTest.cpp, tests/SubfontTest.cpp,
- tests/TFMReaderTest.cpp, tests/TensorProductPatchTest.cpp:
- added 'override' specifier to gtest methods
-
- * src/FontCache.cpp, src/FontCache.hpp, tests/FontCacheTest.cpp,
- tests/Makefile.am:
- added FontCacheTest
-
- * tests/Makefile.am, tests/create-makefile:
- removed redundant linker flag from tests
-
- * m4/ax_code_coverage.m4, m4/ax_cxx_compile_stdcxx.m4:
- updated m4 scripts to latest versions
-
-2017-01-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * README.md, appveyor.yml:
- added basic appveyor.yml
-
-2017-01-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/ff-woff/Makefile.am, libs/ff-woff/fontforge/fontforge.h,
- libs/ff-woff/fontforge/tmpfile2.cpp, libs/ff-woff/fontforge/utils.c,
- src/dvisvgm.cpp:
- improved error handling of tmpfile2() in ff-woff
-The FontForge library
- doesn't check the return value of tmpfile() which may lead
-to segfaults.
- The replacement function tmpfile2() throws an exception or calls
-exit()
- so that dvisvgm can terminate more cleanly.
-
-2017-01-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BoundingBox.cpp, src/Color.cpp, src/DVIToSVGActions.cpp,
- src/FilePath.cpp, src/FileSystem.cpp, src/FontWriter.cpp,
- src/Makefile.am, src/PageSize.cpp, src/SVGOutput.cpp, src/utility.cpp,
- src/utility.hpp, tests/Makefile.am, tests/UtilityTest.cpp:
- moved common utility functions to separate compilation unit and
- namespace
-
- * src/DVIToSVG.cpp, src/DVIToSVGActions.cpp, src/EPSToSVG.cpp:
- get program name and version from version.hpp, avoid using macros from
- config.h
-
- * .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.1
-
- * NEWS:
- updated NEWS
-
-2017-01-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * libs/ff-woff/fontforge/utils.c, src/FileSystem.cpp, src/FileSystem.hpp,
- src/Font.cpp, src/FontWriter.cpp, src/GlyphTracerMessages.hpp,
- src/MetafontWrapper.cpp, src/MetafontWrapper.hpp, src/Process.cpp,
- src/Process.hpp, src/SVGOutput.cpp, src/SVGOutput.hpp:
- create temp files in the system's temp folder rather than in cwd (closes
- #63)
-
- * doc/dvisvgm.txt.in, src/CommandLine.hpp, src/dvisvgm.cpp,
- src/options.xml:
- added option --tmpdir to select a different temp folder
-
- * src/FontWriter.cpp, src/FontWriter.hpp:
- print error message if FontWriter can't write temporary files
-
-2017-01-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FilePath.cpp, src/FilePath.hpp, tests/FilePathTest.cpp,
- tests/SVGOutputTest.cpp:
- retain letter case of filenames (Windows)
-
- * src/DVIToSVG.cpp, src/EPSToSVG.cpp, src/SVGTree.hpp:
- print warning message if output file could not be written
-
- * tests/GhostscriptTest.cpp:
- disable GS banner in GhostscriptTest
-
-2017-01-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp, src/dvisvgm.cpp:
- added missing newlines in messages; fixed typo
-
-2017-01-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/AGLTable.hpp:
- updated AGL table and removed colliding codepoints (closes #64)
-
-2017-01-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, README, README.md, configure.ac, doc/Makefile.am,
- doc/conf-dblatex-man.xsl, doc/conf-dblatex-pdf.xsl, doc/db2html.xsl,
- doc/dvisvgm.txt.in, doc/tweak-db-article.xsl, doc/tweak-dblatex-pdf.xsl,
- libs/Makefile.am, src/AGLTable.hpp, src/BasicDVIReader.cpp,
- src/BasicDVIReader.hpp, src/Bezier.cpp, src/Bezier.hpp,
- src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.hpp,
- src/Bitmap.cpp, src/Bitmap.hpp, src/BoundingBox.cpp, src/BoundingBox.hpp,
- src/CLCommandLine.cpp, src/CLCommandLine.hpp, src/CLOption.hpp,
- src/CMap.cpp, src/CMap.hpp, src/CMapManager.cpp, src/CMapManager.hpp,
- src/CMapReader.cpp, src/CMapReader.hpp, src/CRC32.cpp, src/CRC32.hpp,
- src/Calculator.cpp, src/Calculator.hpp, src/CharMapID.cpp,
- src/CharMapID.hpp, src/Character.hpp, src/Color.cpp, src/Color.hpp,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.hpp,
- src/CommandLine.hpp, src/DLLoader.cpp, src/DLLoader.hpp,
- src/DVIActions.hpp, src/DVIReader.cpp, src/DVIReader.hpp,
- src/DVIToSVG.cpp, src/DVIToSVG.hpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.hpp, src/DependencyGraph.hpp, src/Directory.cpp,
- src/Directory.hpp, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.hpp, src/EPSFile.cpp, src/EPSFile.hpp,
- src/EPSToSVG.cpp, src/EPSToSVG.hpp, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.hpp, src/EncFile.cpp, src/EncFile.hpp,
- src/FileFinder.cpp, src/FileFinder.hpp, src/FilePath.cpp,
- src/FilePath.hpp, src/FileSystem.cpp, src/FileSystem.hpp,
- src/FixWord.hpp, src/Font.cpp, src/Font.hpp, src/FontCache.cpp,
- src/FontCache.hpp, src/FontEncoding.cpp, src/FontEncoding.hpp,
- src/FontEngine.cpp, src/FontEngine.hpp, src/FontManager.cpp,
- src/FontManager.hpp, src/FontMap.cpp, src/FontMap.hpp,
- src/FontMetrics.cpp, src/FontMetrics.hpp, src/FontStyle.hpp,
- src/FontWriter.cpp, src/FontWriter.hpp, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.hpp, src/GFReader.cpp, src/GFReader.hpp,
- src/GFTracer.cpp, src/GFTracer.hpp, src/Ghostscript.cpp,
- src/Ghostscript.hpp, src/Glyph.hpp, src/GlyphTracerMessages.hpp,
- src/GraphicsPath.hpp, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.hpp, src/InputBuffer.cpp, src/InputBuffer.hpp,
- src/InputReader.cpp, src/InputReader.hpp, src/JFM.cpp, src/JFM.hpp,
- src/Length.cpp, src/Length.hpp, src/Makefile.am, src/MapLine.cpp,
- src/MapLine.hpp, src/Matrix.cpp, src/Matrix.hpp, src/Message.cpp,
- src/Message.hpp, src/MessageException.hpp, src/MetafontWrapper.cpp,
- src/MetafontWrapper.hpp, src/MiKTeXCom.cpp, src/MiKTeXCom.hpp,
- src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.hpp,
- src/NumericRanges.hpp, src/PSFilter.hpp, src/PSInterpreter.cpp,
- src/PSInterpreter.hpp, src/PSPattern.cpp, src/PSPattern.hpp,
- src/PSPreviewFilter.cpp, src/PSPreviewFilter.hpp, src/PageRanges.cpp,
- src/PageRanges.hpp, src/PageSize.cpp, src/PageSize.hpp, src/Pair.hpp,
- src/PapersizeSpecialHandler.cpp, src/PapersizeSpecialHandler.hpp,
- src/PathClipper.cpp, src/PathClipper.hpp, src/PdfSpecialHandler.cpp,
- src/PdfSpecialHandler.hpp, src/PreScanDVIReader.cpp,
- src/PreScanDVIReader.hpp, src/Process.cpp, src/Process.hpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.hpp, src/RangeMap.cpp,
- src/RangeMap.hpp, src/SVGCharHandler.cpp, src/SVGCharHandler.hpp,
- src/SVGCharHandlerFactory.cpp, src/SVGCharHandlerFactory.hpp,
- src/SVGCharPathHandler.cpp, src/SVGCharPathHandler.hpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGCharTspanTextHandler.hpp,
- src/SVGOutput.cpp, src/SVGOutput.hpp, src/SVGSingleCharTextHandler.cpp,
- src/SVGSingleCharTextHandler.hpp, src/SVGTree.cpp, src/SVGTree.hpp,
- src/ShadingPatch.cpp, src/ShadingPatch.hpp, src/SignalHandler.cpp,
- src/SignalHandler.hpp, src/SpecialActions.hpp, src/SpecialHandler.hpp,
- src/SpecialManager.cpp, src/SpecialManager.hpp, src/StreamReader.cpp,
- src/StreamReader.hpp, src/StreamWriter.cpp, src/StreamWriter.hpp,
- src/Subfont.cpp, src/Subfont.hpp, src/System.cpp, src/System.hpp,
- src/TFM.cpp, src/TFM.hpp, src/TensorProductPatch.cpp,
- src/TensorProductPatch.hpp, src/Terminal.cpp, src/Terminal.hpp,
- src/ToUnicodeMap.cpp, src/ToUnicodeMap.hpp, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.hpp, src/TriangularPatch.cpp,
- src/TriangularPatch.hpp, src/Unicode.cpp, src/Unicode.hpp,
- src/VFActions.hpp, src/VFReader.cpp, src/VFReader.hpp,
- src/VectorIterator.hpp, src/VectorStream.hpp, src/XMLDocument.cpp,
- src/XMLDocument.hpp, src/XMLNode.cpp, src/XMLNode.hpp, src/XMLString.cpp,
- src/XMLString.hpp, src/ZLibOutputStream.hpp, src/dvisvgm.cpp,
- src/ffwrapper.c, src/ffwrapper.h, src/macros.hpp, src/options.dtd,
- src/options.xml, src/psdefs.cpp, src/version.hpp, src/version.hpp.in,
- tests/BezierTest.cpp, tests/BitmapTest.cpp, tests/BoundingBoxTest.cpp,
- tests/CMapManagerTest.cpp, tests/CMapReaderTest.cpp, tests/CMapTest.cpp,
- tests/CRC32Test.cpp, tests/CalculatorTest.cpp,
- tests/ColorSpecialTest.cpp, tests/ColorTest.cpp,
- tests/CommandLineTest.cpp, tests/DependencyGraphTest.cpp,
- tests/DirectoryTest.cpp, tests/DvisvgmSpecialTest.cpp,
- tests/EmSpecialTest.cpp, tests/FileFinderTest.cpp,
- tests/FilePathTest.cpp, tests/FileSystemTest.cpp,
- tests/FontManagerTest.cpp, tests/FontMapTest.cpp,
- tests/GFGlyphTracerTest.cpp, tests/GFReaderTest.cpp,
- tests/GraphicsPathTest.cpp, tests/JFMReaderTest.cpp,
- tests/LengthTest.cpp, tests/Makefile.am, tests/MapLineTest.cpp,
- tests/MatrixTest.cpp, tests/MessageExceptionTest.cpp,
- tests/PSInterpreterTest.cpp, tests/PageRagesTest.cpp,
- tests/PageSizeTest.cpp, tests/PairTest.cpp, tests/RangeMapTest.cpp,
- tests/SVGOutputTest.cpp, tests/ShadingPatchTest.cpp,
- tests/SplittedCharInputBufferTest.cpp, tests/StreamInputBufferTest.cpp,
- tests/StreamReaderTest.cpp, tests/StreamWriterTest.cpp,
- tests/SubfontTest.cpp, tests/TFMReaderTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/ToUnicodeMapTest.cpp,
- tests/TriangularPatchTest.cpp, tests/UnicodeTest.cpp,
- tests/VectorIteratorTest.cpp, tests/VectorStreamTest.cpp,
- tests/XMLNodeTest.cpp, tests/XMLStringTest.cpp, tests/check-conv,
- tests/create-makefile, tests/data/Makefile.am, tests/genhashcheck.py,
- tests/normalize.xsl:
- updated year in copyright statements to 2017
-
-2016-12-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am, doc/conf-dblatex-pdf.xsl, doc/db2html.xsl,
- doc/dvisvgm.txt.in, doc/dvisvgm.xpr, doc/tweak-db-article.xsl:
- manpage: minor refactorings of the XSLT scripts; added generation of
- epub
-
-2016-12-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/conf-dblatex-man.xsl, doc/conf-dblatex-pdf.xsl, doc/db2html.xsl,
- doc/tweak-dblatex-pdf.xsl:
- added missing email address to copyright headers
-
- * doc/conf-dblatex-man.xsl, doc/conf-dblatex-pdf.xsl,
- doc/tweak-dblatex-pdf.xsl:
- indent with tabs rather than spaces
-
- * doc/db2html.xsl:
- manpage: replace icon of Author section
-
- * doc/conf-dblatex-pdf.xsl, doc/tweak-dblatex-pdf.xsl:
- manpage: use mixed case titles in pdf output
-
-2016-12-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/db2html.xsl, doc/dvisvgm.xpr:
- manpage: preserve whitespace in list of supported specials
-
-2016-11-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac:
- ensure compiling C files with --std=c99
-
-2016-11-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS:
- updated NEWS
-
-2016-11-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- minor changes in manpage
-
- * README, README.md, configure.ac, libs/Makefile.am, libs/ff-woff/LICENSE,
- libs/ff-woff/Makefile.am, libs/ff-woff/README.md,
- libs/ff-woff/fontforge/PfEd.h, libs/ff-woff/fontforge/alphabet.c,
- libs/ff-woff/fontforge/asmfpst.c, libs/ff-woff/fontforge/autohint.c,
- libs/ff-woff/fontforge/char.c, libs/ff-woff/fontforge/cjk.c,
- libs/ff-woff/fontforge/configure-fontforge.h,
- libs/ff-woff/fontforge/cvundoes.c, libs/ff-woff/fontforge/dumppfa.c,
- libs/ff-woff/fontforge/edgelist.h, libs/ff-woff/fontforge/edgelist2.h,
- libs/ff-woff/fontforge/encoding.c, libs/ff-woff/fontforge/encoding.h,
- libs/ff-woff/fontforge/fontforge-config.h,
- libs/ff-woff/fontforge/fontforge.h, libs/ff-woff/fontforge/fontforgevw.h,
- libs/ff-woff/fontforge/fvfonts.c, libs/ff-woff/fontforge/gwwiconv.c,
- libs/ff-woff/fontforge/libffstamp.h, libs/ff-woff/fontforge/lookups.c,
- libs/ff-woff/fontforge/macbinary.c, libs/ff-woff/fontforge/macenc.c,
- libs/ff-woff/fontforge/mathconstants.c, libs/ff-woff/fontforge/memory.c,
- libs/ff-woff/fontforge/mm.c, libs/ff-woff/fontforge/namehash.h,
- libs/ff-woff/fontforge/namelist.c, libs/ff-woff/fontforge/nouiutil.c,
- libs/ff-woff/fontforge/nowakowskittfinstr.c,
- libs/ff-woff/fontforge/parsepfa.c, libs/ff-woff/fontforge/parsettf.c,
- libs/ff-woff/fontforge/parsettfatt.c, libs/ff-woff/fontforge/psfont.h,
- libs/ff-woff/fontforge/psread.c, libs/ff-woff/fontforge/pua.c,
- libs/ff-woff/fontforge/sd.h, libs/ff-woff/fontforge/sfd.c,
- libs/ff-woff/fontforge/sfd1.c, libs/ff-woff/fontforge/sfd1.h,
- libs/ff-woff/fontforge/splinechar.c, libs/ff-woff/fontforge/splinefont.c,
- libs/ff-woff/fontforge/splinefont.h,
- libs/ff-woff/fontforge/splineorder2.c,
- libs/ff-woff/fontforge/splineoverlap.c,
- libs/ff-woff/fontforge/splinerefigure.c,
- libs/ff-woff/fontforge/splinesave.c,
- libs/ff-woff/fontforge/splinesaveafm.c,
- libs/ff-woff/fontforge/splineutil.c,
- libs/ff-woff/fontforge/splineutil2.c, libs/ff-woff/fontforge/start.c,
- libs/ff-woff/fontforge/stemdb.c, libs/ff-woff/fontforge/stemdb.h,
- libs/ff-woff/fontforge/tables.h, libs/ff-woff/fontforge/tottf.c,
- libs/ff-woff/fontforge/tottfaat.c, libs/ff-woff/fontforge/tottfgpos.c,
- libs/ff-woff/fontforge/tottfvar.c, libs/ff-woff/fontforge/ttf.h,
- libs/ff-woff/fontforge/ttfinstrs.c, libs/ff-woff/fontforge/ttfinstrs.h,
- libs/ff-woff/fontforge/ttfspecial.c,
- libs/ff-woff/fontforge/uiinterface.h, libs/ff-woff/fontforge/unialt.c,
- libs/ff-woff/fontforge/ustring.c, libs/ff-woff/fontforge/utils.c,
- libs/ff-woff/fontforge/utype.c, libs/ff-woff/fontforge/woff.c,
- libs/ff-woff/inc/basics.h, libs/ff-woff/inc/chardata.h,
- libs/ff-woff/inc/charset.h, libs/ff-woff/inc/dlist.h,
- libs/ff-woff/inc/gimage.h, libs/ff-woff/inc/gnetwork.h,
- libs/ff-woff/inc/gwwiconv.h, libs/ff-woff/inc/intl.h,
- libs/ff-woff/inc/ustring.h, libs/ff-woff/inc/utype.h, src/Makefile.am:
- bundle reduced fontforge library (ff-woff)
-
- * configure.ac, libs/Makefile.am, libs/clipper/Makefile.am,
- libs/ff-woff/Makefile.am, libs/woff2/Makefile.am,
- libs/woff2/brotli/Makefile.am, libs/woff2/brotli/enc/Makefile.am,
- libs/woff2/src/Makefile.am, src/Makefile.am:
- added license files of bundled libraries; relocated Makefiles
-
- * .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.0.4
-
-2016-11-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CommandLine.hpp, src/options.xml:
- fixed a typo in the --help output
-
- * src/BasicDVIReader.cpp, src/BasicDVIReader.hpp, src/DVIReader.cpp,
- src/DVIReader.hpp:
- use const variables for DVI opcodes rather than the values directly
-
-2016-11-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontWriter.cpp:
- few cosmetic changes; added comments
-
-2016-09-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.0.3
-
- * NEWS, README, README.md:
- updated NEWS and README
-
-2016-09-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/DVIReader.hpp, src/DVIToSVG.cpp,
- src/DVIToSVG.hpp:
- dropped tracking of previous DVI state from DVIReader
-
- * src/DVIReader.cpp:
- fixed positioning of rules
-
-2016-09-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/DVIReader.hpp, src/DVIToSVG.cpp:
- fixed regression in character positioning of of virtual fonts
-
-2016-09-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp:
- fixed type regression in computation of DVI positions (closes #61)
-
- * .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.0.2
-
- * NEWS, README.md:
- updated NEWS and README
-
-2016-09-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp:
- fixed sign of character depth computed for native fonts
-
-2016-09-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.0.1
-
- * NEWS, README, README.md:
- updated NEWS and README
-
-2016-08-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md:
- added link to reduced FF library to README
-
- * doc/dvisvgm.txt.in, src/FontWriter.cpp, src/FontWriter.hpp,
- src/SVGTree.cpp, src/SVGTree.hpp, src/ffwrapper.c:
- added option to autohint fonts created by the FontForge library
-
-2016-08-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVGActions.hpp, src/FontManager.hpp, src/MetafontWrapper.hpp:
- adapted struct/class forward declarations
-
-2016-08-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp, src/FileFinder.hpp:
- removed unused variable
-
- * src/CLCommandLine.cpp:
- added missing cast to avoid compiler warning
-
- * .travis.yml, configure.ac, src/Doxyfile, src/version.hpp:
- set version to 2.0
-
- * README, README.md:
- updated README files
-
- * NEWS:
- updated NEWS
-
-2016-08-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml:
- use Ubuntu Trusty for Travis builds
-
- * .travis.yml:
- Travis: prevent rebuilding files in folder 'src' when calling 'make
- check'
-
- * src/FontWriter.cpp, src/FontWriter.hpp, src/ffwrapper.c,
- src/ffwrapper.h:
- added missing copyright headers
-
-2016-08-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, clipper/License.txt, clipper/Makefile.am,
- clipper/clipper.cpp, clipper/clipper.hpp, configure.ac, libs/Makefile.am,
- libs/clipper/License.txt, libs/clipper/Makefile.am,
- libs/clipper/clipper.cpp, libs/clipper/clipper.hpp, libs/xxHash/LICENSE,
- libs/xxHash/Makefile.am, libs/xxHash/xxhash.c, libs/xxHash/xxhash.h,
- src/Makefile.am, tests/Makefile.am, tests/create-makefile,
- xxHash/LICENSE, xxHash/Makefile.am, xxHash/xxhash.c, xxHash/xxhash.h:
- moved bundled libraries (clipper, xxHash) to subfolder 'libs'
-
- * configure.ac, doc/dvisvgm.txt.in, libs/Makefile.am, libs/woff2/LICENSE,
- libs/woff2/brotli/LICENSE, libs/woff2/brotli/enc/Makefile.am,
- libs/woff2/brotli/enc/backward_references.cc,
- libs/woff2/brotli/enc/backward_references.h,
- libs/woff2/brotli/enc/bit_cost.h,
- libs/woff2/brotli/enc/block_splitter.cc,
- libs/woff2/brotli/enc/block_splitter.h,
- libs/woff2/brotli/enc/brotli_bit_stream.cc,
- libs/woff2/brotli/enc/brotli_bit_stream.h,
- libs/woff2/brotli/enc/cluster.h, libs/woff2/brotli/enc/command.h,
- libs/woff2/brotli/enc/compress_fragment.cc,
- libs/woff2/brotli/enc/compress_fragment.h,
- libs/woff2/brotli/enc/compress_fragment_two_pass.cc,
- libs/woff2/brotli/enc/compress_fragment_two_pass.h,
- libs/woff2/brotli/enc/compressor.h, libs/woff2/brotli/enc/context.h,
- libs/woff2/brotli/enc/dictionary.cc, libs/woff2/brotli/enc/dictionary.h,
- libs/woff2/brotli/enc/dictionary_hash.h, libs/woff2/brotli/enc/encode.cc,
- libs/woff2/brotli/enc/encode.h, libs/woff2/brotli/enc/encode_parallel.cc,
- libs/woff2/brotli/enc/encode_parallel.h,
- libs/woff2/brotli/enc/entropy_encode.cc,
- libs/woff2/brotli/enc/entropy_encode.h,
- libs/woff2/brotli/enc/entropy_encode_static.h,
- libs/woff2/brotli/enc/fast_log.h,
- libs/woff2/brotli/enc/find_match_length.h, libs/woff2/brotli/enc/hash.h,
- libs/woff2/brotli/enc/histogram.cc, libs/woff2/brotli/enc/histogram.h,
- libs/woff2/brotli/enc/literal_cost.cc,
- libs/woff2/brotli/enc/literal_cost.h, libs/woff2/brotli/enc/metablock.cc,
- libs/woff2/brotli/enc/metablock.h, libs/woff2/brotli/enc/port.h,
- libs/woff2/brotli/enc/prefix.h, libs/woff2/brotli/enc/ringbuffer.h,
- libs/woff2/brotli/enc/static_dict.cc,
- libs/woff2/brotli/enc/static_dict.h,
- libs/woff2/brotli/enc/static_dict_lut.h,
- libs/woff2/brotli/enc/streams.cc, libs/woff2/brotli/enc/streams.h,
- libs/woff2/brotli/enc/transform.h, libs/woff2/brotli/enc/types.h,
- libs/woff2/brotli/enc/utf8_util.cc, libs/woff2/brotli/enc/utf8_util.h,
- libs/woff2/brotli/enc/write_bits.h, libs/woff2/brotli/tools/bro.cc,
- libs/woff2/brotli/tools/rfc-format.py, libs/woff2/brotli/tools/version.h,
- libs/woff2/src/Makefile.am, libs/woff2/src/buffer.h,
- libs/woff2/src/file.h, libs/woff2/src/font.cc, libs/woff2/src/font.h,
- libs/woff2/src/glyph.cc, libs/woff2/src/glyph.h,
- libs/woff2/src/normalize.cc, libs/woff2/src/normalize.h,
- libs/woff2/src/port.h, libs/woff2/src/round.h,
- libs/woff2/src/store_bytes.h, libs/woff2/src/table_tags.cc,
- libs/woff2/src/table_tags.h, libs/woff2/src/transform.cc,
- libs/woff2/src/transform.h, libs/woff2/src/variable_length.cc,
- libs/woff2/src/variable_length.h, libs/woff2/src/woff2_common.cc,
- libs/woff2/src/woff2_common.h, libs/woff2/src/woff2_dec.h,
- libs/woff2/src/woff2_enc.cc, libs/woff2/src/woff2_enc.h,
- libs/woff2/src/woff2_out.cc, libs/woff2/src/woff2_out.h,
- src/FontWriter.cpp, src/FontWriter.hpp, src/Makefile.am:
- added support for embedding WOFF2 fonts
-
-2016-08-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLNode.hpp:
- added move constructors to XMLNode classes
-
-2016-08-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontEngine.cpp:
- fixed sign of the font descender
-
- * configure.ac, doc/dvisvgm.txt.in, src/CommandLine.hpp,
- src/FontWriter.cpp, src/FontWriter.hpp, src/GraphicsPath.hpp,
- src/Makefile.am, src/SVGTree.cpp, src/SVGTree.hpp, src/XMLNode.cpp,
- src/XMLNode.hpp, src/dvisvgm.cpp, src/ffwrapper.c, src/ffwrapper.h,
- src/options.xml:
- added option --font-format to select the file format used to embed fonts
-
-2016-08-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * xxHash/xxhash.c, xxHash/xxhash.h:
- updated xxHash to version 0.6.2
-
-2016-08-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FixWord.hpp, src/Font.cpp, src/FontMetrics.hpp, src/SVGTree.cpp,
- src/TFM.cpp, src/TFM.hpp:
- added getters for ascent and descent to TFM-based fonts
-
-2016-08-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Ghostscript.hpp:
- removed copy constructor of class Ghostscript
-
- * src/PathClipper.cpp:
- added missing initializers
-
-2016-08-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/CLCommandLine.cpp, src/CLCommandLine.hpp,
- src/CommandLine.hpp, src/Makefile.am, src/dvisvgm.cpp, src/options.dtd,
- src/options.xml, src/version.hpp, src/version.hpp.in:
- added version.hpp to provide the current version number
-
-2016-08-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/DVIReader.hpp, src/Directory.cpp,
- src/Directory.hpp, src/FilePath.cpp, src/FilePath.hpp, src/Font.cpp,
- src/Font.hpp, src/FontManager.cpp, src/FontManager.hpp, src/GFReader.hpp,
- src/PageRanges.cpp, src/PageRanges.hpp, src/PageSize.cpp,
- src/PageSize.hpp, src/SVGOutput.cpp, src/SVGOutput.hpp,
- src/VFActions.hpp, src/VFReader.cpp:
- pass string parameters by reference if possible
-
- * src/System.cpp, src/dvisvgm.cpp:
- minor refactorings of dvisvgm.cpp
-
- * src/Ghostscript.cpp, src/MiKTeXCom.cpp:
- replaced __WIN64__ with pre-defined _WIN64
-
-2016-08-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CLCommandLine.cpp, src/CLCommandLine.hpp, src/CLOption.hpp,
- src/CmdLineParserBase.cpp, src/CmdLineParserBase.hpp,
- src/CommandLine.cpp, src/CommandLine.hpp, src/Makefile.am,
- src/dvisvgm.cpp, src/options.dtd, src/options.xml,
- tests/CommandLineTest.cpp:
- reimplemented the CommandLine parser class
-
- * src/CMap.cpp, src/CMapManager.cpp, src/CMapReader.cpp, src/EncFile.cpp,
- src/FileFinder.cpp, src/FileFinder.hpp, src/Font.cpp,
- src/FontEncoding.cpp, src/FontManager.cpp, src/FontMap.cpp,
- src/FontMetrics.cpp, src/Ghostscript.cpp, src/MetafontWrapper.cpp,
- src/PsSpecialHandler.cpp, src/Subfont.cpp, src/dvisvgm.cpp,
- tests/CMapManagerTest.cpp, tests/FileFinderTest.cpp,
- tests/MapLineTest.cpp, tests/SubfontTest.cpp:
- made FileFinder a singleton again
-
-2016-07-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.cpp, src/BoundingBox.cpp,
- src/DvisvgmSpecialHandler.cpp, src/EmSpecialHandler.cpp,
- src/FileSystem.cpp, src/FontCache.cpp, src/FontEngine.cpp,
- src/FontManager.cpp, src/GraphicsPath.hpp, src/PSInterpreter.cpp,
- src/PapersizeSpecialHandler.cpp, src/PathClipper.cpp, src/RangeMap.cpp,
- src/Subfont.cpp, src/TpicSpecialHandler.cpp, src/XMLDocument.cpp,
- src/XMLNode.cpp:
- replaced insert/push_back with emplace/emplace_back where useful
-
-2016-07-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PathClipper.cpp:
- some minor refactorings of class PathClipper
-
- * src/CMapReader.cpp:
- minor refactoring of class CMapReader
-
-2016-07-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontMap.cpp, src/FontMap.hpp:
- some syntactic refactorings of class FontMap
-
- * src/FontManager.cpp, src/FontManager.hpp:
- use unique_ptr to automatically release Font objects in class
- FontManager
-
-2016-07-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/AGLTable.h, src/AGLTable.hpp, src/BasicDVIReader.cpp,
- src/BasicDVIReader.h, src/BasicDVIReader.hpp, src/Bezier.cpp,
- src/Bezier.h, src/Bezier.hpp, src/BgColorSpecialHandler.cpp,
- src/BgColorSpecialHandler.h, src/BgColorSpecialHandler.hpp,
- src/Bitmap.cpp, src/Bitmap.h, src/Bitmap.hpp, src/BoundingBox.cpp,
- src/BoundingBox.h, src/BoundingBox.hpp, src/CMap.cpp, src/CMap.h,
- src/CMap.hpp, src/CMapManager.cpp, src/CMapManager.h,
- src/CMapManager.hpp, src/CMapReader.cpp, src/CMapReader.h,
- src/CMapReader.hpp, src/CRC32.cpp, src/CRC32.h, src/CRC32.hpp,
- src/Calculator.cpp, src/Calculator.h, src/Calculator.hpp,
- src/CharMapID.cpp, src/CharMapID.h, src/CharMapID.hpp, src/Character.h,
- src/Character.hpp, src/CmdLineParserBase.cpp, src/CmdLineParserBase.h,
- src/CmdLineParserBase.hpp, src/Color.cpp, src/Color.h, src/Color.hpp,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/ColorSpecialHandler.hpp, src/CommandLine.cpp, src/CommandLine.h,
- src/CommandLine.hpp, src/DLLoader.cpp, src/DLLoader.h, src/DLLoader.hpp,
- src/DVIActions.h, src/DVIActions.hpp, src/DVIReader.cpp, src/DVIReader.h,
- src/DVIReader.hpp, src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVG.hpp,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/DVIToSVGActions.hpp,
- src/DependencyGraph.h, src/DependencyGraph.hpp, src/Directory.cpp,
- src/Directory.h, src/Directory.hpp, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.h, src/DvisvgmSpecialHandler.hpp,
- src/EPSFile.cpp, src/EPSFile.h, src/EPSFile.hpp, src/EPSToSVG.cpp,
- src/EPSToSVG.h, src/EPSToSVG.hpp, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.h, src/EmSpecialHandler.hpp, src/EncFile.cpp,
- src/EncFile.h, src/EncFile.hpp, src/FileFinder.cpp, src/FileFinder.h,
- src/FileFinder.hpp, src/FilePath.cpp, src/FilePath.h, src/FilePath.hpp,
- src/FileSystem.cpp, src/FileSystem.h, src/FileSystem.hpp, src/FixWord.h,
- src/FixWord.hpp, src/Font.cpp, src/Font.h, src/Font.hpp,
- src/FontCache.cpp, src/FontCache.h, src/FontCache.hpp,
- src/FontEncoding.cpp, src/FontEncoding.h, src/FontEncoding.hpp,
- src/FontEngine.cpp, src/FontEngine.h, src/FontEngine.hpp,
- src/FontManager.cpp, src/FontManager.h, src/FontManager.hpp,
- src/FontMap.cpp, src/FontMap.h, src/FontMap.hpp, src/FontMetrics.cpp,
- src/FontMetrics.h, src/FontMetrics.hpp, src/FontStyle.h,
- src/FontStyle.hpp, src/GFGlyphTracer.cpp, src/GFGlyphTracer.h,
- src/GFGlyphTracer.hpp, src/GFReader.cpp, src/GFReader.h,
- src/GFReader.hpp, src/GFTracer.cpp, src/GFTracer.h, src/GFTracer.hpp,
- src/Ghostscript.cpp, src/Ghostscript.h, src/Ghostscript.hpp, src/Glyph.h,
- src/Glyph.hpp, src/GlyphTracerMessages.h, src/GlyphTracerMessages.hpp,
- src/GraphicsPath.h, src/GraphicsPath.hpp, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.h, src/HtmlSpecialHandler.hpp,
- src/InputBuffer.cpp, src/InputBuffer.h, src/InputBuffer.hpp,
- src/InputReader.cpp, src/InputReader.h, src/InputReader.hpp, src/JFM.cpp,
- src/JFM.h, src/JFM.hpp, src/Length.cpp, src/Length.h, src/Length.hpp,
- src/Makefile.am, src/MapLine.cpp, src/MapLine.h, src/MapLine.hpp,
- src/Matrix.cpp, src/Matrix.h, src/Matrix.hpp, src/Message.cpp,
- src/Message.h, src/Message.hpp, src/MessageException.h,
- src/MessageException.hpp, src/MetafontWrapper.cpp, src/MetafontWrapper.h,
- src/MetafontWrapper.hpp, src/MiKTeXCom.cpp, src/MiKTeXCom.h,
- src/MiKTeXCom.hpp, src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.h,
- src/NoPsSpecialHandler.hpp, src/NumericRanges.h, src/NumericRanges.hpp,
- src/PSFilter.h, src/PSFilter.hpp, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PSInterpreter.hpp, src/PSPattern.cpp,
- src/PSPattern.h, src/PSPattern.hpp, src/PSPreviewFilter.cpp,
- src/PSPreviewFilter.h, src/PSPreviewFilter.hpp, src/PageRanges.cpp,
- src/PageRanges.h, src/PageRanges.hpp, src/PageSize.cpp, src/PageSize.h,
- src/PageSize.hpp, src/Pair.h, src/Pair.hpp,
- src/PapersizeSpecialHandler.cpp, src/PapersizeSpecialHandler.h,
- src/PapersizeSpecialHandler.hpp, src/PathClipper.cpp, src/PathClipper.h,
- src/PathClipper.hpp, src/PdfSpecialHandler.cpp, src/PdfSpecialHandler.h,
- src/PdfSpecialHandler.hpp, src/PreScanDVIReader.cpp,
- src/PreScanDVIReader.h, src/PreScanDVIReader.hpp, src/Process.cpp,
- src/Process.h, src/Process.hpp, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/PsSpecialHandler.hpp, src/RangeMap.cpp,
- src/RangeMap.h, src/RangeMap.hpp, src/SVGCharHandler.cpp,
- src/SVGCharHandler.h, src/SVGCharHandler.hpp,
- src/SVGCharHandlerFactory.cpp, src/SVGCharHandlerFactory.h,
- src/SVGCharHandlerFactory.hpp, src/SVGCharPathHandler.cpp,
- src/SVGCharPathHandler.h, src/SVGCharPathHandler.hpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGCharTspanTextHandler.h,
- src/SVGCharTspanTextHandler.hpp, src/SVGOutput.cpp, src/SVGOutput.h,
- src/SVGOutput.hpp, src/SVGSingleCharTextHandler.cpp,
- src/SVGSingleCharTextHandler.h, src/SVGSingleCharTextHandler.hpp,
- src/SVGTree.cpp, src/SVGTree.h, src/SVGTree.hpp, src/ShadingPatch.cpp,
- src/ShadingPatch.h, src/ShadingPatch.hpp, src/SignalHandler.cpp,
- src/SignalHandler.h, src/SignalHandler.hpp, src/SpecialActions.h,
- src/SpecialActions.hpp, src/SpecialHandler.h, src/SpecialHandler.hpp,
- src/SpecialManager.cpp, src/SpecialManager.h, src/SpecialManager.hpp,
- src/StreamReader.cpp, src/StreamReader.h, src/StreamReader.hpp,
- src/StreamWriter.cpp, src/StreamWriter.h, src/StreamWriter.hpp,
- src/Subfont.cpp, src/Subfont.h, src/Subfont.hpp, src/System.cpp,
- src/System.h, src/System.hpp, src/TFM.cpp, src/TFM.h, src/TFM.hpp,
- src/TensorProductPatch.cpp, src/TensorProductPatch.h,
- src/TensorProductPatch.hpp, src/Terminal.cpp, src/Terminal.h,
- src/Terminal.hpp, src/ToUnicodeMap.cpp, src/ToUnicodeMap.h,
- src/ToUnicodeMap.hpp, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h, src/TpicSpecialHandler.hpp,
- src/TriangularPatch.cpp, src/TriangularPatch.h, src/TriangularPatch.hpp,
- src/Unicode.cpp, src/Unicode.h, src/Unicode.hpp, src/VFActions.h,
- src/VFActions.hpp, src/VFReader.cpp, src/VFReader.h, src/VFReader.hpp,
- src/VectorIterator.h, src/VectorIterator.hpp, src/VectorStream.h,
- src/VectorStream.hpp, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLDocument.hpp, src/XMLNode.cpp, src/XMLNode.h, src/XMLNode.hpp,
- src/XMLString.cpp, src/XMLString.h, src/XMLString.hpp,
- src/ZLibOutputStream.h, src/ZLibOutputStream.hpp, src/dvisvgm.cpp,
- src/macros.h, src/macros.hpp, src/psdefs.cpp, tests/BezierTest.cpp,
- tests/BitmapTest.cpp, tests/BoundingBoxTest.cpp,
- tests/CMapManagerTest.cpp, tests/CMapReaderTest.cpp, tests/CMapTest.cpp,
- tests/CRC32Test.cpp, tests/CalculatorTest.cpp,
- tests/ColorSpecialTest.cpp, tests/ColorTest.cpp,
- tests/CommandLineTest.cpp, tests/DependencyGraphTest.cpp,
- tests/DirectoryTest.cpp, tests/DvisvgmSpecialTest.cpp,
- tests/EmSpecialTest.cpp, tests/FileFinderTest.cpp,
- tests/FilePathTest.cpp, tests/FileSystemTest.cpp,
- tests/FontManagerTest.cpp, tests/FontMapTest.cpp,
- tests/GFGlyphTracerTest.cpp, tests/GFReaderTest.cpp,
- tests/GhostscriptTest.cpp, tests/GraphicsPathTest.cpp,
- tests/JFMReaderTest.cpp, tests/LengthTest.cpp, tests/Makefile.am,
- tests/MapLineTest.cpp, tests/MatrixTest.cpp,
- tests/MessageExceptionTest.cpp, tests/PSInterpreterTest.cpp,
- tests/PageRagesTest.cpp, tests/PageSizeTest.cpp, tests/PairTest.cpp,
- tests/RangeMapTest.cpp, tests/SVGOutputTest.cpp,
- tests/ShadingPatchTest.cpp, tests/SplittedCharInputBufferTest.cpp,
- tests/StreamInputBufferTest.cpp, tests/StreamReaderTest.cpp,
- tests/StreamWriterTest.cpp, tests/SubfontTest.cpp,
- tests/TFMReaderTest.cpp, tests/TensorProductPatchTest.cpp,
- tests/ToUnicodeMapTest.cpp, tests/TriangularPatchTest.cpp,
- tests/UnicodeTest.cpp, tests/VectorIteratorTest.cpp,
- tests/VectorStreamTest.cpp, tests/XMLNodeTest.cpp,
- tests/XMLStringTest.cpp, tests/create-makefile:
- renamed filename extension of C++ headers to .hpp
-
-2016-07-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMapManager.cpp, src/CMapManager.h, src/FileFinder.cpp,
- src/Font.cpp, src/Font.h, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLNode.cpp, src/XMLNode.h, tests/XMLNodeTest.cpp:
- use smart pointers to release heap memory
-
- * src/DVIToSVGActions.cpp, src/DVIToSVGActions.h:
- create BoxMap object directly, avoid new/delete
-
-2016-07-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/AGLTable.h, src/Color.cpp, src/Unicode.cpp, tests/genhashcheck.py:
- replaced repeated binary search implementations with calls of
- lower_bound()
-
-2016-07-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp, src/Message.cpp:
- initialize maps with initializer-lists
-
-2016-07-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Length.cpp, src/TpicSpecialHandler.cpp:
- replaced 'id macros' with constexpr functions
-
-2016-07-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TFM.cpp:
- added missing initializers
-
- * src/dvisvgm.cpp:
- catch exception in set_cache_dir()
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.16
-
- * NEWS, README.md:
- updated NEWS and README
-
-2016-07-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, m4/ax_cxx_compile_stdcxx.m4:
- switch from C++03 to C++11
-
- * src/NumericRanges.h, src/PapersizeSpecialHandler.cpp, src/Unicode.cpp,
- src/VFReader.cpp:
- replaced static callback functions with lambdas
-
- * src/CMapReader.cpp, src/CMapReader.h, src/CmdLineParserBase.cpp,
- src/CmdLineParserBase.h, src/Color.cpp, src/Color.h, src/CommandLine.cpp,
- src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp,
- src/EmSpecialHandler.cpp, src/Font.cpp, src/Font.h, src/FontManager.cpp,
- src/GraphicsPath.h, src/HtmlSpecialHandler.cpp, src/HtmlSpecialHandler.h,
- src/Length.cpp, src/Length.h, src/PathClipper.cpp,
- src/PsSpecialHandler.cpp, src/SVGTree.cpp, src/ShadingPatch.cpp,
- src/TensorProductPatch.h, tests/BoundingBoxTest.cpp,
- tests/LengthTest.cpp, tests/ShadingPatchTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/TriangularPatchTest.cpp:
- replaced some enums with enum classes
-
- * clipper/clipper.hpp, src/AGLTable.h, src/BasicDVIReader.cpp,
- src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.h, src/CMap.cpp,
- src/CMap.h, src/CMapReader.cpp, src/CRC32.cpp, src/CRC32.h,
- src/CharMapID.h, src/Character.h, src/Color.cpp, src/Color.h,
- src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp,
- src/DVIToSVG.h, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/EPSFile.cpp, src/EPSFile.h, src/EncFile.cpp, src/EncFile.h,
- src/FileSystem.cpp, src/FileSystem.h, src/FixWord.h, src/Font.cpp,
- src/Font.h, src/FontCache.cpp, src/FontCache.h, src/FontEncoding.cpp,
- src/FontEncoding.h, src/FontEngine.cpp, src/FontEngine.h,
- src/FontManager.cpp, src/FontManager.h, src/FontMetrics.cpp,
- src/FontMetrics.h, src/GFGlyphTracer.cpp, src/GFGlyphTracer.h,
- src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp, src/GFTracer.h,
- src/Glyph.h, src/GlyphTracerMessages.h, src/InputBuffer.cpp,
- src/InputBuffer.h, src/JFM.cpp, src/JFM.h, src/Makefile.am,
- src/Message.h, src/Pair.h, src/PathClipper.cpp, src/PreScanDVIReader.cpp,
- src/PsSpecialHandler.h, src/RangeMap.cpp, src/RangeMap.h,
- src/SVGCharHandler.h, src/SVGCharPathHandler.cpp,
- src/SVGCharPathHandler.h, src/SVGCharTspanTextHandler.cpp,
- src/SVGCharTspanTextHandler.h, src/SVGSingleCharTextHandler.cpp,
- src/SVGSingleCharTextHandler.h, src/StreamReader.cpp, src/StreamReader.h,
- src/StreamWriter.cpp, src/StreamWriter.h, src/Subfont.cpp, src/Subfont.h,
- src/TFM.cpp, src/TFM.h, src/ToUnicodeMap.cpp, src/ToUnicodeMap.h,
- src/Unicode.cpp, src/Unicode.h, src/VFActions.h, src/VFReader.cpp,
- src/VFReader.h, src/XMLString.cpp, src/types.h, tests/BitmapTest.cpp,
- tests/CRC32Test.cpp, tests/ColorSpecialTest.cpp, tests/ColorTest.cpp,
- tests/GFGlyphTracerTest.cpp, tests/GFReaderTest.cpp,
- tests/JFMReaderTest.cpp, tests/Makefile.am, tests/StreamReaderTest.cpp,
- tests/TriangularPatchTest.cpp, tests/TypesTest.cpp,
- tests/UnicodeTest.cpp:
- replaced own fixed-sized integer types with types from cstdint
-
- * AUTHORS, LGPL-2.1.txt, Makefile.am, gzstream/COPYING.LIB,
- gzstream/Makefile, gzstream/README, gzstream/gzstream.cpp,
- gzstream/gzstream.h, gzstream/index.html, gzstream/logo.gif,
- gzstream/test_gunzip.C, gzstream/test_gzip.C, gzstream/version,
- src/Makefile.am, src/SVGOutput.cpp, src/SVGOutput.h,
- src/ZLibOutputStream.h, src/dvisvgm.cpp, src/gzstream.cpp,
- src/gzstream.h, tests/Makefile.am, tests/SVGOutputTest.cpp,
- tests/create-makefile:
- replaced old gzstream classes
-
- * src/DVIReader.cpp, src/DVIReader.h, src/Font.cpp, src/Font.h,
- src/FontManager.cpp, src/FontManager.h, src/VFActions.h,
- src/VFReader.cpp:
- transfer DVI snippet of a VF char by move semantics rather than by heap
- pointer
-
-2016-07-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bitmap.cpp, src/BoundingBox.h, src/CMapManager.cpp,
- src/CmdLineParserBase.cpp, src/DVIToSVG.cpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/DependencyGraph.h,
- src/DvisvgmSpecialHandler.cpp, src/EmSpecialHandler.cpp,
- src/FileFinder.cpp, src/FilePath.cpp, src/FilePath.h, src/Font.cpp,
- src/FontCache.cpp, src/FontEncoding.cpp, src/FontManager.cpp,
- src/FontMap.cpp, src/FontMap.h, src/GFReader.cpp, src/GFReader.h,
- src/GraphicsPath.h, src/HtmlSpecialHandler.cpp, src/NumericRanges.h,
- src/PSPattern.cpp, src/PsSpecialHandler.cpp, src/SVGTree.cpp,
- src/SVGTree.h, src/SpecialManager.cpp, src/SpecialManager.h,
- src/Subfont.cpp, src/Subfont.h, src/TpicSpecialHandler.cpp,
- src/XMLDocument.cpp, src/XMLNode.cpp, src/XMLString.cpp, src/macros.h:
- use range-based 'for' loop to iterate over containers; drop FORALL macro
-
- * clipper/clipper.hpp, src/BgColorSpecialHandler.h, src/Bitmap.cpp,
- src/CMap.h, src/CmdLineParserBase.h, src/ColorSpecialHandler.h,
- src/CommandLine.h, src/DVIReader.h, src/DVIToSVG.h,
- src/DVIToSVGActions.h, src/DvisvgmSpecialHandler.h, src/EPSToSVG.h,
- src/EmSpecialHandler.h, src/EncFile.h, src/Font.h, src/FontCache.cpp,
- src/FontEncoding.h, src/FontMetrics.h, src/GFGlyphTracer.h,
- src/GFReader.h, src/GFTracer.h, src/GlyphTracerMessages.h,
- src/GraphicsPath.h, src/HtmlSpecialHandler.h, src/InputBuffer.h,
- src/InputReader.h, src/JFM.h, src/MessageException.h,
- src/NoPsSpecialHandler.h, src/PSPattern.h, src/PSPreviewFilter.h,
- src/PapersizeSpecialHandler.h, src/PathClipper.cpp,
- src/PdfSpecialHandler.h, src/PreScanDVIReader.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h,
- src/SVGCharPathHandler.h, src/SVGCharTspanTextHandler.h, src/SVGOutput.h,
- src/SVGSingleCharTextHandler.h, src/SpecialActions.h, src/TFM.h,
- src/TensorProductPatch.h, src/TpicSpecialHandler.h,
- src/TriangularPatch.h, src/VectorStream.h, src/XMLNode.h:
- mark overridden methods with 'override' keyword
-
- * src/PsSpecialHandler.cpp:
- use unique_ptr rather than deprecated auto_ptr
-
- * src/BasicDVIReader.h, src/Bitmap.h, src/CMap.h, src/CmdLineParserBase.h,
- src/DVIActions.h, src/Font.h, src/FontEncoding.h, src/FontMetrics.h,
- src/GFGlyphTracer.h, src/GFReader.h, src/GFTracer.h, src/GraphicsPath.h,
- src/InputBuffer.h, src/InputReader.h, src/MessageException.h,
- src/PSFilter.h, src/PSInterpreter.h, src/PSPattern.h,
- src/SVGCharHandler.h, src/SVGOutput.h, src/ShadingPatch.h,
- src/SpecialActions.h, src/SpecialHandler.h, src/StreamReader.h,
- src/StreamWriter.h, src/Subfont.h, src/VFActions.h, src/XMLNode.h:
- replaced empty virtual destructors with default ones
-
-2016-07-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BasicDVIReader.h, src/DVIActions.h, src/DVIReader.cpp,
- src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/FontManager.cpp,
- src/FontManager.h, src/PreScanDVIReader.h, src/dvisvgm.cpp:
- refactored the DVI reader classes
-- added higher-level template methods
- to process the DVI commands more safely
-- moved triggering of DVIActions
- from DVIReader to DVIToSVG
-
-2016-06-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BoundingBox.cpp, src/BoundingBox.h, src/DVIToSVG.cpp,
- src/dvisvgm.cpp:
- fixed computation of bounding boxes modified by relative --bbox argument
-
- * xxHash/xxhash.c, xxHash/xxhash.h:
- updated xxHash to version 0.6.1
-
-2016-06-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TFM.cpp, tests/JFMReaderTest.cpp, tests/TFMReaderTest.cpp:
- minor improvements to TFM/JFM tests
-
-2016-06-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/VectorStream.h, tests/VectorStreamTest.cpp:
- refactored VectorStreamBuffer to keep constness of assigned vector
-
- * src/GFReader.cpp:
- ensure validity of postpost command in GFReader::executePostamble()
-
-2016-06-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DvisvgmSpecialHandler.cpp, src/TFM.cpp, src/VFReader.cpp:
- replaced local definitions of pt2bp with Length::pt2bp
-
- * src/XMLNode.h:
- added ouput operators for the XML node objects
-
- * src/EmSpecialHandler.cpp, src/EmSpecialHandler.h,
- tests/EmSpecialTest.cpp, tests/Makefile.am:
- improved the emTeX special handler; added EmSpecialTest
-
- * src/BoundingBox.cpp, src/BoundingBox.h, tests/BoundingBoxTest.cpp:
- fixed unit conversion in BoundingBox class
-
-2016-06-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/Length.cpp, src/Length.h, tests/LengthTest.cpp:
- added dd, cc, and sp units to class Length; fixed factor pt2pc
-
-2016-06-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * xxHash/xxhash.c, xxHash/xxhash.h:
- updated xxHash to version 0.6.0
-
- * src/DLLoader.cpp, src/DLLoader.h, src/Directory.cpp, src/Directory.h,
- src/FilePath.cpp, src/FilePath.h, src/FileSystem.cpp, src/GFTracer.cpp,
- src/Ghostscript.cpp, src/Ghostscript.h, src/Message.cpp,
- src/MetafontWrapper.cpp, src/Process.cpp, src/Terminal.cpp,
- src/Terminal.h, src/dvisvgm.cpp:
- cleaned up Windows-related #defines
-
-2016-06-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CommandLine.cpp:
- removed redundant #includes
-
- * src/Length.cpp, src/Length.h, tests/LengthTest.cpp:
- added functions to convert between Length::Unit and std::string
-
-2016-06-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMapManager.cpp, src/CMapManager.h, src/DVIActions.h,
- src/DVIToSVGActions.h, src/DvisvgmSpecialHandler.h, src/Font.h,
- src/FontEngine.h, src/FontManager.h, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.h, src/PSPattern.h, src/PSPreviewFilter.h,
- src/SVGCharHandler.cpp, src/SVGCharHandler.h, src/SVGCharPathHandler.cpp,
- src/SVGCharTspanTextHandler.cpp, src/SVGSingleCharTextHandler.cpp,
- src/SVGTree.h, src/SpecialActions.h, src/SpecialHandler.h,
- src/SpecialManager.h, src/XMLDocument.cpp, src/XMLNode.h,
- tests/XMLNodeTest.cpp:
- changed some structs to classes and replaced #includes with forward
- declarations
-
- * src/SVGCharHandler.h:
- added missing initializer to class SVGCharHandler
-
-2016-06-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h, src/DVIToSVG.cpp,
- src/DVIToSVGActions.cpp, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.h, src/EPSToSVG.cpp, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.h, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.h, src/NoPsSpecialHandler.cpp,
- src/NoPsSpecialHandler.h, src/PSPattern.cpp, src/PSPattern.h,
- src/PdfSpecialHandler.cpp, src/PdfSpecialHandler.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h, tests/ColorSpecialTest.cpp,
- tests/DvisvgmSpecialTest.cpp:
- refactored handling of SpecialAction objects
-
- * src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/SVGTree.cpp,
- src/SVGTree.h:
- refactored processing of end-of-page (eop) commands
-
- * doc/dvisvgm.txt.in, src/DVIToSVG.cpp, src/Makefile.am,
- src/PapersizeSpecialHandler.cpp, src/PapersizeSpecialHandler.h,
- src/PsSpecialHandler.cpp, src/dvisvgm.cpp:
- added evaluation of PS special 'papersize='
-
-2016-06-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp:
- fixed transformation of background color rectange
-
-2016-05-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/EPSToSVG.cpp:
- reworded messages printed after finishing a conversion
-
-2016-05-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVGActions.cpp, src/Font.cpp, src/Makefile.am,
- src/SVGCharHandler.cpp, src/SVGCharHandler.h,
- src/SVGCharHandlerFactory.cpp, src/SVGCharHandlerFactory.h,
- src/SVGCharPathHandler.cpp, src/SVGCharPathHandler.h,
- src/SVGCharTspanTextHandler.cpp, src/SVGCharTspanTextHandler.h,
- src/SVGSingleCharTextHandler.cpp, src/SVGSingleCharTextHandler.h,
- src/SVGTree.cpp, src/SVGTree.h, src/dvisvgm.cpp:
- replaced static SVG text backend by specialized handler classes
-
- * src/BasicDVIReader.cpp, src/BasicDVIReader.h, src/Bezier.h,
- src/TensorProductPatch.h, src/TriangularPatch.h:
- replaced leading spaces with tabs
-
-2016-05-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BasicDVIReader.cpp, src/DVIReader.cpp:
- fixed handling of subfont index in native font definition of XDV 7
-
-2016-05-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLDocument.cpp, src/XMLNode.cpp, src/XMLNode.h,
- tests/DvisvgmSpecialTest.cpp:
- prevent line wrapping inside text nodes
-
-2016-05-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * README.md, doc/dvisvgm.txt.in, src/BasicDVIReader.cpp,
- src/BasicDVIReader.h, src/DVIReader.cpp, src/DVIToSVG.cpp:
- reworded 'DVI format' to 'DVI (format) version'
-
- * README.md, doc/dvisvgm.txt.in, src/BasicDVIReader.cpp,
- src/BasicDVIReader.h, src/DVIReader.cpp:
- added support for XDV version 7 introduced by XeTeX 0.99995
-
-2016-05-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TFM.cpp:
- prevent reading more than 7 TFM param values (fixes #58)
-
- * .travis.yml:
- temporarily drop clang from Travis builds
-
-2016-05-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/JFM.cpp, src/JFM.h, src/TFM.cpp, src/TFM.h:
- TFM: store design size in bp units rather than as fixword
-
- * src/FontMetrics.h, src/JFM.cpp, src/TFM.cpp, src/TFM.h:
- added methods to query space-related parameters from TFM/JFM files
-
- * src/TFM.cpp, tests/JFMReaderTest.cpp, tests/TFMReaderTest.cpp:
- fixed calculation of character dimensions in TFM class
-
-2016-04-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Process.cpp:
- fixed collecting stdout/stderr output when executing a process
-
-2016-04-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMap.h, src/CMapReader.cpp, tests/CMapManagerTest.cpp,
- tests/Makefile.am, tests/data/Makefile.am, tests/data/ot1.cmap:
- added CMapManagerTest
-
-2016-04-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.15.1
-
- * NEWS, README, README.md:
- updated NEWS and README
-
-2016-04-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Calculator.cpp, src/Matrix.cpp:
- use std::ws to skip whitespace in istreams
-
- * src/Matrix.cpp:
- avoid adding trailing EOF characters when parsing parameters of
- transformation commands
-
- * tests/CMapReaderTest.cpp:
- improved CMapReaderTest
-
-2016-04-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/AGLTable.h, src/Makefile.am, src/Unicode.cpp, tests/Makefile.am,
- tests/create-makefile, tests/genhashcheck.py:
- moved AGL hash table from Unicode.cpp to a separate file
-
-2016-04-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLDocument.cpp:
- explicitly specify UTF-8 encoding in XML declaration (closes #54)
-
- * src/Unicode.cpp, tests/UnicodeTest.cpp:
- added support for the AGL character names 'uniFOO' and 'uFOO'
-
-2016-03-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPath.h:
- renamed GraphicsPath::sconito/scubicto
-
-2016-03-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/db2html.xsl:
- adapted db2html to insert anchors for each option entry
-
- * src/DVIActions.h, src/DVIReader.cpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/SVGTree.cpp, src/SVGTree.h:
- changed font parameter of setFont() methods from pointer to reference
-
- * src/SVGTree.cpp, src/SVGTree.h:
- split text and path section of SVGTree::appendChar() into seperate
- methods
-
-2016-02-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS:
- updated NEWS
-
-2016-02-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/Font.cpp, src/Font.h, src/SVGTree.cpp, src/SVGTree.h,
- src/dvisvgm.cpp, src/options.xml:
- added option --comments (adds comments with additional information to
- the SVG file
-
- * src/Font.cpp, src/Unicode.cpp, src/Unicode.h, tests/UnicodeTest.cpp:
- renamed Unicode::psNameToCodepoint() to Unicode::aglNameToCodepoint
-
- * src/FileFinder.cpp, src/FilePath.cpp, src/FileSystem.cpp,
- src/FileSystem.h, src/Font.cpp, src/MetafontWrapper.cpp, src/dvisvgm.cpp:
- changed string parameters of FileSystem functions to type std::string
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.15
-
-2016-02-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontEngine.cpp:
- reworded error messages of class FontEngine
-
- * src/MetafontWrapper.cpp, src/Process.cpp:
- avoid reading Metafont logfiles to extract the GF filename
-
- * configure.ac, src/FileFinder.cpp, src/FileFinder.h,
- tests/FileFinderTest.cpp, tests/GFGlyphTracerTest.cpp,
- tests/GFReaderTest.cpp, tests/JFMReaderTest.cpp, tests/Makefile.am,
- tests/TFMReaderTest.cpp, tests/cidjmgr0-h.tfm, tests/cmr10.600gf,
- tests/cmr10.tfm, tests/create-makefile, tests/data/Makefile.am,
- tests/data/cidjmgr0-h.tfm, tests/data/cmr10.600gf, tests/data/cmr10.tfm,
- tests/data/dvipdfm_test.map, tests/data/dvips_test.map,
- tests/data/frktest-nf-cmp.svg, tests/data/frktest-wf-cmp.svg,
- tests/data/frktest.dvi, tests/data/sample-nf-cmp.svg,
- tests/data/sample-wf-cmp.svg, tests/data/sample.dvi,
- tests/data/sample.sfd, tests/dvipdfm_test.map, tests/dvips_test.map,
- tests/frktest-nf-cmp.svg, tests/frktest-wf-cmp.svg, tests/frktest.dvi,
- tests/sample-nf-cmp.svg, tests/sample-wf-cmp.svg, tests/sample.dvi,
- tests/sample.sfd:
- moved test data files to subfolder
-
-2016-02-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/FileFinderTest.cpp, tests/GFReaderTest.cpp,
- tests/SVGOutputTest.cpp:
- avoid implicit casts of ifstream/ozstream objects in tests
-
- * src/CmdLineParserBase.cpp, src/CmdLineParserBase.h,
- tests/CommandLineTest.cpp:
- minor improvements of class CommandLineTest
-
- * src/XMLNode.cpp, tests/DvisvgmSpecialTest.cpp:
- improved DvisvgmSpecialTest
-
- * src/FontEngine.cpp, src/FontEngine.h:
- removed redundant code from class FontEngine
-
-2016-02-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- don't remove clipping paths that consist of single moveto commands only
-
-2016-02-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bitmap.cpp, src/BoundingBox.cpp, src/CMap.cpp, src/CMapManager.cpp,
- src/Calculator.cpp, src/CommandLine.cpp, src/DVIReader.cpp,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/Directory.cpp, src/Directory.h, src/EPSToSVG.cpp, src/EncFile.cpp,
- src/FileFinder.cpp, src/Font.cpp, src/FontCache.h, src/FontEngine.cpp,
- src/FontManager.cpp, src/FontMap.cpp, src/FontMetrics.cpp,
- src/GFGlyphTracer.cpp, src/GFReader.cpp, src/GFTracer.cpp,
- src/HtmlSpecialHandler.cpp, src/InputReader.cpp, src/MapLine.cpp,
- src/MetafontWrapper.cpp, src/PSInterpreter.cpp,
- src/PdfSpecialHandler.cpp, src/Process.cpp, src/PsSpecialHandler.cpp,
- src/SVGTree.cpp, src/SpecialManager.cpp, src/StreamReader.cpp,
- src/StreamWriter.cpp, src/Subfont.cpp, src/TFM.cpp,
- src/TensorProductPatch.cpp, src/TpicSpecialHandler.cpp, src/VFReader.cpp,
- src/XMLDocument.cpp, src/dvisvgm.cpp, tests/XMLStringTest.cpp:
- minor code cleanup (removed redundant includes, added casts)
-
-2016-01-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * m4/ax_code_coverage.m4:
- updated m4 code coverage script to latest version
-
- * src/JFM.h, tests/JFMReaderTest.cpp, tests/Makefile.am,
- tests/TFMReaderTest.cpp, tests/cidjmgr0-h.tfm, tests/cmr10.tfm,
- tests/create-makefile:
- added tests for the TFM and JFM classes
-
-2016-01-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicsPath.h, tests/GraphicsPathTest.cpp:
- fixed access of invalid iterator
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.14.2
-
- * NEWS, README.md:
- updated NEWS
-
-2016-01-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- added generic info about the command-line interface to the manpage
-
- * doc/db2html.xsl:
- updated links to Bootstrap and Font Awesome in stylesheet db2html.xsl
-
- * src/dvisvgm.cpp, xxHash/xxhash.c, xxHash/xxhash.h:
- updated xxHash to version 0.5.0
-
- * tests/Makefile.am, tests/create-makefile, tests/genhashcheck.py:
- added test to check the validity of the char name hashes used in
- Unicode.cpp
-
-2016-01-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.cpp, src/ColorSpecialHandler.cpp,
- src/ColorSpecialHandler.h, tests/ColorSpecialTest.cpp:
- removed check for 'background' special from ColorSpecialHandler
-
-2016-01-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.h, src/FontStyle.h, src/SVGTree.cpp,
- src/TriangularPatch.cpp:
- updated/fixed some comments
-
- * src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h, src/DVIToSVG.cpp,
- src/SpecialHandler.h, src/SpecialManager.cpp, src/SpecialManager.h:
- corrected handling of background color special across DVI pages
-
-2016-01-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GFReader.cpp, src/GFReader.h:
- added checks for misplaced GF commands
-
- * NEWS:
- updated NEWS
-
-2016-01-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml:
- force Travis to use legacy builds due to an issue with clang and gtest
-
- * Makefile.am, README, README.md, configure.ac, doc/Makefile.am,
- doc/conf-dblatex-man.xsl, doc/conf-dblatex-pdf.xsl, doc/db2html.xsl,
- doc/dvisvgm.txt.in, src/BasicDVIReader.cpp, src/BasicDVIReader.h,
- src/Bezier.cpp, src/Bezier.h, src/BgColorSpecialHandler.cpp,
- src/BgColorSpecialHandler.h, src/Bitmap.cpp, src/Bitmap.h,
- src/BoundingBox.cpp, src/BoundingBox.h, src/CMap.cpp, src/CMap.h,
- src/CMapManager.cpp, src/CMapManager.h, src/CMapReader.cpp,
- src/CMapReader.h, src/CRC32.cpp, src/CRC32.h, src/Calculator.cpp,
- src/Calculator.h, src/CharMapID.cpp, src/CharMapID.h, src/Character.h,
- src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/Color.cpp,
- src/Color.h, src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/CommandLine.cpp, src/CommandLine.h, src/DLLoader.cpp, src/DLLoader.h,
- src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp,
- src/DVIToSVG.h, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/DependencyGraph.h, src/Directory.cpp, src/Directory.h,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- src/EPSFile.cpp, src/EPSFile.h, src/EPSToSVG.cpp, src/EPSToSVG.h,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.h, src/EncFile.cpp,
- src/EncFile.h, src/FileFinder.cpp, src/FileFinder.h, src/FilePath.cpp,
- src/FilePath.h, src/FileSystem.cpp, src/FileSystem.h, src/Font.cpp,
- src/Font.h, src/FontCache.cpp, src/FontCache.h, src/FontEncoding.cpp,
- src/FontEncoding.h, src/FontEngine.cpp, src/FontEngine.h,
- src/FontManager.cpp, src/FontManager.h, src/FontMap.cpp, src/FontMap.h,
- src/FontMetrics.cpp, src/FontMetrics.h, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.h, src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp,
- src/GFTracer.h, src/Ghostscript.cpp, src/Ghostscript.h, src/Glyph.h,
- src/GlyphTracerMessages.h, src/GraphicsPath.h,
- src/HtmlSpecialHandler.cpp, src/HtmlSpecialHandler.h,
- src/InputBuffer.cpp, src/InputBuffer.h, src/InputReader.cpp,
- src/InputReader.h, src/JFM.cpp, src/JFM.h, src/Length.cpp, src/Length.h,
- src/Makefile.am, src/MapLine.cpp, src/MapLine.h, src/Matrix.cpp,
- src/Matrix.h, src/Message.cpp, src/Message.h, src/MessageException.h,
- src/MetafontWrapper.cpp, src/MetafontWrapper.h, src/MiKTeXCom.cpp,
- src/MiKTeXCom.h, src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.h,
- src/NumericRanges.h, src/PSFilter.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PSPattern.cpp, src/PSPattern.h,
- src/PSPreviewFilter.cpp, src/PSPreviewFilter.h, src/PageRanges.cpp,
- src/PageRanges.h, src/PageSize.cpp, src/PageSize.h, src/Pair.h,
- src/PathClipper.cpp, src/PathClipper.h, src/PdfSpecialHandler.cpp,
- src/PdfSpecialHandler.h, src/PreScanDVIReader.cpp,
- src/PreScanDVIReader.h, src/Process.cpp, src/Process.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/RangeMap.cpp,
- src/RangeMap.h, src/SVGOutput.cpp, src/SVGOutput.h, src/SVGTree.cpp,
- src/SVGTree.h, src/ShadingPatch.cpp, src/ShadingPatch.h,
- src/SignalHandler.cpp, src/SignalHandler.h, src/SpecialActions.h,
- src/SpecialHandler.h, src/SpecialManager.cpp, src/SpecialManager.h,
- src/StreamReader.cpp, src/StreamReader.h, src/StreamWriter.cpp,
- src/StreamWriter.h, src/Subfont.cpp, src/Subfont.h, src/System.cpp,
- src/System.h, src/TFM.cpp, src/TFM.h, src/TensorProductPatch.cpp,
- src/TensorProductPatch.h, src/Terminal.cpp, src/Terminal.h,
- src/ToUnicodeMap.cpp, src/ToUnicodeMap.h, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h, src/TriangularPatch.cpp, src/TriangularPatch.h,
- src/Unicode.cpp, src/Unicode.h, src/VFActions.h, src/VFReader.cpp,
- src/VFReader.h, src/VectorIterator.h, src/VectorStream.h,
- src/XMLDocument.cpp, src/XMLDocument.h, src/XMLNode.cpp, src/XMLNode.h,
- src/XMLString.cpp, src/XMLString.h, src/dvisvgm.cpp, src/macros.h,
- src/options.dtd, src/options.xml, src/psdefs.cpp, src/types.h,
- tests/BezierTest.cpp, tests/BitmapTest.cpp, tests/BoundingBoxTest.cpp,
- tests/CMapReaderTest.cpp, tests/CMapTest.cpp, tests/CRC32Test.cpp,
- tests/CalculatorTest.cpp, tests/ColorSpecialTest.cpp,
- tests/ColorTest.cpp, tests/CommandLineTest.cpp,
- tests/DependencyGraphTest.cpp, tests/DirectoryTest.cpp,
- tests/DvisvgmSpecialTest.cpp, tests/FileFinderTest.cpp,
- tests/FilePathTest.cpp, tests/FileSystemTest.cpp,
- tests/FontManagerTest.cpp, tests/FontMapTest.cpp,
- tests/GFGlyphTracerTest.cpp, tests/GFReaderTest.cpp,
- tests/GraphicsPathTest.cpp, tests/LengthTest.cpp, tests/Makefile.am,
- tests/MapLineTest.cpp, tests/MatrixTest.cpp,
- tests/MessageExceptionTest.cpp, tests/PSInterpreterTest.cpp,
- tests/PageRagesTest.cpp, tests/PageSizeTest.cpp, tests/PairTest.cpp,
- tests/RangeMapTest.cpp, tests/SVGOutputTest.cpp,
- tests/ShadingPatchTest.cpp, tests/SplittedCharInputBufferTest.cpp,
- tests/StreamInputBufferTest.cpp, tests/StreamReaderTest.cpp,
- tests/StreamWriterTest.cpp, tests/SubfontTest.cpp,
- tests/TensorProductPatchTest.cpp, tests/ToUnicodeMapTest.cpp,
- tests/TriangularPatchTest.cpp, tests/TypesTest.cpp,
- tests/UnicodeTest.cpp, tests/VectorIteratorTest.cpp,
- tests/VectorStreamTest.cpp, tests/XMLNodeTest.cpp,
- tests/XMLStringTest.cpp, tests/check-conv, tests/create-makefile,
- tests/normalize.xsl:
- updated year in copyright statements to 2016
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.14.1
-
-2015-12-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
- reset PS graphics state at end of every DVI page
-
-2015-12-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.14
-
- * NEWS:
- updated NEWS
-
-2015-12-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- added evaluation of PSTricks specials 'pst:' and 'PST:'
-
-2015-12-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp:
- lookup files in the current working directory before searching the texmf
- tree
-
- * src/GraphicsPath.h, tests/GraphicsPathTest.cpp:
- fixed memory issue in class GraphicsPath<T>
-
-2015-12-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/EPSToSVG.h,
- src/PSPreviewFilter.cpp, src/PSPreviewFilter.h, src/PsSpecialHandler.cpp,
- src/SpecialActions.h, src/dvisvgm.cpp:
- added option --bbox=preview; adapt preview data if --bbox=min
-
-2015-12-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp:
- return entire kpathsea version string if it doesn't start with
- 'kpathsea'
-
- * tests/GhostscriptTest.cpp:
- prevent opening a graphics window when running GhostscriptTest
-
-2015-12-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.13
-
- * NEWS:
- updated NEWS
-
- * clipper/clipper.cpp, clipper/clipper.hpp:
- replaced DOS line endings of the Clipper sources to Unix ones
-
-2015-12-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp, src/Font.h, src/Glyph.h, src/GraphicPath.h,
- src/GraphicsPath.h, src/Makefile.am, src/PathClipper.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/ShadingPatch.h,
- src/TensorProductPatch.cpp, src/TensorProductPatch.h,
- src/TpicSpecialHandler.cpp, src/TriangularPatch.cpp,
- src/TriangularPatch.h, tests/GraphicPathTest.cpp,
- tests/GraphicsPathTest.cpp, tests/Makefile.am,
- tests/TensorProductPatchTest.cpp, tests/TriangularPatchTest.cpp:
- renamed class GraphicPath to GraphicsPath
-
-2015-11-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- added a couple of links to the manpage
-
- * src/GraphicPath.h, src/PsSpecialHandler.cpp:
- remove redundant moveto commands from graphics paths
-
-2015-11-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVGActions.cpp, src/EPSToSVG.cpp:
- remove progress message before printing a PS error message
-
- * src/DVIToSVGActions.cpp, src/DVIToSVGActions.h:
- removed redundant methods
-
-2015-11-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- added evaluation of PS operators ashow, awidthshow, and widthshow (fixes
- #49)
-
- * xxHash/xxhash.c:
- updated xxHash to version r42
-
-2015-11-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp, src/psdefs.cpp:
- minor code cleanup and reordering
-
- * src/psdefs.cpp:
- reduce rounding errors produced by PS operator 'charpath'
-
- * src/psdefs.cpp:
- propagate call of PS operator 'setcolor' to the PS handler
-
-2015-11-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.12
-
- * NEWS:
- updated NEWS
-
-2015-11-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontManager.cpp:
- removed redundant #include
-
- * src/FontEngine.cpp:
- treat character code as character index if no font mapping is set
-
-2015-11-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md:
- updated links to Google Test framework
-
-2015-11-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.cpp, src/Color.h, src/ColorSpecialHandler.cpp,
- src/HtmlSpecialHandler.cpp, tests/ColorTest.cpp:
- renamed Color::setName() to Color::setPSName()
-
- * tests/Makefile.am, tests/ShadingPatch.cpp, tests/ShadingPatchTest.cpp:
- renamed ShadingPatchTest
-
- * doc/dvisvgm.txt.in, src/Color.cpp, src/Color.h, src/CommandLine.cpp,
- src/CommandLine.h, src/DVIToSVGActions.cpp,
- src/DvisvgmSpecialHandler.cpp, src/EmSpecialHandler.cpp,
- src/HtmlSpecialHandler.cpp, src/PSPattern.cpp, src/PsSpecialHandler.cpp,
- src/SVGTree.cpp, src/TpicSpecialHandler.cpp, src/dvisvgm.cpp,
- src/options.xml, tests/ColorTest.cpp:
- added option --colornames to replace RGB color values with SVG color
- names
-
-2015-10-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Process.cpp, src/Process.h:
- fixed invalid access to freed string memory
-
-2015-10-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in:
- minor improvements of the manual page
-
-2015-09-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, README, README.md:
- updated NEWS and README files
-
-2015-09-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.11
-
-2015-09-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp, src/ToUnicodeMap.cpp, src/Unicode.cpp, src/Unicode.h,
- tests/UnicodeTest.cpp:
- improved handling of invalid Unicode points
-
- * src/Font.cpp, src/Unicode.cpp, src/Unicode.h, tests/UnicodeTest.cpp:
- renamed Unicode::psName2Codepoint to Unicode::psNameToCodepoint
-
-2015-09-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp:
- prevent creating 0x00 codepoints if PS character name is unknown
-
- * src/HtmlSpecialHandler.cpp:
- quote XML metacharacters in xlink:title attributes
-
- * src/CmdLineParserBase.h, src/InputReader.h:
- changed 'struct InputReader' to 'class InputReader'
-
-2015-09-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/SVGTree.cpp:
- force creating a new text element after appending a different node to
- the page
-
-2015-08-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md:
- minor updates to README and README.md
-
-2015-07-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/GhostscriptTest.cpp, tests/Makefile.am:
- added GhostscriptTest
-
- * tests/UnicodeTest.cpp:
- improved UnicodeTest
-
- * tests/CommandLineTest.cpp, tests/MessageExceptionTest.cpp:
- use ASSERT_STREQ in tests
-
-2015-07-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md, doc/dvisvgm.txt.in:
- updated links to project website again (relocated to
- dvisvgm.bplaced.net)
-
-2015-07-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md, doc/dvisvgm.txt.in:
- updated info about new project website
-
-2015-07-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.10
-
- * NEWS:
- updated NEWS
-
-2015-07-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * README.md, doc/dvisvgm.txt.in, src/BasicDVIReader.cpp,
- src/BasicDVIReader.h, src/DVIReader.cpp, src/DVIReader.h, src/Font.h,
- src/FontManager.cpp, src/FontManager.h:
- added support for new XDV format 6
-
-2015-07-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md:
- updated README
-
-2015-07-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/dvisvgm.cpp:
- check for option --help before initializing the FileFinder
-
- * src/MiKTeXCom.cpp:
- added some comments to MiKTeXCom.cpp
-
-2015-07-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/BezierTest.cpp:
- removed #include "debug.h" from test
-
- * Makefile.am, configure.ac, xxHash/LICENSE, xxHash/Makefile.am,
- xxHash/xxhash.c, xxHash/xxhash.h:
- added xxHash library (https://github.com/Cyan4973/xxHash)
-
- * src/Font.cpp, src/Makefile.am, src/Unicode.cpp, src/Unicode.h,
- tests/Makefile.am, tests/create-makefile:
- added mapping from character names to unicode for PostScript fonts
-
-2015-04-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml, configure.ac, src/Doxyfile:
- set version to 1.9.2
-
- * NEWS, README.md:
- updated NEWS and README.md
-
- * src/SVGTree.cpp:
- apply --precision settings to font-size attributes too
-
-2015-04-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/SVGOutputTest.cpp:
- remove output files created by SVGOutputTest::getPageStream()
-
-2015-04-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * README.md:
- minor additions to README.md
-
-2015-03-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GlyphTracerMessages.h:
- always skip tracer message if no glyphs have been traced
-
- * src/GFReader.cpp, src/GFReader.h, tests/GFReaderTest.cpp:
- improved GFReaderTest
-
-2015-03-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GFGlyphTracer.cpp, src/GFTracer.h, tests/GFGlyphTracerTest.cpp,
- tests/Makefile.am:
- ensure GFGlyphTracer::executeChar() returns the correct status; added
- GFGlyphtracerTest
-
- * src/DVIToSVG.cpp:
- avoid retracing of fonts if option --no-fonts is given
-
-2015-03-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/StreamWriterTest.cpp:
- fixed StreamWriterTest
-
- * tests/SVGOutputTest.cpp:
- improved SVGOutputTest
-
-2015-03-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/Makefile.am, tests/ShadingPatch.cpp:
- added ShadingPatchTest
-
-2015-03-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/ShadingPatch.h, src/TensorProductPatch.cpp,
- src/TensorProductPatch.h, src/TriangularPatch.cpp, src/TriangularPatch.h,
- tests/Makefile.am, tests/TriangularPatchTest.cpp:
- added test for class TriangularPatch
-
- * src/Bezier.cpp, src/Bezier.h, src/TensorProductPatch.cpp,
- src/TriangularPatch.cpp, src/TriangularPatch.h,
- tests/TriangularPatchTest.cpp:
- renamed method pointAt() of class Bezier and TriangularPatch to
- valueAt()
-
- * src/TensorProductPatch.h, tests/TensorProductPatchTest.cpp:
- improved TensorProductPatchTest
-
-2015-03-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * m4/ax_code_coverage.m4:
- added missing file ax_code_coverage.m4
-
- * autogen.sh:
- updated autogen.sh
-
-2015-03-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLNode.cpp, src/XMLNode.h, tests/Makefile.am,
- tests/XMLNodeTest.cpp:
- fixed a few issues in class XMLElementNode; added XMLNodeTest
-
- * .gitignore, Makefile.am, clipper/Makefile.am, configure.ac,
- src/Makefile.am, tests/Makefile.am, tests/create-makefile:
- extended build system to generate coverage reports
-
- * tests/Makefile.am, tests/VectorIteratorTest.cpp:
- added VectorIteratorTest
-
-2015-03-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/XMLStringTest.cpp:
- fixed test class name of XMLString
-
-2015-03-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/CRC32Test.cpp:
- added test for 'compute' methods of class CRC32
-
- * tests/GraphicPathTest.cpp:
- extended tests of class GraphicPath
-
-2015-03-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Unicode.cpp, tests/Makefile.am, tests/UnicodeTest.cpp:
- fixed UTF-8 encoding of 0xfffe and 0xffff; added UnicodeTest
-
- * tests/StreamReaderTest.cpp:
- exteded StreamReader tests
-
-2015-03-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/XMLString.cpp, tests/Makefile.am, tests/XMLStringTest.cpp:
- fixed conversion from C and C++ strings to XMLString; added
- XMLStringTest
-
- * .gitignore:
- added .gitignore
-
-2015-03-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bitmap.cpp, src/Bitmap.h, tests/BitmapTest.cpp,
- tests/GFReaderTest.cpp, tests/Makefile.am:
- small refactorings of class Bitmap; added tests for class Bitmap
-
- * src/BoundingBox.cpp, src/BoundingBox.h, tests/BoundingBoxTest.cpp:
- improved BoundingBox tests
-
-2015-03-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bezier.cpp, src/BoundingBox.cpp, src/BoundingBox.h,
- tests/BezierTest.cpp, tests/Makefile.am:
- fixed Bezier::reduceDegree() for degree 1 and added BezierTest class
-
-2015-03-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml:
- Travis conf: added configuration data for Coverity Scan
-
- * README.md:
- added license badge to README.md
-
-2015-02-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, README.md:
- updated NEWS and README.md
-
-2015-02-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Calculator.cpp:
- replaced while(1) with for(;;) for consistency
-
-2015-02-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/Doxyfile:
- set version to 1.9.1
-
-2015-02-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Ghostscript.cpp:
- disable lookup of GS library in Windows registry for old gcc versions
-
-2015-02-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/EPSToSVG.cpp, src/Makefile.am, src/SVGOutput.cpp,
- src/SVGOutput.h, src/SVGOutputBase.h, src/dvisvgm.cpp:
- moved class SVGOutput to separate compilation unit
-
- * doc/dvisvgm.txt.in, src/SVGOutput.cpp, src/SVGOutput.h,
- tests/Makefile.am, tests/SVGOutputTest.cpp, tests/create-makefile:
- added width specifiers and exression evaluation to --output patterns
-
- * doc/dvisvgm.txt.in:
- minor additions and formatting changes of the manpage
-
- * doc/Makefile.am, doc/conf-dblatex-man.xsl, doc/conf-dblatex-pdf.xsl,
- doc/dvisvgm.sty, doc/dvisvgm.xpr, doc/tweak-dblatex-pdf.xsl:
- improved the layout of the pdf manpage
-
- * doc/Makefile.am, doc/db2html.xsl, doc/dvisvgm.css:
- create html manpage with a separate stylesheet matching the new website
- theme
-
-2015-02-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * .travis.yml:
- added configuration file for Travis CI
-
- * .travis.yml:
- added dependency 'python-lxml' to Travis configuration
-
- * .travis.yml:
- added dependency 'libgtest-dev' to Travis configuration; ensure call of
- 'make check'
-
- * .travis.yml:
- Travis conf: added missing call of 'configure'
-
- * .travis.yml:
- Travis conf: build gtest libraries since Ubuntu doesn't provide the
- binaries
-
-2015-02-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TpicSpecialHandler.cpp:
- use constant M_PI rather than computing PI locally
-
-2015-02-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * README, README.md:
- updated README and README.md
-
-2015-01-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/ShadingPatch.h:
- removed redundant methods from class ShadingPatch
-
-2015-01-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TensorProductPatch.cpp, src/TriangularPatch.cpp:
- renamed static helper function clip() to snap()
-
-2015-01-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.cpp:
- resolved ambiguous call of pow (patch by Peter Breitenlohner)
-
-2015-01-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/VectorIterator.h:
- removed redundant method VectorIterator::distanceToLast()
-
-2014-12-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, README, README.md, configure.ac, doc/Makefile.am,
- doc/dvisvgm.txt.in, src/BasicDVIReader.cpp, src/BasicDVIReader.h,
- src/Bezier.cpp, src/Bezier.h, src/BgColorSpecialHandler.cpp,
- src/BgColorSpecialHandler.h, src/Bitmap.cpp, src/Bitmap.h,
- src/BoundingBox.cpp, src/BoundingBox.h, src/CMap.cpp, src/CMap.h,
- src/CMapManager.cpp, src/CMapManager.h, src/CMapReader.cpp,
- src/CMapReader.h, src/CRC32.cpp, src/CRC32.h, src/Calculator.cpp,
- src/Calculator.h, src/CharMapID.cpp, src/CharMapID.h, src/Character.h,
- src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/Color.cpp,
- src/Color.h, src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/CommandLine.cpp, src/CommandLine.h, src/DLLoader.cpp, src/DLLoader.h,
- src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp,
- src/DVIToSVG.h, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/DependencyGraph.h, src/Directory.cpp, src/Directory.h,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- src/EPSFile.cpp, src/EPSFile.h, src/EPSToSVG.cpp, src/EPSToSVG.h,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.h, src/EncFile.cpp,
- src/EncFile.h, src/FileFinder.cpp, src/FileFinder.h, src/FilePath.cpp,
- src/FilePath.h, src/FileSystem.cpp, src/FileSystem.h, src/Font.cpp,
- src/Font.h, src/FontCache.cpp, src/FontCache.h, src/FontEncoding.cpp,
- src/FontEncoding.h, src/FontEngine.cpp, src/FontEngine.h,
- src/FontManager.cpp, src/FontManager.h, src/FontMap.cpp, src/FontMap.h,
- src/FontMetrics.cpp, src/FontMetrics.h, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.h, src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp,
- src/GFTracer.h, src/Ghostscript.cpp, src/Ghostscript.h, src/Glyph.h,
- src/GlyphTracerMessages.h, src/GraphicPath.h, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.h, src/InputBuffer.cpp, src/InputBuffer.h,
- src/InputReader.cpp, src/InputReader.h, src/JFM.cpp, src/JFM.h,
- src/Length.cpp, src/Length.h, src/Makefile.am, src/MapLine.cpp,
- src/MapLine.h, src/Matrix.cpp, src/Matrix.h, src/Message.cpp,
- src/Message.h, src/MessageException.h, src/MetafontWrapper.cpp,
- src/MetafontWrapper.h, src/MiKTeXCom.cpp, src/MiKTeXCom.h,
- src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.h,
- src/NumericRanges.h, src/PSFilter.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PSPattern.cpp, src/PSPattern.h,
- src/PSPreviewFilter.cpp, src/PSPreviewFilter.h, src/PageRanges.cpp,
- src/PageRanges.h, src/PageSize.cpp, src/PageSize.h, src/Pair.h,
- src/PathClipper.cpp, src/PathClipper.h, src/PdfSpecialHandler.cpp,
- src/PdfSpecialHandler.h, src/PreScanDVIReader.cpp,
- src/PreScanDVIReader.h, src/Process.cpp, src/Process.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/RangeMap.cpp,
- src/RangeMap.h, src/SVGOutputBase.h, src/SVGTree.cpp, src/SVGTree.h,
- src/ShadingPatch.cpp, src/ShadingPatch.h, src/SignalHandler.cpp,
- src/SignalHandler.h, src/SpecialActions.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h, src/StreamReader.cpp,
- src/StreamReader.h, src/StreamWriter.cpp, src/StreamWriter.h,
- src/Subfont.cpp, src/Subfont.h, src/System.cpp, src/System.h,
- src/TFM.cpp, src/TFM.h, src/TensorProductPatch.cpp,
- src/TensorProductPatch.h, src/Terminal.cpp, src/Terminal.h,
- src/ToUnicodeMap.cpp, src/ToUnicodeMap.h, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h, src/TriangularPatch.cpp, src/TriangularPatch.h,
- src/Unicode.cpp, src/Unicode.h, src/VFActions.h, src/VFReader.cpp,
- src/VFReader.h, src/VectorIterator.h, src/VectorStream.h,
- src/XMLDocument.cpp, src/XMLDocument.h, src/XMLNode.cpp, src/XMLNode.h,
- src/XMLString.cpp, src/XMLString.h, src/dvisvgm.cpp, src/macros.h,
- src/options.dtd, src/options.xml, src/psdefs.cpp, src/types.h,
- tests/BoundingBoxTest.cpp, tests/CMapReaderTest.cpp, tests/CMapTest.cpp,
- tests/CRC32Test.cpp, tests/CalculatorTest.cpp,
- tests/ColorSpecialTest.cpp, tests/ColorTest.cpp,
- tests/CommandLineTest.cpp, tests/DependencyGraphTest.cpp,
- tests/DirectoryTest.cpp, tests/DvisvgmSpecialTest.cpp,
- tests/FileFinderTest.cpp, tests/FilePathTest.cpp,
- tests/FileSystemTest.cpp, tests/FontManagerTest.cpp,
- tests/FontMapTest.cpp, tests/GFReaderTest.cpp, tests/GraphicPathTest.cpp,
- tests/LengthTest.cpp, tests/Makefile.am, tests/MapLineTest.cpp,
- tests/MatrixTest.cpp, tests/MessageExceptionTest.cpp,
- tests/PSInterpreterTest.cpp, tests/PageRagesTest.cpp,
- tests/PageSizeTest.cpp, tests/PairTest.cpp, tests/RangeMapTest.cpp,
- tests/SplittedCharInputBufferTest.cpp, tests/StreamInputBufferTest.cpp,
- tests/StreamReaderTest.cpp, tests/StreamWriterTest.cpp,
- tests/SubfontTest.cpp, tests/TensorProductPatchTest.cpp,
- tests/ToUnicodeMapTest.cpp, tests/TypesTest.cpp,
- tests/VectorStreamTest.cpp, tests/check-conv, tests/create-makefile,
- tests/normalize.xsl:
- updated year in copyright statements to 2015
-
-2014-12-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/ShadingPatch.h,
- src/TensorProductPatch.cpp, src/TensorProductPatch.h,
- src/TriangularPatch.cpp, src/TriangularPatch.h, src/dvisvgm.cpp,
- src/options.xml:
- added command-line options --grad-overlap, --grad-segments, and
- --grad-simplify
-
- * src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/EPSToSVG.cpp,
- src/EPSToSVG.h, src/SpecialActions.h, src/SpecialManager.cpp,
- src/dvisvgm.cpp:
- show PS instruction counter when processing EPS files with option
- --progress
-
- * src/dvisvgm.cpp:
- clear line before printing the message about user interruption to avoid
- trailing text fragments
-
- * configure.ac, src/Doxyfile:
- set version to 1.9
-
- * NEWS:
- updated NEWS
-
-2014-12-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp:
- check validity of DVI file before trying to collect the BOPs
-
-2014-12-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Makefile.am, src/TriangularPatch.cpp, src/TriangularPatch.h:
- added class to compute triangular shading patches
-
- * src/Makefile.am, src/PsSpecialHandler.cpp, src/ShadingPatch.cpp,
- src/ShadingPatch.h, src/TensorProductPatch.cpp, src/TensorProductPatch.h:
- extracted common interface class ShadingPatch from TensorProductPatch
-
- * src/Color.cpp, src/Color.h, src/Makefile.am, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/VectorIterator.h, src/psdefs.cpp:
- extended PS operator 'shfill' to support triangular patch meshes
-
-2014-12-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
- added processing of the optional 'BBox' entry in a PS shading dictionary
-
-2014-12-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CommandLine.cpp, src/CommandLine.h, src/dvisvgm.cpp,
- src/options.xml:
- disable option --clipjoin if PS support is disabled
-
- * src/Color.cpp, tests/ColorSpecialTest.cpp, tests/ColorTest.cpp:
- fixed CMYK to RGB approximation
-
-2014-11-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSInterpreter.cpp, src/PSInterpreter.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/psdefs.cpp, tests/PSInterpreterTest.cpp:
- added evaluation of PS operator shfill (Coons and tensor product patches
- only)
-
-2014-11-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * README.md:
- added list of features and a download button to README.md
-
-2014-11-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * clipper/clipper.cpp, clipper/clipper.hpp:
- updated clipper library to version 6.2.1
-
-2014-11-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bezier.cpp, src/Bezier.h, src/BoundingBox.h, src/GraphicPath.h,
- src/Makefile.am, src/TensorProductPatch.cpp, src/TensorProductPatch.h,
- tests/Makefile.am, tests/TensorProductPatchTest.cpp:
- added code to compute tensor-product patches required for gradient fills
-
-2014-11-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Matrix.cpp:
- use constant M_PI rather than defining PI locally
-
-2014-10-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.cpp, src/Color.h, src/ColorSpecialHandler.cpp,
- src/PsSpecialHandler.cpp, tests/ColorTest.cpp:
- replaced float by double in class Color
-
- * src/Color.cpp, src/Color.h, src/ColorSpecialHandler.cpp,
- src/DVIReader.cpp, src/HtmlSpecialHandler.cpp, src/PsSpecialHandler.cpp,
- tests/ColorTest.cpp:
- renamed RGB setters/getters of class Color
-
- * src/Color.cpp, src/Color.h:
- replaced vectors with valarrays in class Color
-
- * src/Color.cpp, src/Color.h, tests/ColorTest.cpp:
- added deltaE and L*a*b* color space methods to class Color
-
-2014-10-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * clipper/clipper.cpp, clipper/clipper.hpp:
- updated clipper library to version 6.2.0
-
- * src/GraphicPath.h, src/PathClipper.cpp, src/PathClipper.h,
- src/XMLNode.h:
- fixed a couple of doxygen comments; removed redundant
- PathClipperException
-
-2014-10-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CommandLine.cpp:
- updated CommandLine.cpp with description of option --no-merge
-
- * src/Ghostscript.cpp:
- try to lookup the location of the GS DLL in the Windows registry
-
-2014-10-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/options.xml:
- added info about option --no-merge to the manpage
-
-2014-09-24 Khaled Hosny <khaled.hosny@hindawi.com>
-
- * src/Makefile.am:
- Add an opt2cpp Python script
-
-A very ugly script that should work as a
- drop in replacement for the
-opt2cpp XSLT.
-
-2014-09-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
- ensure that colors set by a color special are always considered by the
- PS handler
-
-2014-09-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BasicDVIReader.cpp, src/DVIReader.cpp, src/FontCache.cpp,
- src/GFReader.cpp, src/dvisvgm.cpp:
- replaced namespace 'ios_base' with 'ios'
-
-2014-08-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- added missing whitespace boundaries in PS code
-
- * src/FontEngine.cpp, tests/PageRagesTest.cpp:
- removed unused static functions
-
- * configure.ac, src/Doxyfile:
- set version to 1.8.1
-
- * NEWS:
- updated NEWS
-
-2014-08-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/DependencyGraph.h, src/Makefile.am,
- src/SVGTree.cpp, src/SVGTree.h, src/XMLNode.cpp, src/XMLNode.h,
- tests/DependencyGraphTest.cpp, tests/Makefile.am:
- remove redundant clipPath elements from generated SVG files
-
-2014-08-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSPattern.cpp, src/XMLNode.cpp, src/XMLNode.h:
- renamed XMLElementNode::findDescendants() and made it constant
-
-2014-08-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/Makefile.am, tests/create-makefile:
- link tests against FreeType library
-
- * README.md:
- minor fixed to README.md
-
-2014-08-10 Khaled Hosny <khaledhosny@eglug.org>
-
- * configure.ac, src/Makefile.am:
- Don't override CXXFLAGS in configure script
-
-Breaks standard things
- like:
-
- make CXXFLAGS="-g -O0 -pg"
-
- * configure.ac, src/Makefile.am:
- Don't override CPPFLAGS and LDFLAGS in configure
-
-For the same reasons
- as the previous commit
-
-2014-08-07 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/dvisvgm.cpp:
- removed old code that moved cache files to new location
-
- * src/XMLDocument.cpp, src/XMLDocument.h, src/XMLNode.cpp, src/XMLNode.h:
- removed unused emit() methods from XML classes
-
-2014-07-31 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/PsSpecialHandler.cpp, src/psdefs.cpp:
- prevent side-effects caused by bop/eop operators present in PS specials
-
-2014-07-29 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * NEWS:
- updated NEWS
-
-2014-07-28 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/GraphicPath.h, src/PSInterpreter.cpp, src/PSInterpreter.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/psdefs.cpp,
- tests/PSInterpreterTest.cpp:
- added evaluation of PS operator 'clippath' (copies clipping path into
- graphics path)
-
- * configure.ac, src/Doxyfile:
- set version to 1.8
-
-2014-07-26 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Font.cpp, src/GFGlyphTracer.cpp, src/GraphicPath.h,
- src/PsSpecialHandler.cpp:
- renamed GraphicPath::newpath() to GraphicPath::clear()
-
-2014-07-24 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/InputReader.cpp, src/PSInterpreter.cpp:
- ensure that InputReader::compare() checks whole and not just partial
- words
-
-2014-07-22 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.h, src/dvisvgm.cpp:
- prevent throwing a DVIException when option -l is present
-
- * Makefile.am, clipper/License.txt, clipper/Makefile.am,
- clipper/clipper.cpp, clipper/clipper.hpp, configure.ac, src/Makefile.am:
- added slightly modified sources of clipper library (computes boolops on
- polygons)
-
- * src/GraphicPath.h:
- added field to store the winding rule to class GraphicPath
-
- * README, README.md, src/Bezier.cpp, src/Bezier.h, src/GraphicPath.h,
- src/Makefile.am, src/PathClipper.cpp, src/PathClipper.h, src/dvisvgm.cpp:
- added class PathClipper to compute intersections of closed curved
- graphics paths
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/dvisvgm.cpp,
- src/options.xml:
- added option --clippath to compute the intersection of clipping paths
-
-2014-07-20 Khaled Hosny <khaledhosny@eglug.org>
-
- * src/FontEngine.cpp:
- Free existing FT_Face before creating a new one
-
-FontEngine was never
- destroying the FT_Face's it creates, except the
-very last one that was
- destroyed by the destructor. For some reason,
-this was causing
- FT_New_Face() to fail on Windows after processing the
-first hundred or so
- pages of DVI files.
-
-2014-07-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/GraphicPath.h, src/PsSpecialHandler.cpp, src/SVGTree.cpp,
- src/SVGTree.h, src/dvisvgm.cpp, src/options.xml,
- tests/GraphicPathTest.cpp:
- added option to create relative rather than absolute path commands
-
- * src/TpicSpecialHandler.cpp:
- TPIC handler: use class GraphicPath to create SVG path commands
-
-2014-07-07 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVGActions.h, src/Doxyfile, src/HtmlSpecialHandler.h,
- src/RangeMap.cpp, src/SpecialManager.cpp, src/ToUnicodeMap.cpp:
- fixed a couple of broken doxygen comments
-
-2014-06-25 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Ghostscript.cpp:
- get proper name of Ghostscript library when building for Cygwin
-
-2014-06-23 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * README.md:
- added markdown version of README
-
-2014-06-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- suppress output of PS operator ':show' to prevent the creation of
- additional graphic elements
-
-2014-06-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/SpecialManager.cpp, src/SpecialManager.h:
- removed redundant method SpecialManager::leavePSHeaderSection()
-
- * doc/dvisvgm.txt.in, src/DVIToSVGActions.cpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- tests/DvisvgmSpecialTest.cpp, tests/Makefile.am:
- added/improved dvisvgm::raw* specials
-
- * src/InputReader.cpp:
- added missing include
-
- * configure.ac, src/Doxyfile:
- set version to 1.7
-
- * NEWS:
- updated NEWS
-
-2014-06-12 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/XMLNode.cpp, src/XMLNode.h:
- added clear() to XMLNode classes; added XMLTextNode::getText()
-
-2014-06-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/InputReader.cpp, src/InputReader.h:
- added InputReader::getLine()
-
- * src/DVIToSVG.cpp, src/SpecialHandler.h, src/SpecialManager.cpp,
- src/SpecialManager.h:
- added listener to allow SpecialHandlers being notified when
- pre-processing has finished
-
-2014-06-10 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/SpecialActions.h, tests/ColorSpecialTest.cpp:
- renamed class SpecialEmptyActions to EmptySpecialActions
-
-2014-06-09 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIReader.cpp, src/Ghostscript.cpp:
- removed unused variable; call Ghostscript::exit() with explicitely given
- object
-
- * src/DVIToSVG.h, src/SpecialManager.h:
- removed redundant definition of assignment operators
-
-2014-06-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BasicDVIReader.cpp, src/BasicDVIReader.h, src/DVIReader.cpp,
- src/DVIReader.h, src/Makefile.am:
- moved basic funtionality of DVIReader to base class BasicDVIReader
-
- * src/BasicDVIReader.h, src/DVIReader.cpp, src/DVIToSVG.cpp,
- src/DVIToSVG.h, src/dvisvgm.cpp:
- moved call of executePreamble() and executePostamble() from DVIToSVG to
- DVIReader
-
- * src/DVIActions.h, src/DVIReader.cpp, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Makefile.am,
- src/PreScanDVIReader.cpp, src/PreScanDVIReader.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h, src/StreamReader.cpp,
- src/StreamReader.h:
- pre-process DVI file to collect required data not present in the page
- ranges to be converted
-
- * src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/SpecialManager.cpp, src/SpecialManager.h, src/dvisvgm.cpp:
- made class SpecialManager a singleton
-
- * src/BasicDVIReader.h, src/DVIToSVG.cpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h:
- allow to replace the DVI reader assigned to an instance of
- DVIToSVGActions
-
- * doc/dvisvgm.txt.in, src/BasicDVIReader.h, src/DVIToSVG.cpp,
- src/DVIToSVG.h, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/EPSToSVG.cpp, src/EPSToSVG.h, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.h, src/PreScanDVIReader.cpp,
- src/PreScanDVIReader.h, src/SpecialActions.h:
- process hyperref anchors and links across pages
-
- * src/BasicDVIReader.cpp, src/BasicDVIReader.h, src/Bitmap.h,
- src/BoundingBox.h, src/CMap.h, src/CMapManager.cpp, src/CMapManager.h,
- src/CMapReader.h, src/CRC32.h, src/Calculator.cpp, src/Calculator.h,
- src/CmdLineParserBase.h, src/Color.cpp, src/ColorSpecialHandler.cpp,
- src/ColorSpecialHandler.h, src/CommandLine.cpp, src/CommandLine.h,
- src/DLLoader.h, src/DVIReader.cpp, src/DVIToSVG.h, src/DVIToSVGActions.h,
- src/Directory.h, src/DvisvgmSpecialHandler.h, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.h, src/EncFile.h, src/FileFinder.h,
- src/FileSystem.cpp, src/Font.cpp, src/Font.h, src/FontCache.h,
- src/FontEncoding.cpp, src/FontEngine.cpp, src/FontEngine.h,
- src/FontManager.cpp, src/FontManager.h, src/FontMap.cpp, src/FontMap.h,
- src/GFGlyphTracer.cpp, src/GFGlyphTracer.h, src/GFReader.cpp,
- src/GFReader.h, src/GFTracer.h, src/Ghostscript.cpp, src/Ghostscript.h,
- src/GraphicPath.h, src/HtmlSpecialHandler.h, src/InputBuffer.cpp,
- src/InputBuffer.h, src/JFM.h, src/Length.cpp, src/Length.h,
- src/MapLine.cpp, src/MapLine.h, src/Matrix.cpp, src/Matrix.h,
- src/MessageException.h, src/MetafontWrapper.cpp, src/MetafontWrapper.h,
- src/NoPsSpecialHandler.h, src/NumericRanges.h, src/PSInterpreter.h,
- src/PSPattern.h, src/PSPreviewFilter.h, src/PageRanges.h, src/PageSize.h,
- src/Pair.h, src/PdfSpecialHandler.cpp, src/PdfSpecialHandler.h,
- src/Process.h, src/PsSpecialHandler.cpp, src/PsSpecialHandler.h,
- src/SVGTree.h, src/SignalHandler.h, src/SpecialActions.h,
- src/SpecialManager.h, src/StreamWriter.h, src/Subfont.cpp, src/Subfont.h,
- src/TFM.h, src/ToUnicodeMap.h, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h, src/VFReader.cpp, src/VectorStream.h,
- src/XMLDocument.h, src/XMLNode.h, src/XMLString.cpp, src/XMLString.h,
- src/dvisvgm.cpp, src/types.h:
- replaced leading spaces by tabs; removed trailing whitespace
-
-2014-06-03 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIReader.cpp, src/DVIReader.h:
- removed redundant variable DVIReader::_prevBop
-
- * src/PsSpecialHandler.cpp:
- fixed incorrect extent values shown when applying a preview bbox
- (bp->pt)
-
-2014-06-01 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/EPSFile.cpp, src/GFReader.cpp:
- replaced relative variant of seekg() by absolute one where possible
-
- * src/DVIReader.cpp, src/DVIReader.h:
- removed redundant code from DVIReader::evalCommand()
-
-2014-05-31 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIReader.cpp, src/VFReader.cpp:
- few code adjustments
-
- * src/DVIReader.cpp, src/StreamReader.cpp, src/StreamReader.h,
- src/VFReader.cpp:
- removed StreamReader::in()
-
- * src/DVIReader.cpp, src/StreamReader.h, src/VFReader.cpp:
- renamed some methods of class StreamReader
-
-2014-05-29 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIReader.cpp, src/DVIReader.h, src/StreamReader.h:
- collect all DVI BOP offsets to reach them quickly
-
- * src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h:
- removed DVIReader::_totalPages; use number of BOP offsets instead
-
- * src/DVIReader.cpp, src/DVIReader.h, src/dvisvgm.cpp:
- simplified computation of progress ratio
-
- * src/DVIReader.cpp, src/DVIReader.h:
- simplified DVIReader::executePage; removed DVIReader::executePages
-
-2014-05-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp, src/Makefile.am, src/Unicode.cpp, src/Unicode.h,
- src/XMLString.cpp:
- moved unicode-related funtions to separate class
-
- * src/CharMap.cpp, src/CharMap.h, src/Font.cpp, src/FontEngine.cpp,
- src/FontEngine.h:
- removed redundant method CharMap::invert()
-
- * src/CMap.cpp, src/CMap.h, src/Makefile.am, src/RangeMap.cpp,
- src/RangeMap.h, tests/Makefile.am, tests/RangeMapTest.cpp:
- extracted class RangeMap previously implemented as part of SegmentedCMap
-
- * src/RangeMap.cpp:
- fixed right joins of touching ranges in a RangeMap
-
- * src/CharMap.cpp, src/CharMap.h, src/Font.cpp, src/Font.h,
- src/FontEngine.cpp, src/FontEngine.h, src/Makefile.am:
- replaced class CharMap with more generic class RangeMap
-
- * src/DVIToSVG.cpp, src/Makefile.am, src/NumericRanges.h,
- src/PageRanges.cpp, src/PageRanges.h, tests/PageRagesTest.cpp:
- extracted functionality of class PageRanges to separate class
- NumericRanges
-
- * src/Makefile.am, src/RangeMap.h, src/ToUnicodeMap.cpp,
- src/ToUnicodeMap.h, tests/Makefile.am, tests/ToUnicodeMapTest.cpp:
- added class ToUnicodeMap to handle mappings from character indexes to
- unicode points
-
- * src/Makefile.am:
- Makefile: put source files on separate lines
-
-2014-04-30 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CharMapID.cpp, src/CharMapID.h, src/DVIReader.cpp, src/Font.cpp,
- src/Font.h, src/FontEngine.cpp, src/FontEngine.h:
- try to add unicode mappings missing in a font's cmap table
-
-2014-04-29 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/SVGTree.cpp:
- don't add unnecessary element 'missing-glyph' to SVG files
-
-2014-04-24 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/options.xml:
- renamed argument of option --linkmark from 'type' to 'style'
-
-2014-04-23 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/System.h:
- removed redundant semicolon
-
-2014-04-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/Doxyfile:
- set version to 1.6
-
- * NEWS:
- updated NEWS
-
-2014-04-21 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/DVIToSVG.cpp, src/EPSToSVG.cpp:
- removed date and machine triplet from generated SVG files
-
-2014-04-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.h:
- added optional selection of line/box colors to option --linkmark
-
-2014-04-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CommandLine.h, src/DVIToSVG.cpp, src/EPSToSVG.cpp:
- don't link GS messages unnecessarily if HAVE_LIBGS is defined
-
- * src/DVIReader.h, src/DVIToSVGActions.h, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.h, src/SpecialActions.h:
- only split hyperlink boxes on line breaks
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/options.xml:
- changed default argument of option --linkmark to 'box'
-
-2014-04-16 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DLLoader.cpp:
- prevent calling dlopen() if the length of the string argument is 0
-
- * doc/dvisvgm.txt.in, src/Ghostscript.cpp:
- if libgs is loaded during runtime, look for libgs.so.X instead of
- libgs.so
-
- * src/Ghostscript.cpp, src/dvisvgm.cpp:
- moved lookup of MiKTeX's GS DLL to get_libgs()
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/SVGTree.cpp, src/SVGTree.h, src/dvisvgm.cpp, src/options.xml:
- added command-line option --zoom
-
-2014-04-11 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CMap.cpp, src/CmdLineParserBase.cpp, src/ColorSpecialHandler.cpp,
- src/DVIReader.cpp, src/DVIToSVGActions.cpp, src/Doxyfile,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- src/EPSFile.cpp, src/EmSpecialHandler.cpp, src/FileFinder.cpp,
- src/FileSystem.cpp, src/Font.cpp, src/FontCache.cpp, src/FontEncoding.h,
- src/FontEngine.cpp, src/FontMap.cpp, src/GraphicPath.h,
- src/PSInterpreter.cpp, src/PageRanges.cpp, src/PsSpecialHandler.cpp,
- src/SVGTree.cpp, src/SVGTree.h, src/SpecialManager.cpp, src/Subfont.cpp,
- src/TFM.cpp, src/TpicSpecialHandler.cpp, src/XMLDocument.cpp,
- src/XMLNode.cpp, src/dvisvgm.cpp:
- fixed issues in the doxygen documentation
-
- * configure.ac, src/Doxyfile:
- set version to 1.5.3
-
- * NEWS:
- updated NEWS
-
-2014-04-09 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVGActions.cpp:
- equalize implementations of moveToX and moveToY
-
- * src/BoundingBox.h, src/DVIActions.cpp, src/DVIActions.h,
- src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/DvisvgmSpecialHandler.cpp, src/EPSToSVG.cpp,
- src/EmSpecialHandler.cpp, src/Font.h, src/FontManager.cpp,
- src/GFGlyphTracer.cpp, src/GFReader.cpp, src/GFTracer.cpp,
- src/GFTracer.h, src/GraphicPath.h, src/HtmlSpecialHandler.h,
- src/Makefile.am, src/PSPattern.cpp, src/PSPreviewFilter.cpp,
- src/PSPreviewFilter.h, src/PageSize.cpp, src/PageSize.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/SVGTree.cpp,
- src/SpecialHandler.h, src/SpecialManager.cpp, src/SpecialManager.h,
- src/TFM.cpp, src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.h,
- src/VFReader.cpp:
- switched internal computations from TeX points (pt) to PS points (bp)
-
-2014-02-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/DVIReader.h:
- ensure updating the SVG cursor position when executing DVI command
- set_rule
-
-2014-01-13 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Ghostscript.cpp:
- check if library given by --libgs is actually a GS library
-
-2014-01-10 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * NEWS:
- updated NEWS
-
-2014-01-03 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileFinder.cpp:
- catch exceptions thrown by MiKTeXCom object
-
- * src/Directory.cpp:
- initialize Directory member variables (Win only)
-
- * src/FileFinder.cpp:
- return 'unknown' if MiKTeX version can't be retrieved
-
- * configure.ac, src/Doxyfile:
- set version to 1.5.2
-
-2014-01-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, README, configure.ac, doc/Makefile.am, doc/dvisvgm.txt.in,
- src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp, src/BoundingBox.h,
- src/CMap.cpp, src/CMap.h, src/CMapManager.cpp, src/CMapManager.h,
- src/CMapReader.cpp, src/CMapReader.h, src/CRC32.cpp, src/CRC32.h,
- src/Calculator.cpp, src/Calculator.h, src/CharMap.cpp, src/CharMap.h,
- src/CharMapID.cpp, src/CharMapID.h, src/Character.h,
- src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/Color.cpp,
- src/Color.h, src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/CommandLine.cpp, src/CommandLine.h, src/DLLoader.cpp, src/DLLoader.h,
- src/DVIActions.cpp, src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/Directory.cpp, src/Directory.h,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- src/EPSFile.cpp, src/EPSFile.h, src/EPSToSVG.cpp, src/EPSToSVG.h,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.h, src/EncFile.cpp,
- src/EncFile.h, src/FileFinder.cpp, src/FileFinder.h, src/FilePath.cpp,
- src/FilePath.h, src/FileSystem.cpp, src/FileSystem.h, src/Font.cpp,
- src/Font.h, src/FontCache.cpp, src/FontCache.h, src/FontEncoding.cpp,
- src/FontEncoding.h, src/FontEngine.cpp, src/FontEngine.h,
- src/FontManager.cpp, src/FontManager.h, src/FontMap.cpp, src/FontMap.h,
- src/FontMetrics.cpp, src/FontMetrics.h, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.h, src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp,
- src/GFTracer.h, src/Ghostscript.cpp, src/Ghostscript.h, src/Glyph.h,
- src/GlyphTracerMessages.h, src/GraphicPath.h, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.h, src/InputBuffer.cpp, src/InputBuffer.h,
- src/InputReader.cpp, src/InputReader.h, src/JFM.cpp, src/JFM.h,
- src/Length.cpp, src/Length.h, src/Makefile.am, src/MapLine.cpp,
- src/MapLine.h, src/Matrix.cpp, src/Matrix.h, src/Message.cpp,
- src/Message.h, src/MessageException.h, src/MetafontWrapper.cpp,
- src/MetafontWrapper.h, src/MiKTeXCom.cpp, src/MiKTeXCom.h,
- src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.h, src/PSFilter.h,
- src/PSInterpreter.cpp, src/PSInterpreter.h, src/PSPattern.cpp,
- src/PSPattern.h, src/PSPreviewFilter.cpp, src/PSPreviewFilter.h,
- src/PageRanges.cpp, src/PageRanges.h, src/PageSize.cpp, src/PageSize.h,
- src/Pair.h, src/PdfSpecialHandler.cpp, src/PdfSpecialHandler.h,
- src/Process.cpp, src/Process.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/SVGOutputBase.h, src/SVGTree.cpp,
- src/SVGTree.h, src/SignalHandler.cpp, src/SignalHandler.h,
- src/SpecialActions.h, src/SpecialHandler.h, src/SpecialManager.cpp,
- src/SpecialManager.h, src/StreamReader.cpp, src/StreamReader.h,
- src/StreamWriter.cpp, src/StreamWriter.h, src/Subfont.cpp, src/Subfont.h,
- src/System.cpp, src/System.h, src/TFM.cpp, src/TFM.h, src/Terminal.cpp,
- src/Terminal.h, src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.h,
- src/VFActions.h, src/VFReader.cpp, src/VFReader.h, src/VectorStream.h,
- src/XMLDocument.cpp, src/XMLDocument.h, src/XMLNode.cpp, src/XMLNode.h,
- src/XMLString.cpp, src/XMLString.h, src/dvisvgm.cpp, src/macros.h,
- src/options.dtd, src/options.xml, src/psdefs.cpp, src/types.h,
- tests/BoundingBoxTest.cpp, tests/CMapReaderTest.cpp, tests/CMapTest.cpp,
- tests/CRC32Test.cpp, tests/CalculatorTest.cpp,
- tests/ColorSpecialTest.cpp, tests/ColorTest.cpp,
- tests/CommandLineTest.cpp, tests/DirectoryTest.cpp,
- tests/FileFinderTest.cpp, tests/FilePathTest.cpp,
- tests/FileSystemTest.cpp, tests/FontManagerTest.cpp,
- tests/FontMapTest.cpp, tests/GFReaderTest.cpp, tests/GraphicPathTest.cpp,
- tests/LengthTest.cpp, tests/Makefile.am, tests/MapLineTest.cpp,
- tests/MatrixTest.cpp, tests/MessageExceptionTest.cpp,
- tests/PSInterpreterTest.cpp, tests/PageRagesTest.cpp,
- tests/PageSizeTest.cpp, tests/PairTest.cpp,
- tests/SplittedCharInputBufferTest.cpp, tests/StreamInputBufferTest.cpp,
- tests/StreamReaderTest.cpp, tests/StreamWriterTest.cpp,
- tests/SubfontTest.cpp, tests/TypesTest.cpp, tests/VectorStreamTest.cpp,
- tests/check-conv, tests/create-makefile, tests/normalize.xsl:
- updated year in copyright statements to 2014
-
-2014-01-01 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/MiKTeXCom.cpp:
- prevent releasing MiKTeX object if its initialization failed
-
-2013-12-29 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Font.cpp:
- check if units per EM are not 0 to prevent divisions by zero
-
- * src/Directory.cpp, src/Directory.h, src/FontMap.cpp,
- tests/DirectoryTest.cpp:
- changed directory entry types from char to enums
-
- * src/FontCache.cpp:
- catch potential StreamReaderException
-
-2013-12-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/BoundingBox.cpp:
- explicitely initialize BoundingBox fields
-
- * src/FontCache.cpp:
- avoid accessing strings constructed from temporaries
-
- * src/Matrix.cpp:
- ensure return value of istream::get() is assigned to int vars
-
- * src/DVIReader.cpp:
- check if denominator of DVI unit is non-zero
-
- * src/DvisvgmSpecialHandler.cpp, src/FontCache.cpp:
- ensure null pointer checks before dereferencing
-
- * src/FontCache.cpp, src/SpecialManager.cpp:
- restore stream format flags
-
- * src/DVIReader.cpp, src/Directory.cpp, src/GFReader.cpp:
- added missing initializations of member variables
-
-2013-12-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.h, src/Bitmap.h, src/BoundingBox.h,
- src/CMap.h, src/CMapManager.h, src/CMapReader.h, src/Calculator.h,
- src/CharMap.h, src/CharMapID.h, src/Character.h, src/CmdLineParserBase.h,
- src/Color.h, src/ColorSpecialHandler.h, src/CommandLine.h,
- src/DLLoader.h, src/DVIActions.h, src/DVIReader.h, src/DVIToSVG.h,
- src/DVIToSVGActions.h, src/Directory.h, src/DvisvgmSpecialHandler.h,
- src/EPSFile.h, src/EPSToSVG.h, src/EmSpecialHandler.h, src/EncFile.h,
- src/FileFinder.h, src/FilePath.h, src/FileSystem.h, src/Font.h,
- src/FontCache.h, src/FontEncoding.h, src/FontEngine.h, src/FontManager.h,
- src/FontMap.h, src/FontMetrics.h, src/GFGlyphTracer.h, src/GFReader.h,
- src/GFTracer.h, src/Ghostscript.h, src/Glyph.h,
- src/GlyphTracerMessages.h, src/GraphicPath.h, src/HtmlSpecialHandler.h,
- src/InputBuffer.h, src/InputReader.h, src/JFM.h, src/Length.h,
- src/MapLine.h, src/Matrix.h, src/Message.h, src/MessageException.h,
- src/MetafontWrapper.h, src/MiKTeXCom.h, src/NoPsSpecialHandler.h,
- src/PSFilter.h, src/PSInterpreter.h, src/PSPattern.h,
- src/PSPreviewFilter.h, src/PageRanges.h, src/PageSize.h, src/Pair.h,
- src/PdfSpecialHandler.h, src/Process.h, src/PsSpecialHandler.h,
- src/SVGOutputBase.h, src/SVGTree.h, src/SignalHandler.h,
- src/SpecialActions.h, src/SpecialHandler.h, src/SpecialManager.h,
- src/StreamReader.h, src/StreamWriter.h, src/Subfont.h, src/System.h,
- src/TFM.h, src/Terminal.h, src/TpicSpecialHandler.h, src/VFActions.h,
- src/VFReader.h, src/VectorStream.h, src/XMLDocument.h, src/XMLNode.h,
- src/XMLString.h, src/macros.h, src/types.h:
- prefixed include guards with DVISVGM_ to prevent ambiguities with
- external headers
-
-2013-11-16 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIReader.cpp, src/SVGTree.cpp, src/SVGTree.h:
- don't let global font colors interfere with color specials
-
-2013-10-29 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * NEWS:
- updated NEWS
-
-2013-10-28 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Bitmap.cpp, src/Color.cpp, src/JFM.cpp, src/Matrix.cpp:
- added missing #includes of header file <algorithm>
-
- * src/FileSystem.cpp, src/MetafontWrapper.cpp:
- added explicit casts from ifstream to bool
-
- * src/DVIReader.cpp:
- temporarily reactivated processing of font definitions located in the
- postamble
-
- * configure.ac, src/Doxyfile:
- set version to 1.5.1
-
-2013-10-27 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.cpp:
- suppress output of logical page number if it equals physical page number
-
-2013-10-16 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/PSPreviewFilter.cpp, src/PsSpecialHandler.cpp:
- ensure proper evaluation of tightpage data if multiple pages are
- processed
-
-2013-10-12 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/InputBuffer.h:
- don't check unsigned variables for negative values
-
- * src/Color.h, src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
- added 'const' to read-only methods
-
-2013-09-21 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontCache.cpp, src/FontCache.h:
- renamed FontCache::VERSION to FontCache::FORMAT_VERSION
-
- * src/DVIToSVG.cpp, src/Ghostscript.h, src/dvisvgm.cpp:
- added missing guards and functions to prevent compilation errors if
- DISABLE_GS is set
-
- * src/DVIToSVG.cpp:
- changed warning message that appears if PS support has been disabled
- permanently
-
-2013-09-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.cpp, src/Bitmap.cpp, src/BoundingBox.cpp,
- src/CMap.cpp, src/CMapManager.cpp, src/CMapReader.cpp, src/CRC32.cpp,
- src/Calculator.cpp, src/CharMap.cpp, src/CmdLineParserBase.cpp,
- src/Color.cpp, src/ColorSpecialHandler.cpp, src/CommandLine.cpp,
- src/CommandLine.h, src/DLLoader.cpp, src/DVIActions.cpp,
- src/DVIReader.cpp, src/DVIToSVG.cpp, src/DVIToSVGActions.cpp,
- src/Directory.cpp, src/DvisvgmSpecialHandler.cpp, src/EPSFile.cpp,
- src/EPSToSVG.cpp, src/EmSpecialHandler.cpp, src/EncFile.cpp,
- src/FileFinder.cpp, src/FilePath.cpp, src/FileSystem.cpp, src/Font.cpp,
- src/FontCache.cpp, src/FontEncoding.cpp, src/FontEngine.cpp,
- src/FontManager.cpp, src/FontMap.cpp, src/FontMetrics.cpp,
- src/GFGlyphTracer.cpp, src/GFReader.cpp, src/GFTracer.cpp,
- src/Ghostscript.cpp, src/Ghostscript.h, src/HtmlSpecialHandler.cpp,
- src/InputBuffer.cpp, src/InputReader.cpp, src/JFM.cpp, src/Length.cpp,
- src/MapLine.cpp, src/Matrix.cpp, src/Message.cpp,
- src/MetafontWrapper.cpp, src/MiKTeXCom.cpp, src/NoPsSpecialHandler.cpp,
- src/PSInterpreter.cpp, src/PSPattern.cpp, src/PSPreviewFilter.cpp,
- src/PageRanges.cpp, src/PageSize.cpp, src/PdfSpecialHandler.cpp,
- src/Process.cpp, src/PsSpecialHandler.cpp, src/SVGTree.cpp,
- src/SignalHandler.cpp, src/SpecialManager.cpp, src/StreamReader.cpp,
- src/StreamWriter.cpp, src/Subfont.cpp, src/System.cpp, src/TFM.cpp,
- src/Terminal.cpp, src/TpicSpecialHandler.cpp, src/VFReader.cpp,
- src/XMLDocument.cpp, src/XMLNode.cpp, src/XMLString.cpp, src/dvisvgm.cpp:
- include config.h at the top of every translation unit
-
- * src/DLLoader.h, src/Directory.h:
- moved #define NOMINMAX to Windows config.h
-
- * configure.ac, src/Doxyfile:
- set version to 1.5
-
- * NEWS:
- updated NEWS
-
-2013-08-30 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontMetrics.h, src/JFM.cpp, src/JFM.h, src/TFM.h:
- added retrieval of vertical mode flag to class FontMetrics
-
- * src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Font.cpp, src/Font.h,
- src/FontEngine.cpp, src/FontEngine.h, src/FontMetrics.h, src/JFM.h,
- src/SVGTree.cpp, src/SVGTree.h, src/TFM.h, src/dvisvgm.cpp:
- added support for DVI format 3 (pTeX, vertical mode)
-
- * src/DVIReader.cpp, src/DVIReader.h, src/Font.cpp, src/Font.h,
- src/FontEngine.cpp, src/FontEngine.h, src/FontManager.cpp,
- src/FontManager.h, src/FontStyle.h, src/SVGTree.cpp, src/dvisvgm.cpp:
- added support for XDV (DVI format 5) files
-
- * src/Font.cpp, src/Font.h, src/XMLString.cpp:
- replaced entity references by corresponding UTF-8 characters; use
- correct unicode points rather than DVI charcodes
-
- * doc/dvisvgm.txt.in:
- updated manpage
-
-2013-08-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CharMap.cpp, src/CharMap.h, src/Font.cpp, src/Font.h,
- src/FontEncoding.h, src/FontEngine.cpp, src/FontEngine.h,
- src/FontManager.cpp, src/Makefile.am:
- replaced local std::map tables used in Font classes with new class
- CharMap
-
-2013-08-23 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/SVGTree.cpp:
- appended px unit to font-size attributes in style section
-
-2013-08-22 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/XMLString.cpp:
- replace very small floating point numbers by 0
-
-2013-08-20 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileFinder.cpp:
- suppress error messages from makeFOO tools
-
-2013-08-13 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CMap.cpp, src/CMap.h, src/CMapManager.cpp, src/CMapManager.h,
- src/EncFile.h, src/Font.cpp, src/Font.h, src/FontEncoding.cpp,
- src/FontEncoding.h, src/FontManager.cpp, src/FontMap.cpp, src/FontMap.h:
- derive EncodingPair from FontEncoding
-
- * src/Font.cpp, src/Font.h, src/FontEncoding.cpp, src/FontEncoding.h,
- src/FontManager.cpp, src/FontMap.cpp, src/FontMap.h:
- moved assignment of base font map to Font class
-
-2013-08-11 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/FileFinder.cpp:
- check if the kpathsea library is C++-safe (patch by Peter Breitenlohner)
-
- * src/dvisvgm.cpp:
- fix number of dashes printed by -V1
-
-2013-08-08 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Matrix.cpp, src/Matrix.h:
- renamed Matrix skewing methods
-
-2013-08-04 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Font.cpp, src/Font.h, src/FontEngine.cpp, src/FontManager.cpp,
- src/FontMap.cpp, src/FontMap.h, src/FontStyle.h, src/Makefile.am:
- store pointers to font map and encoding in Font objects to speed up
- looking them up
-
- * src/Ghostscript.h, src/PSPreviewFilter.cpp, src/PsSpecialHandler.cpp:
- added missing variable initializations
-
-2013-08-03 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CMapManager.cpp, src/CMapManager.h, src/FontManager.cpp:
- avoid const_cast in CMapManager
-
-2013-08-02 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIActions.h, src/DVIReader.cpp, src/DVIToSVG.cpp:
- disable font processing while scanning PS header specials
-
- * src/CMap.h, src/CMapManager.cpp:
- properly handle 'unicode' encoding entries set in font map
-
-2013-08-01 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/XMLDocument.cpp, src/XMLString.cpp:
- changed encoding of SVG files from ISO-8859-1 to UTF-8
-
- * src/DVIToSVG.cpp, src/Makefile.am, src/SVGTree.cpp,
- src/XMLDocTypeNode.h:
- removed DOCTYPE declaration from generated files as suggested by the SVG
- specification
-
- * src/DVIToSVG.cpp:
- removed redundant #include statements
-
- * src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.h, src/EPSToSVG.h,
- src/Matrix.cpp, src/Matrix.h, src/PsSpecialHandler.cpp,
- src/SpecialActions.h, src/dvisvgm.cpp:
- apply page transformations to width, height, and depth of preview bbox
-
- * NEWS:
- updated NEWS
-
- * configure.ac, src/Doxyfile:
- set version to 1.4
-
-2013-07-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CMap.cpp, src/CMap.h, src/CMapManager.cpp, src/CMapManager.h,
- src/CMapReader.cpp, src/CMapReader.h, src/FontManager.cpp,
- src/Makefile.am, tests/CMapTest.cpp, tests/Makefile.am:
- added classes to handle CMap files
-
- * src/CMap.cpp, src/CMap.h, src/CMapManager.h, src/EncFile.cpp,
- src/EncFile.h, src/FileFinder.cpp, src/Font.cpp, src/Font.h,
- src/FontEncoding.cpp, src/FontEncoding.h, src/FontEngine.cpp,
- src/FontEngine.h, src/FontManager.cpp, src/Makefile.am,
- tests/CMapTest.cpp:
- derive .enc encoding vectors and CMaps from common base class
- FontEncoding
-
- * src/CMap.cpp, src/CMap.h, src/Character.h, src/EncFile.h, src/Font.cpp,
- src/Font.h, src/FontEncoding.h, src/FontEngine.cpp, src/FontEngine.h,
- src/Makefile.am, tests/CMapTest.cpp:
- added Character class to handle character names, codes, and indexes
- consistently
-
- * src/FileFinder.cpp, src/Font.cpp, src/Font.h, src/FontManager.cpp:
- added support for OTF fonts
-
- * src/Font.cpp, src/Font.h, src/FontMetric.cpp, src/FontMetric.h,
- src/FontMetrics.cpp, src/FontMetrics.h, src/Makefile.am, src/TFM.h:
- renamed class FontMetric to FontMetrics
-
- * src/CMap.cpp, src/CMap.h, src/CMapReader.cpp, src/CMapReader.h,
- tests/CMapReaderTest.cpp, tests/CMapTest.cpp, tests/Makefile.am:
- added evaluation of base font (bf) sections in CMap files
-
- * src/CMap.h, src/CMapManager.cpp, src/CMapManager.h, src/CMapReader.cpp,
- src/CharMapID.cpp, src/CharMapID.h, src/Font.cpp, src/Font.h,
- src/FontEngine.cpp, src/FontEngine.h, src/FontManager.cpp,
- src/FontMap.cpp, src/FontMap.h, src/Makefile.am:
- try to decode characters of non-CID fonts that have a CMap assigned in
- the fontmap
-
-2013-07-27 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Font.cpp, src/Font.h, src/FontEncoding.cpp, src/FontEncoding.h:
- moved lookup of the encoding of a font to the Font class
-
- * src/JFM.cpp:
- fixed retrieval of char indexes if a JFM contains entries of chartype 0
- only
-
- * src/BgColorSpecialHandler.h, src/DVIToSVG.cpp, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PsSpecialHandler.cpp, src/PsSpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h:
- ensure that PS header code is evaluated before the page/body code; also
- execute bop-hook and eop-hook
-
- * src/PSInterpreter.cpp, src/PSInterpreter.h, src/PsSpecialHandler.cpp:
- added funtion to execute PS code snippets and retrieve their results
-
- * doc/dvisvgm.txt.in, src/DVIActions.h, src/DVIReader.cpp,
- src/DVIToSVG.cpp, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/EPSToSVG.cpp, src/Makefile.am, src/PSFilter.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PSPreviewFilter.cpp, src/PSPreviewFilter.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/SpecialActions.h,
- src/SpecialHandler.h, src/SpecialManager.cpp, src/SpecialManager.h:
- added evaluation of bounding box information created by preview package
-
-2013-07-23 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/EPSToSVG.cpp:
- print warning message if height or width of EPS bbox is 0
-
- * src/psdefs.cpp:
- PS handler: call newpath before executing charpath in operator show
-
- * src/FontMap.cpp:
- check for EOF prior to try to parse another mapline
-
-2013-07-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.cpp:
- replaced PS operator prval with =only in psdefs
-
-2013-07-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.cpp:
- ensure catching PSExceptions while processing PS header specials to
- prevent segfaults
-
- * src/psdefs.cpp:
- properly store PS operator applyscalevals in systemdict
-
-2013-07-14 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Process.cpp, src/Process.h:
- extended Process::run() to grab the output written to stdout
-
- * src/FileFinder.cpp, src/FileFinder.h:
- FileFinder: added lookup of cmap files
-
-2013-07-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/CommandLine.cpp:
- command-line parser: changed type of argument mode from char to enum
-
-2013-06-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileFinder.cpp:
- removed redundant 'using namespace std'
-
-2013-06-03 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.h, src/dvisvgm.cpp:
- extend option --linkmark to highlight linked areas by a given background
- color
-
-2013-06-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.cpp, src/Color.h, src/ColorSpecialHandler.cpp,
- src/ColorSpecialHandler.h, src/SpecialActions.h,
- tests/ColorSpecialTest.cpp, tests/ColorTest.cpp, tests/Makefile.am:
- use Color class in ColorSpecialHandler rather than local code; added
- ColorTest
-
-2013-05-22 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/dvisvgm.cpp:
- added a missing (underlining) hyphen to the output of -V1
-
-2013-05-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.h:
- added missing NoPsSpecialhandler files
-
-2013-05-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp, src/Font.h, src/FontManager.h, src/FontMetric.cpp,
- src/FontMetric.h, src/Makefile.am, src/TFM.cpp, src/TFM.h:
- handle invalid TFM files properly
-
- * src/Font.cpp, src/FontMetric.cpp, src/FontMetric.h, src/JFM.cpp,
- src/JFM.h, src/Makefile.am, src/StreamReader.h, src/TFM.cpp, src/TFM.h:
- added support for Japanese font metric (JFM) files
-
- * src/FileFinder.cpp, src/MiKTeXCom.cpp, src/MiKTeXCom.h, src/dvisvgm.cpp:
- try to load the Ghostscript library that comes with MiKTeX
-
- * doc/dvisvgm.txt.in, src/DVIToSVG.cpp, src/HtmlSpecialHandler.cpp,
- src/HtmlSpecialHandler.h, src/Makefile.am, src/SpecialManager.cpp:
- added support of hyperref specials
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/HtmlSpecialHandler.cpp, src/dvisvgm.cpp, src/options.xml:
- added option --linkmark to select the highlighing variant for hyperlinks
-
- * configure.ac, src/Doxyfile:
- set version to 1.3
-
- * NEWS:
- updated NEWS
-
-2013-05-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * AUTHORS, Makefile.am, README, configure.ac, potracelib/Makefile.am,
- potracelib/auxiliary.h, potracelib/bitmap.h, potracelib/curve.c,
- potracelib/curve.h, potracelib/decompose.c, potracelib/decompose.h,
- potracelib/lists.h, potracelib/potracelib.c, potracelib/potracelib.h,
- potracelib/progress.h, potracelib/trace.c, potracelib/trace.h:
- removed bundled potrace library
-
- * src/SVGTree.cpp, src/SVGTree.h:
- added methods to push and pop 'context elements' to a page that wrap
- parts of the page contents
-
- * src/DVIToSVGActions.h, src/EPSToSVG.h, src/SpecialActions.h:
- provide the context push/pop methods of class SVGTree to special
- handlers
-
- * src/InputReader.cpp, src/InputReader.h:
- added optional parameter 'quotechar' to InputReader::parseAttributes()
-
- * src/EmSpecialHandler.h, src/NoPsSpecialHandler.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h, src/TpicSpecialHandler.h:
- moved DVI listener methods to dedicated listener interface classes
-
- * src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp,
- src/DVIToSVG.h, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.h,
- src/NoPsSpecialHandler.cpp, src/NoPsSpecialHandler.h,
- src/SpecialHandler.h, src/SpecialManager.cpp, src/SpecialManager.h,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.h:
- added page number parameter to DVIEndPageListener::dviEndPage()
-
-2013-05-01 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVGActions.cpp, src/Terminal.cpp, src/Terminal.h:
- disable cursor when showing the progress indicator (Windows only)
-
-2013-04-26 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.cpp:
- don't link NoPsSpecialHandler if HAVE_LIBGS
-
-2013-04-25 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontEncoding.cpp:
- fixed bracketing bug that prevented lookup of fontmap files
-
-2013-04-24 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/BoundingBox.cpp, src/BoundingBox.h, src/Calculator.cpp,
- src/Calculator.h, src/Matrix.cpp, src/Matrix.h, src/MessageException.h,
- src/PageSize.cpp, src/PageSize.h, src/StreamReader.cpp,
- src/StreamReader.h, src/VFReader.cpp, src/VFReader.h, src/VectorStream.h,
- src/XMLDocument.cpp, src/XMLDocument.h:
- added missing underscores to private member variables
-
- * configure.ac, src/Doxyfile:
- set version to 1.2.2
-
- * NEWS:
- updated NEWS
-
-2013-04-23 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.cpp, src/EPSToSVG.cpp, src/dvisvgm.cpp:
- avoid output of empty parentheses if TARGET_SYSTEM is not set
-
- * doc/dvisvgm.txt.in, src/CmdLineParserBase.cpp, src/CommandLine.cpp,
- src/options.dtd, src/options.xml:
- added information about 'dvisvgm -E' to usage line
-
- * src/BoundingBox.cpp, src/BoundingBox.h, src/Calculator.h,
- src/CmdLineParserBase.h, src/DVIToSVGActions.cpp, src/Message.cpp,
- src/VFReader.cpp:
- added missing member initializations to some classes
-
-2013-04-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/Makefile.am, src/SpecialManager.cpp:
- print a warning message if PS specials are found but ignored
-
-2013-04-15 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileFinder.cpp, src/dvisvgm.cpp:
- catch MessageException if MiKTeX version can't be obtained
-
-2013-04-09 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * tests/Makefile.am, tests/create-makefile:
- updated tests/Makefile.am to honor system potracelib if present
-
- * configure.ac, src/Doxyfile:
- set version to 1.2.1
-
- * NEWS:
- updated NEWS
-
-2013-04-08 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/Color.cpp, src/Color.h, src/DVIToSVGActions.cpp:
- allow the background color special to insert white rectancles
-
- * src/PageRanges.h:
- dropped unused variable PageRanges::_max
-
-2013-04-04 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/XMLNode.cpp, src/XMLNode.h:
- unhide derived method XMLDeclarationNode::append
-
-2013-03-10 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * Makefile.am, configure.ac:
- don't build bundled potracelib if system library is used (patch by
- Alexis Ballier)
-
-2013-03-03 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * potracelib/auxiliary.h, potracelib/bitmap.h, potracelib/curve.c,
- potracelib/curve.h, potracelib/decompose.c, potracelib/decompose.h,
- potracelib/lists.h, potracelib/potracelib.c, potracelib/potracelib.h,
- potracelib/progress.h, potracelib/trace.c, potracelib/trace.h:
- updated bundled potrace library to version 1.11
-
-2013-03-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * potracelib/auxiliary.h, potracelib/bitmap.h, potracelib/curve.c,
- potracelib/decompose.h, potracelib/lists.h, potracelib/progress.h,
- potracelib/trace.c, potracelib/trace.h, src/EPSFile.cpp,
- src/EPSToSVG.cpp, src/EPSToSVG.h, src/PSPattern.cpp, src/PSPattern.h,
- src/SVGOutputBase.h:
- converted DOS line endings
-
-2013-02-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Makefile.am, src/PSInterpreter.cpp, src/PSInterpreter.h,
- src/PSPattern.cpp, src/PSPattern.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/psdefs.psc, tests/PSInterpreterTest.cpp:
- PS handler: added support of tiling patterns
-
- * src/Makefile.am, src/PSInterpreter.cpp, src/psdefs.cpp, src/psdefs.psc:
- make psdefs a separate compilation unit
-
- * tests/MapLineTest.cpp:
- prevent MapLineTest from failing if file UGBK.sfd is not available
-
- * src/psdefs.cpp:
- improved processing of PS operator 'show'
-
- * configure.ac, src/Doxyfile:
- set version to 1.2
-
- * NEWS:
- updated NEWS
-
-2013-02-21 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/XMLNode.cpp, src/XMLNode.h:
- added virtual constructor XMLNode::clone()
-
- * src/XMLNode.cpp, src/XMLNode.h:
- added methods to lookup attribute values and selected descendant XML
- nodes
-
-2013-02-19 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/PSInterpreter.cpp, src/PSInterpreter.h:
- added PSInterpreter::limit() to limit the number of bytes to be
- processed
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/EPSFile.cpp, src/EPSFile.h,
- src/EPSToSVG.cpp, src/EPSToSVG.h, src/Makefile.am,
- src/PsSpecialHandler.cpp, src/SVGOutputBase.h, src/dvisvgm.cpp,
- src/options.xml:
- add option to directly convert EPS files to SVG
-
- * src/FilePath.cpp:
- adapt path separators on Windows systems to get the correct output path
-
-2013-02-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/CommandLine.cpp,
- src/CommandLine.h:
- applied a few refactorings to the command-line parser
-
-2013-02-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/CmdLineParserBase.cpp, src/CmdLineParserBase.h,
- src/CommandLine.cpp, src/CommandLine.h, src/dvisvgm.cpp, src/options.xml:
- added optional parameter to option --help to specify output format
-
-2013-02-06 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/BoundingBox.cpp, src/CommandLine.cpp,
- src/CommandLine.h, src/EmSpecialHandler.cpp, src/GraphicPath.h,
- src/Matrix.cpp, src/PsSpecialHandler.cpp, src/TpicSpecialHandler.cpp,
- src/XMLString.cpp, src/XMLString.h, src/dvisvgm.cpp, src/options.xml:
- added option --precision to set the number of decimal places applied to
- attribute values
-
-2013-01-30 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CommandLine.cpp:
- fixed alignment of --help text
-
-2013-01-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp, src/FontEngine.cpp, src/Makefile.am,
- src/MiKTeXCom.cpp, src/MiKTeXCom.h:
- moved MiKTeX COM code to separate class
-
-2013-01-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/DVIToSVG.cpp, src/FileFinder.cpp, src/Font.cpp,
- src/Font.h, src/FontEncoding.cpp, src/FontEngine.cpp, src/FontEngine.h,
- src/FontManager.cpp, src/FontMap.cpp, src/FontMap.h, src/Makefile.am,
- src/MapLine.cpp, src/MapLine.h, src/Subfont.cpp, src/Subfont.h,
- tests/FontMapTest.cpp, tests/Makefile.am, tests/MapLineTest.cpp,
- tests/SubfontTest.cpp, tests/create-makefile, tests/sample.sfd:
- added support for subfont definitions and multi-font (.ttc) files
-
- * src/FontManager.cpp, src/FontMap.cpp, src/FontMap.h, src/MapLine.h:
- replaced FontMap entries by pointers; initialize entries with MapLine
- objects
-
- * src/CommandLine.cpp, src/Font.cpp, src/Font.h, src/FontEngine.cpp,
- src/FontEngine.h, src/FontManager.cpp, src/FontMap.cpp, src/FontMap.h,
- src/MapLine.cpp, src/MapLine.h, tests/MapLineTest.cpp:
- implemented evaluation of font style options given in a mapline
-
- * configure.ac, src/Doxyfile:
- set version to 1.1
-
- * NEWS, README:
- updated NEWS and README
-
-2013-01-20 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontEngine.cpp, src/FontEngine.h:
- removed unneeded code related to font sizes from class FontEngine
-
-2013-01-16 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/FontMap.cpp, src/FontMap.h, src/dvisvgm.cpp, src/options.xml:
- renamed option --map-file to --fontmap; allow multiple mapfiles and
- modes
-
- * doc/dvisvgm.txt.in, src/DVIToSVG.cpp, src/FontMap.cpp, src/FontMap.h,
- src/Makefile.am, src/PdfSpecialHandler.cpp, src/PdfSpecialHandler.h:
- added PdfSpecialHandler to evaluate pdf:mapline and pdf:mapfile specials
-
-2013-01-10 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Font.cpp, src/FontEncoding.cpp:
- fixed a string exception that occurred when an encoding file or an entry
- in the encoding table is unavailable
-
-2013-01-06 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileFinder.cpp, src/FileFinder.h, src/FontEncoding.cpp,
- src/FontEncoding.h:
- removed font encoding methods from FileFinder
-
-2013-01-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, README, configure.ac, doc/Makefile.am, doc/dvisvgm.txt.in,
- src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp, src/BoundingBox.h,
- src/CRC32.cpp, src/CRC32.h, src/Calculator.cpp, src/Calculator.h,
- src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/Color.cpp,
- src/Color.h, src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/CommandLine.cpp, src/CommandLine.h, src/DLLoader.cpp, src/DLLoader.h,
- src/DVIActions.cpp, src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/Directory.cpp, src/Directory.h,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.h, src/FileFinder.cpp,
- src/FileFinder.h, src/FilePath.cpp, src/FilePath.h, src/FileSystem.cpp,
- src/FileSystem.h, src/Font.cpp, src/Font.h, src/FontCache.cpp,
- src/FontCache.h, src/FontEncoding.cpp, src/FontEncoding.h,
- src/FontEngine.cpp, src/FontEngine.h, src/FontManager.cpp,
- src/FontManager.h, src/FontMap.cpp, src/FontMap.h, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.h, src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp,
- src/GFTracer.h, src/Ghostscript.cpp, src/Ghostscript.h, src/Glyph.h,
- src/GlyphTracerMessages.h, src/GraphicPath.h, src/InputBuffer.cpp,
- src/InputBuffer.h, src/InputReader.cpp, src/InputReader.h,
- src/Length.cpp, src/Length.h, src/Makefile.am, src/Matrix.cpp,
- src/Matrix.h, src/Message.cpp, src/Message.h, src/MessageException.h,
- src/MetafontWrapper.cpp, src/MetafontWrapper.h, src/MiKTeXCom.cpp,
- src/MiKTeXCom.h, src/PSInterpreter.cpp, src/PSInterpreter.h,
- src/PageRanges.cpp, src/PageRanges.h, src/PageSize.cpp, src/PageSize.h,
- src/Pair.h, src/Process.cpp, src/Process.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/SVGTree.cpp, src/SVGTree.h,
- src/SignalHandler.cpp, src/SignalHandler.h, src/SpecialActions.h,
- src/SpecialHandler.h, src/SpecialManager.cpp, src/SpecialManager.h,
- src/StreamReader.cpp, src/StreamReader.h, src/StreamWriter.cpp,
- src/StreamWriter.h, src/System.cpp, src/System.h, src/TFM.cpp, src/TFM.h,
- src/Terminal.cpp, src/Terminal.h, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h, src/VFActions.h, src/VFReader.cpp,
- src/VFReader.h, src/VectorStream.h, src/XMLDocTypeNode.h,
- src/XMLDocument.cpp, src/XMLDocument.h, src/XMLNode.cpp, src/XMLNode.h,
- src/XMLString.cpp, src/XMLString.h, src/dvisvgm.cpp, src/macros.h,
- src/options.dtd, src/options.xml, src/psdefs.psc, src/types.h,
- tests/BoundingBoxTest.cpp, tests/CRC32Test.cpp, tests/CalculatorTest.cpp,
- tests/ColorSpecialTest.cpp, tests/CommandLineTest.cpp,
- tests/DirectoryTest.cpp, tests/FileFinderTest.cpp,
- tests/FilePathTest.cpp, tests/FileSystemTest.cpp,
- tests/FontManagerTest.cpp, tests/FontMapTest.cpp, tests/GFReaderTest.cpp,
- tests/GraphicPathTest.cpp, tests/LengthTest.cpp, tests/Makefile.am,
- tests/MatrixTest.cpp, tests/MessageExceptionTest.cpp,
- tests/PSInterpreterTest.cpp, tests/PageRagesTest.cpp,
- tests/PageSizeTest.cpp, tests/PairTest.cpp,
- tests/SplittedCharInputBufferTest.cpp, tests/StreamInputBufferTest.cpp,
- tests/StreamReaderTest.cpp, tests/StreamWriterTest.cpp,
- tests/TypesTest.cpp, tests/VectorStreamTest.cpp, tests/create-makefile:
- updated year in copyright statements to 2013
-
-2012-12-23 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontCache.cpp, src/PsSpecialHandler.cpp, src/TpicSpecialHandler.cpp:
- check emptiness of containers with empty() instead of size()
-
- * src/FileFinder.cpp, src/MiKTeXCom.cpp, src/Process.cpp:
- avoid creating copies of exception objects
-
- * src/CmdLineParserBase.h, src/Directory.cpp, src/GFReader.cpp,
- src/PsSpecialHandler.cpp:
- initialize uninitialized member variables
-
- * src/FileFinder.cpp, src/Message.cpp, src/dvisvgm.cpp:
- reduced scope of some variables
-
-2012-12-12 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontCache.cpp:
- replaced 'char' with 'glyph' in font cache listing
-
- * src/SpecialManager.cpp:
- clear all corresponding containers when calling
- SpecialHandler::unregisterHandlers()
-
-2012-12-03 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Ghostscript.cpp:
- added explicit cast to avoid signed/unsigned comparison warning
-
-2012-12-02 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FilePath.cpp, tests/FilePathTest.cpp:
- strip drive letter if it's not set (Windows only)
-
- * tests/FileSystemTest.cpp, tests/GFReaderTest.cpp:
- ensure that tests work properly on Windows
-
- * src/macros.h:
- removed SHOW() from macros.h
-
- * doc/dvisvgm.txt.in, src/Ghostscript.cpp:
- use gsdll64.dll for 64-bit builds; added info about gsdll64.dll to
- manpage
-
-2012-11-24 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Message.cpp:
- don't wrap message lines explicitly on Windows
-* * *
-
-2012-11-23 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Ghostscript.cpp, src/Ghostscript.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/dvisvgm.cpp:
- print an error message if the execution of PS code fails
-
- * src/PSInterpreter.cpp, src/psdefs.psc:
- print operand stack in case of a PS error
-
-2012-11-22 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Message.cpp:
- handle wrapping of messages containing newlines correctly
-
-2012-11-21 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DLLoader.cpp, src/DLLoader.h, src/Ghostscript.cpp:
- renamed DLLoader::loadFunction() to DLLoader::loadSymbol()
-
-2012-11-19 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontEngine.cpp, src/FontEngine.h:
- renamed FontEngine::fname to FontEngine::_fontname
-
- * src/Font.cpp, src/Font.h, src/FontManager.cpp:
- print warning if font checksums don't match
-
-2012-11-16 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Directory.h:
- undefine macro max() to avoid compilation problems on Windows
-
-2012-11-15 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileFinder.cpp, src/FileFinder.h, src/FontMap.cpp, src/FontMap.h,
- tests/FontMapTest.cpp:
- made class FontMap a singleton
-
- * src/FileFinder.cpp, src/FileFinder.h, src/dvisvgm.cpp:
- moved initialization of FontMap from FileFinder to dvisvgm.cpp
-
- * src/Makefile.am, src/MapLine.cpp, src/MapLine.h, tests/Makefile.am,
- tests/MapLineTest.cpp:
- added new class MapLine to parse and evaluate a single line of a map
- file
-
- * src/FileFinder.cpp, src/FontManager.cpp, src/FontMap.cpp, src/FontMap.h,
- tests/FontMapTest.cpp:
- adapted code to use new MapLine class; introduced support of map line
- modes
-
-2012-11-14 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileFinder.cpp:
- initialize Ghostscript when compiled for TeX Live Win32 (patch by Peter
- Breitenlohner)
-
- * src/FileFinder.cpp, src/FileFinder.h, src/dvisvgm.cpp,
- tests/FileFinderTest.cpp, tests/FontManagerTest.cpp:
- initialize second parameter of kpse_set_program_name() correctly
-
- * src/DVIToSVG.cpp:
- prevent compilation error when using a C++11 compiler (patch by Peter
- Breitenlohner)
-
-2012-11-11 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/InputBuffer.cpp, src/InputBuffer.h, src/InputReader.cpp,
- src/InputReader.h, src/PsSpecialHandler.cpp,
- tests/StreamInputBufferTest.cpp:
- some refactorings of class InputReader; added InputReader::find()
-
-2012-10-24 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.cpp, src/DVIToSVG.h, src/dvisvgm.cpp:
- don't show warning about disabled PS support in list of special handlers
-
-2012-09-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.12
-
- * NEWS:
- updated NEWS
-
- * src/options.ggo:
- removed deprecated file options.ggo
-
-2012-09-20 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.cpp:
- show warning if processing of PS specials is disabled
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
- removed Ghostscript info from ps entry in list of special handlers
-
-2012-09-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.psc:
- ignore dvips bop operators that might be present in PS specials
-
-2012-09-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/StreamReader.cpp:
- fixed reading invalid number of string characters
-
-2012-04-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/Makefile.am:
- keep manpage when calling 'make clean'
-
-2012-04-04 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVGActions.cpp, src/SVGTree.cpp, src/SVGTree.h,
- tests/frktest-nf-cmp.svg, tests/frktest-wf-cmp.svg,
- tests/sample-nf-cmp.svg, tests/sample-wf-cmp.svg:
- scale point units in the SVG files to big points (bp)
-
-2012-04-02 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Matrix.cpp, src/Matrix.h, tests/MatrixTest.cpp:
- added Matrix::invert() and det()
-
-2012-03-29 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Matrix.cpp, src/Matrix.h, tests/MatrixTest.cpp:
- added start index parameter to Matrix::set(vector<>)
-
-2012-03-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.psc:
- evaluate PS operators rectclip, rectfill, and rectstroke
-
-2012-03-09 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Ghostscript.cpp, src/Ghostscript.h:
- added optional parameter to Ghostscript::revision() to retrieve the
- revision number only
-
- * src/dvisvgm.cpp:
- added Ghostscript to library list printed by --version=yes
-
- * NEWS:
- updated NEWS
-
-2012-03-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.11
-
-2012-03-07 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVGActions.cpp:
- correct location of a rule's bounding box (lp bug #948713)
-
-2012-02-24 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in:
- fixed a couple of mistakes and formatting flaws in the manpage
-
-2012-02-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * README:
- updated information about bug reporting
-
-2012-01-26 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CmdLineParserBase.h, src/DVIActions.h, src/DVIReader.h,
- src/DVIToSVGActions.h, src/FontEngine.h, src/FontManager.h,
- src/MetafontWrapper.h, src/SVGTree.h, src/SpecialActions.h,
- src/SpecialHandler.h, src/SpecialManager.h, src/TFM.h, src/VFReader.h:
- adapt forward declarations of classes and structs to their corresponding
- definition (SF bug #3480013)
-
-2012-01-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/miktex-core.def, src/miktex-kps.def, src/miktex-kps.h:
- removed outdated files for old MiKTeX bindings
-
-2012-01-09 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/InputReader.cpp, tests/StreamInputBufferTest.cpp:
- fixed parsing of negative floating point numbers starting with '-0.' (SF
- bug #3471097)
-
- * src/TpicSpecialHandler.cpp:
- added some more comments to methods of class TpicSpecialHandler
-
-2012-01-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, README, configure.ac, doc/Makefile.am, doc/dvisvgm.txt.in,
- src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp, src/BoundingBox.h,
- src/CRC32.cpp, src/CRC32.h, src/Calculator.cpp, src/Calculator.h,
- src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/Color.cpp,
- src/Color.h, src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/CommandLine.cpp, src/CommandLine.h, src/DLLoader.cpp, src/DLLoader.h,
- src/DVIActions.cpp, src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/Directory.cpp, src/Directory.h,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.h, src/FileFinder.cpp,
- src/FileFinder.h, src/FilePath.cpp, src/FilePath.h, src/FileSystem.cpp,
- src/FileSystem.h, src/Font.cpp, src/Font.h, src/FontCache.cpp,
- src/FontCache.h, src/FontEncoding.cpp, src/FontEncoding.h,
- src/FontEngine.cpp, src/FontEngine.h, src/FontManager.cpp,
- src/FontManager.h, src/FontMap.cpp, src/FontMap.h, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.h, src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp,
- src/GFTracer.h, src/Ghostscript.cpp, src/Ghostscript.h, src/Glyph.h,
- src/GlyphTracerMessages.h, src/GraphicPath.h, src/InputBuffer.cpp,
- src/InputBuffer.h, src/InputReader.cpp, src/InputReader.h,
- src/Length.cpp, src/Length.h, src/Makefile.am, src/Matrix.cpp,
- src/Matrix.h, src/Message.cpp, src/Message.h, src/MessageException.h,
- src/MetafontWrapper.cpp, src/MetafontWrapper.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PageRanges.cpp, src/PageRanges.h,
- src/PageSize.cpp, src/PageSize.h, src/Pair.h, src/Process.cpp,
- src/Process.h, src/PsSpecialHandler.cpp, src/PsSpecialHandler.h,
- src/SVGTree.cpp, src/SVGTree.h, src/SignalHandler.cpp,
- src/SignalHandler.h, src/SpecialActions.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h, src/StreamReader.cpp,
- src/StreamReader.h, src/StreamWriter.cpp, src/StreamWriter.h,
- src/System.cpp, src/System.h, src/TFM.cpp, src/TFM.h, src/Terminal.cpp,
- src/Terminal.h, src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.h,
- src/VFActions.h, src/VFReader.cpp, src/VFReader.h, src/VectorStream.h,
- src/XMLDocTypeNode.h, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLNode.cpp, src/XMLNode.h, src/XMLString.cpp, src/XMLString.h,
- src/dvisvgm.cpp, src/macros.h, src/options.dtd, src/options.xml,
- src/psdefs.psc, src/types.h, tests/BoundingBoxTest.cpp,
- tests/CRC32Test.cpp, tests/CalculatorTest.cpp,
- tests/ColorSpecialTest.cpp, tests/CommandLineTest.cpp,
- tests/DirectoryTest.cpp, tests/FileFinderTest.cpp,
- tests/FilePathTest.cpp, tests/FileSystemTest.cpp,
- tests/FontManagerTest.cpp, tests/FontMapTest.cpp, tests/GFReaderTest.cpp,
- tests/GraphicPathTest.cpp, tests/LengthTest.cpp, tests/Makefile.am,
- tests/MatrixTest.cpp, tests/MessageExceptionTest.cpp,
- tests/PSInterpreterTest.cpp, tests/PageRagesTest.cpp,
- tests/PageSizeTest.cpp, tests/PairTest.cpp,
- tests/SplittedCharInputBufferTest.cpp, tests/StreamInputBufferTest.cpp,
- tests/StreamReaderTest.cpp, tests/StreamWriterTest.cpp,
- tests/TypesTest.cpp, tests/VectorStreamTest.cpp, tests/check-conv,
- tests/create-makefile:
- updated year in copyright statements
-
-2011-12-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * tests/Makefile.am, tests/create-makefile:
- link tests with -lpthread (required by gtest on Ubuntu)
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.10
-
- * NEWS:
- updated NEWS
-
-2011-12-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.cpp, src/DVIToSVGActions.cpp, src/GlyphTracerMessages.h,
- src/Message.cpp, src/Message.h, src/MetafontWrapper.cpp,
- src/Terminal.cpp, src/Terminal.h, src/dvisvgm.cpp:
- allow users to customize the message colors
-
- * doc/dvisvgm.txt.in:
- added documentation on environment variable DVISVGM_COLORS to manpage
-
-2011-11-22 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/GraphicPath.h:
- added some more comments to the methods of GraphicPath
-
-2011-11-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac:
- move linker flag -lfreetype from LDFLAGS to LIBS to avoid linking
- problems
-
-2011-10-28 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontMap.cpp:
- removed unused variable eval_prefix in helper function read_entry()
-
- * src/SVGTree.cpp:
- avoid possible collisions of glyph IDs
-
-2011-10-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.9
-
- * NEWS:
- updated NEWS
-
-2011-10-09 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FilePath.cpp:
- added some missing comments to methods of class FilePath
-
- * src/Directory.h:
- dropped method Directory::getEntry()
-
-2011-10-07 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Process.cpp:
- added missing include <signal.h> to Process.cpp
-
- * src/Process.cpp:
- exclude definition of split_paramstr() from Windows builds as it's not
- used there
-
-2011-10-03 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/Makefile.am:
- add metadata/pdfmarks to pdf version of manpage
-
-2011-09-06 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * potracelib/auxiliary.h, potracelib/bitmap.h, potracelib/curve.c,
- potracelib/curve.h, potracelib/decompose.c, potracelib/decompose.h,
- potracelib/lists.h, potracelib/potracelib.c, potracelib/potracelib.h,
- potracelib/progress.h, potracelib/trace.c, potracelib/trace.h:
- updated bundled potrace library to version 1.10
-
-2011-06-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.9dev
-
- * src/FileFinder.cpp, src/MetafontWrapper.cpp:
- fixed segfault occured in TeX Live Win32 caused by mf.exe being
- unavailable (SF bug #3308473)
-
-2011-06-01 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac:
- added AC_LANG_SOURCE to avoid autoconf warnings
-
-2011-05-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, configure.ac, src/Doxyfile:
- set version to 1.0.8; updated NEWS
-
- * src/PsSpecialHandler.cpp:
- explicitly cast double to int in call of ClippingStack::dup()/pop()
-
-2011-05-27 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * tests/check-conv, tests/sample-nf-cmp.svg, tests/sample-wf-cmp.svg:
- updated conversion tests
-
-2011-05-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp, src/Makefile.am, src/MetafontWrapper.cpp,
- src/MetafontWrapper.h, src/Process.cpp, src/Process.h,
- src/SignalHandler.cpp:
- replaced call of system() with Process::run() and kill child process if
- necessary
-
-2011-05-22 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileFinder.cpp:
- MiKTeX: maketfm and makemf have been renamed to miktex-maketfm and
- miktex-makemf
-
- * src/MetafontWrapper.cpp:
- dropped '--halt-on-error' in Metafont call to process buggy mf files
- completely
-
-2011-05-19 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DLLoader.h:
- added #undef NOMINMAX before (re)defining it
-
-2011-05-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSInterpreter.cpp, src/PSInterpreter.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/psdefs.psc, tests/PSInterpreterTest.cpp:
- PS handler: implemented evaluation of save, restore, and grestoreall
-
-2011-05-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.8dev
-
- * src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVGActions.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/SpecialActions.h:
- fixed interaction between PS and DVI drawing position
-
- * src/PsSpecialHandler.cpp:
- add definitions in literal PS headers to dictionary TeXDict
-
- * src/PsSpecialHandler.cpp:
- fixed potential segfault caused by invisible zero-length paths
-
-2011-05-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVGActions.h, src/PsSpecialHandler.cpp, src/PsSpecialHandler.h,
- src/psdefs.psc:
- PS handler: added missing unit conversions (pt vs. bp)
-
- * NEWS, README, configure.ac, src/Doxyfile:
- set version to 1.0.7; updated NEWS and README
-
-2011-05-05 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/PSInterpreter.cpp, src/PsSpecialHandler.cpp:
- separate PS snippets by newline characters to leave preceding comments
-
- * src/PsSpecialHandler.h:
- corrected scaling formula applied to PS line properties
-
- * doc/dvisvgm.txt.in:
- added info about dvips rounding issues to manpage
-
-2011-05-04 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/PsSpecialHandler.cpp:
- don't call Ghostscript::revision() in initialization of static variable
-
- * src/Ghostscript.cpp, src/Ghostscript.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h:
- avoid 'this' pointer in initialazation list of
- PSInterpreter::PSInterpreter()
-
- * src/Length.h:
- undefine macro IN
-
-2011-05-03 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.7dev
-
- * src/psdefs.psc:
- catch PS error /nocurrentpoint in operator 'setpos' properly
-
- * src/psdefs.psc:
- PS handler: recognize save/restore operators
-
- * src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/EmSpecialHandler.cpp, src/EmSpecialHandler.h,
- src/PSInterpreter.h, src/PsSpecialHandler.cpp, src/PsSpecialHandler.h,
- src/SpecialActions.h, src/SpecialHandler.h, src/SpecialManager.cpp,
- src/SpecialManager.h, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h:
- replaced methods for DVI position alterations with translation semantics
-
- * src/PSInterpreter.cpp, src/PSInterpreter.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/macros.h, src/psdefs.psc,
- tests/PSInterpreterTest.cpp:
- improved handling of pure PostScript specials
-
- * src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.h:
- tpic special 'ip' must not draw the outline of the polygon but only fill
- its interior
-
- * src/DLLoader.cpp, src/DLLoader.h:
- don't define min/max macros in windows.h
-
-2011-04-30 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/SpecialManager.cpp:
- register special prefix ps:: properly
-
-2011-04-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileFinder.cpp, src/FileFinder.h, src/dvisvgm.cpp,
- tests/FileFinderTest.cpp:
- dropped class FileFinder::Impl and simplified FileFinder interface
-
- * src/DVIReader.cpp, src/Font.cpp, src/GFReader.cpp, src/Makefile.am,
- src/MetafontWrapper.cpp, src/PSInterpreter.cpp, src/SignalHandler.cpp,
- src/SignalHandler.h, src/TFM.cpp, src/dvisvgm.cpp:
- added class SignalHandler for CTRL-C signals
-
- * NEWS, README, configure.ac, src/Doxyfile:
- set version to 1.0.6; updated NEWS and README
-
-2011-04-14 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVGActions.cpp, src/MessageException.h, src/dvisvgm.cpp,
- tests/Makefile.am, tests/MessageExceptionTest.cpp:
- derived MessageException from std::exception and replaced getMessage()
- with what()
-
-2011-04-13 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/XMLNode.cpp, src/XMLNode.h:
- prepended member variables of the XMLNode classes with underscore
-
-2011-03-15 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIReader.cpp:
- throw DVI exception if set_char/put_char is executed without preceding
- font selection
-
-2011-03-04 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.6dev
-
- * potracelib/potracelib.c, potracelib/potracelib.h:
- changed return type of potrace_version() to 'const char *' in order to
- avoid compiler warning
-
-2011-03-01 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * NEWS, configure.ac, src/Doxyfile:
- set version to 1.0.5, updated NEWS
-
-2011-02-28 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/FontCache.cpp, src/FontCache.h, src/dvisvgm.cpp:
- added code to remove outdated and corrupted cache files
-
- * src/Ghostscript.cpp:
- fixed formatting of GS version number
-
-2011-02-21 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.5dev
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/GraphicPath.h, src/SVGTree.cpp, src/SVGTree.h, src/dvisvgm.cpp,
- src/options.xml, tests/CommandLineTest.cpp:
- added option to replace use elements with paths
-
- * src/SVGTree.cpp:
- added missing unit in height/width attribute of svg root element
-
- * tests/frktest-nf-cmp.svg, tests/frktest-wf-cmp.svg,
- tests/sample-nf-cmp.svg, tests/sample-wf-cmp.svg:
- updated conversion test files
-
-2011-02-16 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/InputBuffer.h:
- reference to scanned string in StringInputBuffer is constant now
-
-2011-02-10 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileSystem.cpp, src/FileSystem.h, src/dvisvgm.cpp,
- tests/FileSystemTest.cpp:
- merged FileSystem::move() into FileSystem::copy()
-
- * src/CRC32.cpp, src/CRC32.h, src/Makefile.am, tests/CRC32Test.cpp,
- tests/Makefile.am:
- added class CRC32 and corresponding tests
-
- * src/StreamReader.cpp, src/StreamReader.h, src/StreamWriter.cpp,
- src/StreamWriter.h, tests/Makefile.am, tests/StreamReaderTest.cpp,
- tests/StreamWriterTest.cpp:
- added CRC32 computation methods to StreamReader and StreamWriter
-
- * src/FontCache.cpp, src/FontCache.h:
- added CRC32 checks to cache files
-
-2011-01-31 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CmdLineParserBase.cpp:
- print character instead of ascii value in message of command-line parser
-
-2011-01-30 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/FileFinder.cpp, src/FileFinder.h, src/FontEngine.cpp,
- src/FontEngine.h, src/dvisvgm.cpp, src/options.xml:
- added optional argument to --version
-
-2011-01-28 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * potracelib/auxiliary.h, potracelib/bitmap.h, potracelib/curve.c,
- potracelib/curve.h, potracelib/decompose.c, potracelib/decompose.h,
- potracelib/lists.h, potracelib/potracelib.c, potracelib/potracelib.h,
- potracelib/progress.h, potracelib/trace.c, potracelib/trace.h:
- updated bundled potrace library to version 1.9
-
-2011-01-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileSystem.cpp, src/FileSystem.h, tests/FileSystemTest.cpp,
- tests/Makefile.am:
- added FileSystem::copy and FileSystem::move; added FileSystemTest
-
- * doc/dvisvgm.txt.in, src/dvisvgm.cpp:
- moved cache files to subfolder ($HOME/.dvisvgm/cache)
-
-2011-01-04 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * Makefile.am, README, configure.ac, doc/Makefile.am, doc/dvisvgm.txt.in,
- src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp, src/BoundingBox.h,
- src/Calculator.cpp, src/Calculator.h, src/CmdLineParserBase.cpp,
- src/CmdLineParserBase.h, src/Color.cpp, src/Color.h,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/CommandLine.cpp, src/CommandLine.h, src/DLLoader.cpp, src/DLLoader.h,
- src/DVIActions.cpp, src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/Directory.cpp, src/Directory.h,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.h, src/FileFinder.cpp,
- src/FileFinder.h, src/FilePath.cpp, src/FilePath.h, src/FileSystem.cpp,
- src/FileSystem.h, src/Font.cpp, src/Font.h, src/FontCache.cpp,
- src/FontCache.h, src/FontEncoding.cpp, src/FontEncoding.h,
- src/FontEngine.cpp, src/FontEngine.h, src/FontManager.cpp,
- src/FontManager.h, src/FontMap.cpp, src/FontMap.h, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.h, src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp,
- src/GFTracer.h, src/Ghostscript.cpp, src/Ghostscript.h, src/Glyph.h,
- src/GlyphTracerMessages.h, src/GraphicPath.h, src/InputBuffer.cpp,
- src/InputBuffer.h, src/InputReader.cpp, src/InputReader.h,
- src/Length.cpp, src/Length.h, src/Makefile.am, src/Matrix.cpp,
- src/Matrix.h, src/Message.cpp, src/Message.h, src/MessageException.h,
- src/MetafontWrapper.cpp, src/MetafontWrapper.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PageRanges.cpp, src/PageRanges.h,
- src/PageSize.cpp, src/PageSize.h, src/Pair.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/SVGTree.cpp, src/SVGTree.h,
- src/SpecialActions.h, src/SpecialHandler.h, src/SpecialManager.cpp,
- src/SpecialManager.h, src/StreamReader.cpp, src/StreamReader.h,
- src/StreamWriter.cpp, src/StreamWriter.h, src/System.cpp, src/System.h,
- src/TFM.cpp, src/TFM.h, src/Terminal.cpp, src/Terminal.h,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.h, src/VFActions.h,
- src/VFReader.cpp, src/VFReader.h, src/VectorStream.h,
- src/XMLDocTypeNode.h, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLNode.cpp, src/XMLNode.h, src/XMLString.cpp, src/XMLString.h,
- src/dvisvgm.cpp, src/macros.h, src/options.dtd, src/options.xml,
- src/psdefs.psc, src/types.h, tests/BoundingBoxTest.cpp,
- tests/CalculatorTest.cpp, tests/ColorSpecialTest.cpp,
- tests/CommandLineTest.cpp, tests/DirectoryTest.cpp,
- tests/FileFinderTest.cpp, tests/FilePathTest.cpp,
- tests/FontManagerTest.cpp, tests/FontMapTest.cpp, tests/GFReaderTest.cpp,
- tests/GraphicPathTest.cpp, tests/LengthTest.cpp, tests/Makefile.am,
- tests/MatrixTest.cpp, tests/PageRagesTest.cpp, tests/PageSizeTest.cpp,
- tests/PairTest.cpp, tests/SplittedCharInputBufferTest.cpp,
- tests/StreamInputBufferTest.cpp, tests/TypesTest.cpp,
- tests/VectorStreamTest.cpp, tests/check-conv, tests/create-makefile:
- updated year in copyright info
-
- * tests/Makefile.am, tests/PSInterpreterTest.cpp:
- added basic tests for class PSInterpreter
-
-2010-12-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FileFinder.cpp:
- updated to MiKTeX 2.8 SDK
-
- * src/PsSpecialHandler.cpp:
- fixed scaling issue in PS positioning
-
- * src/PSInterpreter.cpp, src/PSInterpreter.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/psdefs.psc:
- PS handler: added missing scaling of linewidths and dash distances
-
- * NEWS, configure.ac, src/Doxyfile:
- set version to 1.0.4; updated NEWS
-
- * doc/dvisvgm.txt.in:
- minor update to the manpage
-
-2010-08-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontEngine.cpp:
- fixed FreeType version check (patch by Paul Vojta)
-
-2010-08-11 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * tests/Makefile.am, tests/PairTest.cpp:
- added PairTest
-
-2010-08-06 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.3
-
-2010-08-05 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * NEWS, doc/dvisvgm.txt.in:
- updated manpage and NEWS
-
-2010-08-04 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/BoundingBox.cpp, src/BoundingBox.h, src/Matrix.cpp, src/Matrix.h,
- src/PsSpecialHandler.cpp:
- revamped PsSpecialHandler::psfile() to fix a transformation issue (SF
- bug #3037372)
-
-2010-07-28 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp:
- added check of DVI format version
-
-2010-07-26 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
- restore transformation matrix after execution of psfile
-
-2010-07-13 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.3dev
-
- * src/InputBuffer.h:
- added missing namespace prefix
-
- * src/Terminal.cpp:
- replaced \e with \x1B
-
- * src/GraphicPath.h, src/PsSpecialHandler.h:
- fixed missing initialization of GraphicPath iterator
-
- * src/Directory.cpp, src/Directory.h, src/GFReader.cpp, src/GFReader.h:
- added leading underscore to variables of GFReader
-
-2010-06-22 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/gzstream.cpp, src/gzstream.h:
- fixed class variable issue introduced by previous AIX patch
-
- * NEWS, configure.ac, src/Doxyfile:
- set version to 1.0.2
-
-2010-06-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Bitmap.cpp, tests/DirectoryTest.cpp, tests/GFReaderTest.cpp,
- tests/Makefile.am, tests/cmr10.600gf, tests/create-makefile:
- added GFReaderTest; updated DirectoryTest
-
-2010-06-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Bitmap.cpp, src/Calculator.cpp, src/CmdLineParserBase.cpp,
- src/Color.cpp, src/ColorSpecialHandler.cpp, src/DVIReader.cpp,
- src/DVIReader.h, src/DVIToSVGActions.cpp, src/DvisvgmSpecialHandler.cpp,
- src/EmSpecialHandler.cpp, src/FontCache.cpp, src/FontEncoding.cpp,
- src/GFGlyphTracer.cpp, src/Pair.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/TFM.cpp, src/TFM.h:
- fixed some type conversion warnings
-
- * src/Message.cpp, src/Message.h:
- renamed MessageStream::putchar() to MessageStream::putChar() to avoid
- name clashes
-
- * src/types.h, tests/Makefile.am, tests/TypesTest.cpp:
- added TypesTest
-
-2010-06-16 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * potracelib/curve.c, potracelib/curve.h, potracelib/decompose.c:
- renamed internal potrace functions path_new() and path_free() to prevent
- linker conflicts on OS X
-
-2010-06-14 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.2dev
-
- * configure.ac, src/CmdLineParserBase.h, src/FileFinder.h,
- src/FontCache.cpp, src/FontCache.h, src/FontEncoding.cpp,
- src/FontEngine.cpp, src/GFGlyphTracer.h, src/MetafontWrapper.cpp,
- src/gzstream.cpp:
- applied latest TL patches from Peter Breitenlohner and Karl Berry
-
-2010-06-11 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Message.cpp:
- suppress ANSI color code by default
-
- * NEWS, configure.ac, src/Doxyfile:
- set version to 1.0.1
-
-2010-06-09 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/Doxyfile:
- set version to 1.0.1dev
-
- * src/psdefs.psc:
- fixed recursion issue in PS operator charpath
-
-2010-06-08 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, doc/Makefile.am, src/Makefile.am:
- cleaned up configuration scripts
-
- * configure.ac, src/Doxyfile:
- set version to 1.0dev
-
- * doc/dvisvgm.txt.in, src/BoundingBox.cpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/DvisvgmSpecialHandler.cpp,
- src/EmSpecialHandler.cpp, src/PsSpecialHandler.cpp, src/SpecialActions.h,
- src/SpecialManager.cpp, src/TpicSpecialHandler.cpp:
- added special for creating local bounding boxes
-
- * src/FilePath.cpp, src/FilePath.h, src/FileSystem.cpp, src/FileSystem.h,
- src/Makefile.am, tests/FilePathTest.cpp, tests/Makefile.am:
- added class FilePath
-
- * src/InputBuffer.h, tests/ColorSpecialTest.cpp,
- tests/StreamInputBufferTest.cpp:
- added InputBuffer::invalidate()
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Makefile.am,
- src/PageRanges.cpp, src/PageRanges.h, src/StreamCounter.h,
- src/dvisvgm.cpp, src/options.xml, tests/BoundingBoxTest.cpp,
- tests/CommandLineTest.cpp, tests/Makefile.am, tests/PageRagesTest.cpp,
- tests/StreamCounterTest.cpp:
- added conversion of multiple pages
-
- * configure.ac, doc/Makefile.am, doc/dvisvgm.txt.in, src/CommandLine.cpp,
- src/CommandLine.h, src/DVIActions.h, src/DVIToSVG.cpp, src/GFTracer.cpp,
- src/GlyphTracerMessages.h, src/Makefile.am, src/Message.cpp,
- src/Message.h, src/MetafontWrapper.cpp, src/Terminal.cpp, src/Terminal.h,
- src/dvisvgm.cpp, src/options.xml:
- improved output of messages including optional colorization
-
- * src/Font.cpp:
- print error message if Metafont failed
-
- * src/PSInterpreter.cpp, src/PSInterpreter.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/psdefs.psc:
- evaluate Ghostscript operator .setopacityalpha
-
- * src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h:
- added method to compute length of DVI command
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/DVIActions.h, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/Makefile.am, src/Message.cpp, src/Message.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PsSpecialHandler.cpp, src/PsSpecialHandler.h,
- src/SpecialActions.h, src/System.cpp, src/System.h, src/dvisvgm.cpp,
- src/options.xml:
- added percentage-based progress indicator
-
- * doc/Makefile.am, doc/dvisvgm.txt.in:
- documented option --help and --version in manpage
-
- * NEWS, configure.ac, src/Doxyfile:
- set version to 1.0
-
- * src/PSInterpreter.cpp, src/PSInterpreter.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h:
- fixed PS destructor issue (SF bug #3013392)
-
-2010-05-09 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac:
- fixed whitespace issue in CPPFLAGS and LDFLAGS
-
-2010-05-04 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac:
- fixed kpathsea check; use pkg-config to check freetype availability
-
- * tests/FileFinderTest.cpp, tests/FontManagerTest.cpp, tests/check-conv:
- fixed segfaults in tests
-
-2010-04-23 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * NEWS, configure.ac, src/Doxyfile:
- set version to 0.9.1
-
-2010-04-22 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CommandLine.cpp, src/options.xml:
- output of option --help: replaced '(default: FOO)' by '[FOO]'
-
- * src/DVIToSVG.cpp, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/SVGTree.cpp, src/SVGTree.h, src/XMLNode.cpp, src/XMLNode.h:
- ignore unused fonts in CSS styles list
-
- * src/SVGTree.cpp:
- fixed broken validity when using SVG fonts
-
- * src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp,
- src/DVIToSVG.h, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h:
- print page count and page number of DVI page being processed
-
- * tests/check-conv, tests/frktest-wf-cmp.svg, tests/sample-wf-cmp.svg:
- adapted conversion tests to new output format
-
-2010-04-20 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontEncoding.cpp:
- fixed memory bug in FontEncoding::encoding()
-
-2010-04-11 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/Doxyfile:
- set version to 0.9.1dev
-
- * src/DVIToSVGActions.cpp:
- replaced wrong font pointer that could lead to segfaults
-
-2010-03-24 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Font.cpp, src/Font.h, src/dvisvgm.cpp:
- moved some methods from PhysicalFontImpl to PysicalFont
-
- * doc/dvisvgm.txt.in, src/BoundingBox.cpp, src/BoundingBox.h,
- src/CommandLine.cpp, src/CommandLine.h, src/DVIToSVG.cpp,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Font.cpp, src/Font.h,
- src/GlyphTracerMessages.h, src/Makefile.am, src/dvisvgm.cpp,
- src/options.xml:
- added command-line option --exact
-
- * src/FontCache.cpp, src/Makefile.am, src/StreamWriter.cpp,
- src/StreamWriter.h, src/TFM.cpp:
- replaced local stream IO functions by StreamReader/StreamWriter methods
-
- * src/CmdLineParserBase.cpp, src/DVIToSVG.cpp, src/DVIToSVGActions.cpp,
- src/FontEngine.cpp, src/GlyphTracerMessages.h, src/Message.cpp,
- src/Message.h, src/MetafontWrapper.cpp, src/dvisvgm.cpp:
- added class MessageStream, updated message output
-
- * src/FontCache.cpp, src/GFGlyphTracer.cpp, src/GFReader.cpp:
- variable _fontname is now correctly set in class FontCache
-
- * NEWS, configure.ac, src/Doxyfile:
- set version to 0.9
-
- * tests/frktest-nf-cmp.svg, tests/frktest-wf-cmp.svg,
- tests/sample-nf-cmp.svg, tests/sample-wf-cmp.svg:
- updated conversion tests
-
-2010-03-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.cpp, src/SVGTree.cpp:
- moved creation of SVG 'use' elements from class DVIToSVG to class
- SVGTree
-
- * src/DVIToSVG.cpp, src/Font.cpp, src/Font.h, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.h, src/SVGTree.cpp, src/SVGTree.h:
- added class GFGlyphTracer::Callback providing an interface used to print
- status information about the tracer
-
- * src/CmdLineParserBase.cpp, src/CmdLineParserBase.h:
- added evaluation of boolean and char arguments to the command-line
- parser
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/Font.cpp, src/Font.h,
- src/dvisvgm.cpp, src/options.xml, tests/CommandLineTest.cpp:
- reactivated option --trace-all, and added optional argument 'retrace' to
- it
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/Font.cpp, src/Font.h, src/dvisvgm.cpp, src/options.xml:
- added command-line option --keep
-
-2010-03-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/GFReader.cpp, src/GFReader.h:
- replaced GFReader messages by exceptions
-
- * src/CharmapTranslator.cpp, src/CharmapTranslator.h, src/DVIToSVG.cpp,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Font.cpp, src/Font.h,
- src/Makefile.am, src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h, src/SVGTree.cpp,
- src/SVGTree.h:
- removed class CharmapTranslator
-
- * src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp,
- src/DVIToSVGActions.cpp, src/FontManager.cpp, src/FontManager.h,
- src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h, src/SVGTree.cpp,
- src/SVGTree.h, src/VFReader.h, tests/FontManagerTest.cpp:
- made FontManager a singleton
-
- * src/FontCache.cpp, src/FontCache.h:
- added method FontCache::write(const char *dir) that updates the cache
- file of the current font
-
- * src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp, src/Font.cpp,
- src/Font.h, src/FontEmitter.h, src/GFGlyphTracer.h, src/Makefile.am,
- src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h, src/SVGTree.cpp,
- src/SVGTree.h, src/dvisvgm.cpp, tests/Makefile.am, tests/check-conv,
- tests/create-makefile:
- removed emitter classes; incorporated their functionality into SVGTree
- and PhysicalFontImpl
-
- * src/BoundingBox.cpp, src/Calculator.cpp, src/Matrix.cpp,
- src/PSInterpreter.cpp, src/PSInterpreter.h:
- fixed a couple of comments
-
-2010-02-26 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Font.cpp, src/FontCache.cpp, src/FontCache.h, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.h, src/GFReader.cpp, src/GFReader.h, src/GFTracer.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h:
- refactorings of GF tracer class; removed transferGlyph()
-
-2010-02-21 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Font.h, src/FontEncoding.cpp, src/FontEncoding.h,
- src/FontManager.cpp, src/FontManager.h, src/SVGFontEmitter.cpp:
- moved method encoding() from class FontManager to class FontEncoding
-
- * src/CharmapTranslator.cpp, src/CharmapTranslator.h, src/Font.cpp,
- src/Font.h, src/FontCache.cpp, src/FontCache.h, src/FontEngine.cpp,
- src/FontEngine.h, src/Glyph.cpp, src/Glyph.h, src/Makefile.am,
- src/SVGFontEmitter.cpp, src/SVGFontEmitter.h:
- removed class Glyph and incorporated its functionality into Font class
-
-2010-02-05 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/Doxyfile:
- set version to 0.8.9dev
-
- * src/psdefs.psc:
- removed PS error handler nocurrentpoint
-
- * src/DVIToSVG.cpp:
- added evaluation of literal PS headers to PSHeaderActions
-
-2010-02-02 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * NEWS, configure.ac, src/Doxyfile:
- version updated to 0.8.8
-
-2010-02-01 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * tests/check-conv:
- skip conversion checks by default
-
-2010-01-31 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * tests/Makefile.am, tests/check-conv, tests/create-makefile,
- tests/frktest-nf-cmp.svg, tests/frktest-wf-cmp.svg, tests/frktest.dvi,
- tests/normalize.xsl, tests/sample-nf-cmp.svg, tests/sample-wf-cmp.svg,
- tests/sample.dvi:
- added tests to check conversion results
-
- * tests/normalize.xsl:
- some improvements to normalize.xsl
-
-2010-01-29 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/CommandLine.cpp,
- src/CommandLine.h:
- removed CmdLineParserBase::numOptions()
-
- * src/GraphicPath.h:
- fixed scaling bug in computation of glyph paths when using -n
-
-2010-01-24 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/FontCache.h, src/dvisvgm.cpp, src/options.dtd, src/options.xml:
- added command-line option --libgs
-
-2010-01-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/CommandLine.cpp, src/options.dtd, src/options.xml:
- added DTD for options.xml
-
-2010-01-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac:
- updated type of kpathsea_version_string (patch by lomov_vl)
-
- * fedora/dvisvgm-gs.patch, fedora/dvisvgm-potrace.patch,
- fedora/dvisvgm.spec:
- removed fedora directory
-
- * doc/dvisvgm.txt.in, src/BoundingBox.cpp, src/BoundingBox.h,
- src/DVIToSVG.cpp, tests/BoundingBoxTest.cpp, tests/Makefile.am:
- added support for enlarging the minimal bbox by a given amount.
-
- * Makefile.am, README, configure.ac, doc/dvisvgm.txt.in,
- src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp, src/BoundingBox.h,
- src/Calculator.cpp, src/Calculator.h, src/CharmapTranslator.cpp,
- src/CharmapTranslator.h, src/CmdLineParserBase.cpp,
- src/CmdLineParserBase.h, src/Color.cpp, src/Color.h,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/CommandLine.cpp, src/CommandLine.h, src/DLLoader.cpp, src/DLLoader.h,
- src/DVIActions.cpp, src/DVIActions.h, src/DVIReader.cpp, src/DVIReader.h,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/Directory.cpp, src/Directory.h,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.h, src/FileFinder.cpp,
- src/FileFinder.h, src/FileSystem.cpp, src/FileSystem.h, src/Font.cpp,
- src/Font.h, src/FontCache.cpp, src/FontCache.h, src/FontEmitter.h,
- src/FontEncoding.cpp, src/FontEncoding.h, src/FontEngine.cpp,
- src/FontEngine.h, src/FontManager.cpp, src/FontManager.h,
- src/FontMap.cpp, src/FontMap.h, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.h, src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp,
- src/GFTracer.h, src/Ghostscript.cpp, src/Ghostscript.h, src/Glyph.cpp,
- src/Glyph.h, src/GraphicPath.h, src/InputBuffer.cpp, src/InputBuffer.h,
- src/InputReader.cpp, src/InputReader.h, src/Length.cpp, src/Length.h,
- src/Makefile.am, src/Matrix.cpp, src/Matrix.h, src/Message.cpp,
- src/Message.h, src/MessageException.h, src/MetafontWrapper.cpp,
- src/MetafontWrapper.h, src/PSInterpreter.cpp, src/PSInterpreter.h,
- src/PageSize.cpp, src/PageSize.h, src/Pair.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h, src/SVGTree.cpp,
- src/SVGTree.h, src/SpecialActions.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h, src/StreamCounter.h,
- src/StreamReader.cpp, src/StreamReader.h, src/TFM.cpp, src/TFM.h,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.h, src/VFActions.h,
- src/VFReader.cpp, src/VFReader.h, src/VectorStream.h,
- src/XMLDocTypeNode.h, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLNode.cpp, src/XMLNode.h, src/XMLString.cpp, src/XMLString.h,
- src/dvisvgm.cpp, src/macros.h, src/options.xml, src/psdefs.psc,
- src/types.h, tests/BoundingBoxTest.cpp, tests/CalculatorTest.cpp,
- tests/ColorSpecialTest.cpp, tests/CommandLineTest.cpp,
- tests/DirectoryTest.cpp, tests/FileFinderTest.cpp,
- tests/FontManagerTest.cpp, tests/FontMapTest.cpp,
- tests/GraphicPathTest.cpp, tests/LengthTest.cpp, tests/Makefile.am,
- tests/MatrixTest.cpp, tests/PageSizeTest.cpp,
- tests/SplittedCharInputBufferTest.cpp, tests/StreamCounterTest.cpp,
- tests/StreamInputBufferTest.cpp, tests/VectorStreamTest.cpp,
- tests/create-makefile:
- updated boilerplates
-
- * doc/dvisvgm.txt.in, src/FileFinder.cpp, src/Ghostscript.cpp,
- src/Ghostscript.h, src/dvisvgm.cpp:
- environment variable LIBGS can now be used to set the name of the GS
- shared library
-
- * NEWS:
- updated NEWS
-
- * src/Ghostscript.cpp:
- fixed typo in variable name
-
-2009-12-16 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/InputReader.cpp:
- fixed bug in InputReader::parseUInt()
-
-2009-12-15 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, src/dvisvgm.cpp:
- appied get_time patch sent by Peter Breitenlohner
-
-2009-12-02 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/BoundingBox.h, src/Calculator.h, src/CharmapTranslator.h,
- src/DVIReader.h, src/DVIToSVG.h, src/DVIToSVGActions.h, src/Font.h,
- src/FontEngine.h, src/FontManager.h, src/FontMap.h, src/GFGlyphTracer.h,
- src/GFReader.h, src/MessageException.h, src/MetafontWrapper.h,
- src/PageSize.h, src/SVGTree.cpp, src/SVGTree.h, src/StreamReader.h,
- src/VFActions.h, src/VFReader.h, src/XMLDocTypeNode.h, src/XMLDocument.h,
- src/XMLNode.h, src/XMLString.h:
- removed using statements from header files
-
-2009-11-25 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/FontCache.cpp, src/FontCache.h, src/FontEngine.cpp,
- src/FontEngine.h, src/FontGlyph.cpp, src/FontGlyph.h,
- src/GFGlyphTracer.cpp, src/GFGlyphTracer.h, src/GFTracer.cpp,
- src/Glyph.cpp, src/Glyph.h, src/GraphicPath.h, src/Makefile.am,
- src/Pair.h, src/SVGFontEmitter.cpp, src/SVGFontTraceEmitter.cpp,
- tests/GraphicPathTest.cpp:
- removed FEGlyphCommands and replaced separate glyph class implementation
- by class GraphicPath
-
-2009-11-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.cpp, src/Ghostscript.cpp, src/Ghostscript.h:
- replaced #if !DISABLE_GS by #if !defined(DISABLE_GS) (Peter
- Breitenlohner)
-
- * src/Ghostscript.cpp, src/Ghostscript.h:
- replaced #if HAVE_LIBGS by #if defined(HAVE_LIBGS)
-
- * src/DLLoader.cpp, src/DLLoader.h:
- fixed line endings
-
-2009-11-17 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * configure.ac, fedora/dvisvgm.spec, src/Doxyfile:
- set version number to 0.8.8dev
-
- * potracelib/potracelib.c, potracelib/potracelib.h:
- replaced outdated string constant type char* by const char* in
- potrace_version()
-
- * src/Color.cpp, src/ColorSpecialHandler.cpp, src/FontManager.cpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h,
- src/TpicSpecialHandler.cpp:
- added explicit casts to avoid compiler warnings (Peter Breitenlohner)
-
- * src/InputReader.cpp:
- added missing initialization value (Peter Breitenlohner)
-
- * src/CmdLineParserBase.h, src/GraphicPath.h, src/InputReader.h,
- src/Makefile.am, src/PSInterpreter.h, src/SpecialManager.h:
- added missing virtual destructors to avoid warnings
-
- * src/dvisvgm.cpp:
- don't use email adress PACKAGE_BUGREPORT for copyright notice
-
- * NEWS:
- updated NEWS
-
-2009-11-09 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVG.cpp, src/dvisvgm.cpp:
- added total number of pages to message text
-
- * NEWS, src/Color.cpp, src/Color.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/SVGTree.cpp:
- PS handler: colors set by color specials are now considered properly
-
- * configure.ac, fedora/dvisvgm.spec, src/Doxyfile:
- set version to 0.8.7
-
-2009-11-06 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/GraphicPath.h, src/PsSpecialHandler.cpp:
- PS handler: replace zero-length paths by dots
-
- * NEWS, doc/dvisvgm.txt.in:
- updated NEWS and manpage
-
- * NEWS, src/PsSpecialHandler.cpp:
- fixed path scaling issue in PS handler
-
-2009-10-29 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DVIToSVGActions.cpp, src/Font.cpp, src/Font.h:
- fixed positioning of italic characters
-
-2009-10-25 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/DvisvgmSpecialHandler.cpp:
- added macro {?nl} to dvisvgm:raw evaluator
-
-2009-10-18 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/Font.cpp, src/TFM.cpp, src/TFM.h:
- added italic correction values to character widths
-
-2009-10-16 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * tests/Makefile.am, tests/create-makefile:
- added script to create tests/Makefile.am
-
- * configure.ac, src/Doxyfile:
- increased version to 0.8.7dev
-
-2009-10-13 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * doc/Makefile.am, doc/dvisvgm.txt.in:
- removed outdated post-processing of manpage
-
- * fedora/dvisvgm.spec:
- updated spec file
-
- * doc/Makefile.am:
- added missing dvi suffix in Makefile target dvi-pdf
-
- * README, tests/CalculatorTest.cpp, tests/CalculatorTest.h,
- tests/ColorSpecialTest.cpp, tests/ColorSpecialTest.h,
- tests/CommandLineTest.cpp, tests/CommandLineTest.h,
- tests/DirectoryTest.cpp, tests/DirectoryTest.h, tests/FileFinderTest.cpp,
- tests/FileFinderTest.h, tests/FontManagerTest.cpp,
- tests/FontManagerTest.h, tests/FontMapTest.cpp, tests/FontMapTest.h,
- tests/GraphicPathTest.cpp, tests/GraphicPathTest.h, tests/LengthTest.cpp,
- tests/LengthTest.h, tests/Makefile.am, tests/MatrixTest.cpp,
- tests/MatrixTest.h, tests/PageSizeTest.cpp, tests/PageSizeTest.h,
- tests/SplittedCharInputBufferTest.cpp,
- tests/SplittedCharInputBufferTest.h, tests/StreamCounterTest.cpp,
- tests/StreamCounterTest.h, tests/StreamInputBufferTest.cpp,
- tests/StreamInputBufferTest.h, tests/VectorStreamTest.cpp,
- tests/VectorStreamTest.h:
- replaced cxxtest by googletest
-
-2009-10-12 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp, src/BoundingBox.h,
- src/Calculator.cpp, src/Calculator.h, src/CharmapTranslator.cpp,
- src/CharmapTranslator.h, src/CmdLineParserBase.cpp,
- src/CmdLineParserBase.h, src/Color.cpp, src/Color.h,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h, src/DLLoader.cpp,
- src/DLLoader.h, src/DVIActions.cpp, src/DVIActions.h, src/DVIReader.cpp,
- src/DVIReader.h, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/Directory.cpp, src/Directory.h,
- src/DvisvgmSpecialHandler.h, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.h, src/FileFinder.cpp, src/FileFinder.h,
- src/FileSystem.cpp, src/FileSystem.h, src/Font.cpp, src/Font.h,
- src/FontCache.cpp, src/FontCache.h, src/FontEmitter.h,
- src/FontEncoding.cpp, src/FontEncoding.h, src/FontEngine.cpp,
- src/FontEngine.h, src/FontGlyph.cpp, src/FontGlyph.h,
- src/FontManager.cpp, src/FontManager.h, src/FontMap.cpp, src/FontMap.h,
- src/GFGlyphTracer.cpp, src/GFGlyphTracer.h, src/GFReader.cpp,
- src/GFReader.h, src/GFTracer.cpp, src/GFTracer.h, src/Ghostscript.cpp,
- src/Ghostscript.h, src/GraphicPath.h, src/InputBuffer.cpp,
- src/InputBuffer.h, src/InputReader.cpp, src/InputReader.h,
- src/Matrix.cpp, src/Matrix.h, src/Message.cpp, src/Message.h,
- src/MessageException.h, src/MetafontWrapper.cpp, src/MetafontWrapper.h,
- src/PSInterpreter.cpp, src/PSInterpreter.h, src/PageSize.cpp,
- src/PageSize.h, src/Pair.h, src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h,
- src/SpecialActions.h, src/SpecialHandler.h, src/SpecialManager.cpp,
- src/SpecialManager.h, src/StreamCounter.h, src/StreamReader.cpp,
- src/StreamReader.h, src/TFM.cpp, src/TFM.h, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h, src/VFActions.h, src/VFReader.cpp,
- src/VFReader.h, src/VectorStream.h, src/XMLDocTypeNode.h,
- src/XMLDocument.cpp, src/XMLDocument.h, src/XMLNode.cpp, src/XMLNode.h,
- src/XMLString.cpp, src/XMLString.h, src/macros.h, src/types.h:
- code cleanup
-
-2009-10-11 Martin Gieseking <mgieseki@users.sourceforge.net>
-
- * autogen.sh:
- fixed file permissions of autogen.sh
-
- * src/DVIToSVG.cpp, src/DvisvgmSpecialHandler.cpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/SVGTree.cpp,
- src/SVGTree.h:
- suppress empty style and transformation elements
-
- * NEWS:
- NEWS updated
-
-2009-10-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- scale clipping paths by 72.27/72
-
-2009-10-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bitmap.h:
- fixed bit shift overflow in Bitmap class occured on 64-bit systems
-
- * autogen.sh, prepare:
- prepare script replaced by autogen.sh
-
- * doc/dvisvgm.txt.in:
- fixed formatting of manual page
-
- * src/Length.cpp, src/Length.h, tests/LengthTest.h:
- fixed unit conversion bug
-
- * src/Makefile.am:
- fixed Makefile
-
-2009-10-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, doc/dvisvgm.txt.in, src/BoundingBox.cpp, src/CommandLine.cpp,
- src/CommandLine.h, src/DVIToSVG.cpp, src/DVIToSVG.h, src/dvisvgm.cpp,
- src/options.xml, tests/CommandLineTest.h, tests/Makefile.am:
- cmdline parameter --bbox can now be used to set the absolute bounding
- box
-
- * NEWS, src/GraphicPath.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h:
- PS clipping path sequences and intersections are now handled correctly
-
- * src/MetafontWrapper.cpp:
- fixed file permissions
-
- * src/dvisvgm.cpp:
- fixed uncaught PageSizeException
-
-2009-10-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, doc/dvisvgm.txt.in, src/BoundingBox.cpp, src/BoundingBox.h,
- src/DvisvgmSpecialHandler.cpp:
- added the special variant 'dvisvgm:bbox abs' and 'dvisvgm:bbox fix'
-
- * src/BoundingBox.cpp, src/BoundingBox.h, src/Length.cpp, src/Length.h,
- src/Makefile.am, tests/LengthTest.h:
- class Length provides length unit calculations
-
-2009-10-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BoundingBox.cpp, src/BoundingBox.h, src/GraphicPath.h,
- src/PSInterpreter.cpp, src/PSInterpreter.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/psdefs.psc:
- fixed some PS bounding box and positioning issues introduced by previous
- changesets
-
- * NEWS, configure.ac, fedora/dvisvgm.spec, src/Doxyfile:
- set version to 0.8.6
-
-2009-10-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- convert PS path coordinated to TeX point units
-
- * NEWS, src/PsSpecialHandler.cpp:
- fixed another positioning bug reported by John Bowman
-
-2009-10-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GraphicPath.h, src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
- corrected positioning bug introduced with previous PS positioning fix
-
-2009-10-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am, doc/dvisvgm.txt.in:
- generate pdf manpage directly with groff; adapted manpage source to work
- with latest asciidoc
-
-2009-10-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am, doc/dvisvgm.txt.in:
- replaced backticks in manpage by apostrophes; updated date on homepage
-
-2009-09-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DvisvgmSpecialHandler.cpp:
- added optional depth parameter to special dvisvgm:raw
-
- * doc/dvisvgm.txt.in:
- added dvisvgm:raw example to man page
-
- * LGPL-2.1.txt, NEWS, README:
- updated README and NEWS, and added file with LGPL license text
-
- * Makefile.am, configure.ac, fedora/dvisvgm.spec, src/Doxyfile:
- increased version number to 0.8.5
-
-2009-09-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS:
- added cretdit to John Bowman for sending a patch for the already fixed
- clipping bug
-
- * src/PsSpecialHandler.h:
- increased the default linewidth to 0.5
-
- * fedora/dvisvgm.spec:
- updated spec file and fixed typo on website
-
- * doc/dvisvgm.txt.in:
- minor changes of the documentation
-
-2009-09-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, src/CmdLineParserBase.cpp, src/FontCache.cpp,
- src/SVGFontTraceEmitter.cpp:
- fixed memory bug in tracer module (issue #21)
-
- * NEWS, doc/dvisvgm.txt.in, src/CommandLine.cpp, src/CommandLine.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/SpecialManager.cpp,
- src/SpecialManager.h, src/dvisvgm.cpp, src/options.xml:
- added option --progress for enabling a progress indicator (feature #22)
-
- * src/FileSystem.cpp, src/MetafontWrapper.cpp:
- Windows: Metafont is now called via CreateProcess()
-
-2009-09-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h, src/DVIToSVG.cpp,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h:
- refactored prefixes methods of the SpecialHandlers (ticket #20)
-
- * NEWS, doc/dvisvgm.txt.in, src/FileSystem.cpp, src/FileSystem.h,
- src/FontCache.cpp, src/FontCache.h, src/dvisvgm.cpp:
- option --cache prints additional information about the cached fonts
- (feature #7)
-
- * src/FileSystem.cpp, src/FontCache.cpp:
- fixed Windows-related bug in FileSystem::collect
-
-2009-09-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, README:
- updated NEWS and README
-
-2009-09-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, fedora/dvisvgm.spec, src/Doxyfile:
- increased version number to 0.8.4
-
- * src/BoundingBox.cpp, src/BoundingBox.h, src/PsSpecialHandler.cpp:
- linewidths are now considered properly in computation of bounding box
- (issue #13)
-
- * src/dvisvgm.cpp:
- fixed evaluation of option --help
-
- * src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/CommandLine.cpp,
- src/InputBuffer.h, src/InputReader.h, src/psdefs.psc,
- tests/CommandLineTest.h:
- improved the command line parser to make it more POSIX-compliant
- (feature #17)
-
-2009-09-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp, src/psdefs.psc:
- fixed flattened clipping path bug (issue #11)
-
-2009-08-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Makefile.am:
- added error checks; disallow numeric optional arguments w/o default
- value
-
-2009-08-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, src/PSInterpreter.cpp, src/PsSpecialHandler.cpp, src/dvisvgm.cpp,
- src/psdefs.psc:
- added evaluation of PS 'show' operator in order to evaluate PSTricks
- Type 3 fonts properly
-
- * fedora/dvisvgm.spec:
- updated spec file and homepage to latest release
-
-2009-08-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, configure.ac, doc/dvisvgm.txt.in, src/CmdLineParserBase.cpp,
- src/CommandLine.cpp, src/Doxyfile, src/dvisvgm.cpp, src/getopt.c,
- src/getopt.h, src/getopt1.c, src/options.xml:
- replaced option --cache=? by --cache; increased version number to 0.8.3
-
-2009-08-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * fedora/dvisvgm-0.8.1-potrace.patch, fedora/dvisvgm-gs.patch,
- fedora/dvisvgm-potrace.patch, fedora/dvisvgm.spec:
- updated Fedora files
-
- * configure.ac, fedora/dvisvgm.spec, src/Ghostscript.cpp,
- src/Ghostscript.h, src/Makefile.am:
- improved Ghostscript and potrace linking checks to simplify usage of
- external devel files
-
- * NEWS, configure.ac, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/PsSpecialHandler.cpp,
- src/SpecialManager.cpp, src/SpecialManager.h:
- PS prologue files referenced in first page are now always loaded
-
-2009-08-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CommandLine.cpp, src/CommandLine.h:
- speed up printing help by using puts() instead of C++ streams
-
-2009-08-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontMap.cpp:
- fixed memory bug in FontMap
-
- * src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/Makefile.am,
- src/dvisvgm.cpp, src/options.xml, tests/CommandLineTest.h,
- tests/Makefile.am:
- improved CmdLineParserBase and replaced gengetopt-based parser
-
- * NEWS, configure.ac, src/CmdLineParserBase.cpp, src/CmdLineParserBase.h,
- src/Doxyfile:
- increased version number to 0.8.2
-
-2009-08-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/InputReader.cpp, src/InputReader.h:
- added method parseUInt()
-
- * src/CmdLineParserBase.cpp, src/CmdLineParserBase.h, src/options.xml:
- added files for replacement of gengetopt (not active yet)
-
- * src/CmdLineParserBase.cpp, src/CmdLineParserBase.h:
- finished cmdline parser
-
- * COPYING:
- added copy of file COPYING
-
-2009-08-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * tests/Makefile.am:
- added include path to fix broken distcheck
-
- * COPYING, LICENSE, Makefile.am, README, doc/dvisvgm.txt.in,
- src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp, src/BoundingBox.h,
- src/Calculator.cpp, src/Calculator.h, src/CharmapTranslator.cpp,
- src/CharmapTranslator.h, src/Color.cpp, src/Color.h,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h, src/DLLoader.cpp,
- src/DLLoader.h, src/DVIActions.cpp, src/DVIActions.h, src/DVIReader.cpp,
- src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Directory.cpp,
- src/Directory.h, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.h, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.h, src/FileFinder.cpp, src/FileFinder.h,
- src/FileSystem.cpp, src/FileSystem.h, src/Font.cpp, src/Font.h,
- src/FontCache.cpp, src/FontCache.h, src/FontEmitter.h,
- src/FontEncoding.cpp, src/FontEncoding.h, src/FontEngine.cpp,
- src/FontEngine.h, src/FontGlyph.cpp, src/FontGlyph.h,
- src/FontManager.cpp, src/FontManager.h, src/FontMap.cpp, src/FontMap.h,
- src/GFGlyphTracer.cpp, src/GFGlyphTracer.h, src/GFReader.cpp,
- src/GFReader.h, src/GFTracer.cpp, src/GFTracer.h, src/Ghostscript.cpp,
- src/Ghostscript.h, src/GraphicPath.h, src/InputBuffer.cpp,
- src/InputBuffer.h, src/InputReader.cpp, src/InputReader.h,
- src/Matrix.cpp, src/Matrix.h, src/Message.cpp, src/Message.h,
- src/MessageException.h, src/MetafontWrapper.cpp, src/MetafontWrapper.h,
- src/PSInterpreter.cpp, src/PSInterpreter.h, src/PageSize.cpp,
- src/PageSize.h, src/Pair.h, src/PsSpecialHandler.cpp,
- src/PsSpecialHandler.h, src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h, src/SVGTree.cpp,
- src/SVGTree.h, src/SpecialActions.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h, src/StreamCounter.h,
- src/StreamReader.cpp, src/StreamReader.h, src/TFM.cpp, src/TFM.h,
- src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.h, src/VFActions.h,
- src/VFReader.cpp, src/VFReader.h, src/VectorStream.h,
- src/XMLDocTypeNode.h, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLNode.cpp, src/XMLNode.h, src/XMLString.cpp, src/XMLString.h,
- src/dvisvgm.cpp, src/inttypes.h, src/macros.h, src/psdefs.psc,
- src/types.h, tests/CalculatorTest.h, tests/ColorSpecialTest.h,
- tests/DirectoryTest.h, tests/FileFinderTest.h, tests/FontManagerTest.h,
- tests/FontMapTest.h, tests/GraphicPathTest.h, tests/MatrixTest.h,
- tests/PageSizeTest.h, tests/SplittedCharInputBufferTest.h,
- tests/StreamCounterTest.h, tests/StreamInputBufferTest.h,
- tests/VectorStreamTest.h:
- changed license to GPL version 3 or later
-
-2009-08-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * fedora/dvisvgm-0.8.1-potrace.patch, fedora/dvisvgm.spec:
- added spec file and patch for Fedora builds
-
- * Makefile.am, configure.ac, src/Makefile.am, src/tests/CalculatorTest.h,
- src/tests/ColorSpecialTest.h, src/tests/DirectoryTest.h,
- src/tests/FileFinderTest.h, src/tests/FontManagerTest.h,
- src/tests/FontMapTest.h, src/tests/GraphicPathTest.h,
- src/tests/MatrixTest.h, src/tests/PageSizeTest.h,
- src/tests/SplittedCharInputBufferTest.h, src/tests/StreamCounterTest.h,
- src/tests/StreamInputBufferTest.h, src/tests/VectorStreamTest.h,
- src/tests/dvipdfm_test.map, src/tests/dvips_test.map,
- tests/CalculatorTest.h, tests/ColorSpecialTest.h, tests/DirectoryTest.h,
- tests/FileFinderTest.h, tests/FontManagerTest.h, tests/FontMapTest.h,
- tests/GraphicPathTest.h, tests/Makefile.am, tests/MatrixTest.h,
- tests/PageSizeTest.h, tests/SplittedCharInputBufferTest.h,
- tests/StreamCounterTest.h, tests/StreamInputBufferTest.h,
- tests/VectorStreamTest.h, tests/dvipdfm_test.map, tests/dvips_test.map:
- moved tests from src/tests to ./tests
-
- * tests/Makefile.am:
- added generated file test-all.cpp to CLEANFILES
-
-2009-08-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * LICENSE, Makefile.am, src/Ghostscript.cpp:
- modified package to be compatible with prerequisites of Fedora
-
-2009-07-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, src/DVIToSVG.cpp:
- added target triplet to version string in SVG output
-
- * src/DVIToSVGActions.cpp, src/Ghostscript.cpp, src/Ghostscript.h,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
- added Ghostscript revision info to output of dvisvgm -l
-
-2009-07-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/psdefs.psc:
- added vim tag to psdefs.psc
-
-2009-07-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PsSpecialHandler.cpp:
- added evaluation of more psfile parameters; fixed psfile bounding box
- bug
-
- * NEWS, configure.ac, src/Doxyfile:
- updated version number to 0.8.1
-
- * NEWS, src/FileSystem.cpp, src/FontEngine.cpp, src/FontManager.cpp,
- src/Ghostscript.cpp, src/PageSize.cpp, src/dvisvgm.cpp:
- fixed bug related to unsigned/size_t mismatch on x64 systems
-
- * src/psdefs.psc:
- cleaned up VC++ build files; added batch file to generate cmdline.c;
- added generated file psdefs.psc for convenience
-
-2009-07-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DLLoader.cpp, src/InputReader.cpp, src/PSInterpreter.cpp:
- changes to make VC happy; fixed potential memory bug
-
- * NEWS, README:
- fixed typos; updated homepage/manpage
-
- * src/DVIReader.h, src/InputBuffer.cpp, src/InputBuffer.h,
- src/InputReader.cpp, src/InputReader.h, src/Matrix.cpp, src/Matrix.h,
- src/PSInterpreter.h:
- replaced size_t parameters by unsigned
-
-2009-07-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/PSInterpreter.cpp:
- some clean-ups
-
-2009-07-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, README, doc/dvisvgm.txt.in, src/BoundingBox.cpp,
- src/BoundingBox.h, src/GraphicPath.h, src/PSInterpreter.cpp,
- src/PsSpecialHandler.cpp, src/PsSpecialHandler.h:
- fixed clipping bug; updated homepage, README, NEWS
-
- * src/TpicSpecialHandler.cpp:
- fixed reintroduced bug in TPIC handler
-
-2009-07-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DvisvgmSpecialHandler.cpp, src/InputBuffer.cpp, src/InputReader.cpp,
- src/InputReader.h, src/PsSpecialHandler.cpp, src/PsSpecialHandler.h,
- src/tests/StreamInputBufferTest.h:
- implemented psfile special; fixed some bugs
-
- * src/PsSpecialHandler.cpp, src/SVGTree.cpp:
- fixed bbox bug; added missing file
-
-2009-07-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, doc/dvisvgm.txt.in, src/BoundingBox.cpp,
- src/BoundingBox.h, src/Color.cpp, src/Color.h, src/DLLoader.cpp,
- src/DLLoader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Doxyfile,
- src/DvisvgmSpecialHandler.cpp, src/EmSpecialHandler.cpp,
- src/FileFinder.cpp, src/FontEncoding.cpp, src/Ghostscript.cpp,
- src/Ghostscript.h, src/GraphicPath.h, src/InputBuffer.cpp,
- src/InputBuffer.h, src/InputReader.cpp, src/InputReader.h,
- src/Makefile.am, src/Matrix.cpp, src/Matrix.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PsSpecialHandler.cpp, src/PsSpecialHandler.h,
- src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h, src/SVGTree.h,
- src/SpecialActions.h, src/TpicSpecialHandler.cpp,
- src/TransformationMatrix.cpp, src/TransformationMatrix.h,
- src/XMLDocument.cpp, src/XMLDocument.h, src/XMLNode.cpp, src/XMLNode.h,
- src/iapi.h, src/ierrors.h, src/tests/GraphicPathTest.h,
- src/tests/MatrixTest.h, src/tests/SplittedCharInputBufferTest.h,
- src/tests/StreamInputBufferTest.h:
- transplanted PS functionality to default branch
-
-2009-06-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GFReader.cpp, src/GFReader.h:
- removed error method, use Message::estream instead
-
- * src/InputBuffer.cpp, src/InputBuffer.h, src/Makefile.am:
- transplanted changes to InputBuffer from branch 'pages'
-
- * src/Bitmap.cpp, src/Bitmap.h:
- transplanted changes to Bitmap from branch 'pages'
-
- * src/DVIReader.cpp, src/DVIReader.h:
- transplanted changes to DVIReader from branch 'pages'
-
- * src/FileSystem.cpp, src/FileSystem.h:
- transplanted changes to FileSystem from branch 'pages'
-
- * src/VFReader.cpp:
- transplanted changes to VFReader from branch 'pages'
-
- * src/GFTracer.cpp:
- transplanted changes to GFTracer from branch 'pages'
-
- * src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/DvisvgmSpecialHandler.cpp, src/DvisvgmSpecialHandler.h,
- src/EmSpecialHandler.cpp, src/EmSpecialHandler.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h:
- transplanted changes to SpecialHandlers from branch 'pages'
-
-2009-04-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TpicSpecialHandler.cpp:
- fixed TPIC handler bug that could caused unwanted color fills of
- ellipses due to a missing call of reset()
-
- * NEWS, configure.ac, src/Doxyfile:
- increased version number to 0.7.3
-
- * src/FontCache.h:
- increased version of font cache files to ensure their recreation due to
- the previously fixed shorthand path command bug
-
-2009-04-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontGlyph.cpp:
- fixed bug in computation of shorthand path command
-
-2009-04-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontMap.cpp:
- fixed bug in FontMap that causes a segfault if extension in given font
- file is missing (reported by Armin Geisse)
-
-2009-04-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * configure.ac, doc/dvisvgm.txt.in, src/MetafontWrapper.cpp,
- src/dvisvgm.cpp:
- prepared release 0.7.2 (removed inclusions of debug.h, adapted homepage
- and manpage)
-
-2009-03-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/MetafontWrapper.cpp, src/MetafontWrapper.h:
- ported fix in MetafontWrapper back to default branch
-
-2009-03-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/DVIToSVG.h, src/FontGlyph.cpp,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h, src/dvisvgm.cpp:
- replaced Metafont magnification variable and its setters by a public
- class variable
-
- * src/Doxyfile:
- added doxygen files
-
- * src/SVGFontTraceEmitter.cpp:
- fixed closing bracket "bug" when writing the currently traced character
- to the terminal
-
-2009-03-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, src/FontCache.cpp, src/FontGlyph.cpp, src/FontGlyph.h,
- src/GFGlyphTracer.cpp, src/Pair.h, src/SVGFontEmitter.cpp:
- use of shorthand path commands has been implemented
-
- * src/FontGlyph.cpp:
- fixed potential bug in Glyph::optimizeCommands()
-
- * src/FontGlyph.cpp:
- fixed memory bug in Glyph::optimizeCommands()
-
-2009-03-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontCache.cpp:
- cache files are being compressed now to reduce the file size
-
-2009-03-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, doc/dvisvgm.txt.in, src/FontEmitter.h, src/GFGlyphTracer.cpp,
- src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h, src/dvisvgm.cpp,
- src/options.ggo:
- added option --trace-all that forces tracing of all glyphs of all
- currently used bitmap fonts
-
- * src/FontCache.cpp, src/SVGFontTraceEmitter.cpp:
- don't read existing cache file if --trace-all is given (trace complete
- font and then write cache file instead)
-
-2009-03-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontCache.cpp:
- fixed bug in read/write functions of FontCache
-
- * src/DVIToSVG.cpp, src/TFM.cpp, src/TFM.h:
- added firstChar()/lastChar() to TFM class, removed unnecessary mag
- member variable and its setter
-
-2009-03-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.txt.in, src/DVIToSVG.cpp, src/FileSystem.cpp,
- src/FileSystem.h, src/FontCache.cpp, src/FontCache.h, src/FontGlyph.h,
- src/GFGlyphTracer.cpp, src/GFGlyphTracer.h, src/Makefile.am,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h, src/dvisvgm.cpp:
- completed font caching support
-
- * doc/dvisvgm.txt.in, src/dvisvgm.cpp:
- added option variant --cache=? to display the default cache directory
-
- * src/FontCache.cpp:
- reduced size of cache file format by using variable integer sizes
-
-2009-03-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, configure.ac, doc/dvisvgm.txt.in, src/DVIToSVG.cpp,
- src/FileSystem.cpp, src/FileSystem.h, src/FontCache.cpp, src/FontCache.h,
- src/FontGlyph.cpp, src/FontGlyph.h, src/GFGlyphTracer.cpp,
- src/GFGlyphTracer.h, src/GFTracer.cpp, src/options.ggo:
- first additions to support font caching; not working yet
-
-2009-03-11 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/FontEmitter.h, src/SVGFontEmitter.cpp,
- src/SVGFontEmitter.h, src/SVGFontTraceEmitter.cpp,
- src/SVGFontTraceEmitter.h:
- improved font embedding algorithm in case of --no-fonts (identical
- glyphs in different sizes are now referenced rather than duplicated)
-
-2009-03-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, src/DVIToSVG.cpp, src/DVIToSVGActions.cpp, src/Font.h,
- src/SVGFontEmitter.cpp, src/SVGFontTraceEmitter.cpp:
- all glyph sizes are now computed correctly in conjuction with option
- --no-fonts
-
-2009-03-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BgColorSpecialHandler.cpp, src/SpecialManager.cpp,
- src/TpicSpecialHandler.cpp:
- adapted Code to make VC happy
-
- * src/types.h:
- minor changes to homepage and .hgignore
-
- * src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp:
- fixed transformation bug (transformations are now applied properly to
- the page)
-
-2009-03-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, README, src/Color.cpp, src/Color.h, src/ColorSpecialHandler.cpp,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/DvisvgmSpecialHandler.cpp, src/EmSpecialHandler.cpp, src/Makefile.am,
- src/TpicSpecialHandler.cpp:
- added bgcolor support, updated homepage, fixed color handler bug
-
- * src/BgColorSpecialHandler.cpp, src/BgColorSpecialHandler.h:
- added missing background color handler
-
-2009-03-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.h:
- implemented arc drawing of tpic special set
-
- * src/TpicSpecialHandler.cpp, src/TpicSpecialHandler.h:
- implemented splines of tpic specials
-
-2009-03-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/BoundingBox.cpp, src/BoundingBox.h, src/Color.cpp,
- src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h, src/DVIActions.h,
- src/DVIBBoxActions.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/EmSpecialHandler.cpp,
- src/Makefile.am, src/SpecialActions.h, src/SpecialHandler.h,
- src/TpicSpecialHandler.cpp:
- improved computation of the bounding box (works with specials now);
- added dummy function for background color assignments
-
- * doc/Makefile.am, doc/dvisvgm.txt.in, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.h, src/InputBuffer.cpp, src/InputBuffer.h,
- src/SpecialActions.h:
- implemented the dvisvgm specials raw, image, and bbox
-
- * doc/dvisvgm.txt.in, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.h:
- minor code improvements; comments added
-
-2009-02-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am, doc/dvisvgm.txt, doc/dvisvgm.txt.in:
- removed generated file, added dvisvgm.txt.in
-
- * doc/Makefile.am, doc/dvisvgm.txt.in:
- improved manpage
-
-2009-02-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/DvisvgmSpecialHandler.cpp, src/EmSpecialHandler.cpp,
- src/SpecialActions.h, src/TpicSpecialHandler.cpp:
- renamed appendInPage() to appendToPage
-
-2009-02-24 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/DVIToSVGActions.cpp, src/DvisvgmSpecialHandler.cpp,
- src/DvisvgmSpecialHandler.h, src/EmSpecialHandler.cpp,
- src/EmSpecialHandler.h, src/Makefile.am, src/SpecialColorHandler.cpp,
- src/SpecialColorHandler.h, src/SpecialDvisvgmHandler.cpp,
- src/SpecialDvisvgmHandler.h, src/SpecialEmHandler.cpp,
- src/SpecialEmHandler.h, src/SpecialHandler.h, src/SpecialHtmlHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h,
- src/tests/ColorSpecialTest.h:
- improved SpecialHandler is now able to handle unprefixed specials
-
- * NEWS, src/Color.cpp, src/Color.h, src/DVIToSVGActions.cpp,
- src/Makefile.am, src/Pair.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h, src/TpicSpecialHandler.cpp,
- src/TpicSpecialHandler.h:
- first tpic implementations; not complete yet
-
- * NEWS, doc/dvisvgm.1.in, src/TpicSpecialHandler.cpp:
- few additions to tpic handler
-
-2009-02-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, configure.ac, doc/dvisvgm.1.in, src/DVIBBoxActions.h,
- src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/FontEmitter.h, src/FontEngine.cpp,
- src/FontEngine.h, src/FontGlyph.cpp, src/FontGlyph.h,
- src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h, src/XMLNode.cpp,
- src/XMLNode.h, src/dvisvgm.cpp, src/options.ggo,
- src/tests/ColorSpecialTest.h:
- added option --no-fonts wich uses path elements instead of fonts
-
-2009-02-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, doc/dvisvgm.1.in, src/Color.cpp, src/Color.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Makefile.am,
- src/SpecialActions.h, src/SpecialColorHandler.cpp,
- src/SpecialDvisvgmHandler.cpp, src/SpecialDvisvgmHandler.h,
- src/SpecialEmHandler.cpp, src/SpecialEmHandler.h,
- src/SpecialHtmlHandler.h, src/VerbSpecialHandler.cpp,
- src/VerbSpecialHandler.h:
- fixed bug in color handler, added skeletons of dvisvgm/hyperref special
- handlers
-
-2009-02-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.h, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/Makefile.am, src/SpecialActions.h, src/SpecialColorHandler.cpp,
- src/SpecialEmHandler.cpp:
- added color support to emTeX specials, removed Color class
-
- * NEWS, src/SpecialActions.h, src/tests/ColorSpecialTest.h:
- adapted color test to new interface, added emtex info
-
-2009-02-17 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp:
- made DVICommand local to executeCommand, removed unnecessary if
- statement
-
-2009-02-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.h, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h:
- finished color support
-
- * src/dvisvgm.cpp:
- fixed incorrect behavior of option -V/--version
-
- * NEWS, configure.ac:
- increased version number to 0.6.2, updated NEWS
-
- * doc/dvisvgm.1.in, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/dvisvgm.cpp, src/options.ggo:
- added option --no-style
-
- * NEWS, configure.ac:
- prepared release of version 0.7
-
-2009-02-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile.am, configure.ac, src/tests/DirectoryTest.h:
- removed rpm support
-
- * prepare:
- added administrative files
-
- * src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h:
- reverted to previous version, removed dependency on Color class
-
- * src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Makefile.am,
- src/SpecialActions.h, src/SpecialHandler.h, src/SpecialManager.cpp,
- src/SpecialManager.h:
- color specials are now processed by DVIToSVGActions, but don't create
- any results yet
-
- * prepare:
- updated administrative files
-
- * src/ColorSpecialHandler.cpp, src/Makefile.am,
- src/tests/ColorSpecialTest.h:
- added tests for ColorSpecialHandler
-
-2009-02-12 martin@xps <martin@xps>
-
- * src/inttypes.h:
- added rudimentary files for writing of SWF files; not ready yet
-
-2009-02-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Color.h, src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/Makefile.am:
- replaced RGB arrays by Color class
-
-2009-02-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TransformationMatrix.cpp:
- made y-coordinate of cmdline-option -t optional
-
-2009-02-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/dvisvgm.1.in, src/ColorSpecialHandler.h, src/DVIToSVG.cpp,
- src/DVIToSVG.h, src/DVIToSVGActions.cpp, src/DVIToSVGActions.h,
- src/SpecialHandler.h, src/SpecialManager.cpp, src/SpecialManager.h,
- src/dvisvgm.cpp, src/options.ggo:
- added option --list-specials that lists all registered special handlers
-
- * src/FileFinder.cpp:
- changed lookup order of font maps
-
-2009-02-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/dvisvgm.cpp, src/options.ggo:
- added optional prefix list to commandline option --no-specials
-
- * src/DVIToSVGActions.cpp:
- replaced special ignore list evaluation algorithm
-
-2009-02-04 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp:
- added option for additional loading of user maps
-
- * src/FontMap.cpp:
- added output of font encoding in write method
-
-2009-02-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/SpecialHandler.h,
- src/SpecialManager.cpp, src/SpecialManager.h, src/options.ggo:
- more color special implementation (color constants), still not ready
-
- * src/FileFinder.cpp, src/FileFinder.h, src/dvisvgm.cpp:
- option -m/--map-file is now evaluated properly
-
- * map/cork-lm.map:
- removed deprecated map subdirectory
-
-2009-02-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, src/FileFinder.cpp:
- fixed buggy call of maketfm/makemf in Windows version
-
- * src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h, src/Makefile.am,
- src/SpecialHandler.h, src/SpecialManager.cpp, src/SpecialManager.h:
- added special support skeletons; not working yet
-
- * src/ColorSpecialHandler.cpp, src/ColorSpecialHandler.h:
- some refactorings in color handler
-
-2009-01-30 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/dvisvgm.cpp:
- prevented writing zero-length svg files; simplified main code by using
- auto pointers
-
- * NEWS, src/DVIReader.cpp, src/DVIReader.h:
- fixed magnification bug
-
-2009-01-29 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp:
- adapted Windows version to new release
-
-2009-01-28 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FileFinder.cpp, src/FileFinder.h, src/Makefile.am,
- src/tests/DirectoryTest.h, src/tests/FileFinderTest.h,
- src/tests/FontManagerTest.h, src/tests/KPSFileFinderTest.h:
- refactored FileFinder (implementation as singleton)
-
- * src/dvisvgm.cpp:
- use new initialisation of FileFinder
-
- * src/GFReader.h, src/GFTracer.cpp, src/GFTracer.h:
- improved GFTracer to support unscaled results
-
- * src/FontMap.cpp, src/Makefile.am, src/tests/FontMapTest.h,
- src/tests/dvipdfm_test.map, src/tests/dvips_test.map:
- extensions to FontMap almost complete but not finished yet
-
- * src/Calculator.cpp, src/DVIToSVG.cpp, src/FontEncoding.cpp,
- src/FontMap.cpp, src/SVGFontEmitter.cpp, src/SVGFontTraceEmitter.cpp:
- replaced comparisions with "" with calls of empty()
-
- * src/FileFinder.cpp, src/FontMap.cpp, src/FontMap.h,
- src/tests/FontMapTest.h, src/tests/dvips_test.map:
- FontMap now supports dvips and dvipdfm maps
-
- * NEWS, configure.ac, doc/dvisvgm.1.in:
- adapted configuration and documentation to new dvips map file support
-
-2009-01-27 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/GFGlyphTracer.cpp, src/GFGlyphTracer.h, src/GFTracer.cpp,
- src/GFTracer.h, src/Makefile.am, src/SVGFontTraceEmitter.cpp,
- src/SVGFontTraceEmitter.h:
- made GFTracer a generic class with template methods
-
-2009-01-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bitmap.cpp, src/Bitmap.h, src/GFReader.cpp, src/GFReader.h,
- src/GFTracer.cpp, src/Makefile.am:
- improvements to GF handling, first skeletton of gf->metapost (gfprint)
-
- * src/InputBuffer.h:
- fixed incompatible types bug
-
-2009-01-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/InputBuffer.cpp, src/InputBuffer.h:
- added missing include
-
- * src/FontMap.cpp, src/FontMap.h:
- started redesign of FontMap, not complete yet
-
- * src/CharmapTranslator.cpp, src/DVIToSVG.cpp, src/FileFinder.cpp,
- src/FileFinder.h, src/Font.cpp, src/FontEncoding.cpp,
- src/FontManager.cpp, src/KPSFileFinder.cpp, src/KPSFileFinder.h,
- src/Makefile.am, src/MetafontWrapper.cpp, src/TFM.cpp, src/dvisvgm.cpp:
- renamed KPSFileFinder to FileFinder
-
- * src/FontMap.cpp:
- basic dvips font map support, not complete yet
-
-2009-01-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * doc/Makefile.am, doc/dvisvgm.1.in:
- manpage updates
-
-2009-01-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontMap.cpp:
- forgot to remove address operator
-
- * src/KPSFileFinder.cpp, src/KPSFileFinder.h, src/dvisvgm.cpp:
- added support for MiKTeX' new COM interface
-
- * src/DVIReader.cpp, src/FontManager.cpp, src/KPSFileFinder.cpp:
- memory leak fixed
-
- * src/KPSFileFinder.cpp:
- fixed throwing of COM exception
-
- * Makefile.am, NEWS, README, configure.ac, potracelib/Makefile.am:
- updated version info to 0.6
-
- * src/tests/CalculatorTest.h, src/tests/DirectoryTest.h,
- src/tests/FontManagerTest.h, src/tests/FontMapTest.h,
- src/tests/KPSFileFinderTest.h, src/tests/PageSizeTest.h,
- src/tests/StreamCounterTest.h, src/tests/VectorStreamTest.h:
- updated tests
-
- * doc/dvisvgm.1.in, src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp,
- src/BoundingBox.h, src/Calculator.cpp, src/Calculator.h,
- src/CharmapTranslator.cpp, src/CharmapTranslator.h, src/DVIActions.cpp,
- src/DVIActions.h, src/DVIBBoxActions.h, src/DVIReader.cpp,
- src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Directory.cpp,
- src/Directory.h, src/FileFinder.cpp, src/FileFinder.h,
- src/FileSystem.cpp, src/FileSystem.h, src/Font.cpp, src/Font.h,
- src/FontEmitter.h, src/FontEncoding.cpp, src/FontEncoding.h,
- src/FontEngine.cpp, src/FontEngine.h, src/FontGlyph.cpp, src/FontGlyph.h,
- src/FontManager.cpp, src/FontManager.h, src/FontMap.cpp, src/FontMap.h,
- src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp, src/GFTracer.h,
- src/InputBuffer.cpp, src/InputBuffer.h, src/KPSFileFinder.cpp,
- src/KPSFileFinder.h, src/Makefile.am, src/Matrix.cpp, src/Matrix.h,
- src/Message.cpp, src/Message.h, src/MessageException.h,
- src/MetafontWrapper.cpp, src/MetafontWrapper.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PageSize.cpp, src/PageSize.h, src/Pair.h,
- src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h,
- src/StreamCounter.h, src/StreamReader.cpp, src/StreamReader.h,
- src/TFM.cpp, src/TFM.h, src/TransformationMatrix.cpp,
- src/TransformationMatrix.h, src/VFActions.h, src/VFReader.cpp,
- src/VFReader.h, src/VectorStream.h, src/XMLDocTypeNode.h,
- src/XMLDocument.cpp, src/XMLDocument.h, src/XMLNode.cpp, src/XMLNode.h,
- src/XMLString.cpp, src/XMLString.h, src/dvisvgm.cpp, src/macros.h,
- src/options.ggo, src/types.h:
- updated file header comments
-
- * configure.ac:
- added test whether dvipdfm.map is available
-
-2009-01-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp,
- src/FontEncoding.cpp, src/FontGlyph.cpp:
- fixed bugs in handling of font encodings and virtual fonts
-
- * src/Calculator.cpp, src/DVIReader.cpp, src/DVIToSVGActions.cpp,
- src/Directory.cpp, src/FontEncoding.cpp, src/FontEngine.cpp,
- src/FontManager.cpp, src/FontMap.cpp, src/KPSFileFinder.cpp,
- src/MetafontWrapper.cpp, src/PageSize.cpp, src/StreamReader.cpp,
- src/TFM.cpp, src/TransformationMatrix.cpp, src/VFReader.cpp,
- src/XMLDocument.cpp, src/XMLNode.cpp:
- added in/out attributes to parameter documentation
-
-2009-01-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/DVIToSVG.cpp, src/Font.h, src/FontEncoding.cpp,
- src/FontEncoding.h, src/FontEngine.cpp, src/FontEngine.h,
- src/FontGlyph.cpp, src/FontGlyph.h, src/FontManager.cpp,
- src/FontManager.h, src/InputBuffer.cpp, src/InputBuffer.h,
- src/SVGFontEmitter.cpp, src/SVGFontEmitter.h:
- first working version with font encoding support
-
- * src/FontEngine.cpp, src/FontEngine.h, src/SVGFontEmitter.cpp:
- fixed glyph positioning bug occured in conjunction with font encoding
-
- * src/SVGFontEmitter.cpp:
- fixed memory bug
-
-2009-01-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/FontEncoding.cpp, src/FontEncoding.h, src/FontEngine.cpp,
- src/FontEngine.h, src/FontManager.cpp, src/FontManager.h,
- src/FontMap.cpp, src/FontMap.h, src/KPSFileFinder.cpp,
- src/KPSFileFinder.h:
- more encoding implementations, not complete yet
-
- * src/DVIReader.cpp, src/FontEncoding.cpp, src/FontEncoding.h,
- src/FontEngine.cpp, src/FontEngine.h, src/FontManager.cpp,
- src/FontManager.h, src/FontMap.cpp:
- partly working mapping support, but yet too slow
-
-2009-01-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TransformationMatrix.cpp:
- fixed bug in argument assignment of transformation command M
-
-2009-01-15 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/TransformationMatrix.cpp:
- removed a dangerous loop remained from previous code
-
-2009-01-14 Martin Gieseking <martin.gieseking@uos.de>
-
- * potracelib/auxiliary.h, potracelib/bitmap.h, potracelib/curve.c,
- potracelib/curve.h, potracelib/decompose.c, potracelib/decompose.h,
- potracelib/lists.h, potracelib/potracelib.c, potracelib/potracelib.h,
- potracelib/progress.h, potracelib/trace.c, potracelib/trace.h:
- updated libpotrace to version 1.8
-
- * src/FontEncoding.cpp, src/FontEncoding.h, src/InputBuffer.cpp,
- src/InputBuffer.h, src/Makefile.am:
- added basic skeleton for handling of font encodings
-
- * src/FileSystem.cpp, src/FileSystem.h:
- const string parameters
-
- * src/dvisvgm.cpp:
- updated copyright string
-
- * src/KPSFileFinder.cpp:
- added enc-file support
-
-2009-01-13 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CharmapTranslator.cpp:
- fixed crash on loading corrupt pfb-files
-
-2008-06-18 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Makefile.am:
- adapted to latest gengetopt version
-
-2008-04-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Makefile.am:
- added missing include path
-
- * src/DVIReader.cpp:
- minor change
-
-2007-03-26 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, src/CharmapTranslator.cpp, src/CharmapTranslator.h,
- src/DVIActions.h, src/DVIReader.cpp, src/DVIToSVG.cpp,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Font.h,
- src/FontManager.cpp, src/Makefile.am, src/SVGFontTraceEmitter.cpp,
- src/SVGFontTraceEmitter.h:
- redesigned DVIActions and CharmapTranslator
-
- * src/DVIActions.cpp, src/DVIReader.cpp, src/DVIReader.h,
- src/FontManager.cpp, src/tests/FontManagerTest.h:
- few minor changes
-
-2007-03-25 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIActions.cpp, src/DVIActions.h, src/DVIBBoxActions.h,
- src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/Font.cpp, src/Font.h,
- src/FontManager.cpp, src/FontManager.h, src/StreamReader.cpp,
- src/StreamReader.h, src/VFActions.h, src/VFReader.cpp, src/VFReader.h,
- src/VectorStream.h:
- first working version 0.5, release candidate 1
-
- * src/DVIReader.cpp, src/DVIReader.h, src/VFActions.h:
- minor fixes
-
-2007-03-23 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/FontManager.cpp, src/FontManager.h,
- src/KPSFileFinder.cpp, src/KPSFileFinder.h, src/VFReader.cpp:
- more vf implementations, not complete yet
-
-2007-03-22 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, doc/Makefile.in, src/DVIReader.cpp, src/DVIReader.h,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/FileSystem.cpp, src/FileSystem.h,
- src/KPSFileFinder.cpp, src/KPSFileFinder.h, src/Makefile.am,
- src/dvisvgm.cpp, src/tests/DirectoryTest.h, src/tests/FontManagerTest.h:
- reintegrated font map initialization into KPSFileFinderm adapted some
- tests
-
- * src/DVIReader.cpp, src/Font.cpp, src/Font.h, src/FontManager.cpp,
- src/VFActions.h, src/VFReader.cpp, src/VFReader.h:
- more vf implementations
-
-2007-03-21 Martin Gieseking <martin.gieseking@uos.de>
-
- * AUTHORS, Makefile.am, README, potracelib/Makefile.am, src/Directory.cpp,
- src/Directory.h, src/KPSFileFinder.cpp, src/Makefile, src/Makefile.am,
- src/Makefile.in, src/SVGFontTraceEmitter.cpp, src/test-all.cpp,
- src/tests/DirectoryTest.h:
- implemented Directory class for Linux, added DirectoryTest
-
- * src/Calculator.cpp, src/DVIReader.cpp, src/Directory.cpp, src/Font.h,
- src/FontManager.cpp, src/Makefile, src/Makefile.am, src/Makefile.in,
- src/MetafontWrapper.cpp, src/VFReader.cpp, src/VectorStream.h,
- src/test-all.cpp, src/tests/VectorStreamTest.h:
- removed redundant code and commented code fragments, added
- VectorInputStream class
-
- * src/Directory.cpp, src/Directory.h, src/KPSFileFinder.cpp,
- src/KPSFileFinder.h, src/dvisvgm.cpp:
- completed MiKTeX font map file look-up, fixed bug in Directory class
-
- * src/KPSFileFinder.cpp, src/KPSFileFinder.h, src/dvisvgm.cpp:
- implemented options -n and -m
-
-2007-03-20 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, doc/Makefile, doc/Makefile.in, doc/dvisvgm.1.in,
- src/DVIReader.cpp, src/DVIToSVG.cpp, src/Font.cpp, src/Font.h,
- src/FontManager.cpp, src/KPSFileFinder.cpp, src/Makefile,
- src/Makefile.am, src/Makefile.in, src/VFReader.cpp, src/dvisvgm.cpp,
- src/test-all.cpp, src/tests/KPSFileFinderTest.h:
- added KPSFileFinderTest, added EmptyFont, fixed compilation error
-
- * src/Directory.cpp, src/Directory.h, src/FileSystem.cpp, src/FontMap.cpp,
- src/FontMap.h, src/KPSFileFinder.cpp:
- more changes for MiKTeX support
-
-2007-03-19 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CharmapTranslator.cpp, src/DVIToSVG.cpp, src/FontManager.cpp,
- src/KPSFileFinder.cpp, src/KPSFileFinder.h, src/Makefile,
- src/Makefile.am, src/Makefile.in, src/MetafontWrapper.cpp, src/TFM.cpp:
- added mktexFOO support and font map lookups to KPSFileFinder
-
- * src/KPSFileFinder.cpp:
- bug fixed, font maps work now
-
- * src/Font.cpp, src/Font.h, src/FontManager.cpp, src/FontMap.cpp,
- src/FontMap.h, src/KPSFileFinder.cpp:
- made sources comaptible with MikTeX
-
-2007-03-16 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp, src/Font.h, src/FontManager.cpp, src/FontMap.cpp,
- src/FontMap.h, src/KPSFileFinder.cpp, src/Makefile, src/Makefile.am,
- src/Makefile.in, src/StreamReader.cpp, src/TFM.cpp, src/options.ggo,
- src/tests/FontMapTest.h:
- more coding in the font department, not finished yet
-
-2007-03-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/CharmapTranslator.cpp, src/CharmapTranslator.h, src/DVIReader.cpp,
- src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVGActions.cpp, src/Font.cpp,
- src/FontManager.cpp, src/GFTracer.cpp, src/KPSFileFinder.cpp,
- src/KPSFileFinder.h, src/Makefile, src/Makefile.am, src/Makefile.in,
- src/MetafontWrapper.cpp, src/MetafontWrapper.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h,
- src/StreamReader.cpp, src/StreamReader.h, src/TFM.cpp, src/TFM.h,
- src/VFReader.cpp, src/VFReader.h, src/dvisvgm.cpp, src/options.ggo,
- src/test-all.cpp:
- refactorings: extracted StreamReader class, replaced generic FileFinder
- support by KPSFileFinder calls
-
-2007-03-08 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIActions.h, src/DVIBBoxActions.h, src/DVIReader.cpp,
- src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/Font.cpp, src/Font.h, src/FontManager.cpp,
- src/FontManager.h, src/KPSFileFinder.cpp, src/KPSFileFinder.h,
- src/Makefile, src/Makefile.am, src/Makefile.in, src/Message.cpp,
- src/dvisvgm.cpp, src/macros.h, src/test-all.cpp:
- first unstable version with redesigned font handling
-
- * COPYING, Makefile, Makefile.am, Makefile.in, Martins_svg_neu.svg, NEWS,
- aclocal.m4, cmdline.c, config.guess, config.h, config.h.in,
- config.status, config.sub, configure.ac, depcomp, doc/Makefile,
- doc/dvisvgm.1, doc/dvisvgm.1.in, gpl.txt, install-sh, missing,
- src/FontManager.cpp, src/FontManager.h, src/Makefile.am,
- src/VFReader.cpp, src/tests/FontManagerTest.h, stamp-h1, table.txt:
- removed some garbage from the repository, added initial FontManagerTest
-
- * doc/dvisvgm.1, src/FontEngine.h, src/dvisvgm.cpp,
- src/tests/FontManagerTest.h:
- minor changes
-
- * src/DVIBBoxReader.cpp, src/DVIBBoxReader.h, src/Font.cpp, src/Font.h,
- src/StreamCounter.h, src/dvisvgm.cpp:
- fixed memory bug
-
- * src/DVIReader.cpp, src/DVIToSVGActions.cpp, src/Font.h, src/Makefile,
- src/Makefile.am, src/Makefile.in, src/VFActions.h, src/VFReader.cpp,
- src/VFReader.h, src/dvisvgm.cpp:
- plugged VFReader and its actions into the code (not usable yet)
-
-2007-03-07 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Font.cpp, src/Font.h:
- added Font classes (not yet error-free)
-
-2007-03-06 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.h, src/DVIToSVG.cpp, src/FontManager.cpp,
- src/FontManager.h:
- added FontManager skeleton, fixed bug in makehead
-
-2007-03-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/FontManager.cpp, src/VFReader.cpp:
- added some more skeleton code
-
-2007-03-02 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/DVIReader.cpp, src/Makefile, src/Makefile.in, src/VFReader.cpp,
- src/VFReader.h, src/options.ggo:
- added skeleton of VFReader
-
-2007-01-10 Martin Gieseking <martin.gieseking@uos.de>
-
- * src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp, src/BoundingBox.h,
- src/Calculator.cpp, src/Calculator.h, src/CharmapTranslator.cpp,
- src/CharmapTranslator.h, src/DVIActions.h, src/DVIBBoxActions.h,
- src/DVIBBoxReader.cpp, src/DVIBBoxReader.h, src/DVIReader.cpp,
- src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/FileFinder.cpp,
- src/FileFinder.h, src/FileSystem.cpp, src/FileSystem.h,
- src/FontEmitter.h, src/FontEngine.cpp, src/FontEngine.h,
- src/FontGlyph.cpp, src/FontGlyph.h, src/FontMap.cpp, src/FontMap.h,
- src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp, src/GFTracer.h,
- src/KPSFileFinder.cpp, src/KPSFileFinder.h, src/Makefile,
- src/Makefile.am, src/Makefile.in, src/Matrix.cpp, src/Matrix.h,
- src/Message.cpp, src/Message.h, src/MessageException.h,
- src/MetafontWrapper.cpp, src/MetafontWrapper.h, src/PSInterpreter.cpp,
- src/PSInterpreter.h, src/PageSize.cpp, src/PageSize.h, src/Pair.h,
- src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h,
- src/StreamCounter.h, src/TFM.cpp, src/TFM.h,
- src/TransformationMatrix.cpp, src/TransformationMatrix.h,
- src/XMLDocTypeNode.h, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLNode.cpp, src/XMLNode.h, src/XMLString.cpp, src/XMLString.h,
- src/cmdline.c, src/cmdline.h, src/dvisvgm.cpp, src/getopt.c,
- src/getopt.h, src/getopt1.c, src/gzstream.cpp, src/gzstream.h,
- src/macros.h, src/miktex-core.def, src/miktex-kps.def, src/miktex-kps.h,
- src/options.ggo, src/test-all.cpp, src/tests/CalculatorTest.h,
- src/tests/PageSizeTest.h, src/tests/StreamCounterTest.h, src/types.h:
- moved dir
-
- * INSTALL, Makefile.am, NEWS, README, configure.ac, doc/Makefile,
- doc/Makefile.am, doc/Makefile.in, doc/dvisvgm.1, doc/dvisvgm.1.in,
- gzstream/COPYING.LIB, gzstream/Makefile, gzstream/README,
- gzstream/gzstream.cpp, gzstream/gzstream.h, gzstream/index.html,
- gzstream/logo.gif, gzstream/test_gunzip.C, gzstream/test_gzip.C,
- gzstream/version, map/cork-lm.map, potracelib/Makefile.am,
- potracelib/auxiliary.h, potracelib/bitmap.h, potracelib/curve.c,
- potracelib/curve.h, potracelib/decompose.c, potracelib/decompose.h,
- potracelib/lists.h, potracelib/potracelib.c, potracelib/potracelib.h,
- potracelib/progress.h, potracelib/trace.c, potracelib/trace.h:
- moved sources
-
- * src/cmdline.c, src/cmdline.h:
- remove unnecessary files
-
-2007-01-09 Martin Gieseking <martin.gieseking@uos.de>
-
- * INSTALL, Makefile.am, NEWS, README, configure.ac, doc/Makefile,
- doc/Makefile.am, doc/Makefile.in, doc/dvisvgm.1, doc/dvisvgm.1.in,
- gzstream/COPYING.LIB, gzstream/Makefile, gzstream/README,
- gzstream/gzstream.cpp, gzstream/gzstream.h, gzstream/index.html,
- gzstream/logo.gif, gzstream/test_gunzip.C, gzstream/test_gzip.C,
- gzstream/version, potracelib/Makefile.am, potracelib/auxiliary.h,
- potracelib/bitmap.h, potracelib/curve.c, potracelib/curve.h,
- potracelib/decompose.c, potracelib/decompose.h, potracelib/lists.h,
- potracelib/potracelib.c, potracelib/potracelib.h, potracelib/progress.h,
- potracelib/trace.c, potracelib/trace.h, src/Bitmap.cpp, src/Bitmap.h,
- src/BoundingBox.cpp, src/BoundingBox.h, src/Calculator.cpp,
- src/Calculator.h, src/CharmapTranslator.cpp, src/CharmapTranslator.h,
- src/DVIActions.h, src/DVIBBoxActions.h, src/DVIBBoxReader.cpp,
- src/DVIBBoxReader.h, src/DVIReader.cpp, src/DVIReader.h,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/FileFinder.cpp, src/FileFinder.h,
- src/FileSystem.cpp, src/FileSystem.h, src/FontEmitter.h,
- src/FontEngine.cpp, src/FontEngine.h, src/FontGlyph.cpp, src/FontGlyph.h,
- src/FontMap.cpp, src/FontMap.h, src/GFReader.cpp, src/GFReader.h,
- src/GFTracer.cpp, src/GFTracer.h, src/KPSFileFinder.cpp,
- src/KPSFileFinder.h, src/Makefile, src/Makefile.am, src/Makefile.in,
- src/Matrix.cpp, src/Matrix.h, src/Message.cpp, src/Message.h,
- src/MessageException.h, src/MetafontWrapper.cpp, src/MetafontWrapper.h,
- src/PSInterpreter.cpp, src/PSInterpreter.h, src/PageSize.cpp,
- src/PageSize.h, src/Pair.h, src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h,
- src/StreamCounter.h, src/TFM.cpp, src/TFM.h,
- src/TransformationMatrix.cpp, src/TransformationMatrix.h,
- src/XMLDocTypeNode.h, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLNode.cpp, src/XMLNode.h, src/XMLString.cpp, src/XMLString.h,
- src/cmdline.c, src/cmdline.h, src/dvisvgm.cpp, src/getopt.c,
- src/getopt.h, src/getopt1.c, src/gzstream.cpp, src/gzstream.h,
- src/macros.h, src/miktex-core.def, src/miktex-kps.def, src/miktex-kps.h,
- src/options.ggo, src/test-all.cpp, src/tests/CalculatorTest.h,
- src/tests/PageSizeTest.h, src/tests/StreamCounterTest.h, src/types.h:
- moved files to trunk subfolder
-
- * map/cork-lm.map:
- moved files to trunk
-
-2007-01-05 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile, Makefile.am, Makefile.in, README, config.status, configure.ac,
- potracelib/Makefile.am, potracelib/bitops.h, potracelib/flate.c,
- potracelib/flate.h, src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp,
- src/BoundingBox.h, src/Calculator.cpp, src/Calculator.h,
- src/CharmapTranslator.cpp, src/CharmapTranslator.h, src/DVIActions.h,
- src/DVIBBoxActions.h, src/DVIBBoxReader.cpp, src/DVIBBoxReader.h,
- src/DVIReader.cpp, src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/FileFinder.cpp,
- src/FileFinder.h, src/FileSystem.cpp, src/FileSystem.h,
- src/FontEmitter.h, src/FontEngine.cpp, src/FontEngine.h,
- src/FontGlyph.cpp, src/FontGlyph.h, src/FontMap.cpp, src/FontMap.h,
- src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp, src/GFTracer.h,
- src/KPSFileFinder.cpp, src/KPSFileFinder.h, src/Makefile.am,
- src/Matrix.cpp, src/Matrix.h, src/Message.cpp, src/Message.h,
- src/MessageException.h, src/MetafontWrapper.cpp, src/MetafontWrapper.h,
- src/PSInterpreter.cpp, src/PSInterpreter.h, src/PageSize.cpp,
- src/PageSize.h, src/Pair.h, src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h,
- src/StreamCounter.h, src/TFM.cpp, src/TFM.h,
- src/TransformationMatrix.cpp, src/TransformationMatrix.h,
- src/XMLDocTypeNode.h, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLNode.cpp, src/XMLNode.h, src/XMLString.cpp, src/XMLString.h,
- src/dvisvgm.cpp, src/macros.h, src/test-all.cpp, src/types.h:
- minor modifications
-
-2007-01-03 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, src/KPSFileFinder.cpp:
- updated homepage
-
- * Makefile, Makefile.am, Makefile.in, config.h, config.h.in,
- config.status, configure, configure.ac, doc/Makefile,
- potracelib/Makefile.am, potracelib/auxiliary.h, potracelib/bitmap.h,
- potracelib/bitops.h, potracelib/curve.c, potracelib/curve.h,
- potracelib/decompose.c, potracelib/decompose.h, potracelib/flate.c,
- potracelib/flate.h, potracelib/lists.h, potracelib/potracelib.c,
- potracelib/potracelib.h, potracelib/progress.h, potracelib/trace.c,
- potracelib/trace.h, src/Makefile, src/Makefile.am, src/Makefile.in:
- added potracelib to distribution
-
- * configure:
- removed configure from repository
-
-2006-12-31 Martin Gieseking <martin.gieseking@uos.de>
-
- * NEWS, configure.ac, src/DVIToSVG.cpp, src/FileSystem.cpp,
- src/FontEngine.cpp, src/GFTracer.cpp, src/KPSFileFinder.cpp,
- src/Matrix.h, src/Message.cpp, src/PageSize.cpp,
- src/TransformationMatrix.cpp, src/dvisvgm.cpp:
- updated to MikTeX 2.5 support
-
- * Makefile, config.status, configure, configure.ac, doc/Makefile,
- doc/dvisvgm.1, src/FileSystem.cpp, src/FontEngine.cpp,
- src/KPSFileFinder.cpp, src/Makefile, src/dvisvgm.cpp, src/test-all.cpp:
- some minor fixes
-
- * src/KPSFileFinder.cpp:
- fixed namepsace bug
-
-2006-08-01 Martin Gieseking <martin.gieseking@uos.de>
-
- * Makefile, Makefile.in, NEWS, aclocal.m4, autom4te.cache/output.0,
- autom4te.cache/requests, autom4te.cache/traces.0, config.h, config.log,
- config.status, configure, configure.ac, doc/Makefile, doc/Makefile.in,
- doc/dvisvgm.1, src/FontEngine.cpp, src/Makefile, src/Makefile.in,
- src/cmdline.c, src/cmdline.h, src/dvisvgm.cpp:
- added support for freetype version >= 2.1.1
-
- * configure.ac:
- enabled svn keyword expansion
-
-2006-04-12 Martin Gieseking <martin.gieseking@uos.de>
-
- * COPYING, INSTALL, Makefile, Makefile.am, Makefile.in,
- Martins_svg_neu.svg, NEWS, README, aclocal.m4, autom4te.cache/output.0,
- autom4te.cache/requests, autom4te.cache/traces.0, cmdline.c,
- config.guess, config.h, config.h.in, config.log, config.status,
- config.sub, configure, configure.ac, depcomp, doc/Makefile,
- doc/Makefile.am, doc/Makefile.in, doc/dvisvgm.1, doc/dvisvgm.1.in,
- gpl.txt, gzstream/COPYING.LIB, gzstream/Makefile, gzstream/README,
- gzstream/gzstream.cpp, gzstream/gzstream.h, gzstream/index.html,
- gzstream/logo.gif, gzstream/test_gunzip.C, gzstream/test_gzip.C,
- gzstream/version, install-sh, map/cork-lm.map, missing, src/Bitmap.cpp,
- src/Bitmap.h, src/BoundingBox.cpp, src/BoundingBox.h, src/Calculator.cpp,
- src/Calculator.h, src/CharmapTranslator.cpp, src/CharmapTranslator.h,
- src/DVIActions.h, src/DVIBBoxActions.h, src/DVIBBoxReader.cpp,
- src/DVIBBoxReader.h, src/DVIReader.cpp, src/DVIReader.h,
- src/DVIToSVG.cpp, src/DVIToSVG.h, src/DVIToSVGActions.cpp,
- src/DVIToSVGActions.h, src/FileFinder.cpp, src/FileFinder.h,
- src/FileSystem.cpp, src/FileSystem.h, src/FontEmitter.h,
- src/FontEngine.cpp, src/FontEngine.h, src/FontGlyph.cpp, src/FontGlyph.h,
- src/FontMap.cpp, src/FontMap.h, src/GFReader.cpp, src/GFReader.h,
- src/GFTracer.cpp, src/GFTracer.h, src/KPSFileFinder.cpp,
- src/KPSFileFinder.h, src/Makefile, src/Makefile.am, src/Makefile.in,
- src/Matrix.cpp, src/Matrix.h, src/Message.cpp, src/Message.h,
- src/MessageException.h, src/MetafontWrapper.cpp, src/MetafontWrapper.h,
- src/PSInterpreter.cpp, src/PSInterpreter.h, src/PageSize.cpp,
- src/PageSize.h, src/Pair.h, src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h,
- src/StreamCounter.h, src/TFM.cpp, src/TFM.h,
- src/TransformationMatrix.cpp, src/TransformationMatrix.h,
- src/XMLDocTypeNode.h, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLNode.cpp, src/XMLNode.h, src/XMLString.cpp, src/XMLString.h,
- src/cmdline.c, src/cmdline.h, src/dvisvgm.cpp, src/getopt.c,
- src/getopt.h, src/getopt1.c, src/gzstream.cpp, src/gzstream.h,
- src/lshort-cm.dvi, src/lshort-cm.svg, src/lshort-cm.svgz, src/lshort.dvi,
- src/lshort.svg, src/lshort.svgz, src/macros.h, src/miktex-core.def,
- src/miktex-kps.def, src/miktex-kps.h, src/options.ggo, src/test-all.cpp,
- src/tests/CalculatorTest.h, src/tests/PageSizeTest.h,
- src/tests/StreamCounterTest.h, src/types.h, stamp-h1, table.txt:
- initial import
-
- * src/Bitmap.cpp, src/Bitmap.h, src/BoundingBox.cpp, src/BoundingBox.h,
- src/Calculator.cpp, src/Calculator.h, src/CharmapTranslator.cpp,
- src/CharmapTranslator.h, src/DVIActions.h, src/DVIBBoxActions.h,
- src/DVIBBoxReader.cpp, src/DVIBBoxReader.h, src/DVIReader.cpp,
- src/DVIReader.h, src/DVIToSVG.cpp, src/DVIToSVG.h,
- src/DVIToSVGActions.cpp, src/DVIToSVGActions.h, src/FileFinder.cpp,
- src/FileFinder.h, src/FileSystem.cpp, src/FileSystem.h,
- src/FontEmitter.h, src/FontEngine.cpp, src/FontEngine.h,
- src/FontGlyph.cpp, src/FontGlyph.h, src/FontMap.cpp, src/FontMap.h,
- src/GFReader.cpp, src/GFReader.h, src/GFTracer.cpp, src/GFTracer.h,
- src/KPSFileFinder.cpp, src/KPSFileFinder.h, src/Message.cpp,
- src/Message.h, src/MessageException.h, src/MetafontWrapper.cpp,
- src/MetafontWrapper.h, src/PageSize.cpp, src/PageSize.h, src/Pair.h,
- src/SVGFontEmitter.cpp, src/SVGFontEmitter.h,
- src/SVGFontTraceEmitter.cpp, src/SVGFontTraceEmitter.h,
- src/StreamCounter.h, src/TFM.cpp, src/TFM.h,
- src/TransformationMatrix.cpp, src/TransformationMatrix.h,
- src/XMLDocTypeNode.h, src/XMLDocument.cpp, src/XMLDocument.h,
- src/XMLNode.cpp, src/XMLNode.h, src/XMLString.cpp, src/XMLString.h,
- src/dvisvgm.cpp, src/macros.h, src/test-all.cpp,
- src/tests/CalculatorTest.h, src/tests/PageSizeTest.h,
- src/tests/StreamCounterTest.h, src/types.h:
- changed keyword tags
-
- * src/lshort-cm.dvi, src/lshort-cm.svg, src/lshort-cm.svgz,
- src/lshort.dvi, src/lshort.svg, src/lshort.svgz:
- removed files that need not be version controlled
-
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-src/Makefile.am
index 0526e67a739..5bb4d6cd866 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/Makefile.am
@@ -1,5 +1,5 @@
## This file is part of dvisvgm
-## Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de>
+## Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de>
##
## Process this file with automake.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/Makefile.in
index cc04df25b93..96d17c9c748 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/Makefile.in
@@ -15,7 +15,7 @@
@SET_MAKE@
# aminclude_static.am generated automatically by Autoconf
-# from AX_AM_MACROS_STATIC on Tue Feb 21 11:55:35 CET 2023
+# from AX_AM_MACROS_STATIC on Thu Jan 11 09:52:29 CET 2024
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
@@ -170,7 +170,7 @@ am__define_uniq_tagged_files = \
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/dvisvgm-src/aminclude_static.am AUTHORS COPYING \
- ChangeLog INSTALL NEWS README
+ INSTALL NEWS README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/NEWS b/Build/source/texk/dvisvgm/dvisvgm-src/NEWS
index c610fad9bc0..2f2a5bee5ae 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/NEWS
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/NEWS
@@ -1,3 +1,60 @@
+dvisvgm-3.2 (2024-01-11)
+- PDF handler: fixed a rounding issue that could lead to slightly bigger
+ text extents (GH issue #256)
+- added macros {?pageno}, {?svgfile}, and {?svgpath} to the dvisvgm special
+ commands
+- added separate verbosity flag 8 for user messages printed by special
+ dvisvgm:message
+- added command-line option --message to allow for printing user messages
+ after writing an SVG file (GH issue #258)
+- applied upstream patch regarding undefined type punning to the bundled
+ woff2 library
+- few improvements of the manual page
+
+dvisvgm-3.1.2 (2023-10-12)
+- improved evaluation of graphic extents created by the 'preview' package
+ (GH issue #246)
+- fixed computation of character boxes when using --exact-bbox (GH issue #248)
+- fixed memory error in optimizer module (GH issue #250)
+- updated bundled brotli library to version 1.1.0
+
+dvisvgm-3.1.1 (2023-08-29)
+- added evaluation of optional dash prefixes to command-line option --optimize
+ to exclude selected optimizer modules
+- fixed invalid removal of clipping paths referenced in 'defs' section
+- fixed automatic calls of optimizer module 'remove-clippaths'
+- suppress Ghostscript warning about deprecated option -dNEWPDF (GH issue #245)
+- updated bundled xxHash library to version 0.8.2
+- few fixes in the manual page
+
+dvisvgm-3.1 (2023-07-06)
+- added command-line option --currentcolor to replace a given color with
+ CSS variable 'currentColor' (GH issue #214)
+- added special dvisvgm:currentcolor to replace the currently active color
+ with CSS variable 'currentColor' (GH issue #214)
+- added special 'dvisvgm:message' to print given texts to the console
+- added support for Omega Font Metric (OFM) files
+- added fallback mechanism for missing characters in OFM-based virtual fonts
+ proposed by Takuji Tanaka (GH issue #241)
+- fixed handling of whitespace in PDF file paths (GH issue #233)
+- fixed vertical placement of "vertical fonts" in horizontal mode
+ (GH issue #235)
+- fixed parsing of floating point numbers occurred with libc++ (GH issue #240)
+- fixed potential segmentation faults triggered by missing font files
+ (GH issue #241)
+- fixed GLIBCXX assertion error in new PDF handler (GH issue #242)
+- improved handling of font subset prefixes in new, mutool-based PDF handler
+ (GH issue #242)
+- several minor code improvements
+
+dvisvgm-3.0.4 (2023-03-10)
+- fixed issue that could prevent reading the output of subprocesses
+ (GH issue #232)
+- removed optional dependency on libcrypto (OpenSSL) because the MD5 functions
+ have been deprecated (always using the bundled MD5 function now)
+- added TeX Live conditionals to the build system (patch by Karl Berry)
+- small code and manual page improvements
+
dvisvgm-3.0.3 (2023-02-21)
- fixed resetting of character contexts (GH issue #227)
- added missing #includes required for GCC 13
@@ -6,7 +63,7 @@ dvisvgm-3.0.2 (2023-01-30)
- fixed computation of font sizes in new PDF handler (GH issue #220)
- fixed viewBox coordinates determined by new PDF handler (GH issue #223)
- improved detection of font names used in PDF files (GH issue #224)
-- minor code improvements
+- minor code improvements
dvisvgm-3.0.1 (2023-01-10)
- added support for the 64-bit GS library in TeX Live
@@ -20,9 +77,9 @@ dvisvgm-3.0.1 (2023-01-10)
- improved processing of fonts when using the new PDF handler
dvisvgm-3.0 (2022-10-16)
-- added new PDF handler based on mutool to keep the PDF functionality available
- which can't no longer be realized with as of Ghostscript 10.1.0 due to the
- replacement of its PDF interpreter
+- added a new PDF handler based on mutool to keep the PDF functionality
+ available which can no longer be realized with Ghostscript 10.1.0 due to
+ the replacement of its PostScript-based PDF interpreter
- replaced the bundled minimal Fontforge library (ff-woff) with a dedicated,
newly implemented library for embedding TTF/WOFF data into the SVG files
- added option --embed-bitmaps to embed bitmaps into the generated SVG files
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/README b/Build/source/texk/dvisvgm/dvisvgm-src/README
index 0dbbc51a350..2903e4e2410 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/README
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/README
@@ -34,13 +34,6 @@ DEPENDENCIES
searching files in the large texmf tree. Please ensure that you use the
kpathsea version coming with or matching your TeX system.
- * OpenSSL crypto library (https://www.openssl.org)
- dvisvgm comes with a bundled implementation of the MD5 hash algorithm which
- can optionally be replaced with the corresponding function of the OpenSSL
- crypto library. If the configuration script finds the OpenSSL development
- files on the build system, it links against libcrypto instead of the bundled
- MD5 module.
-
* potracelib (http://potrace.sourceforge.net)
Peter Selinger's bitmap tracing library is utilized to vectorize Metafont's
bitmap output. A recent version is also part of the dvisvgm sources.
@@ -123,7 +116,7 @@ ADDITIONAL INFORMATION
COPYRIGHT
- Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de>
+ Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/aminclude_static.am b/Build/source/texk/dvisvgm/dvisvgm-src/aminclude_static.am
index 8892cc24c01..8bf9b4ccc8f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/aminclude_static.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/aminclude_static.am
@@ -1,6 +1,6 @@
# aminclude_static.am generated automatically by Autoconf
-# from AX_AM_MACROS_STATIC on Tue Feb 21 11:55:35 CET 2023
+# from AX_AM_MACROS_STATIC on Thu Jan 11 09:52:29 CET 2024
# Code coverage
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/config.h.in b/Build/source/texk/dvisvgm/dvisvgm-src/config.h.in
index f649cc3dcb6..2f4dea5984b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/config.h.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/config.h.in
@@ -49,9 +49,6 @@
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
-/* Define to 1 if you have the <openssl/md5.h> header file. */
-#undef HAVE_OPENSSL_MD5_H
-
/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac b/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac
index f2ea0467eef..6cca2c4efdc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/configure.ac
@@ -1,17 +1,19 @@
# This file is part of dvisvgm
-# Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de>
+# Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de>
#
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([dvisvgm],[3.0.3],[martin.gieseking@uos.de])
-DATE="February 2023"
+AC_INIT([dvisvgm],[3.2],[martin.gieseking@uos.de])
+DATE="January 2024"
AC_CONFIG_SRCDIR(src)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([subdir-objects dist-xz])
+AM_CONDITIONAL([TEXLIVE_BUILD], [test "x$enable_texlive_build" = xyes])
+
AH_TEMPLATE([HOST_SYSTEM], [The machine triplet of the host system])
AC_DEFINE_UNQUOTED([HOST_SYSTEM], ["$host"])
@@ -136,10 +138,6 @@ AS_IF([test "x$enable_woff" != "xyes"],
[AC_MSG_WARN([disabled ttfautohint support])])])]
[AC_SUBST(TTFAUTOHINT_CFLAGS) AC_SUBST(TTFAUTOHINT_LIBS)])])
-AC_CHECK_HEADERS([openssl/md5.h])
-PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto], [HAVE_LIBCRYPTO=1], [HAVE_LIBCRYPTO=0])
-AM_CONDITIONAL([USE_BUNDLED_MD5], [test "$HAVE_LIBCRYPTO" -eq 0])
-
AC_CHECK_LIB(z, gzopen)
# Check for header files.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/doc/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-src/doc/Makefile.am
index 8ec0d0a0a0e..575998c202d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/doc/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/doc/Makefile.am
@@ -1,5 +1,5 @@
## This file is part of dvisvgm
-## Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de>
+## Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de>
##
## Process this file with automake.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/doc/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/doc/Makefile.in
index d9d639c5c36..3ec7a8cac22 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/doc/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/doc/Makefile.in
@@ -225,8 +225,6 @@ KPSE_LIBS = @KPSE_LIBS@
LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCRYPTO_CFLAGS = @LIBCRYPTO_CFLAGS@
-LIBCRYPTO_LIBS = @LIBCRYPTO_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-man.xsl b/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-man.xsl
index 23fb9ff2c4c..175f7fb9622 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-man.xsl
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-man.xsl
@@ -1,19 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is part of dvisvgm -->
-<!-- Copyright (C) 2015-2023 Martin Gieseking <martin.gieseking@uos.de> -->
+<!-- Copyright (C) 2015-2024 Martin Gieseking <martin.gieseking@uos.de> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <!-- output monospaced text in bold -->
- <xsl:template match="literal">
- <xsl:text>\fB</xsl:text>
- <xsl:apply-templates/>
- <xsl:text>\fR</xsl:text>
- </xsl:template>
+ <!-- output monospaced text in bold -->
+ <xsl:template match="literal">
+ <xsl:text>\fB</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>\fR</xsl:text>
+ </xsl:template>
- <!-- append URL to hyperlinked text pointing to external targets -->
- <xsl:template match="ulink[not(contains(., '://')) and not(contains(@url, 'mailto:'))]">
- <xsl:apply-templates/>
- <xsl:text> (\m[blue]</xsl:text>
- <xsl:value-of select="@url"/>
- <xsl:text>\m[])</xsl:text>
- </xsl:template>
+ <!-- append URL to hyperlinked text pointing to external targets -->
+ <xsl:template match="ulink[not(contains(., '://')) and not(contains(@url, 'mailto:'))]">
+ <xsl:apply-templates/>
+ <xsl:text> (\m[blue]</xsl:text>
+ <xsl:value-of select="@url"/>
+ <xsl:text>\m[])</xsl:text>
+ </xsl:template>
+
+ <!-- expand width of last table column up to the line end -->
+ <xsl:template match="cell" mode="table.format">
+ <xsl:apply-imports/>
+ <xsl:if test="not(following-sibling::cell) or following-sibling::cell[1]/@row != @row">
+ <xsl:text>x</xsl:text>
+ </xsl:if>
+ </xsl:template>
</xsl:stylesheet>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-pdf.xsl b/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-pdf.xsl
index d39e03c3a31..0ae2632b4a0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-pdf.xsl
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/doc/conf-dblatex-pdf.xsl
@@ -1,68 +1,68 @@
<?xml version='1.0' encoding="iso-8859-1"?>
<!-- This file is part of dvisvgm -->
-<!-- Copyright (C) 2015-2023 Martin Gieseking <martin.gieseking@uos.de> -->
+<!-- Copyright (C) 2015-2024 Martin Gieseking <martin.gieseking@uos.de> -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:param name="xetex.font">
- <xsl:text>\setmainfont{Source Serif Pro}&#10;</xsl:text>
- <xsl:text>\setsansfont{Source Sans Pro}&#10;</xsl:text>
- <xsl:text>\setmonofont[Scale=0.9]{Source Code Pro}&#10;</xsl:text>
- </xsl:param>
+ <xsl:param name="xetex.font">
+ <xsl:text>\setmainfont{Source Serif 4}&#10;</xsl:text>
+ <xsl:text>\setsansfont{Source Sans 3}&#10;</xsl:text>
+ <xsl:text>\setmonofont[Scale=0.9]{Source Code Pro}&#10;</xsl:text>
+ </xsl:param>
- <xsl:param name="doc.toc.show">0</xsl:param>
- <xsl:param name="refentry.numbered">0</xsl:param>
- <xsl:param name="figure.caution">caution</xsl:param>
- <xsl:param name="figure.note">note</xsl:param>
- <xsl:param name="literal.layout.options"/>
- <xsl:param name="table.default.tabstyle">tabular</xsl:param>
- <xsl:param name="table.in.float">0</xsl:param>
- <xsl:param name="term.breakline">1</xsl:param>
+ <xsl:param name="doc.toc.show">0</xsl:param>
+ <xsl:param name="refentry.numbered">0</xsl:param>
+ <xsl:param name="figure.caution">caution</xsl:param>
+ <xsl:param name="figure.note">note</xsl:param>
+ <xsl:param name="literal.layout.options"/>
+ <xsl:param name="table.default.tabstyle">tabular</xsl:param>
+ <xsl:param name="table.in.float">0</xsl:param>
+ <xsl:param name="term.breakline">1</xsl:param>
- <xsl:param name="literal.layout.options">
- <xsl:text>basicstyle=\ttfamily\small,backgroundcolor=\color[gray]{0.9},columns=fullflexible,frame=single</xsl:text>
- </xsl:param>
+ <xsl:param name="literal.layout.options">
+ <xsl:text>basicstyle=\ttfamily\small,backgroundcolor=\color[gray]{0.9},columns=fullflexible,frame=single</xsl:text>
+ </xsl:param>
- <!-- ensure processing of refmiscinfo elements -->
- <xsl:template match="refentry">
- <xsl:apply-templates select="refmeta/refmiscinfo"/>
- <xsl:apply-imports/>
- </xsl:template>
+ <!-- ensure processing of refmiscinfo elements -->
+ <xsl:template match="refentry">
+ <xsl:apply-templates select="refmeta/refmiscinfo"/>
+ <xsl:apply-imports/>
+ </xsl:template>
- <!-- put refmiscinfo data into the TeX file -->
- <xsl:template match="refmiscinfo[@class]">
- <xsl:value-of select="concat('\def\refmiscinfo', @class, '{', ., '}&#10;')"/>
- </xsl:template>
+ <!-- put refmiscinfo data into the TeX file -->
+ <xsl:template match="refmiscinfo[@class]">
+ <xsl:value-of select="concat('\def\refmiscinfo', @class, '{', ., '}&#10;')"/>
+ </xsl:template>
- <!-- output TOC before synopsis section -->
- <xsl:template match="refsynopsisdiv">
- <xsl:text>\tableofcontents&#10;</xsl:text>
- <xsl:call-template name="makeheading">
- <xsl:with-param name="level">2</xsl:with-param>
- <xsl:with-param name="num">1</xsl:with-param>
- </xsl:call-template>
- <xsl:apply-templates/>
- </xsl:template>
+ <!-- output TOC before synopsis section -->
+ <xsl:template match="refsynopsisdiv">
+ <xsl:text>\tableofcontents&#10;</xsl:text>
+ <xsl:call-template name="makeheading">
+ <xsl:with-param name="level">2</xsl:with-param>
+ <xsl:with-param name="num">1</xsl:with-param>
+ </xsl:call-template>
+ <xsl:apply-templates/>
+ </xsl:template>
- <!-- force non-star \subsection commands -->
- <xsl:template match="refsect1">
- <xsl:call-template name="makeheading">
- <xsl:with-param name="level">2</xsl:with-param>
- <xsl:with-param name="num">1</xsl:with-param>
- </xsl:call-template>
- <xsl:apply-templates/>
- </xsl:template>
+ <!-- force non-star \subsection commands -->
+ <xsl:template match="refsect1">
+ <xsl:call-template name="makeheading">
+ <xsl:with-param name="level">2</xsl:with-param>
+ <xsl:with-param name="num">1</xsl:with-param>
+ </xsl:call-template>
+ <xsl:apply-templates/>
+ </xsl:template>
- <!-- add named list items (e.g. command-line options, specials) to PDF bookmarks -->
- <xsl:template match="refsect1/variablelist/varlistentry/term[emphasis]">
- <xsl:text>\phantomsection\pdfbookmark[3]{</xsl:text>
- <xsl:choose>
- <xsl:when test="contains(emphasis, '--')">
- <xsl:value-of select="substring-after(emphasis, '--')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="emphasis"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="concat('}{', generate-id(emphasis), '}&#10;')"/>
- <xsl:apply-imports/>
- </xsl:template>
+ <!-- add named list items (e.g. command-line options, specials) to PDF bookmarks -->
+ <xsl:template match="refsect1/variablelist/varlistentry/term[emphasis]">
+ <xsl:text>\phantomsection\pdfbookmark[3]{</xsl:text>
+ <xsl:choose>
+ <xsl:when test="contains(emphasis, '--')">
+ <xsl:value-of select="substring-after(emphasis, '--')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="emphasis"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="concat('}{', generate-id(emphasis), '}&#10;')"/>
+ <xsl:apply-imports/>
+ </xsl:template>
</xsl:stylesheet>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1 b/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1
index 063eb4b3da5..dbcd907ab54 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.1
@@ -2,12 +2,12 @@
.\" Title: dvisvgm
.\" Author: Martin Gieseking <martin.gieseking@uos.de>
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 2022-10-14
+.\" Date: 2024-01-06
.\" Manual: dvisvgm Manual
-.\" Source: dvisvgm 3.0.3
+.\" Source: dvisvgm 3.2
.\" Language: English
.\"
-.TH "DVISVGM" "1" "2022\-10\-14" "dvisvgm 3\&.0\&.3" "dvisvgm Manual"
+.TH "DVISVGM" "1" "2024\-01\-06" "dvisvgm 3\&.2" "dvisvgm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -87,11 +87,11 @@ invoice, executive, legal, letter, ledger
.RS 4
.TS
tab(:);
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt.
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx.
T{
\fBdvi\fR
T}:T{
@@ -176,16 +176,16 @@ and
should be sufficient in most cases\&. The following list gives an overview of the known format names which correspond to names of Ghostscript output devices\&.
.TS
tab(:);
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt.
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx.
T{
\fBnone\fR
T}:T{
@@ -299,7 +299,26 @@ predefined colors (\m[blue]https://www.w3.org/TR/SVG11/types.html#ColorKeywords\
Adds comments with further information about selected data to the SVG file\&. Currently, only font elements and font CSS rules related to native fonts are annotated\&.
.RE
.PP
-\fBembed\-bitmaps\fR
+\fB\-\-currentcolor\fR[=\fIcolor\fR]
+.RS 4
+This option tells dvisvgm to replace the specified color with CSS variable
+\fBcurrentColor\fR
+which holds the current foreground color set by CSS property
+\fBcolor\fR\&. This way an application or website can change the color via CSS without the need to modify the SVG code\&.
+.sp
+The optional argument of
+\fB\-\-currentcolor\fR
+specifies the RGB color value to be replaced and must be given as either
+six or three digit hex color value (\m[blue]https://www.w3.org/TR/css-color/#typedef-hex-color\m[])
+preceded by character
+\fB#\fR, e\&.g\&.
+\fB#0000ff\fR
+or
+\fB#00f\fR
+for blue\&. If the optional argument is omitted, black is assumed\&.
+.RE
+.PP
+\fB\-\-embed\-bitmaps\fR
.RS 4
Embeds the contents of bitmap files into the generated SVG files instead of adding file references\&. Because of the base64\-encoded data, the SVG files are usually much bigger but at the same time more portable because they don\(cqt rely on external bitmap files\&.
.sp
@@ -322,6 +341,8 @@ for further information\&.
This option tells dvisvgm to compute 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\-bbox\fR
given, dvisvgm analyzes the actual shape of each character and derives a usually tight bounding box\&.
+.sp
+This option only affects the processing of DVI files\&. When converting EPS or PDF files, the bounding box information stored in these files are used to derive the SVG bounding box\&.
.RE
.PP
\fB\-f, \-\-font\-format\fR=\fIformat\fR
@@ -531,6 +552,21 @@ or
Sets the magnification factor applied in conjunction with Metafont calls prior tracing the glyphs\&. The larger this value, the better the tracing results\&. Nevertheless, large magnification values can cause Metafont arithmetic errors due to number overflows\&. So, use this option with care\&. The default setting usually produces nice results\&.
.RE
.PP
+\fB\-\-message\fR=\fItext\fR
+.RS 4
+Prints a given message to the console after an SVG file has been written\&. Argument
+\fItext\fR
+may consist of static text and the macros listed below in the description of special command
+\fBdvisvgm:raw\fR\&. For example,
+\fB\-\-message="page {?pageno} written to {?svgfile}"\fR
+prints the message with the macros expanded after the conversion of each page of a DVI or PDF file or after processing an EPS file\&.
+.sp
+The output of option
+\fB\-\-message\fR
+is not affected by the specified verbosity level, i\&.e\&. it prints the text even with
+\fB\-\-verbosity=0\fR\&.
+.RE
+.PP
\fB\-\-no\-merge\fR
.RS 4
Puts every single character in a separate
@@ -600,7 +636,15 @@ By default, dvisvgm creates CSS styles and class attributes to reference fonts\&
\fB\-O, \-\-optimize\fR[=\fImodules\fR]
.RS 4
Applies several optimizations on the generated SVG tree to reduce the file size\&. The optimizations are performed by running separate optimizer modules specified by optional argument
-\fImodules\fR\&. It may consist of a single module name or a comma\-separated list of several module names\&. The corresponding modules are executed one by one in the given order and thus transform the XML tree gradually\&.
+\fImodules\fR\&. It may consist of a single module name or a comma\-separated list of several module names\&. The corresponding modules are executed one by one in the given order and thus transform the XML tree gradually\&. A leading hyphen (\fB\-\fR) can be used to exclude a module from processing\&. For example
+\fB\-Oall,\-collapse\-groups\fR
+performs all optimizations except
+\fBcollapse\-groups\fR\&. If the first module name in the list starts with a hyphen, dvisvgm automatically inserts
+\fBall\fR
+at the beginning, i\&.e\&.
+\fB\-O\-collapse\-groups\fR
+is identical to
+\fB\-Oall,\-collapse\-groups\fR\&.
.sp
The following list describes the currently available optimizer modules\&.
.PP
@@ -620,9 +664,9 @@ can\(cqt be combined with other module names\&.
.RS 4
Performs all optimizations listed below\&. This is also the default if option
\fB\-\-optimize\fR
-is used without argument\&. The modules are executed in a predefined order that usually leads to the best results\&.
+is used without any arguments\&. The modules are executed in a predefined order that usually leads to the best results\&.
\fBall\fR
-can\(cqt be combined with other module names\&.
+must be the only or the first entry in the list of module names\&.
.RE
.PP
\fBcollapse\-groups\fR
@@ -853,15 +897,16 @@ If this option is given, dvisvgm does not expect a DVI but a PDF input file, and
\fB\-\-page\fR
can be used to select different pages, page ranges, and/or page sequences\&.
.sp
-If a Ghostcript version < 10\&.1\&.0 is found, dvisvgm uses Ghostscript to process the PDF file\&. In this case, the conversion is realized by creating a single
+If a Ghostcript version < 10\&.01\&.0 is found, dvisvgm uses Ghostscript to process the PDF file\&. In this case, the conversion is realized by creating a single
\fIpdffile\fR
special command which is forwarded to dvisvgm\(cqs PostScript special handler\&. Therefore, this option is only available if dvisvgm was built with PostScript support enabled, and requires Ghostscript to be accessible\&. See option
\fB\-\-libgs\fR
for further information\&.
.sp
-As of Ghostscript 10\&.1\&.0, this will no longer work due to the introduction of a new PDF interpreter\&. Therefore, an alternative conversion module based on
-mutool (\m[blue]https://mupdf.com/docs/mutool.html\m[])
-has been introduced\&. It\(cqs automatically invoked if Ghostscript can\(cqt be used and if a working
+As of Ghostscript 10\&.01\&.0, this will no longer work due to the introduction of a new PDF interpreter\&. Therefore, an alternative conversion module based on
+\fImutool\fR, a utility which is part of the
+MuPDF (\m[blue]https://mupdf.com\m[])
+package, has been introduced\&. It\(cqs automatically invoked if Ghostscript can\(cqt be used and if a working
\fBmutool\fR
executable is present in a directory which is part of the system\(cqs search path\&.
.sp
@@ -1093,10 +1138,10 @@ are applied in the order of their appearance\&. Multiple commands can optionally
Additionally, some pre\-defined constants are provided:
.TS
tab(:);
-lt lt
-lt lt
-lt lt
-lt lt.
+lt ltx
+lt ltx
+lt ltx
+lt ltx.
T{
\fBux\fR
T}:T{
@@ -1161,10 +1206,11 @@ Translates (moves) the page content in direction of vector (\fItx\fR,\fIty\fR)\&
Controls the type of messages printed during a dvisvgm run:
.TS
tab(:);
-lt lt
-lt lt
-lt lt
-lt lt.
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx.
T{
\fB0\fR
T}:T{
@@ -1185,6 +1231,12 @@ T{
T}:T{
informational messages only
T}
+T{
+\fB8\fR
+T}:T{
+user messages only (e\&.g\&. created by special
+\fBdvisvgm:message\fR)
+T}
.TE
.sp 1
.if n \{\
@@ -1199,7 +1251,7 @@ T}
\fBNote\fR
.ps -1
.br
-By adding these values you can combine the categories\&. The default level is 7, i\&.e\&. all messages are printed\&.
+By adding these values you can combine the categories\&. The default level is 15, i\&.e\&. all messages are printed\&.
.sp .5v
.RE
.RE
@@ -1233,7 +1285,7 @@ attributes are omitted\&.
.sp
dvisvgm supports several \fIspecial commands\fR that enrich the DVI command set with additional instructions for features, like color, graphics, and hyperlinks\&. The term \fIspecial command\fR, or just \fIspecial\fR, originates from the TeX command \fB\especial{\&...}\fR which does almost nothing\&. TeX only forwards the whole command to the DVI file and delegates its execution to the DVI driver\&. The DVI driver can then decide to either process or ignore it, depending on the supported statements\&. The parameter of TeX\(cqs \fB\especial\fR command is given in curly braces and may consist of an arbitrary character sequence representing the actual instruction, for example \fBcolor Red\fR\&.
.sp
-+ dvisvgm delegates the evaluation of special commands to dedicated handlers\&. Each handler is responsible for all special statements of the same command set, i\&.e\&. commands usually \(en but not necessarily \(en beginning with a common prefix\&. For example, all PDF specials start with the prefix \fBpdf:\fR, while the TPIC special set consists of 13 different commands without common identifier\&. The PDF specials are processed by dvisvgm\(cqs \fIpdf\fR handler, the TPIC ones by the \fItpic\fR handler\&. To get a list of the actually provided special handlers, use option \fB\-\-list\-specials\fR (see above)\&. The following list gives an overview of the special sets currently supported\&. The names of the handlers can also be used to disable the processing of individual sets of specials\&. For further information on this, see option \fB\-\-no\-specials\fR\&.
+dvisvgm delegates the evaluation of special commands to dedicated handlers\&. Each handler is responsible for all special statements of the same command set, i\&.e\&. commands usually \(en but not necessarily \(en beginning with a common prefix\&. For example, all PDF specials start with the prefix \fBpdf:\fR, while the TPIC special set consists of 13 different commands without common identifier\&. The PDF specials are processed by dvisvgm\(cqs \fIpdf\fR handler, the TPIC ones by the \fItpic\fR handler\&. To get a list of the actually provided special handlers, use option \fB\-\-list\-specials\fR (see above)\&. The following list gives an overview of the special sets currently supported\&. The names of the handlers can also be used to disable the processing of individual sets of specials\&. For further information on this, see option \fB\-\-no\-specials\fR\&.
.PP
\fBbgcolor\fR
.RS 4
@@ -1263,13 +1315,16 @@ special\&. Both syntactically incorrect and wrongly nested tags lead to error me
may also contain the expressions
\fB{?x}\fR,
\fB{?y}\fR,
-\fB{?color}\fR, and
-\fB{?matrix}\fR
+\fB{?color}\fR,
+\fB{?matrix}\fR,
+\fB{?pageno}\fR,
+\fB{?svgfile}\fR, and
+\fB{?svgpath}\fR
that expand to the current
\fIx\fR
or
\fIy\fR
-coordinate, the current color, and current transformation matrix, respectively\&. Character sequence
+coordinate, the current color, the current transformation matrix, the current page number, and the relative and absolute path of the SVG file being created, respectively\&. Character sequence
\fB{?nl}\fR
expands to a newline character\&. Finally, constructions of the form
\fB{?(\fR\fB\fIexpr\fR\fR\fB)}\fR
@@ -1423,6 +1478,29 @@ The following TeX snippet adds two raw SVG elements to the output and updates th
.RE
.\}
.RE
+.PP
+\fBdvisvgm:currentcolor\fR [on|off]
+.RS 4
+This special works similar to option
+\fB\-\-currentcolor\fR
+but doesn\(cqt require an explicit color argument\&. Instead, it takes the currently active color and replaces it with
+\fBcurrentColor\fR\&. Therefore, the result depends on the placement of the special and the preceding color changes\&. Argument
+\fBon\fR
+\(en which activates the
+\fIcurrentColor\fR
+functionality \(en can be omitted\&. When called with argument
+\fBoff\fR, the functionality is deactivated again\&.
+.RE
+.PP
+\fBdvisvgm:message\fR \fImsg\fR
+.RS 4
+Prints the given text
+\fImsg\fR
+to the console\&. It may also contain the macros
+\fI{?\&...}\fR
+mentioned above (see
+\fBdvisvgm:raw\fR)\&.
+.RE
.RE
.PP
\fBem\fR
@@ -1461,7 +1539,7 @@ pdfTeX and dvipdfmx introduced several special commands related to the generatio
\fIpdf:pagesize\fR
is similar to the
\fIpapersize\fR
-special (see above) which specifies the size of the current and all folowing pages\&. In order to actually apply the extents to the generated SVG files, option
+special (see above) which specifies the size of the current and all following pages\&. In order to actually apply the extents to the generated SVG files, option
\fB\-\-bbox=papersize\fR
must be given\&.
.sp
@@ -1597,14 +1675,14 @@ The environment variable \fBDVISVGM_COLORS\fR specifies the colors used to highl
All malformed entries in the list are silently ignored\&.
.TS
tab(:);
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt.
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx.
T{
.sp
\fBer\fR
@@ -1666,21 +1744,21 @@ T}
.sp
\fBExample:\fR \fBer=01:pi=*5\fR sets the colors of error messages (\fBer\fR) to red (\fB1\fR) on black (\fB0\fR), and those of progress indicators (\fBpi\fR) to cyan (\fB5\fR) on default background (\fB*\fR)\&.
.sp
-Variable \fBDVISVGM_PDF_PROC\fR allows you to select the desired PDF processor\&. dvisvgm requires either Ghostscript (version < 10\&.1\&.0) or mutool to process PDF files\&. IF \fBDVISVGM_PDF_PROC\fR is not set, dvisvgm tries to detect the available processors\&. See option \fB\-\-pdf\fR for further information\&. To select a specific PDF processor, you can set \fBDVISVGM_PDF_PROC\fR to \fBgs\fR or \fBmutool\fR which forces the use of Ghostscript and mutool respectively\&.
+Variable \fBDVISVGM_PDF_PROC\fR allows you to select the desired PDF processor\&. dvisvgm requires either Ghostscript (version < 10\&.01\&.0) or mutool to process PDF files\&. IF \fBDVISVGM_PDF_PROC\fR is not set, dvisvgm tries to detect the available processors\&. See option \fB\-\-pdf\fR for further information\&. To select a specific PDF processor, you can set \fBDVISVGM_PDF_PROC\fR to \fBgs\fR or \fBmutool\fR which forces the use of Ghostscript and mutool respectively\&.
.SH "FILES"
.sp
The location of the following files is determined by the kpathsea library\&. To check the actual kpathsea configuration you can use the \fBkpsewhich\fR utility\&.
.TS
tab(:);
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt
-lt lt.
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx
+lt ltx.
T{
.sp
\fB*\&.enc\fR
@@ -1768,4 +1846,4 @@ Please report bugs using the bug tracker at GitHub (\m[blue]https://github.com/m
Written by Martin Gieseking <\m[blue]\fBmartin\&.gieseking@uos\&.de\fR\m[]>
.SH "COPYING"
.sp
-Copyright \(co 2005\-2023 Martin Gieseking\&. Free use of this software is granted under the terms of the GNU General Public License (GPL) version 3 or, (at your option) any later version\&.
+Copyright \(co 2005\-2024 Martin Gieseking\&. Free use of this software is granted under the terms of the GNU General Public License (GPL) version 3 or, (at your option) any later version\&.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.txt.in b/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.txt.in
index f415189aef2..db5b48a35bb 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.txt.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/doc/dvisvgm.txt.in
@@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////
// This file is part of dvisvgm -- a fast DVI to SVG converter //
-// Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> //
+// Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> //
// //
// This program is free software; you can redistribute it and/or //
// modify it under the terms of the GNU General Public License as //
@@ -22,7 +22,7 @@ Martin Gieseking <@PACKAGE_BUGREPORT@>
:man source: dvisvgm
:man version: @VERSION@
:man manual: dvisvgm Manual
-:revdate: 2022-10-14 12:56 +0200
+:revdate: 2024-01-06 14:30 +0100
Name
----
@@ -206,7 +206,17 @@ In order to apply these color names rather than their RGB values, call dvisvgm w
Adds comments with further information about selected data to the SVG file. Currently, only
font elements and font CSS rules related to native fonts are annotated.
-*embed-bitmaps*::
+*--currentcolor*[='color']::
+This option tells dvisvgm to replace the specified color with CSS variable `currentColor` which
+holds the current foreground color set by CSS property `color`. This way an application or website
+can change the color via CSS without the need to modify the SVG code.
++
+The optional argument of `--currentcolor` specifies the RGB color value to be replaced and must
+be given as either https://www.w3.org/TR/css-color/#typedef-hex-color[six or three digit hex color value]
+preceded by character `#`, e.g. `#0000ff` or `#00f` for blue. If the optional argument is omitted, black
+is assumed.
+
+*--embed-bitmaps*::
Embeds the contents of bitmap files into the generated SVG files instead of adding file references.
Because of the base64-encoded data, the SVG files are usually much bigger but at the same time
more portable because they don't rely on external bitmap files.
@@ -229,6 +239,9 @@ dimensions, they don't necessarily correspond with the bounds of the visual glyp
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-bbox*
given, dvisvgm analyzes the actual shape of each character and derives a usually tight bounding box.
++
+This option only affects the processing of DVI files. When converting EPS or PDF files, the bounding
+box information stored in these files are used to derive the SVG bounding box.
*-f, --font-format*='format'::
Selects the file format used to embed font data into the generated SVG output when converting DVI
@@ -380,6 +393,15 @@ The larger this value, the better the tracing results. Nevertheless, large magni
can cause Metafont arithmetic errors due to number overflows. So, use this option with care.
The default setting usually produces nice results.
+*--message*='text'::
+Prints a given message to the console after an SVG file has been written. Argument 'text' may consist
+of static text and the macros listed below in the description of special command +dvisvgm:raw+.
+For example, +--message="page {?pageno} written to {?svgfile}"+ prints the message with the macros
+expanded after the conversion of each page of a DVI or PDF file or after processing an EPS file.
++
+The output of option *--message* is not affected by the specified verbosity level, i.e. it prints
+the text even with +--verbosity=0+.
+
*--no-merge*::
Puts every single character in a separate 'text' element with corresponding 'x' and 'y' attributes.
By default, new 'text' or 'tspan' elements are only created if a string starts at a location that
@@ -420,6 +442,10 @@ are performed by running separate optimizer modules specified by optional argume
It may consist of a single module name or a comma-separated list of several module names.
The corresponding modules are executed one by one in the given order and thus transform the
XML tree gradually.
+A leading hyphen (+-+) can be used to exclude a module from processing. For example
++-Oall,-collapse-groups+ performs all optimizations except +collapse-groups+. If the first
+module name in the list starts with a hyphen, dvisvgm automatically inserts +all+ at the
+beginning, i.e. +-O-collapse-groups+ is identical to +-Oall,-collapse-groups+.
+
The following list describes the currently available optimizer modules.
@@ -432,8 +458,8 @@ The following list describes the currently available optimizer modules.
*all*;;
Performs all optimizations listed below. This is also the default if option *--optimize* is
- used without argument. The modules are executed in a predefined order that usually leads to the
- best results. *all* can't be combined with other module names.
+ used without any arguments. The modules are executed in a predefined order that usually leads
+ to the best results. *all* must be the only or the first entry in the list of module names.
*collapse-groups*;;
Combines nested group elements (+<g>+...+</g>+) that contain only a single group each. If possible,
@@ -572,16 +598,17 @@ If this option is given, dvisvgm does not expect a DVI but a PDF input file, and
it to SVG. Similar to the conversion of DVI files, only the first page is processed by default.
Option *--page* can be used to select different pages, page ranges, and/or page sequences.
+
-If a Ghostcript version < 10.1.0 is found, dvisvgm uses Ghostscript to process the PDF file. In
+If a Ghostcript version < 10.01.0 is found, dvisvgm uses Ghostscript to process the PDF file. In
this case, the conversion is realized by creating a single 'pdffile' special command which is
forwarded to dvisvgm's PostScript special handler. Therefore, this option is only available if
dvisvgm was built with PostScript support enabled, and requires Ghostscript to be accessible.
See option *--libgs* for further information.
+
-As of Ghostscript 10.1.0, this will no longer work due to the introduction of a new PDF interpreter.
-Therefore, an alternative conversion module based on https://mupdf.com/docs/mutool.html[mutool]
-has been introduced. It's automatically invoked if Ghostscript can't be used and if a working
-+mutool+ executable is present in a directory which is part of the system's search path.
+As of Ghostscript 10.01.0, this will no longer work due to the introduction of a new PDF interpreter.
+Therefore, an alternative conversion module based on _mutool_, a utility which is part of the
+https://mupdf.com[MuPDF] package, has been introduced. It's automatically invoked if Ghostscript
+can't be used and if a working +mutool+ executable is present in a directory which is part of the
+system's search path.
+
Alternatively, environment variable +DVISVGM_PDF_PROC+ can be used to select the PDF processor.
The currently supported values are +gs+ and +mutool+.
@@ -731,10 +758,11 @@ Controls the type of messages printed during a dvisvgm run:
*1*;; error messages only
*2*;; warning messages only
*4*;; informational messages only
+ *8*;; user messages only (e.g. created by special +dvisvgm:message+)
+
[NOTE]
-By adding these values you can combine the categories. The default level is 7, i.e. all
+By adding these values you can combine the categories. The default level is 15, i.e. all
messages are printed.
+
@@ -762,7 +790,7 @@ DVI file and delegates its execution to the DVI driver. The DVI driver can then
ignore it, depending on the supported statements. The parameter of TeX's +\special+ command is given in curly
braces and may consist of an arbitrary character sequence representing the actual instruction, for example
+color Red+.
-+
+
dvisvgm delegates the evaluation of special commands to dedicated handlers. Each handler is responsible for
all special statements of the same command set, i.e. commands usually &#x2013; but not necessarily &#x2013;
beginning with a common prefix. For example, all PDF specials start with the prefix +pdf:+, while the TPIC
@@ -792,8 +820,10 @@ dvisvgm offers its own small set of specials. The following list gives a brief o
that the resulting SVG is still valid. Opening and closing tags may be distributed among different 'raw'
specials. The tags themselves can also be split but must be continued with the immediately following 'raw'
special. Both syntactically incorrect and wrongly nested tags lead to error messages.
- Parameter 'text' may also contain the expressions *{?x}*, *{?y}*, *{?color}*, and *{?matrix}* that expand to
- the current 'x' or 'y' coordinate, the current color, and current transformation matrix, respectively.
+ Parameter 'text' may also contain the expressions *{?x}*, *{?y}*, *{?color}*, *{?matrix}*, *{?pageno}*,
+ *{?svgfile}*, and *{?svgpath}* that expand to the current 'x' or 'y' coordinate, the current color, the
+ current transformation matrix, the current page number, and the relative and absolute path of the SVG file
+ being created, respectively.
Character sequence *{?nl}* expands to a newline character. Finally, constructions of the form *{?(__expr__)}*
enable the evaluation of mathematical expressions which may consist of basic arithmetic operations including
modulo. Like above, the variables 'x' and 'y' represent the current coordinates.
@@ -882,6 +912,15 @@ The following TeX snippet adds two raw SVG elements to the output and updates th
\special{dvisvgm:bbox abs 10bp 200bp 100bp 250bp transform}
-------------------------------------------------------------------------------------
+
+ *dvisvgm:currentcolor* [on|off];;
+ This special works similar to option `--currentcolor` but doesn't require an explicit color argument. Instead,
+ it takes the currently active color and replaces it with `currentColor`. Therefore, the result depends on the
+ placement of the special and the preceding color changes. Argument `on` &#x2013; which activates the 'currentColor'
+ functionality &#x2013; can be omitted. When called with argument `off`, the functionality is deactivated again.
+
+ *dvisvgm:message* 'msg';;
+ Prints the given text 'msg' to the console. It may also contain the macros '{?...}' mentioned above
+ (see *dvisvgm:raw*).
*em*::
These specials were introduced with the 'emTeX' distribution by Eberhard Mattes. They provide line drawing
@@ -911,7 +950,7 @@ only 'pdf:mapfile', 'pdf:mapline', 'pdf:pagesize', and PDF hyperlink specials ar
The latter are the PDF pendants to the HTML HyperTeX specials generated by the hyperref package in PDF mode.
+
'pdf:pagesize' is similar to the 'papersize' special (see above) which specifies the size of the current
-and all folowing pages. In order to actually apply the extents to the generated SVG files,
+and all following pages. In order to actually apply the extents to the generated SVG files,
option *--bbox=papersize* must be given.
+
'pdf:mapfile' and 'pdf:mapline' allow for modifying the font map tree while processing the DVI file.
@@ -1025,7 +1064,7 @@ All malformed entries in the list are silently ignored.
of progress indicators (+pi+) to cyan (+5+) on default background (+*+).
Variable *DVISVGM_PDF_PROC* allows you to select the desired PDF processor. dvisvgm requires either
-Ghostscript (version < 10.1.0) or mutool to process PDF files. IF *DVISVGM_PDF_PROC* is not set, dvisvgm
+Ghostscript (version < 10.01.0) or mutool to process PDF files. IF *DVISVGM_PDF_PROC* is not set, dvisvgm
tries to detect the available processors. See option *--pdf* for further information. To select a
specific PDF processor, you can set *DVISVGM_PDF_PROC* to +gs+ or +mutool+ which forces the use of
Ghostscript and mutool respectively.
@@ -1065,7 +1104,7 @@ Written by {author} <{email}>
Copying
-------
-Copyright (C) 2005-2023 Martin Gieseking. Free use of this software is
+Copyright (C) 2005-2024 Martin Gieseking. Free use of this software is
granted under the terms of the GNU General Public License (GPL) version 3
or, (at your option) any later version.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/doc/tweak-db-refentry.xsl b/Build/source/texk/dvisvgm/dvisvgm-src/doc/tweak-db-refentry.xsl
index f47e18d93d5..942d35dd728 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/doc/tweak-db-refentry.xsl
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/doc/tweak-db-refentry.xsl
@@ -1,52 +1,52 @@
<?xml version="1.0"?>
<!-- This file is part of dvisvgm -->
-<!-- Copyright (C) 2015-2023 Martin Gieseking <martin.gieseking@uos.de> -->
+<!-- Copyright (C) 2015-2024 Martin Gieseking <martin.gieseking@uos.de> -->
<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:date="http://exslt.org/dates-and-times"
- xmlns:func="http://exslt.org/functions"
- xmlns:my="my-namespace"
- exclude-result-prefixes="my"
- extension-element-prefixes="date func">
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:date="http://exslt.org/dates-and-times"
+ xmlns:func="http://exslt.org/functions"
+ xmlns:my="my-namespace"
+ exclude-result-prefixes="my"
+ extension-element-prefixes="date func">
- <xsl:output doctype-public="-//OASIS//DTD DocBook XML V4.5//EN" doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
+ <xsl:output doctype-public="-//OASIS//DTD DocBook XML V4.5//EN" doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
- <!-- adapt ISO date created by keyword expansion -->
- <xsl:template match="refentryinfo/date | revision[1]/date">
- <date>
- <xsl:value-of select="my:extract-date(.)"/>
- </date>
- </xsl:template>
+ <!-- adapt ISO date created by keyword expansion -->
+ <xsl:template match="refentryinfo/date | revision[1]/date">
+ <date>
+ <xsl:value-of select="my:extract-date(.)"/>
+ </date>
+ </xsl:template>
- <!-- add date to refmeta element -->
- <xsl:template match="refmeta">
- <xsl:copy>
- <xsl:copy-of select="*"/>
- <refmiscinfo class="date">
- <xsl:value-of select="my:extract-date(../refentryinfo/date)"/>
- </refmiscinfo>
- </xsl:copy>
- </xsl:template>
+ <!-- add date to refmeta element -->
+ <xsl:template match="refmeta">
+ <xsl:copy>
+ <xsl:copy-of select="*"/>
+ <refmiscinfo class="date">
+ <xsl:value-of select="my:extract-date(../refentryinfo/date)"/>
+ </refmiscinfo>
+ </xsl:copy>
+ </xsl:template>
- <func:function name="my:extract-date">
- <xsl:param name="isodate"/>
- <xsl:variable name="shortdate" select="substring($isodate, 1, 10)"/>
- <xsl:choose>
- <xsl:when test="translate($shortdate, '0123456789', '##########') = '####-##-##'">
- <!-- use date part of expanded keyword -->
- <func:result select="$shortdate"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- use current date as fallback -->
- <func:result select="substring(date:date(), 1, 10)"/>
- </xsl:otherwise>
- </xsl:choose>
- </func:function>
+ <func:function name="my:extract-date">
+ <xsl:param name="isodate"/>
+ <xsl:variable name="shortdate" select="substring($isodate, 1, 10)"/>
+ <xsl:choose>
+ <xsl:when test="translate($shortdate, '0123456789', '##########') = '####-##-##'">
+ <!-- use date part of expanded keyword -->
+ <func:result select="$shortdate"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- use current date as fallback -->
+ <func:result select="substring(date:date(), 1, 10)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </func:function>
- <!-- copy everything else unchanged -->
- <xsl:template match="@*|node()">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
- </xsl:template>
+ <!-- copy everything else unchanged -->
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
</xsl:stylesheet>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/doc/tweak-dblatex-pdf.xsl b/Build/source/texk/dvisvgm/dvisvgm-src/doc/tweak-dblatex-pdf.xsl
index 15523e3a207..06716ac76e9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/doc/tweak-dblatex-pdf.xsl
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/doc/tweak-dblatex-pdf.xsl
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is part of dvisvgm -->
-<!-- Copyright (C) 2015-2023 Martin Gieseking <martin.gieseking@uos.de> -->
+<!-- Copyright (C) 2015-2024 Martin Gieseking <martin.gieseking@uos.de> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output doctype-public="-//OASIS//DTD DocBook XML V4.5//EN" doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
+ <xsl:output doctype-public="-//OASIS//DTD DocBook XML V4.5//EN" doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
- <!-- replace default document title -->
- <xsl:template match="refentrytitle[. != ../refmiscinfo[@class='manual']]">
- <xsl:copy>
- <xsl:value-of select="../refmiscinfo[@class='manual']"/>
- </xsl:copy>
- </xsl:template>
+ <!-- replace default document title -->
+ <xsl:template match="refentrytitle[. != ../refmiscinfo[@class='manual']]">
+ <xsl:copy>
+ <xsl:value-of select="../refmiscinfo[@class='manual']"/>
+ </xsl:copy>
+ </xsl:template>
- <!-- add static title to the synopsis section to prevent creating a dynamic one -->
- <xsl:template match="refsynopsisdiv[not(title)]">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <title>Synopsis</title>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
+ <!-- add static title to the synopsis section to prevent creating a dynamic one -->
+ <xsl:template match="refsynopsisdiv[not(title)]">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <title>Synopsis</title>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
- <!-- copy everything else unchanged -->
- <xsl:template match="@*|node()">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
- </xsl:template>
+ <!-- copy everything else unchanged -->
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
</xsl:stylesheet>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-src/libs/Makefile.am
index 13c02637fa0..a0c83616109 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/Makefile.am
@@ -1,5 +1,5 @@
## This file is part of dvisvgm
-## Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de>
+## Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de>
##
## Process this file with automake.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.am
index 64ad12e6aaf..7d7bf1db326 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.am
@@ -9,6 +9,7 @@ libbrotli_a_SOURCES = \
common/dictionary.h \
common/platform.c \
common/platform.h \
+ common/shared_dictionary_internal.h \
common/transform.c \
common/transform.h \
common/version.h \
@@ -31,6 +32,8 @@ libbrotli_a_SOURCES = \
enc/cluster_inc.h \
enc/command.c \
enc/command.h \
+ enc/compound_dictionary.c \
+ enc/compound_dictionary.h \
enc/compress_fragment.c \
enc/compress_fragment.h \
enc/compress_fragment_two_pass.c \
@@ -68,6 +71,7 @@ libbrotli_a_SOURCES = \
enc/prefix.h \
enc/quality.h \
enc/ringbuffer.h \
+ enc/state.h \
enc/static_dict.c \
enc/static_dict.h \
enc/static_dict_lut.h \
@@ -77,6 +81,7 @@ libbrotli_a_SOURCES = \
include/brotli/decode.h \
include/brotli/encode.h \
include/brotli/port.h \
+ include/brotli/shared_dictionary.h \
include/brotli/types.h
AM_CFLAGS = -Wall -I$(srcdir)/include
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.in
index 9caffa85a8a..d6db06e3e18 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/Makefile.in
@@ -124,15 +124,16 @@ libbrotli_a_LIBADD =
am__libbrotli_a_SOURCES_DIST = common/constants.c common/constants.h \
common/context.c common/context.h common/dictionary.c \
common/dictionary.h common/platform.c common/platform.h \
- common/transform.c common/transform.h common/version.h \
- enc/backward_references.c enc/backward_references.h \
- enc/backward_references_hq.c enc/backward_references_hq.h \
- enc/backward_references_inc.h enc/bit_cost.c enc/bit_cost.h \
- enc/bit_cost_inc.h enc/block_encoder_inc.h \
- enc/block_splitter.c enc/block_splitter.h \
- enc/block_splitter_inc.h enc/brotli_bit_stream.c \
- enc/brotli_bit_stream.h enc/cluster.c enc/cluster.h \
- enc/cluster_inc.h enc/command.c enc/command.h \
+ common/shared_dictionary_internal.h common/transform.c \
+ common/transform.h common/version.h enc/backward_references.c \
+ enc/backward_references.h enc/backward_references_hq.c \
+ enc/backward_references_hq.h enc/backward_references_inc.h \
+ enc/bit_cost.c enc/bit_cost.h enc/bit_cost_inc.h \
+ enc/block_encoder_inc.h enc/block_splitter.c \
+ enc/block_splitter.h enc/block_splitter_inc.h \
+ enc/brotli_bit_stream.c enc/brotli_bit_stream.h enc/cluster.c \
+ enc/cluster.h enc/cluster_inc.h enc/command.c enc/command.h \
+ enc/compound_dictionary.c enc/compound_dictionary.h \
enc/compress_fragment.c enc/compress_fragment.h \
enc/compress_fragment_two_pass.c \
enc/compress_fragment_two_pass.h enc/dictionary_hash.c \
@@ -147,11 +148,11 @@ am__libbrotli_a_SOURCES_DIST = common/constants.c common/constants.h \
enc/histogram_inc.h enc/literal_cost.c enc/literal_cost.h \
enc/memory.c enc/memory.h enc/metablock.c enc/metablock.h \
enc/metablock_inc.h enc/params.h enc/prefix.h enc/quality.h \
- enc/ringbuffer.h enc/static_dict.c enc/static_dict.h \
- enc/static_dict_lut.h enc/utf8_util.c enc/utf8_util.h \
- enc/write_bits.h include/brotli/decode.h \
+ enc/ringbuffer.h enc/state.h enc/static_dict.c \
+ enc/static_dict.h enc/static_dict_lut.h enc/utf8_util.c \
+ enc/utf8_util.h enc/write_bits.h include/brotli/decode.h \
include/brotli/encode.h include/brotli/port.h \
- include/brotli/types.h
+ include/brotli/shared_dictionary.h include/brotli/types.h
am__dirstamp = $(am__leading_dot)dirstamp
@HAVE_BROTLI_FALSE@am_libbrotli_a_OBJECTS = \
@HAVE_BROTLI_FALSE@ common/constants.$(OBJEXT) \
@@ -165,6 +166,7 @@ am__dirstamp = $(am__leading_dot)dirstamp
@HAVE_BROTLI_FALSE@ enc/block_splitter.$(OBJEXT) \
@HAVE_BROTLI_FALSE@ enc/brotli_bit_stream.$(OBJEXT) \
@HAVE_BROTLI_FALSE@ enc/cluster.$(OBJEXT) enc/command.$(OBJEXT) \
+@HAVE_BROTLI_FALSE@ enc/compound_dictionary.$(OBJEXT) \
@HAVE_BROTLI_FALSE@ enc/compress_fragment.$(OBJEXT) \
@HAVE_BROTLI_FALSE@ enc/compress_fragment_two_pass.$(OBJEXT) \
@HAVE_BROTLI_FALSE@ enc/dictionary_hash.$(OBJEXT) \
@@ -201,7 +203,8 @@ am__depfiles_remade = common/$(DEPDIR)/constants.Po \
enc/$(DEPDIR)/backward_references_hq.Po \
enc/$(DEPDIR)/bit_cost.Po enc/$(DEPDIR)/block_splitter.Po \
enc/$(DEPDIR)/brotli_bit_stream.Po enc/$(DEPDIR)/cluster.Po \
- enc/$(DEPDIR)/command.Po enc/$(DEPDIR)/compress_fragment.Po \
+ enc/$(DEPDIR)/command.Po enc/$(DEPDIR)/compound_dictionary.Po \
+ enc/$(DEPDIR)/compress_fragment.Po \
enc/$(DEPDIR)/compress_fragment_two_pass.Po \
enc/$(DEPDIR)/dictionary_hash.Po enc/$(DEPDIR)/encode.Po \
enc/$(DEPDIR)/encoder_dict.Po enc/$(DEPDIR)/entropy_encode.Po \
@@ -425,6 +428,7 @@ top_srcdir = @top_srcdir@
@HAVE_BROTLI_FALSE@ common/dictionary.h \
@HAVE_BROTLI_FALSE@ common/platform.c \
@HAVE_BROTLI_FALSE@ common/platform.h \
+@HAVE_BROTLI_FALSE@ common/shared_dictionary_internal.h \
@HAVE_BROTLI_FALSE@ common/transform.c \
@HAVE_BROTLI_FALSE@ common/transform.h \
@HAVE_BROTLI_FALSE@ common/version.h \
@@ -447,6 +451,8 @@ top_srcdir = @top_srcdir@
@HAVE_BROTLI_FALSE@ enc/cluster_inc.h \
@HAVE_BROTLI_FALSE@ enc/command.c \
@HAVE_BROTLI_FALSE@ enc/command.h \
+@HAVE_BROTLI_FALSE@ enc/compound_dictionary.c \
+@HAVE_BROTLI_FALSE@ enc/compound_dictionary.h \
@HAVE_BROTLI_FALSE@ enc/compress_fragment.c \
@HAVE_BROTLI_FALSE@ enc/compress_fragment.h \
@HAVE_BROTLI_FALSE@ enc/compress_fragment_two_pass.c \
@@ -484,6 +490,7 @@ top_srcdir = @top_srcdir@
@HAVE_BROTLI_FALSE@ enc/prefix.h \
@HAVE_BROTLI_FALSE@ enc/quality.h \
@HAVE_BROTLI_FALSE@ enc/ringbuffer.h \
+@HAVE_BROTLI_FALSE@ enc/state.h \
@HAVE_BROTLI_FALSE@ enc/static_dict.c \
@HAVE_BROTLI_FALSE@ enc/static_dict.h \
@HAVE_BROTLI_FALSE@ enc/static_dict_lut.h \
@@ -493,6 +500,7 @@ top_srcdir = @top_srcdir@
@HAVE_BROTLI_FALSE@ include/brotli/decode.h \
@HAVE_BROTLI_FALSE@ include/brotli/encode.h \
@HAVE_BROTLI_FALSE@ include/brotli/port.h \
+@HAVE_BROTLI_FALSE@ include/brotli/shared_dictionary.h \
@HAVE_BROTLI_FALSE@ include/brotli/types.h
@HAVE_BROTLI_FALSE@AM_CFLAGS = -Wall -I$(srcdir)/include
@@ -570,6 +578,8 @@ enc/cluster.$(OBJEXT): enc/$(am__dirstamp) \
enc/$(DEPDIR)/$(am__dirstamp)
enc/command.$(OBJEXT): enc/$(am__dirstamp) \
enc/$(DEPDIR)/$(am__dirstamp)
+enc/compound_dictionary.$(OBJEXT): enc/$(am__dirstamp) \
+ enc/$(DEPDIR)/$(am__dirstamp)
enc/compress_fragment.$(OBJEXT): enc/$(am__dirstamp) \
enc/$(DEPDIR)/$(am__dirstamp)
enc/compress_fragment_two_pass.$(OBJEXT): enc/$(am__dirstamp) \
@@ -622,6 +632,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@enc/$(DEPDIR)/brotli_bit_stream.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@enc/$(DEPDIR)/cluster.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@enc/$(DEPDIR)/command.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@enc/$(DEPDIR)/compound_dictionary.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@enc/$(DEPDIR)/compress_fragment.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@enc/$(DEPDIR)/compress_fragment_two_pass.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@enc/$(DEPDIR)/dictionary_hash.Po@am__quote@ # am--include-marker
@@ -813,6 +824,7 @@ distclean: distclean-am
-rm -f enc/$(DEPDIR)/brotli_bit_stream.Po
-rm -f enc/$(DEPDIR)/cluster.Po
-rm -f enc/$(DEPDIR)/command.Po
+ -rm -f enc/$(DEPDIR)/compound_dictionary.Po
-rm -f enc/$(DEPDIR)/compress_fragment.Po
-rm -f enc/$(DEPDIR)/compress_fragment_two_pass.Po
-rm -f enc/$(DEPDIR)/dictionary_hash.Po
@@ -883,6 +895,7 @@ maintainer-clean: maintainer-clean-am
-rm -f enc/$(DEPDIR)/brotli_bit_stream.Po
-rm -f enc/$(DEPDIR)/cluster.Po
-rm -f enc/$(DEPDIR)/command.Po
+ -rm -f enc/$(DEPDIR)/compound_dictionary.Po
-rm -f enc/$(DEPDIR)/compress_fragment.Po
-rm -f enc/$(DEPDIR)/compress_fragment_two_pass.Po
-rm -f enc/$(DEPDIR)/dictionary_hash.Po
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/constants.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/constants.c
index 6bad9f613ca..89866b15050 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/constants.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/constants.c
@@ -4,7 +4,7 @@
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
-#include "./constants.h"
+#include "constants.h"
const BrotliPrefixCodeRange
_kBrotliPrefixCodeRanges[BROTLI_NUM_BLOCK_LEN_SYMBOLS] = {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/constants.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/constants.h
index e848195a0dc..31e5bd376e9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/constants.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/constants.h
@@ -12,10 +12,11 @@
#ifndef BROTLI_COMMON_CONSTANTS_H_
#define BROTLI_COMMON_CONSTANTS_H_
-#include "./platform.h"
#include <brotli/port.h>
#include <brotli/types.h>
+#include "platform.h"
+
/* Specification: 7.3. Encoding of the context map */
#define BROTLI_CONTEXT_MAP_MAX_RLE 16
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/context.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/context.c
index 2c2dceba9b6..7f9c9586991 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/context.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/context.c
@@ -1,4 +1,4 @@
-#include "./context.h"
+#include "context.h"
#include <brotli/types.h>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/dictionary.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/dictionary.c
index f9e30417c00..7c015ab0ba7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/dictionary.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/dictionary.c
@@ -4,8 +4,8 @@
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
-#include "./dictionary.h"
-#include "./platform.h"
+#include "dictionary.h"
+#include "platform.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -13,6 +13,7 @@ extern "C" {
#if !defined(BROTLI_EXTERNAL_DICTIONARY_DATA)
static const uint8_t kBrotliDictionaryData[] =
+/* GENERATED CODE START */
{
116,105,109,101,100,111,119,110,108,105,102,101,108,101,102,116,98,97,99,107,99,
111,100,101,100,97,116,97,115,104,111,119,111,110,108,121,115,105,116,101,99,105
@@ -5860,6 +5861,7 @@ static const uint8_t kBrotliDictionaryData[] =
,164,181,224,164,190,224,164,136,224,164,184,224,164,149,224,165,141,224,164,176
,224,164,191,224,164,175,224,164,164,224,164,190
}
+/* GENERATED CODE END */
;
#endif /* !BROTLI_EXTERNAL_DICTIONARY_DATA */
@@ -5895,7 +5897,7 @@ static BrotliDictionary kBrotliDictionary = {
#endif
};
-const BrotliDictionary* BrotliGetDictionary() {
+const BrotliDictionary* BrotliGetDictionary(void) {
return &kBrotliDictionary;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.c
index aef39e93c46..25d84a94672 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.c
@@ -6,9 +6,10 @@
#include <stdlib.h>
-#include "./platform.h"
#include <brotli/types.h>
+#include "platform.h"
+
/* Default brotli_alloc_func */
void* BrotliDefaultAllocFunc(void* opaque, size_t size) {
BROTLI_UNUSED(opaque);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.h
index f5ca4435bc0..7406f3fe696 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/platform.h
@@ -12,12 +12,13 @@
* BROTLI_BUILD_BIG_ENDIAN forces to use big-endian optimizations
* BROTLI_BUILD_ENDIAN_NEUTRAL disables endian-aware optimizations
* BROTLI_BUILD_LITTLE_ENDIAN forces to use little-endian optimizations
- * BROTLI_BUILD_PORTABLE disables dangerous optimizations, like unaligned
- read and overlapping memcpy; this reduces decompression speed by 5%
* BROTLI_BUILD_NO_RBIT disables "rbit" optimization for ARM CPUs
+ * BROTLI_BUILD_NO_UNALIGNED_READ_FAST forces off the fast-unaligned-read
+ optimizations (mainly for testing purposes)
* BROTLI_DEBUG dumps file name and line number when decoder detects stream
or memory error
* BROTLI_ENABLE_LOG enables asserts and dumps various state information
+ * BROTLI_ENABLE_DUMP overrides default "dump" behaviour
*/
#ifndef BROTLI_COMMON_PLATFORM_H_
@@ -40,7 +41,7 @@
#define BROTLI_X_BIG_ENDIAN BIG_ENDIAN
#endif
-#if BROTLI_MSVC_VERSION_CHECK(12, 0, 0)
+#if BROTLI_MSVC_VERSION_CHECK(18, 0, 0)
#include <intrin.h>
#endif
@@ -156,24 +157,6 @@ OR:
#define BROTLI_NOINLINE
#endif
-/* BROTLI_INTERNAL could be defined to override visibility, e.g. for tests. */
-#if !defined(BROTLI_INTERNAL)
-#if defined(_WIN32) || defined(__CYGWIN__)
-#define BROTLI_INTERNAL
-#elif BROTLI_GNUC_VERSION_CHECK(3, 3, 0) || \
- BROTLI_TI_VERSION_CHECK(8, 0, 0) || \
- BROTLI_INTEL_VERSION_CHECK(16, 0, 0) || \
- BROTLI_ARM_VERSION_CHECK(4, 1, 0) || \
- BROTLI_IBM_VERSION_CHECK(13, 1, 0) || \
- BROTLI_SUNPRO_VERSION_CHECK(5, 11, 0) || \
- (BROTLI_TI_VERSION_CHECK(7, 3, 0) && \
- defined(__TI_GNU_ATTRIBUTE_SUPPORT__) && defined(__TI_EABI__))
-#define BROTLI_INTERNAL __attribute__ ((visibility ("hidden")))
-#else
-#define BROTLI_INTERNAL
-#endif
-#endif
-
/* <<< <<< <<< end of hedley macros. */
#if BROTLI_GNUC_HAS_ATTRIBUTE(unused, 2, 7, 0) || \
@@ -226,15 +209,24 @@ OR:
#define BROTLI_TARGET_RISCV64
#endif
+#if defined(__loongarch_lp64)
+#define BROTLI_TARGET_LOONGARCH64
+#endif
+
+#if defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8_64) || \
+ defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64) || \
+ defined(BROTLI_TARGET_LOONGARCH64)
+#define BROTLI_TARGET_64_BITS 1
+#else
+#define BROTLI_TARGET_64_BITS 0
+#endif
+
#if defined(BROTLI_BUILD_64_BIT)
#define BROTLI_64_BITS 1
#elif defined(BROTLI_BUILD_32_BIT)
#define BROTLI_64_BITS 0
-#elif defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8_64) || \
- defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64)
-#define BROTLI_64_BITS 1
#else
-#define BROTLI_64_BITS 0
+#define BROTLI_64_BITS BROTLI_TARGET_64_BITS
#endif
#if (BROTLI_64_BITS)
@@ -278,18 +270,19 @@ OR:
#undef BROTLI_X_BIG_ENDIAN
#endif
-#if defined(BROTLI_BUILD_PORTABLE)
-#define BROTLI_ALIGNED_READ (!!1)
-#elif defined(BROTLI_TARGET_X86) || defined(BROTLI_TARGET_X64) || \
+#if defined(BROTLI_BUILD_NO_UNALIGNED_READ_FAST)
+#define BROTLI_UNALIGNED_READ_FAST (!!0)
+#elif defined(BROTLI_TARGET_X86) || defined(BROTLI_TARGET_X64) || \
defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8_ANY) || \
- defined(BROTLI_TARGET_RISCV64)
-/* Allow unaligned read only for white-listed CPUs. */
-#define BROTLI_ALIGNED_READ (!!0)
+ defined(BROTLI_TARGET_RISCV64) || defined(BROTLI_TARGET_LOONGARCH64)
+/* These targets are known to generate efficient code for unaligned reads
+ * (e.g. a single instruction, not multiple 1-byte loads, shifted and or'd
+ * together). */
+#define BROTLI_UNALIGNED_READ_FAST (!!1)
#else
-#define BROTLI_ALIGNED_READ (!!1)
+#define BROTLI_UNALIGNED_READ_FAST (!!0)
#endif
-#if BROTLI_ALIGNED_READ
/* Portable unaligned memory access: read / write values via memcpy. */
static BROTLI_INLINE uint16_t BrotliUnalignedRead16(const void* p) {
uint16_t t;
@@ -309,75 +302,6 @@ static BROTLI_INLINE uint64_t BrotliUnalignedRead64(const void* p) {
static BROTLI_INLINE void BrotliUnalignedWrite64(void* p, uint64_t v) {
memcpy(p, &v, sizeof v);
}
-#else /* BROTLI_ALIGNED_READ */
-/* Unaligned memory access is allowed: just cast pointer to requested type. */
-#if BROTLI_SANITIZED
-/* Consider we have an unaligned load/store of 4 bytes from address 0x...05.
- AddressSanitizer will treat it as a 3-byte access to the range 05:07 and
- will miss a bug if 08 is the first unaddressable byte.
- ThreadSanitizer will also treat this as a 3-byte access to 05:07 and will
- miss a race between this access and some other accesses to 08.
- MemorySanitizer will correctly propagate the shadow on unaligned stores
- and correctly report bugs on unaligned loads, but it may not properly
- update and report the origin of the uninitialized memory.
- For all three tools, replacing an unaligned access with a tool-specific
- callback solves the problem. */
-#if defined(__cplusplus)
-extern "C" {
-#endif /* __cplusplus */
- uint16_t __sanitizer_unaligned_load16(const void* p);
- uint32_t __sanitizer_unaligned_load32(const void* p);
- uint64_t __sanitizer_unaligned_load64(const void* p);
- void __sanitizer_unaligned_store64(void* p, uint64_t v);
-#if defined(__cplusplus)
-} /* extern "C" */
-#endif /* __cplusplus */
-#define BrotliUnalignedRead16 __sanitizer_unaligned_load16
-#define BrotliUnalignedRead32 __sanitizer_unaligned_load32
-#define BrotliUnalignedRead64 __sanitizer_unaligned_load64
-#define BrotliUnalignedWrite64 __sanitizer_unaligned_store64
-#else /* BROTLI_SANITIZED */
-static BROTLI_INLINE uint16_t BrotliUnalignedRead16(const void* p) {
- return *(const uint16_t*)p;
-}
-static BROTLI_INLINE uint32_t BrotliUnalignedRead32(const void* p) {
- return *(const uint32_t*)p;
-}
-#if (BROTLI_64_BITS)
-static BROTLI_INLINE uint64_t BrotliUnalignedRead64(const void* p) {
- return *(const uint64_t*)p;
-}
-static BROTLI_INLINE void BrotliUnalignedWrite64(void* p, uint64_t v) {
- *(uint64_t*)p = v;
-}
-#else /* BROTLI_64_BITS */
-/* Avoid emitting LDRD / STRD, which require properly aligned address. */
-/* If __attribute__(aligned) is available, use that. Otherwise, memcpy. */
-
-#if BROTLI_GNUC_HAS_ATTRIBUTE(aligned, 2, 7, 0)
-typedef BROTLI_ALIGNED(1) uint64_t brotli_unaligned_uint64_t;
-
-static BROTLI_INLINE uint64_t BrotliUnalignedRead64(const void* p) {
- return (uint64_t) ((const brotli_unaligned_uint64_t*) p)[0];
-}
-static BROTLI_INLINE void BrotliUnalignedWrite64(void* p, uint64_t v) {
- brotli_unaligned_uint64_t* dwords = (brotli_unaligned_uint64_t*) p;
- dwords[0] = (brotli_unaligned_uint64_t) v;
-}
-#else /* BROTLI_GNUC_HAS_ATTRIBUTE(aligned, 2, 7, 0) */
-static BROTLI_INLINE uint64_t BrotliUnalignedRead64(const void* p) {
- uint64_t v;
- memcpy(&v, p, sizeof(uint64_t));
- return v;
-}
-
-static BROTLI_INLINE void BrotliUnalignedWrite64(void* p, uint64_t v) {
- memcpy(p, &v, sizeof(uint64_t));
-}
-#endif /* BROTLI_GNUC_HAS_ATTRIBUTE(aligned, 2, 7, 0) */
-#endif /* BROTLI_64_BITS */
-#endif /* BROTLI_SANITIZED */
-#endif /* BROTLI_ALIGNED_READ */
#if BROTLI_LITTLE_ENDIAN
/* Straight endianness. Just read / write values. */
@@ -453,6 +377,16 @@ static BROTLI_INLINE void BROTLI_UNALIGNED_STORE64LE(void* p, uint64_t v) {
}
#endif /* BROTLI_LITTLE_ENDIAN */
+static BROTLI_INLINE void* BROTLI_UNALIGNED_LOAD_PTR(const void* p) {
+ void* v;
+ memcpy(&v, p, sizeof(void*));
+ return v;
+}
+
+static BROTLI_INLINE void BROTLI_UNALIGNED_STORE_PTR(void* p, const void* v) {
+ memcpy(p, &v, sizeof(void*));
+}
+
/* BROTLI_IS_CONSTANT macros returns true for compile-time constants. */
#if BROTLI_GNUC_HAS_BUILTIN(__builtin_constant_p, 3, 0, 1) || \
BROTLI_INTEL_VERSION_CHECK(16, 0, 0)
@@ -474,22 +408,34 @@ static BROTLI_INLINE void BROTLI_UNALIGNED_STORE64LE(void* p, uint64_t v) {
#endif
#if defined(BROTLI_DEBUG) || defined(BROTLI_ENABLE_LOG)
+#define BROTLI_ENABLE_DUMP_DEFAULT 1
#define BROTLI_DCHECK(x) assert(x)
+#else
+#define BROTLI_ENABLE_DUMP_DEFAULT 0
+#define BROTLI_DCHECK(x)
+#endif
+
+#if !defined(BROTLI_ENABLE_DUMP)
+#define BROTLI_ENABLE_DUMP BROTLI_ENABLE_DUMP_DEFAULT
+#endif
+
+#if BROTLI_ENABLE_DUMP
static BROTLI_INLINE void BrotliDump(const char* f, int l, const char* fn) {
fprintf(stderr, "%s:%d (%s)\n", f, l, fn);
fflush(stderr);
}
#define BROTLI_DUMP() BrotliDump(__FILE__, __LINE__, __FUNCTION__)
#else
-#define BROTLI_DCHECK(x)
#define BROTLI_DUMP() (void)(0)
#endif
-/* TODO: add appropriate icc/sunpro/arm/ibm/ti checks. */
+/* BrotliRBit assumes brotli_reg_t fits native CPU register type. */
+#if (BROTLI_64_BITS == BROTLI_TARGET_64_BITS)
+/* TODO(eustas): add appropriate icc/sunpro/arm/ibm/ti checks. */
#if (BROTLI_GNUC_VERSION_CHECK(3, 0, 0) || defined(__llvm__)) && \
!defined(BROTLI_BUILD_NO_RBIT)
#if defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8_ANY)
-/* TODO: detect ARMv6T2 and enable this code for it. */
+/* TODO(eustas): detect ARMv6T2 and enable this code for it. */
static BROTLI_INLINE brotli_reg_t BrotliRBit(brotli_reg_t input) {
brotli_reg_t output;
__asm__("rbit %0, %1\n" : "=r"(output) : "r"(input));
@@ -498,15 +444,14 @@ static BROTLI_INLINE brotli_reg_t BrotliRBit(brotli_reg_t input) {
#define BROTLI_RBIT(x) BrotliRBit(x)
#endif /* armv7 / armv8 */
#endif /* gcc || clang */
+#endif /* brotli_reg_t is native */
#if !defined(BROTLI_RBIT)
static BROTLI_INLINE void BrotliRBit(void) { /* Should break build if used. */ }
#endif /* BROTLI_RBIT */
-#define BROTLI_REPEAT(N, X) { \
- if ((N & 1) != 0) {X;} \
- if ((N & 2) != 0) {X; X;} \
- if ((N & 4) != 0) {X; X; X; X;} \
-}
+#define BROTLI_REPEAT_4(X) {X; X; X; X;}
+#define BROTLI_REPEAT_5(X) {X; X; X; X; X;}
+#define BROTLI_REPEAT_6(X) {X; X; X; X; X; X;}
#define BROTLI_UNUSED(X) (void)(X)
@@ -529,7 +474,7 @@ BROTLI_MIN_MAX(size_t) BROTLI_MIN_MAX(uint32_t) BROTLI_MIN_MAX(uint8_t)
#if BROTLI_GNUC_HAS_BUILTIN(__builtin_ctzll, 3, 4, 0) || \
BROTLI_INTEL_VERSION_CHECK(16, 0, 0)
#define BROTLI_TZCNT64 __builtin_ctzll
-#elif BROTLI_MSVC_VERSION_CHECK(12, 0, 0)
+#elif BROTLI_MSVC_VERSION_CHECK(18, 0, 0)
#if defined(BROTLI_TARGET_X64)
#define BROTLI_TZCNT64 _tzcnt_u64
#else /* BROTLI_TARGET_X64 */
@@ -546,7 +491,7 @@ static BROTLI_INLINE uint32_t BrotliBsf64Msvc(uint64_t x) {
#if BROTLI_GNUC_HAS_BUILTIN(__builtin_clz, 3, 4, 0) || \
BROTLI_INTEL_VERSION_CHECK(16, 0, 0)
#define BROTLI_BSR32(x) (31u ^ (uint32_t)__builtin_clz(x))
-#elif BROTLI_MSVC_VERSION_CHECK(12, 0, 0)
+#elif BROTLI_MSVC_VERSION_CHECK(18, 0, 0)
static BROTLI_INLINE uint32_t BrotliBsr32Msvc(uint32_t x) {
unsigned long msb;
_BitScanReverse(&msb, x);
@@ -571,6 +516,8 @@ BROTLI_UNUSED_FUNCTION void BrotliSuppressUnusedFunctions(void) {
BROTLI_UNUSED(&BROTLI_UNALIGNED_LOAD32LE);
BROTLI_UNUSED(&BROTLI_UNALIGNED_LOAD64LE);
BROTLI_UNUSED(&BROTLI_UNALIGNED_STORE64LE);
+ BROTLI_UNUSED(&BROTLI_UNALIGNED_LOAD_PTR);
+ BROTLI_UNUSED(&BROTLI_UNALIGNED_STORE_PTR);
BROTLI_UNUSED(&BrotliRBit);
BROTLI_UNUSED(&brotli_min_double);
BROTLI_UNUSED(&brotli_max_double);
@@ -586,7 +533,7 @@ BROTLI_UNUSED_FUNCTION void BrotliSuppressUnusedFunctions(void) {
BROTLI_UNUSED(&brotli_max_uint8_t);
BROTLI_UNUSED(&BrotliDefaultAllocFunc);
BROTLI_UNUSED(&BrotliDefaultFreeFunc);
-#if defined(BROTLI_DEBUG) || defined(BROTLI_ENABLE_LOG)
+#if BROTLI_ENABLE_DUMP
BROTLI_UNUSED(&BrotliDump);
#endif
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/shared_dictionary_internal.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/shared_dictionary_internal.h
new file mode 100644
index 00000000000..963762e4325
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/shared_dictionary_internal.h
@@ -0,0 +1,75 @@
+/* Copyright 2017 Google Inc. All Rights Reserved.
+
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* (Transparent) Shared Dictionary definition. */
+
+#ifndef BROTLI_COMMON_SHARED_DICTIONARY_INTERNAL_H_
+#define BROTLI_COMMON_SHARED_DICTIONARY_INTERNAL_H_
+
+#include <brotli/shared_dictionary.h>
+#include <brotli/types.h>
+
+#include "dictionary.h"
+#include "transform.h"
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+struct BrotliSharedDictionaryStruct {
+ /* LZ77 prefixes (compound dictionary). */
+ uint32_t num_prefix; /* max SHARED_BROTLI_MAX_COMPOUND_DICTS */
+ size_t prefix_size[SHARED_BROTLI_MAX_COMPOUND_DICTS];
+ const uint8_t* prefix[SHARED_BROTLI_MAX_COMPOUND_DICTS];
+
+ /* If set, the context map is used to select word and transform list from 64
+ contexts, if not set, the context map is not used and only words[0] and
+ transforms[0] are to be used. */
+ BROTLI_BOOL context_based;
+
+ uint8_t context_map[SHARED_BROTLI_NUM_DICTIONARY_CONTEXTS];
+
+ /* Amount of word_list+transform_list combinations. */
+ uint8_t num_dictionaries;
+
+ /* Must use num_dictionaries values. */
+ const BrotliDictionary* words[SHARED_BROTLI_NUM_DICTIONARY_CONTEXTS];
+
+ /* Must use num_dictionaries values. */
+ const BrotliTransforms* transforms[SHARED_BROTLI_NUM_DICTIONARY_CONTEXTS];
+
+ /* Amount of custom word lists. May be 0 if only Brotli's built-in is used */
+ uint8_t num_word_lists;
+
+ /* Contents of the custom words lists. Must be NULL if num_word_lists is 0. */
+ BrotliDictionary* words_instances;
+
+ /* Amount of custom transform lists. May be 0 if only Brotli's built-in is
+ used */
+ uint8_t num_transform_lists;
+
+ /* Contents of the custom transform lists. Must be NULL if num_transform_lists
+ is 0. */
+ BrotliTransforms* transforms_instances;
+
+ /* Concatenated prefix_suffix_maps of the custom transform lists. Must be NULL
+ if num_transform_lists is 0. */
+ uint16_t* prefix_suffix_maps;
+
+ /* Memory management */
+ brotli_alloc_func alloc_func;
+ brotli_free_func free_func;
+ void* memory_manager_opaque;
+};
+
+typedef struct BrotliSharedDictionaryStruct BrotliSharedDictionaryInternal;
+#define BrotliSharedDictionary BrotliSharedDictionaryInternal
+
+#if defined(__cplusplus) || defined(c_plusplus)
+} /* extern "C" */
+#endif
+
+#endif /* BROTLI_COMMON_SHARED_DICTIONARY_INTERNAL_H_ */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/transform.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/transform.c
index f8fa4335e1c..49455fc496f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/transform.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/transform.c
@@ -4,7 +4,7 @@
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
-#include "./transform.h"
+#include "transform.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/version.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/version.h
index 01b2998e25d..8098040f646 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/version.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/common/version.h
@@ -9,18 +9,43 @@
#ifndef BROTLI_COMMON_VERSION_H_
#define BROTLI_COMMON_VERSION_H_
-/* This macro should only be used when library is compiled together with client.
- If library is dynamically linked, use BrotliDecoderVersion and
+/* Compose 3 components into a single number. In a hexadecimal representation
+ B and C components occupy exactly 3 digits. */
+#define BROTLI_MAKE_HEX_VERSION(A, B, C) ((A << 24) | (B << 12) | C)
+
+/* Those macros should only be used when library is compiled together with
+ the client. If library is dynamically linked, use BrotliDecoderVersion and
BrotliEncoderVersion methods. */
-/* Semantic version, calculated as (MAJOR << 24) | (MINOR << 12) | PATCH */
-#define BROTLI_VERSION 0x1000009
+#define BROTLI_VERSION_MAJOR 1
+#define BROTLI_VERSION_MINOR 1
+#define BROTLI_VERSION_PATCH 0
+
+#define BROTLI_VERSION BROTLI_MAKE_HEX_VERSION( \
+ BROTLI_VERSION_MAJOR, BROTLI_VERSION_MINOR, BROTLI_VERSION_PATCH)
/* This macro is used by build system to produce Libtool-friendly soname. See
https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
+ Version evolution rules:
+ - interfaces added (or change is compatible) -> current+1:0:age+1
+ - interfaces removed (or changed is incompatible) -> current+1:0:0
+ - interfaces not changed -> current:revision+1:age
*/
-/* ABI version, calculated as (CURRENT << 24) | (REVISION << 12) | AGE */
-#define BROTLI_ABI_VERSION 0x1009000
+#define BROTLI_ABI_CURRENT 2
+#define BROTLI_ABI_REVISION 0
+#define BROTLI_ABI_AGE 1
+
+#if BROTLI_VERSION_MAJOR != (BROTLI_ABI_CURRENT - BROTLI_ABI_AGE)
+#error ABI/API version inconsistency
+#endif
+
+#if BROTLI_VERSION_MINOR != BROTLI_ABI_AGE
+#error ABI/API version inconsistency
+#endif
+
+#if BROTLI_VERSION_PATCH != BROTLI_ABI_REVISION
+#error ABI/API version inconsistency
+#endif
#endif /* BROTLI_COMMON_VERSION_H_ */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.c
index a07a617a097..f600e6452ff 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.c
@@ -6,17 +6,19 @@
/* Function to find backward reference copies. */
-#include "./backward_references.h"
+#include "backward_references.h"
+
+#include <brotli/types.h>
#include "../common/constants.h"
-#include "../common/context.h"
#include "../common/dictionary.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./command.h"
-#include "./dictionary_hash.h"
-#include "./memory.h"
-#include "./quality.h"
+#include "command.h"
+#include "compound_dictionary.h"
+#include "dictionary_hash.h"
+#include "encoder_dict.h"
+#include "memory.h"
+#include "quality.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -52,67 +54,103 @@ static BROTLI_INLINE size_t ComputeDistanceCode(size_t distance,
#define EXPORT_FN(X) EXPAND_CAT(X, EXPAND_CAT(PREFIX(), HASHER()))
#define PREFIX() N
+#define ENABLE_COMPOUND_DICTIONARY 0
#define HASHER() H2
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H3
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H4
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H5
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H6
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H40
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H41
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H42
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H54
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H35
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H55
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
#define HASHER() H65
/* NOLINTNEXTLINE(build/include) */
-#include "./backward_references_inc.h"
+#include "backward_references_inc.h"
#undef HASHER
+#undef ENABLE_COMPOUND_DICTIONARY
+#undef PREFIX
+#define PREFIX() D
+#define ENABLE_COMPOUND_DICTIONARY 1
+
+#define HASHER() H5
+/* NOLINTNEXTLINE(build/include) */
+#include "backward_references_inc.h"
+#undef HASHER
+#define HASHER() H6
+/* NOLINTNEXTLINE(build/include) */
+#include "backward_references_inc.h"
+#undef HASHER
+#define HASHER() H40
+/* NOLINTNEXTLINE(build/include) */
+#include "backward_references_inc.h"
+#undef HASHER
+#define HASHER() H41
+/* NOLINTNEXTLINE(build/include) */
+#include "backward_references_inc.h"
+#undef HASHER
+#define HASHER() H42
+/* NOLINTNEXTLINE(build/include) */
+#include "backward_references_inc.h"
+#undef HASHER
+#define HASHER() H55
+/* NOLINTNEXTLINE(build/include) */
+#include "backward_references_inc.h"
+#undef HASHER
+#define HASHER() H65
+/* NOLINTNEXTLINE(build/include) */
+#include "backward_references_inc.h"
+#undef HASHER
+
+#undef ENABLE_COMPOUND_DICTIONARY
#undef PREFIX
#undef EXPORT_FN
@@ -125,6 +163,29 @@ void BrotliCreateBackwardReferences(size_t num_bytes,
ContextLut literal_context_lut, const BrotliEncoderParams* params,
Hasher* hasher, int* dist_cache, size_t* last_insert_len,
Command* commands, size_t* num_commands, size_t* num_literals) {
+ if (params->dictionary.compound.num_chunks != 0) {
+ switch (params->hasher.type) {
+#define CASE_(N) \
+ case N: \
+ CreateBackwardReferencesDH ## N(num_bytes, \
+ position, ringbuffer, ringbuffer_mask, \
+ literal_context_lut, params, hasher, dist_cache, \
+ last_insert_len, commands, num_commands, num_literals); \
+ return;
+ CASE_(5)
+ CASE_(6)
+ CASE_(40)
+ CASE_(41)
+ CASE_(42)
+ CASE_(55)
+ CASE_(65)
+#undef CASE_
+ default:
+ BROTLI_DCHECK(false);
+ break;
+ }
+ }
+
switch (params->hasher.type) {
#define CASE_(N) \
case N: \
@@ -136,6 +197,7 @@ void BrotliCreateBackwardReferences(size_t num_bytes,
FOR_GENERIC_HASHERS(CASE_)
#undef CASE_
default:
+ BROTLI_DCHECK(false);
break;
}
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.h
index 9589cc15419..20fb98a4d88 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references.h
@@ -9,14 +9,15 @@
#ifndef BROTLI_ENC_BACKWARD_REFERENCES_H_
#define BROTLI_ENC_BACKWARD_REFERENCES_H_
+#include <brotli/types.h>
+
#include "../common/constants.h"
#include "../common/context.h"
#include "../common/dictionary.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./command.h"
-#include "./hash.h"
-#include "./quality.h"
+#include "command.h"
+#include "hash.h"
+#include "quality.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_hq.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_hq.c
index 5651caeb7ac..6325032e1cd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_hq.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_hq.c
@@ -6,22 +6,24 @@
/* Function to find backward reference copies. */
-#include "./backward_references_hq.h"
+#include "backward_references_hq.h"
#include <string.h> /* memcpy, memset */
+#include <brotli/types.h>
+
#include "../common/constants.h"
-#include "../common/context.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./command.h"
-#include "./fast_log.h"
-#include "./find_match_length.h"
-#include "./literal_cost.h"
-#include "./memory.h"
-#include "./params.h"
-#include "./prefix.h"
-#include "./quality.h"
+#include "command.h"
+#include "compound_dictionary.h"
+#include "encoder_dict.h"
+#include "fast_log.h"
+#include "find_match_length.h"
+#include "literal_cost.h"
+#include "memory.h"
+#include "params.h"
+#include "prefix.h"
+#include "quality.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -73,6 +75,14 @@ static BROTLI_INLINE uint32_t ZopfliNodeCommandLength(const ZopfliNode* self) {
return ZopfliNodeCopyLength(self) + (self->dcode_insert_length & 0x7FFFFFF);
}
+/* Temporary data for ZopfliCostModelSetFromCommands. */
+typedef struct ZopfliCostModelArena {
+ uint32_t histogram_literal[BROTLI_NUM_LITERAL_SYMBOLS];
+ uint32_t histogram_cmd[BROTLI_NUM_COMMAND_SYMBOLS];
+ uint32_t histogram_dist[BROTLI_MAX_EFFECTIVE_DISTANCE_ALPHABET_SIZE];
+ float cost_literal[BROTLI_NUM_LITERAL_SYMBOLS];
+} ZopfliCostModelArena;
+
/* Histogram based cost model for zopflification. */
typedef struct ZopfliCostModel {
/* The insert and copy length symbols. */
@@ -83,6 +93,12 @@ typedef struct ZopfliCostModel {
float* literal_costs_;
float min_cost_cmd_;
size_t num_bytes_;
+
+ /* Temporary data. */
+ union {
+ size_t literal_histograms[3 * 256];
+ ZopfliCostModelArena arena;
+ };
} ZopfliCostModel;
static void InitZopfliCostModel(
@@ -139,18 +155,15 @@ static void ZopfliCostModelSetFromCommands(ZopfliCostModel* self,
const Command* commands,
size_t num_commands,
size_t last_insert_len) {
- uint32_t histogram_literal[BROTLI_NUM_LITERAL_SYMBOLS];
- uint32_t histogram_cmd[BROTLI_NUM_COMMAND_SYMBOLS];
- uint32_t histogram_dist[BROTLI_MAX_EFFECTIVE_DISTANCE_ALPHABET_SIZE];
- float cost_literal[BROTLI_NUM_LITERAL_SYMBOLS];
+ ZopfliCostModelArena* arena = &self->arena;
size_t pos = position - last_insert_len;
float min_cost_cmd = kInfinity;
size_t i;
float* cost_cmd = self->cost_cmd_;
- memset(histogram_literal, 0, sizeof(histogram_literal));
- memset(histogram_cmd, 0, sizeof(histogram_cmd));
- memset(histogram_dist, 0, sizeof(histogram_dist));
+ memset(arena->histogram_literal, 0, sizeof(arena->histogram_literal));
+ memset(arena->histogram_cmd, 0, sizeof(arena->histogram_cmd));
+ memset(arena->histogram_dist, 0, sizeof(arena->histogram_dist));
for (i = 0; i < num_commands; i++) {
size_t inslength = commands[i].insert_len_;
@@ -159,21 +172,21 @@ static void ZopfliCostModelSetFromCommands(ZopfliCostModel* self,
size_t cmdcode = commands[i].cmd_prefix_;
size_t j;
- histogram_cmd[cmdcode]++;
- if (cmdcode >= 128) histogram_dist[distcode]++;
+ arena->histogram_cmd[cmdcode]++;
+ if (cmdcode >= 128) arena->histogram_dist[distcode]++;
for (j = 0; j < inslength; j++) {
- histogram_literal[ringbuffer[(pos + j) & ringbuffer_mask]]++;
+ arena->histogram_literal[ringbuffer[(pos + j) & ringbuffer_mask]]++;
}
pos += inslength + copylength;
}
- SetCost(histogram_literal, BROTLI_NUM_LITERAL_SYMBOLS, BROTLI_TRUE,
- cost_literal);
- SetCost(histogram_cmd, BROTLI_NUM_COMMAND_SYMBOLS, BROTLI_FALSE,
+ SetCost(arena->histogram_literal, BROTLI_NUM_LITERAL_SYMBOLS, BROTLI_TRUE,
+ arena->cost_literal);
+ SetCost(arena->histogram_cmd, BROTLI_NUM_COMMAND_SYMBOLS, BROTLI_FALSE,
cost_cmd);
- SetCost(histogram_dist, self->distance_histogram_size, BROTLI_FALSE,
+ SetCost(arena->histogram_dist, self->distance_histogram_size, BROTLI_FALSE,
self->cost_dist_);
for (i = 0; i < BROTLI_NUM_COMMAND_SYMBOLS; ++i) {
@@ -188,7 +201,7 @@ static void ZopfliCostModelSetFromCommands(ZopfliCostModel* self,
literal_costs[0] = 0.0;
for (i = 0; i < num_bytes; ++i) {
literal_carry +=
- cost_literal[ringbuffer[(position + i) & ringbuffer_mask]];
+ arena->cost_literal[ringbuffer[(position + i) & ringbuffer_mask]];
literal_costs[i + 1] = literal_costs[i] + literal_carry;
literal_carry -= literal_costs[i + 1] - literal_costs[i];
}
@@ -206,7 +219,8 @@ static void ZopfliCostModelSetFromLiteralCosts(ZopfliCostModel* self,
size_t num_bytes = self->num_bytes_;
size_t i;
BrotliEstimateBitCostsForLiterals(position, num_bytes, ringbuffer_mask,
- ringbuffer, &literal_costs[1]);
+ ringbuffer, self->literal_histograms,
+ &literal_costs[1]);
literal_costs[0] = 0.0;
for (i = 0; i < num_bytes; ++i) {
literal_carry += literal_costs[i + 1];
@@ -418,7 +432,8 @@ static size_t UpdateNodes(
size_t min_len;
size_t result = 0;
size_t k;
- size_t gap = 0;
+ const CompoundDictionary* addon = &params->dictionary.compound;
+ size_t gap = addon->total_size;
EvaluateNode(block_start + stream_offset, pos, max_backward_limit, gap,
starting_dist_cache, model, queue, nodes);
@@ -472,6 +487,24 @@ static size_t UpdateNodes(
len = FindMatchLengthWithLimit(&ringbuffer[prev_ix],
&ringbuffer[cur_ix_masked],
max_len);
+ } else if (backward > dictionary_start) {
+ size_t d = 0;
+ size_t offset;
+ size_t limit;
+ const uint8_t* source;
+ offset = dictionary_start + 1 + addon->total_size - 1;
+ while (offset >= backward + addon->chunk_offsets[d + 1]) d++;
+ source = addon->chunk_source[d];
+ offset = offset - addon->chunk_offsets[d] - backward;
+ limit = addon->chunk_offsets[d + 1] - addon->chunk_offsets[d] - offset;
+ limit = limit > max_len ? max_len : limit;
+ if (best_len >= limit ||
+ continuation != source[offset + best_len]) {
+ continue;
+ }
+ len = FindMatchLengthWithLimit(&source[offset],
+ &ringbuffer[cur_ix_masked],
+ limit);
} else {
/* "Gray" area. It is addressable by decoder, but this encoder
instance does not have that data -> should not touch it. */
@@ -577,7 +610,7 @@ void BrotliZopfliCreateCommands(const size_t num_bytes,
size_t pos = 0;
uint32_t offset = nodes[0].u.next;
size_t i;
- size_t gap = 0;
+ size_t gap = params->dictionary.compound.total_size;
for (i = 0; offset != BROTLI_UINT32_MAX; i++) {
const ZopfliNode* next = &nodes[pos + offset];
size_t copy_length = ZopfliNodeCopyLength(next);
@@ -653,6 +686,23 @@ static size_t ZopfliIterate(size_t num_bytes, size_t position,
return ComputeShortestPathFromNodes(num_bytes, nodes);
}
+static void MergeMatches(BackwardMatch* dst,
+ BackwardMatch* src1, size_t len1, BackwardMatch* src2, size_t len2) {
+ while (len1 > 0 && len2 > 0) {
+ size_t l1 = BackwardMatchLength(src1);
+ size_t l2 = BackwardMatchLength(src2);
+ if (l1 < l2 || ((l1 == l2) && (src1->distance < src2->distance))) {
+ *dst++ = *src1++;
+ len1--;
+ } else {
+ *dst++ = *src2++;
+ len2--;
+ }
+ }
+ while (len1-- > 0) *dst++ = *src1++;
+ while (len2-- > 0) *dst++ = *src2++;
+}
+
/* REQUIRES: nodes != NULL and len(nodes) >= num_bytes + 1 */
size_t BrotliZopfliComputeShortestPath(MemoryManager* m, size_t num_bytes,
size_t position, const uint8_t* ringbuffer, size_t ringbuffer_mask,
@@ -661,21 +711,26 @@ size_t BrotliZopfliComputeShortestPath(MemoryManager* m, size_t num_bytes,
const size_t stream_offset = params->stream_offset;
const size_t max_backward_limit = BROTLI_MAX_BACKWARD_LIMIT(params->lgwin);
const size_t max_zopfli_len = MaxZopfliLen(params);
- ZopfliCostModel model;
StartPosQueue queue;
- BackwardMatch matches[2 * (MAX_NUM_MATCHES_H10 + 64)];
+ BackwardMatch* BROTLI_RESTRICT matches =
+ BROTLI_ALLOC(m, BackwardMatch, 2 * (MAX_NUM_MATCHES_H10 + 64));
const size_t store_end = num_bytes >= StoreLookaheadH10() ?
position + num_bytes - StoreLookaheadH10() + 1 : position;
size_t i;
- size_t gap = 0;
- size_t lz_matches_offset = 0;
- BROTLI_UNUSED(literal_context_lut);
+ const CompoundDictionary* addon = &params->dictionary.compound;
+ size_t gap = addon->total_size;
+ size_t lz_matches_offset =
+ (addon->num_chunks != 0) ? (MAX_NUM_MATCHES_H10 + 128) : 0;
+ ZopfliCostModel* model = BROTLI_ALLOC(m, ZopfliCostModel, 1);
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(model) || BROTLI_IS_NULL(matches)) {
+ return 0;
+ }
nodes[0].length = 0;
nodes[0].u.cost = 0;
- InitZopfliCostModel(m, &model, &params->dist, num_bytes);
+ InitZopfliCostModel(m, model, &params->dist, num_bytes);
if (BROTLI_IS_OOM(m)) return 0;
ZopfliCostModelSetFromLiteralCosts(
- &model, position, ringbuffer, ringbuffer_mask);
+ model, position, ringbuffer, ringbuffer_mask);
InitStartPosQueue(&queue);
for (i = 0; i + HashTypeLengthH10() - 1 < num_bytes; i++) {
const size_t pos = position + i;
@@ -684,17 +739,35 @@ size_t BrotliZopfliComputeShortestPath(MemoryManager* m, size_t num_bytes,
pos + stream_offset, max_backward_limit);
size_t skip;
size_t num_matches;
+ int dict_id = 0;
+ if (params->dictionary.contextual.context_based) {
+ uint8_t p1 = pos >= 1 ?
+ ringbuffer[(size_t)(pos - 1) & ringbuffer_mask] : 0;
+ uint8_t p2 = pos >= 2 ?
+ ringbuffer[(size_t)(pos - 2) & ringbuffer_mask] : 0;
+ dict_id = params->dictionary.contextual.context_map[
+ BROTLI_CONTEXT(p1, p2, literal_context_lut)];
+ }
num_matches = FindAllMatchesH10(&hasher->privat._H10,
- &params->dictionary,
+ params->dictionary.contextual.dict[dict_id],
ringbuffer, ringbuffer_mask, pos, num_bytes - i, max_distance,
dictionary_start + gap, params, &matches[lz_matches_offset]);
+ if (addon->num_chunks != 0) {
+ size_t cd_matches = LookupAllCompoundDictionaryMatches(addon,
+ ringbuffer, ringbuffer_mask, pos, 3, num_bytes - i,
+ dictionary_start, params->dist.max_distance,
+ &matches[lz_matches_offset - 64], 64);
+ MergeMatches(matches, &matches[lz_matches_offset - 64], cd_matches,
+ &matches[lz_matches_offset], num_matches);
+ num_matches += cd_matches;
+ }
if (num_matches > 0 &&
BackwardMatchLength(&matches[num_matches - 1]) > max_zopfli_len) {
matches[0] = matches[num_matches - 1];
num_matches = 1;
}
skip = UpdateNodes(num_bytes, position, i, ringbuffer, ringbuffer_mask,
- params, max_backward_limit, dist_cache, num_matches, matches, &model,
+ params, max_backward_limit, dist_cache, num_matches, matches, model,
&queue, nodes);
if (skip < BROTLI_LONG_COPY_QUICK_STEP) skip = 0;
if (num_matches == 1 && BackwardMatchLength(&matches[0]) > max_zopfli_len) {
@@ -710,12 +783,14 @@ size_t BrotliZopfliComputeShortestPath(MemoryManager* m, size_t num_bytes,
i++;
if (i + HashTypeLengthH10() - 1 >= num_bytes) break;
EvaluateNode(position + stream_offset, i, max_backward_limit, gap,
- dist_cache, &model, &queue, nodes);
+ dist_cache, model, &queue, nodes);
skip--;
}
}
}
- CleanupZopfliCostModel(m, &model);
+ CleanupZopfliCostModel(m, model);
+ BROTLI_FREE(m, model);
+ BROTLI_FREE(m, matches);
return ComputeShortestPathFromNodes(num_bytes, nodes);
}
@@ -753,14 +828,15 @@ void BrotliCreateHqZopfliBackwardReferences(MemoryManager* m, size_t num_bytes,
size_t orig_last_insert_len;
int orig_dist_cache[4];
size_t orig_num_commands;
- ZopfliCostModel model;
+ ZopfliCostModel* model = BROTLI_ALLOC(m, ZopfliCostModel, 1);
ZopfliNode* nodes;
BackwardMatch* matches = BROTLI_ALLOC(m, BackwardMatch, matches_size);
- size_t gap = 0;
- size_t shadow_matches = 0;
- BROTLI_UNUSED(literal_context_lut);
- if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(num_matches) ||
- BROTLI_IS_NULL(matches)) {
+ const CompoundDictionary* addon = &params->dictionary.compound;
+ size_t gap = addon->total_size;
+ size_t shadow_matches =
+ (addon->num_chunks != 0) ? (MAX_NUM_MATCHES_H10 + 128) : 0;
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(model) ||
+ BROTLI_IS_NULL(num_matches) || BROTLI_IS_NULL(matches)) {
return;
}
for (i = 0; i + HashTypeLengthH10() - 1 < num_bytes; ++i) {
@@ -772,15 +848,34 @@ void BrotliCreateHqZopfliBackwardReferences(MemoryManager* m, size_t num_bytes,
size_t num_found_matches;
size_t cur_match_end;
size_t j;
+ int dict_id = 0;
+ if (params->dictionary.contextual.context_based) {
+ uint8_t p1 = pos >= 1 ?
+ ringbuffer[(size_t)(pos - 1) & ringbuffer_mask] : 0;
+ uint8_t p2 = pos >= 2 ?
+ ringbuffer[(size_t)(pos - 2) & ringbuffer_mask] : 0;
+ dict_id = params->dictionary.contextual.context_map[
+ BROTLI_CONTEXT(p1, p2, literal_context_lut)];
+ }
/* Ensure that we have enough free slots. */
BROTLI_ENSURE_CAPACITY(m, BackwardMatch, matches, matches_size,
cur_match_pos + MAX_NUM_MATCHES_H10 + shadow_matches);
if (BROTLI_IS_OOM(m)) return;
num_found_matches = FindAllMatchesH10(&hasher->privat._H10,
- &params->dictionary,
+ params->dictionary.contextual.dict[dict_id],
ringbuffer, ringbuffer_mask, pos, max_length,
max_distance, dictionary_start + gap, params,
&matches[cur_match_pos + shadow_matches]);
+ if (addon->num_chunks != 0) {
+ size_t cd_matches = LookupAllCompoundDictionaryMatches(addon,
+ ringbuffer, ringbuffer_mask, pos, 3, max_length,
+ dictionary_start, params->dist.max_distance,
+ &matches[cur_match_pos + shadow_matches - 64], 64);
+ MergeMatches(&matches[cur_match_pos],
+ &matches[cur_match_pos + shadow_matches - 64], cd_matches,
+ &matches[cur_match_pos + shadow_matches], num_found_matches);
+ num_found_matches += cd_matches;
+ }
cur_match_end = cur_match_pos + num_found_matches;
for (j = cur_match_pos; j + 1 < cur_match_end; ++j) {
BROTLI_DCHECK(BackwardMatchLength(&matches[j]) <=
@@ -810,15 +905,15 @@ void BrotliCreateHqZopfliBackwardReferences(MemoryManager* m, size_t num_bytes,
orig_num_commands = *num_commands;
nodes = BROTLI_ALLOC(m, ZopfliNode, num_bytes + 1);
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(nodes)) return;
- InitZopfliCostModel(m, &model, &params->dist, num_bytes);
+ InitZopfliCostModel(m, model, &params->dist, num_bytes);
if (BROTLI_IS_OOM(m)) return;
for (i = 0; i < 2; i++) {
BrotliInitZopfliNodes(nodes, num_bytes + 1);
if (i == 0) {
ZopfliCostModelSetFromLiteralCosts(
- &model, position, ringbuffer, ringbuffer_mask);
+ model, position, ringbuffer, ringbuffer_mask);
} else {
- ZopfliCostModelSetFromCommands(&model, position, ringbuffer,
+ ZopfliCostModelSetFromCommands(model, position, ringbuffer,
ringbuffer_mask, commands, *num_commands - orig_num_commands,
orig_last_insert_len);
}
@@ -827,12 +922,13 @@ void BrotliCreateHqZopfliBackwardReferences(MemoryManager* m, size_t num_bytes,
*last_insert_len = orig_last_insert_len;
memcpy(dist_cache, orig_dist_cache, 4 * sizeof(dist_cache[0]));
*num_commands += ZopfliIterate(num_bytes, position, ringbuffer,
- ringbuffer_mask, params, gap, dist_cache, &model, num_matches, matches,
+ ringbuffer_mask, params, gap, dist_cache, model, num_matches, matches,
nodes);
BrotliZopfliCreateCommands(num_bytes, position, nodes, dist_cache,
last_insert_len, params, commands, num_literals);
}
- CleanupZopfliCostModel(m, &model);
+ CleanupZopfliCostModel(m, model);
+ BROTLI_FREE(m, model);
BROTLI_FREE(m, nodes);
BROTLI_FREE(m, matches);
BROTLI_FREE(m, num_matches);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_hq.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_hq.h
index 36b75f250d7..8acf975ab98 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_hq.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_hq.h
@@ -9,15 +9,16 @@
#ifndef BROTLI_ENC_BACKWARD_REFERENCES_HQ_H_
#define BROTLI_ENC_BACKWARD_REFERENCES_HQ_H_
+#include <brotli/types.h>
+
#include "../common/constants.h"
#include "../common/context.h"
#include "../common/dictionary.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./command.h"
-#include "./hash.h"
-#include "./memory.h"
-#include "./quality.h"
+#include "command.h"
+#include "hash.h"
+#include "memory.h"
+#include "quality.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_inc.h
index 766bf91ffd2..752c12e9fd2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/backward_references_inc.h
@@ -28,13 +28,11 @@ static BROTLI_NOINLINE void EXPORT_FN(CreateBackwardReferences)(
const size_t random_heuristics_window_size =
LiteralSpreeLengthForSparseSearch(params);
size_t apply_random_heuristics = position + random_heuristics_window_size;
- const size_t gap = 0;
+ const size_t gap = params->dictionary.compound.total_size;
/* Minimum score to accept a backward reference. */
const score_t kMinScore = BROTLI_SCORE_BASE + 100;
- BROTLI_UNUSED(literal_context_lut);
-
FN(PrepareDistanceCache)(privat, dist_cache);
while (position + FN(HashTypeLength)() < pos_end) {
@@ -43,13 +41,29 @@ static BROTLI_NOINLINE void EXPORT_FN(CreateBackwardReferences)(
size_t dictionary_start = BROTLI_MIN(size_t,
position + position_offset, max_backward_limit);
HasherSearchResult sr;
+ int dict_id = 0;
+ uint8_t p1 = 0;
+ uint8_t p2 = 0;
+ if (params->dictionary.contextual.context_based) {
+ p1 = position >= 1 ?
+ ringbuffer[(size_t)(position - 1) & ringbuffer_mask] : 0;
+ p2 = position >= 2 ?
+ ringbuffer[(size_t)(position - 2) & ringbuffer_mask] : 0;
+ dict_id = params->dictionary.contextual.context_map[
+ BROTLI_CONTEXT(p1, p2, literal_context_lut)];
+ }
sr.len = 0;
sr.len_code_delta = 0;
sr.distance = 0;
sr.score = kMinScore;
- FN(FindLongestMatch)(privat, &params->dictionary,
+ FN(FindLongestMatch)(privat, params->dictionary.contextual.dict[dict_id],
ringbuffer, ringbuffer_mask, dist_cache, position, max_length,
max_distance, dictionary_start + gap, params->dist.max_distance, &sr);
+ if (ENABLE_COMPOUND_DICTIONARY) {
+ LookupCompoundDictionaryMatch(&params->dictionary.compound, ringbuffer,
+ ringbuffer_mask, dist_cache, position, max_length,
+ dictionary_start, params->dist.max_distance, &sr);
+ }
if (sr.score > kMinScore) {
/* Found a match. Let's look for something even better ahead. */
int delayed_backward_references_in_row = 0;
@@ -65,11 +79,23 @@ static BROTLI_NOINLINE void EXPORT_FN(CreateBackwardReferences)(
max_distance = BROTLI_MIN(size_t, position + 1, max_backward_limit);
dictionary_start = BROTLI_MIN(size_t,
position + 1 + position_offset, max_backward_limit);
+ if (params->dictionary.contextual.context_based) {
+ p2 = p1;
+ p1 = ringbuffer[position & ringbuffer_mask];
+ dict_id = params->dictionary.contextual.context_map[
+ BROTLI_CONTEXT(p1, p2, literal_context_lut)];
+ }
FN(FindLongestMatch)(privat,
- &params->dictionary,
+ params->dictionary.contextual.dict[dict_id],
ringbuffer, ringbuffer_mask, dist_cache, position + 1, max_length,
max_distance, dictionary_start + gap, params->dist.max_distance,
&sr2);
+ if (ENABLE_COMPOUND_DICTIONARY) {
+ LookupCompoundDictionaryMatch(
+ &params->dictionary.compound, ringbuffer,
+ ringbuffer_mask, dist_cache, position + 1, max_length,
+ dictionary_start, params->dist.max_distance, &sr2);
+ }
if (sr2.score >= sr.score + cost_diff_lazy) {
/* Ok, let's just write one byte for now and start a match from the
next byte. */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/bit_cost.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/bit_cost.c
index 1f3f7ad5c90..6b7c904cede 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/bit_cost.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/bit_cost.c
@@ -6,28 +6,29 @@
/* Functions to estimate the bit cost of Huffman trees. */
-#include "./bit_cost.h"
+#include "bit_cost.h"
+
+#include <brotli/types.h>
#include "../common/constants.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./fast_log.h"
-#include "./histogram.h"
+#include "fast_log.h"
+#include "histogram.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#define FN(X) X ## Literal
-#include "./bit_cost_inc.h" /* NOLINT(build/include) */
+#include "bit_cost_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Command
-#include "./bit_cost_inc.h" /* NOLINT(build/include) */
+#include "bit_cost_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Distance
-#include "./bit_cost_inc.h" /* NOLINT(build/include) */
+#include "bit_cost_inc.h" /* NOLINT(build/include) */
#undef FN
#if defined(__cplusplus) || defined(c_plusplus)
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/bit_cost.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/bit_cost.h
index 6586469e62f..f6f2773994a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/bit_cost.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/bit_cost.h
@@ -9,10 +9,11 @@
#ifndef BROTLI_ENC_BIT_COST_H_
#define BROTLI_ENC_BIT_COST_H_
-#include "../common/platform.h"
#include <brotli/types.h>
-#include "./fast_log.h"
-#include "./histogram.h"
+
+#include "../common/platform.h"
+#include "fast_log.h"
+#include "histogram.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -45,7 +46,7 @@ static BROTLI_INLINE double BitsEntropy(
const uint32_t* population, size_t size) {
size_t sum;
double retval = ShannonEntropy(population, size, &sum);
- if (retval < sum) {
+ if (retval < (double)sum) {
/* At least one bit per literal is needed. */
retval = (double)sum;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter.c
index deb7c2e151a..eba1b691e51 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter.c
@@ -6,18 +6,18 @@
/* Block split point selection utilities. */
-#include "./block_splitter.h"
+#include "block_splitter.h"
#include <string.h> /* memcpy, memset */
#include "../common/platform.h"
-#include "./bit_cost.h"
-#include "./cluster.h"
-#include "./command.h"
-#include "./fast_log.h"
-#include "./histogram.h"
-#include "./memory.h"
-#include "./quality.h"
+#include "bit_cost.h"
+#include "cluster.h"
+#include "command.h"
+#include "fast_log.h"
+#include "histogram.h"
+#include "memory.h"
+#include "quality.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -30,6 +30,7 @@ static const double kCommandBlockSwitchCost = 13.5;
static const double kDistanceBlockSwitchCost = 14.6;
static const size_t kLiteralStrideLength = 70;
static const size_t kCommandStrideLength = 40;
+static const size_t kDistanceStrideLength = 40;
static const size_t kSymbolsPerLiteralHistogram = 544;
static const size_t kSymbolsPerCommandHistogram = 530;
static const size_t kSymbolsPerDistanceHistogram = 544;
@@ -89,19 +90,19 @@ static BROTLI_INLINE double BitCost(size_t count) {
#define FN(X) X ## Literal
#define DataType uint8_t
/* NOLINTNEXTLINE(build/include) */
-#include "./block_splitter_inc.h"
+#include "block_splitter_inc.h"
#undef DataType
#undef FN
#define FN(X) X ## Command
#define DataType uint16_t
/* NOLINTNEXTLINE(build/include) */
-#include "./block_splitter_inc.h"
+#include "block_splitter_inc.h"
#undef FN
#define FN(X) X ## Distance
/* NOLINTNEXTLINE(build/include) */
-#include "./block_splitter_inc.h"
+#include "block_splitter_inc.h"
#undef DataType
#undef FN
@@ -119,6 +120,8 @@ void BrotliDestroyBlockSplit(MemoryManager* m, BlockSplit* self) {
BROTLI_FREE(m, self->lengths);
}
+/* Extracts literals, command distance and prefix codes, then applies
+ * SplitByteVector to create partitioning. */
void BrotliSplitBlock(MemoryManager* m,
const Command* cmds,
const size_t num_commands,
@@ -136,7 +139,9 @@ void BrotliSplitBlock(MemoryManager* m,
/* Create a continuous array of literals. */
CopyLiteralsToByteArray(cmds, num_commands, data, pos, mask, literals);
/* Create the block split on the array of literals.
- Literal histograms have alphabet size 256. */
+ * Literal histograms can have alphabet size up to 256.
+ * Though, to accomodate context modeling, less than half of maximum size
+ * is allowed. */
SplitByteVectorLiteral(
m, literals, literals_count,
kSymbolsPerLiteralHistogram, kMaxLiteralHistograms,
@@ -144,6 +149,10 @@ void BrotliSplitBlock(MemoryManager* m,
literal_split);
if (BROTLI_IS_OOM(m)) return;
BROTLI_FREE(m, literals);
+ /* NB: this might be a good place for injecting extra splitting without
+ * increasing encoder complexity; however, output parition would be less
+ * optimal than one produced with forced splitting inside
+ * SplitByteVector (FindBlocks / ClusterBlocks). */
}
{
@@ -161,7 +170,7 @@ void BrotliSplitBlock(MemoryManager* m,
kCommandStrideLength, kCommandBlockSwitchCost, params,
insert_and_copy_split);
if (BROTLI_IS_OOM(m)) return;
- /* TODO: reuse for distances? */
+ /* TODO(eustas): reuse for distances? */
BROTLI_FREE(m, insert_and_copy_codes);
}
@@ -181,13 +190,27 @@ void BrotliSplitBlock(MemoryManager* m,
SplitByteVectorDistance(
m, distance_prefixes, j,
kSymbolsPerDistanceHistogram, kMaxCommandHistograms,
- kCommandStrideLength, kDistanceBlockSwitchCost, params,
+ kDistanceStrideLength, kDistanceBlockSwitchCost, params,
dist_split);
if (BROTLI_IS_OOM(m)) return;
BROTLI_FREE(m, distance_prefixes);
}
}
+#if defined(BROTLI_TEST)
+size_t CountLiteralsForTest(const Command*, const size_t);
+size_t CountLiteralsForTest(const Command* cmds, const size_t num_commands) {
+ return CountLiterals(cmds, num_commands);
+}
+
+void CopyLiteralsToByteArrayForTest(const Command*,
+ const size_t, const uint8_t*, const size_t, const size_t, uint8_t*);
+void CopyLiteralsToByteArrayForTest(const Command* cmds,
+ const size_t num_commands, const uint8_t* data, const size_t offset,
+ const size_t mask, uint8_t* literals) {
+ CopyLiteralsToByteArray(cmds, num_commands, data, offset, mask, literals);
+}
+#endif
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter.h
index a5e006c4b30..6046b90a5de 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter.h
@@ -9,11 +9,12 @@
#ifndef BROTLI_ENC_BLOCK_SPLITTER_H_
#define BROTLI_ENC_BLOCK_SPLITTER_H_
-#include "../common/platform.h"
#include <brotli/types.h>
-#include "./command.h"
-#include "./memory.h"
-#include "./quality.h"
+
+#include "../common/platform.h"
+#include "command.h"
+#include "memory.h"
+#include "quality.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter_inc.h
index e612d6a3707..aa40bfd329d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/block_splitter_inc.h
@@ -46,17 +46,17 @@ static void FN(RandomSample)(uint32_t* seed,
static void FN(RefineEntropyCodes)(const DataType* data, size_t length,
size_t stride,
size_t num_histograms,
- HistogramType* histograms) {
+ HistogramType* histograms,
+ HistogramType* tmp) {
size_t iters =
kIterMulForRefining * length / stride + kMinItersForRefining;
uint32_t seed = 7;
size_t iter;
iters = ((iters + num_histograms - 1) / num_histograms) * num_histograms;
for (iter = 0; iter < iters; ++iter) {
- HistogramType sample;
- FN(HistogramClear)(&sample);
- FN(RandomSample)(&seed, data, length, stride, &sample);
- FN(HistogramAddHistogram)(&histograms[iter % num_histograms], &sample);
+ FN(HistogramClear)(tmp);
+ FN(RandomSample)(&seed, data, length, stride, tmp);
+ FN(HistogramAddHistogram)(&histograms[iter % num_histograms], tmp);
}
}
@@ -71,46 +71,56 @@ static size_t FN(FindBlocks)(const DataType* data, const size_t length,
double* cost,
uint8_t* switch_signal,
uint8_t* block_id) {
- const size_t data_size = FN(HistogramDataSize)();
- const size_t bitmaplen = (num_histograms + 7) >> 3;
+ const size_t alphabet_size = FN(HistogramDataSize)();
+ const size_t bitmap_len = (num_histograms + 7) >> 3;
size_t num_blocks = 1;
+ size_t byte_ix;
size_t i;
size_t j;
BROTLI_DCHECK(num_histograms <= 256);
+
+ /* Trivial case: single historgram -> single block type. */
if (num_histograms <= 1) {
for (i = 0; i < length; ++i) {
block_id[i] = 0;
}
return 1;
}
- memset(insert_cost, 0, sizeof(insert_cost[0]) * data_size * num_histograms);
+
+ /* Fill bitcost for each symbol of all histograms.
+ * Non-existing symbol cost: 2 + log2(total_count).
+ * Regular symbol cost: -log2(symbol_count / total_count). */
+ memset(insert_cost, 0,
+ sizeof(insert_cost[0]) * alphabet_size * num_histograms);
for (i = 0; i < num_histograms; ++i) {
insert_cost[i] = FastLog2((uint32_t)histograms[i].total_count_);
}
- for (i = data_size; i != 0;) {
+ for (i = alphabet_size; i != 0;) {
+ /* Reverse order to use the 0-th row as a temporary storage. */
--i;
for (j = 0; j < num_histograms; ++j) {
insert_cost[i * num_histograms + j] =
insert_cost[j] - BitCost(histograms[j].data_[i]);
}
}
- memset(cost, 0, sizeof(cost[0]) * num_histograms);
- memset(switch_signal, 0, sizeof(switch_signal[0]) * length * bitmaplen);
+
/* After each iteration of this loop, cost[k] will contain the difference
between the minimum cost of arriving at the current byte position using
entropy code k, and the minimum cost of arriving at the current byte
position. This difference is capped at the block switch cost, and if it
reaches block switch cost, it means that when we trace back from the last
position, we need to switch here. */
- for (i = 0; i < length; ++i) {
- const size_t byte_ix = i;
- size_t ix = byte_ix * bitmaplen;
- size_t insert_cost_ix = data[byte_ix] * num_histograms;
+ memset(cost, 0, sizeof(cost[0]) * num_histograms);
+ memset(switch_signal, 0, sizeof(switch_signal[0]) * length * bitmap_len);
+ for (byte_ix = 0; byte_ix < length; ++byte_ix) {
+ size_t ix = byte_ix * bitmap_len;
+ size_t symbol = data[byte_ix];
+ size_t insert_cost_ix = symbol * num_histograms;
double min_cost = 1e99;
double block_switch_cost = block_switch_bitcost;
size_t k;
for (k = 0; k < num_histograms; ++k) {
- /* We are coding the symbol in data[byte_ix] with entropy code k. */
+ /* We are coding the symbol with entropy code k. */
cost[k] += insert_cost[insert_cost_ix + k];
if (cost[k] < min_cost) {
min_cost = cost[k];
@@ -126,20 +136,21 @@ static size_t FN(FindBlocks)(const DataType* data, const size_t length,
if (cost[k] >= block_switch_cost) {
const uint8_t mask = (uint8_t)(1u << (k & 7));
cost[k] = block_switch_cost;
- BROTLI_DCHECK((k >> 3) < bitmaplen);
+ BROTLI_DCHECK((k >> 3) < bitmap_len);
switch_signal[ix + (k >> 3)] |= mask;
}
}
}
+
+ byte_ix = length - 1;
{ /* Trace back from the last position and switch at the marked places. */
- size_t byte_ix = length - 1;
- size_t ix = byte_ix * bitmaplen;
+ size_t ix = byte_ix * bitmap_len;
uint8_t cur_id = block_id[byte_ix];
while (byte_ix > 0) {
const uint8_t mask = (uint8_t)(1u << (cur_id & 7));
- BROTLI_DCHECK(((size_t)cur_id >> 3) < bitmaplen);
+ BROTLI_DCHECK(((size_t)cur_id >> 3) < bitmap_len);
--byte_ix;
- ix -= bitmaplen;
+ ix -= bitmap_len;
if (switch_signal[ix + (cur_id >> 3)] & mask) {
if (cur_id != block_id[byte_ix]) {
cur_id = block_id[byte_ix];
@@ -185,13 +196,16 @@ static void FN(BuildBlockHistograms)(const DataType* data, const size_t length,
}
}
+/* Given the initial partitioning build partitioning with limited number
+ * of histograms (and block types). */
static void FN(ClusterBlocks)(MemoryManager* m,
const DataType* data, const size_t length,
const size_t num_blocks,
uint8_t* block_ids,
BlockSplit* split) {
uint32_t* histogram_symbols = BROTLI_ALLOC(m, uint32_t, num_blocks);
- uint32_t* block_lengths = BROTLI_ALLOC(m, uint32_t, num_blocks);
+ uint32_t* u32 =
+ BROTLI_ALLOC(m, uint32_t, num_blocks + 4 * HISTOGRAMS_PER_BATCH);
const size_t expected_num_clusters = CLUSTERS_PER_BATCH *
(num_blocks + HISTOGRAMS_PER_BATCH - 1) / HISTOGRAMS_PER_BATCH;
size_t all_histograms_size = 0;
@@ -214,20 +228,25 @@ static void FN(ClusterBlocks)(MemoryManager* m,
static const uint32_t kInvalidIndex = BROTLI_UINT32_MAX;
uint32_t* new_index;
size_t i;
- uint32_t sizes[HISTOGRAMS_PER_BATCH] = { 0 };
- uint32_t new_clusters[HISTOGRAMS_PER_BATCH] = { 0 };
- uint32_t symbols[HISTOGRAMS_PER_BATCH] = { 0 };
- uint32_t remap[HISTOGRAMS_PER_BATCH] = { 0 };
+ uint32_t* BROTLI_RESTRICT const sizes = u32 + 0 * HISTOGRAMS_PER_BATCH;
+ uint32_t* BROTLI_RESTRICT const new_clusters = u32 + 1 * HISTOGRAMS_PER_BATCH;
+ uint32_t* BROTLI_RESTRICT const symbols = u32 + 2 * HISTOGRAMS_PER_BATCH;
+ uint32_t* BROTLI_RESTRICT const remap = u32 + 3 * HISTOGRAMS_PER_BATCH;
+ uint32_t* BROTLI_RESTRICT const block_lengths =
+ u32 + 4 * HISTOGRAMS_PER_BATCH;
+ /* TODO(eustas): move to arena? */
+ HistogramType* tmp = BROTLI_ALLOC(m, HistogramType, 2);
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(histogram_symbols) ||
- BROTLI_IS_NULL(block_lengths) || BROTLI_IS_NULL(all_histograms) ||
+ BROTLI_IS_NULL(u32) || BROTLI_IS_NULL(all_histograms) ||
BROTLI_IS_NULL(cluster_size) || BROTLI_IS_NULL(histograms) ||
- BROTLI_IS_NULL(pairs)) {
+ BROTLI_IS_NULL(pairs) || BROTLI_IS_NULL(tmp)) {
return;
}
- memset(block_lengths, 0, num_blocks * sizeof(uint32_t));
+ memset(u32, 0, (num_blocks + 4 * HISTOGRAMS_PER_BATCH) * sizeof(uint32_t));
+ /* Calculate block lengths (convert repeating values -> series length). */
{
size_t block_idx = 0;
for (i = 0; i < length; ++i) {
@@ -240,6 +259,7 @@ static void FN(ClusterBlocks)(MemoryManager* m,
BROTLI_DCHECK(block_idx == num_blocks);
}
+ /* Pre-cluster blocks (cluster batches). */
for (i = 0; i < num_blocks; i += HISTOGRAMS_PER_BATCH) {
const size_t num_to_combine =
BROTLI_MIN(size_t, num_blocks - i, HISTOGRAMS_PER_BATCH);
@@ -247,8 +267,9 @@ static void FN(ClusterBlocks)(MemoryManager* m,
size_t j;
for (j = 0; j < num_to_combine; ++j) {
size_t k;
+ size_t block_length = block_lengths[i + j];
FN(HistogramClear)(&histograms[j]);
- for (k = 0; k < block_lengths[i + j]; ++k) {
+ for (k = 0; k < block_length; ++k) {
FN(HistogramAdd)(&histograms[j], data[pos++]);
}
histograms[j].bit_cost_ = FN(BrotliPopulationCost)(&histograms[j]);
@@ -257,7 +278,7 @@ static void FN(ClusterBlocks)(MemoryManager* m,
sizes[j] = 1;
}
num_new_clusters = FN(BrotliHistogramCombine)(
- histograms, sizes, symbols, new_clusters, pairs, num_to_combine,
+ histograms, tmp, sizes, symbols, new_clusters, pairs, num_to_combine,
num_to_combine, HISTOGRAMS_PER_BATCH, max_num_pairs);
BROTLI_ENSURE_CAPACITY(m, HistogramType, all_histograms,
all_histograms_capacity, all_histograms_size + num_new_clusters);
@@ -278,6 +299,7 @@ static void FN(ClusterBlocks)(MemoryManager* m,
}
BROTLI_FREE(m, histograms);
+ /* Final clustering. */
max_num_pairs =
BROTLI_MIN(size_t, 64 * num_clusters, (num_clusters / 2) * num_clusters);
if (pairs_capacity < max_num_pairs + 1) {
@@ -285,19 +307,19 @@ static void FN(ClusterBlocks)(MemoryManager* m,
pairs = BROTLI_ALLOC(m, HistogramPair, max_num_pairs + 1);
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(pairs)) return;
}
-
clusters = BROTLI_ALLOC(m, uint32_t, num_clusters);
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(clusters)) return;
for (i = 0; i < num_clusters; ++i) {
clusters[i] = (uint32_t)i;
}
num_final_clusters = FN(BrotliHistogramCombine)(
- all_histograms, cluster_size, histogram_symbols, clusters, pairs,
+ all_histograms, tmp, cluster_size, histogram_symbols, clusters, pairs,
num_clusters, num_blocks, BROTLI_MAX_NUMBER_OF_BLOCK_TYPES,
max_num_pairs);
BROTLI_FREE(m, pairs);
BROTLI_FREE(m, cluster_size);
+ /* Assign blocks to final histograms. */
new_index = BROTLI_ALLOC(m, uint32_t, num_clusters);
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(new_index)) return;
for (i = 0; i < num_clusters; ++i) new_index[i] = kInvalidIndex;
@@ -305,20 +327,21 @@ static void FN(ClusterBlocks)(MemoryManager* m,
{
uint32_t next_index = 0;
for (i = 0; i < num_blocks; ++i) {
- HistogramType histo;
size_t j;
uint32_t best_out;
double best_bits;
- FN(HistogramClear)(&histo);
+ FN(HistogramClear)(tmp);
for (j = 0; j < block_lengths[i]; ++j) {
- FN(HistogramAdd)(&histo, data[pos++]);
+ FN(HistogramAdd)(tmp, data[pos++]);
}
+ /* Among equally good histograms prefer last used. */
+ /* TODO(eustas): should we give a block-switch discount here? */
best_out = (i == 0) ? histogram_symbols[0] : histogram_symbols[i - 1];
- best_bits =
- FN(BrotliHistogramBitCostDistance)(&histo, &all_histograms[best_out]);
+ best_bits = FN(BrotliHistogramBitCostDistance)(
+ tmp, &all_histograms[best_out], tmp + 1);
for (j = 0; j < num_final_clusters; ++j) {
const double cur_bits = FN(BrotliHistogramBitCostDistance)(
- &histo, &all_histograms[clusters[j]]);
+ tmp, &all_histograms[clusters[j]], tmp + 1);
if (cur_bits < best_bits) {
best_bits = cur_bits;
best_out = clusters[j];
@@ -330,6 +353,7 @@ static void FN(ClusterBlocks)(MemoryManager* m,
}
}
}
+ BROTLI_FREE(m, tmp);
BROTLI_FREE(m, clusters);
BROTLI_FREE(m, all_histograms);
BROTLI_ENSURE_CAPACITY(
@@ -337,6 +361,9 @@ static void FN(ClusterBlocks)(MemoryManager* m,
BROTLI_ENSURE_CAPACITY(
m, uint32_t, split->lengths, split->lengths_alloc_size, num_blocks);
if (BROTLI_IS_OOM(m)) return;
+
+ /* Rewrite final assignment to block-split. There might be less blocks
+ * than |num_blocks| due to clustering. */
{
uint32_t cur_length = 0;
size_t block_idx = 0;
@@ -357,28 +384,41 @@ static void FN(ClusterBlocks)(MemoryManager* m,
split->num_types = (size_t)max_type + 1;
}
BROTLI_FREE(m, new_index);
- BROTLI_FREE(m, block_lengths);
+ BROTLI_FREE(m, u32);
BROTLI_FREE(m, histogram_symbols);
}
+/* Create BlockSplit (partitioning) given the limits, estimates and "effort"
+ * parameters.
+ *
+ * NB: max_histograms is often less than number of histograms allowed by format;
+ * this is done intentionally, to save some "space" for context-aware
+ * clustering (here entropy is estimated for context-free symbols). */
static void FN(SplitByteVector)(MemoryManager* m,
const DataType* data, const size_t length,
- const size_t literals_per_histogram,
+ const size_t symbols_per_histogram,
const size_t max_histograms,
const size_t sampling_stride_length,
const double block_switch_cost,
const BrotliEncoderParams* params,
BlockSplit* split) {
const size_t data_size = FN(HistogramDataSize)();
- size_t num_histograms = length / literals_per_histogram + 1;
HistogramType* histograms;
+ HistogramType* tmp;
+ /* Calculate number of histograms; initial estimate is one histogram per
+ * specified amount of symbols; however, this value is capped. */
+ size_t num_histograms = length / symbols_per_histogram + 1;
if (num_histograms > max_histograms) {
num_histograms = max_histograms;
}
+
+ /* Corner case: no input. */
if (length == 0) {
split->num_types = 1;
return;
- } else if (length < kMinLengthForBlockSplitting) {
+ }
+
+ if (length < kMinLengthForBlockSplitting) {
BROTLI_ENSURE_CAPACITY(m, uint8_t,
split->types, split->types_alloc_size, split->num_blocks + 1);
BROTLI_ENSURE_CAPACITY(m, uint32_t,
@@ -390,7 +430,8 @@ static void FN(SplitByteVector)(MemoryManager* m,
split->num_blocks++;
return;
}
- histograms = BROTLI_ALLOC(m, HistogramType, num_histograms);
+ histograms = BROTLI_ALLOC(m, HistogramType, num_histograms + 1);
+ tmp = histograms + num_histograms;
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(histograms)) return;
/* Find good entropy codes. */
FN(InitialEntropyCodes)(data, length,
@@ -398,7 +439,7 @@ static void FN(SplitByteVector)(MemoryManager* m,
num_histograms, histograms);
FN(RefineEntropyCodes)(data, length,
sampling_stride_length,
- num_histograms, histograms);
+ num_histograms, histograms, tmp);
{
/* Find a good path through literals with the good entropy codes. */
uint8_t* block_ids = BROTLI_ALLOC(m, uint8_t, length);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.c
index 9348a97e1b9..5fa0c69aa84 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.c
@@ -8,20 +8,21 @@
compression algorithms here, just the right ordering of bits to match the
specs. */
-#include "./brotli_bit_stream.h"
+#include "brotli_bit_stream.h"
#include <string.h> /* memcpy, memset */
+#include <brotli/types.h>
+
#include "../common/constants.h"
#include "../common/context.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./entropy_encode.h"
-#include "./entropy_encode_static.h"
-#include "./fast_log.h"
-#include "./histogram.h"
-#include "./memory.h"
-#include "./write_bits.h"
+#include "entropy_encode.h"
+#include "entropy_encode_static.h"
+#include "fast_log.h"
+#include "histogram.h"
+#include "memory.h"
+#include "write_bits.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -286,6 +287,7 @@ void BrotliStoreHuffmanTree(const uint8_t* depths, size_t num,
/* Write the Huffman tree into the brotli-representation.
The command alphabet is the largest, so this allocation will fit all
alphabets. */
+ /* TODO(eustas): fix me */
uint8_t huffman_tree[BROTLI_NUM_COMMAND_SYMBOLS];
uint8_t huffman_tree_extra_bits[BROTLI_NUM_COMMAND_SYMBOLS];
size_t huffman_tree_size = 0;
@@ -400,7 +402,7 @@ static BROTLI_INLINE BROTLI_BOOL SortHuffmanTree(
return TO_BROTLI_BOOL(v0->total_count_ < v1->total_count_);
}
-void BrotliBuildAndStoreHuffmanTreeFast(MemoryManager* m,
+void BrotliBuildAndStoreHuffmanTreeFast(HuffmanTree* tree,
const uint32_t* histogram,
const size_t histogram_total,
const size_t max_bits,
@@ -432,10 +434,7 @@ void BrotliBuildAndStoreHuffmanTreeFast(MemoryManager* m,
memset(depth, 0, length * sizeof(depth[0]));
{
- const size_t max_tree_size = 2 * length + 1;
- HuffmanTree* tree = BROTLI_ALLOC(m, HuffmanTree, max_tree_size);
uint32_t count_limit;
- if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(tree)) return;
for (count_limit = 1; ; count_limit *= 2) {
HuffmanTree* node = tree;
size_t l;
@@ -500,7 +499,6 @@ void BrotliBuildAndStoreHuffmanTreeFast(MemoryManager* m,
}
}
}
- BROTLI_FREE(m, tree);
}
BrotliConvertBitDepthsToSymbols(depth, length, bits);
if (count <= 4) {
@@ -677,7 +675,14 @@ static void RunLengthCodeZeros(const size_t in_size,
#define SYMBOL_BITS 9
+typedef struct EncodeContextMapArena {
+ uint32_t histogram[BROTLI_MAX_CONTEXT_MAP_SYMBOLS];
+ uint8_t depths[BROTLI_MAX_CONTEXT_MAP_SYMBOLS];
+ uint16_t bits[BROTLI_MAX_CONTEXT_MAP_SYMBOLS];
+} EncodeContextMapArena;
+
static void EncodeContextMap(MemoryManager* m,
+ EncodeContextMapArena* arena,
const uint32_t* context_map,
size_t context_map_size,
size_t num_clusters,
@@ -687,10 +692,10 @@ static void EncodeContextMap(MemoryManager* m,
uint32_t* rle_symbols;
uint32_t max_run_length_prefix = 6;
size_t num_rle_symbols = 0;
- uint32_t histogram[BROTLI_MAX_CONTEXT_MAP_SYMBOLS];
+ uint32_t* BROTLI_RESTRICT const histogram = arena->histogram;
static const uint32_t kSymbolMask = (1u << SYMBOL_BITS) - 1u;
- uint8_t depths[BROTLI_MAX_CONTEXT_MAP_SYMBOLS];
- uint16_t bits[BROTLI_MAX_CONTEXT_MAP_SYMBOLS];
+ uint8_t* BROTLI_RESTRICT const depths = arena->depths;
+ uint16_t* BROTLI_RESTRICT const bits = arena->bits;
StoreVarLenUint8(num_clusters - 1, storage_ix, storage);
@@ -703,7 +708,7 @@ static void EncodeContextMap(MemoryManager* m,
MoveToFrontTransform(context_map, context_map_size, rle_symbols);
RunLengthCodeZeros(context_map_size, rle_symbols,
&num_rle_symbols, &max_run_length_prefix);
- memset(histogram, 0, sizeof(histogram));
+ memset(histogram, 0, sizeof(arena->histogram));
for (i = 0; i < num_rle_symbols; ++i) {
++histogram[rle_symbols[i] & kSymbolMask];
}
@@ -774,7 +779,7 @@ static void BuildAndStoreBlockSplitCode(const uint8_t* types,
++length_histo[BlockLengthPrefixCode(lengths[i])];
}
StoreVarLenUint8(num_types - 1, storage_ix, storage);
- if (num_types > 1) { /* TODO: else? could StoreBlockSwitch occur? */
+ if (num_types > 1) { /* TODO(eustas): else? could StoreBlockSwitch occur? */
BuildAndStoreHuffmanTree(&type_histo[0], num_types + 2, num_types + 2, tree,
&code->type_depths[0], &code->type_bits[0],
storage_ix, storage);
@@ -787,7 +792,8 @@ static void BuildAndStoreBlockSplitCode(const uint8_t* types,
}
/* Stores a context map where the histogram type is always the block type. */
-static void StoreTrivialContextMap(size_t num_types,
+static void StoreTrivialContextMap(EncodeContextMapArena* arena,
+ size_t num_types,
size_t context_bits,
HuffmanTree* tree,
size_t* storage_ix,
@@ -797,9 +803,9 @@ static void StoreTrivialContextMap(size_t num_types,
size_t repeat_code = context_bits - 1u;
size_t repeat_bits = (1u << repeat_code) - 1u;
size_t alphabet_size = num_types + repeat_code;
- uint32_t histogram[BROTLI_MAX_CONTEXT_MAP_SYMBOLS];
- uint8_t depths[BROTLI_MAX_CONTEXT_MAP_SYMBOLS];
- uint16_t bits[BROTLI_MAX_CONTEXT_MAP_SYMBOLS];
+ uint32_t* BROTLI_RESTRICT const histogram = arena->histogram;
+ uint8_t* BROTLI_RESTRICT const depths = arena->depths;
+ uint16_t* BROTLI_RESTRICT const bits = arena->bits;
size_t i;
memset(histogram, 0, alphabet_size * sizeof(histogram[0]));
/* Write RLEMAX. */
@@ -914,17 +920,17 @@ static void StoreSymbolWithContext(BlockEncoder* self, size_t symbol,
#define FN(X) X ## Literal
/* NOLINTNEXTLINE(build/include) */
-#include "./block_encoder_inc.h"
+#include "block_encoder_inc.h"
#undef FN
#define FN(X) X ## Command
/* NOLINTNEXTLINE(build/include) */
-#include "./block_encoder_inc.h"
+#include "block_encoder_inc.h"
#undef FN
#define FN(X) X ## Distance
/* NOLINTNEXTLINE(build/include) */
-#include "./block_encoder_inc.h"
+#include "block_encoder_inc.h"
#undef FN
static void JumpToByteBoundary(size_t* storage_ix, uint8_t* storage) {
@@ -932,6 +938,13 @@ static void JumpToByteBoundary(size_t* storage_ix, uint8_t* storage) {
storage[*storage_ix >> 3] = 0;
}
+typedef struct StoreMetablockArena {
+ BlockEncoder literal_enc;
+ BlockEncoder command_enc;
+ BlockEncoder distance_enc;
+ EncodeContextMapArena context_map_arena;
+} StoreMetablockArena;
+
void BrotliStoreMetaBlock(MemoryManager* m,
const uint8_t* input, size_t start_pos, size_t length, size_t mask,
uint8_t prev_byte, uint8_t prev_byte2, BROTLI_BOOL is_last,
@@ -945,9 +958,10 @@ void BrotliStoreMetaBlock(MemoryManager* m,
uint32_t num_effective_distance_symbols = params->dist.alphabet_size_limit;
HuffmanTree* tree;
ContextLut literal_context_lut = BROTLI_CONTEXT_LUT(literal_context_mode);
- BlockEncoder literal_enc;
- BlockEncoder command_enc;
- BlockEncoder distance_enc;
+ StoreMetablockArena* arena = NULL;
+ BlockEncoder* literal_enc = NULL;
+ BlockEncoder* command_enc = NULL;
+ BlockEncoder* distance_enc = NULL;
const BrotliDistanceParams* dist = &params->dist;
BROTLI_DCHECK(
num_effective_distance_symbols <= BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS);
@@ -955,21 +969,24 @@ void BrotliStoreMetaBlock(MemoryManager* m,
StoreCompressedMetaBlockHeader(is_last, length, storage_ix, storage);
tree = BROTLI_ALLOC(m, HuffmanTree, MAX_HUFFMAN_TREE_SIZE);
- if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(tree)) return;
- InitBlockEncoder(&literal_enc, BROTLI_NUM_LITERAL_SYMBOLS,
+ arena = BROTLI_ALLOC(m, StoreMetablockArena, 1);
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(tree) || BROTLI_IS_NULL(arena)) return;
+ literal_enc = &arena->literal_enc;
+ command_enc = &arena->command_enc;
+ distance_enc = &arena->distance_enc;
+ InitBlockEncoder(literal_enc, BROTLI_NUM_LITERAL_SYMBOLS,
mb->literal_split.num_types, mb->literal_split.types,
mb->literal_split.lengths, mb->literal_split.num_blocks);
- InitBlockEncoder(&command_enc, BROTLI_NUM_COMMAND_SYMBOLS,
+ InitBlockEncoder(command_enc, BROTLI_NUM_COMMAND_SYMBOLS,
mb->command_split.num_types, mb->command_split.types,
mb->command_split.lengths, mb->command_split.num_blocks);
- InitBlockEncoder(&distance_enc, num_effective_distance_symbols,
+ InitBlockEncoder(distance_enc, num_effective_distance_symbols,
mb->distance_split.num_types, mb->distance_split.types,
mb->distance_split.lengths, mb->distance_split.num_blocks);
- BuildAndStoreBlockSwitchEntropyCodes(&literal_enc, tree, storage_ix, storage);
- BuildAndStoreBlockSwitchEntropyCodes(&command_enc, tree, storage_ix, storage);
- BuildAndStoreBlockSwitchEntropyCodes(
- &distance_enc, tree, storage_ix, storage);
+ BuildAndStoreBlockSwitchEntropyCodes(literal_enc, tree, storage_ix, storage);
+ BuildAndStoreBlockSwitchEntropyCodes(command_enc, tree, storage_ix, storage);
+ BuildAndStoreBlockSwitchEntropyCodes(distance_enc, tree, storage_ix, storage);
BrotliWriteBits(2, dist->distance_postfix_bits, storage_ix, storage);
BrotliWriteBits(
@@ -980,34 +997,36 @@ void BrotliStoreMetaBlock(MemoryManager* m,
}
if (mb->literal_context_map_size == 0) {
- StoreTrivialContextMap(mb->literal_histograms_size,
+ StoreTrivialContextMap(
+ &arena->context_map_arena, mb->literal_histograms_size,
BROTLI_LITERAL_CONTEXT_BITS, tree, storage_ix, storage);
} else {
- EncodeContextMap(m,
+ EncodeContextMap(m, &arena->context_map_arena,
mb->literal_context_map, mb->literal_context_map_size,
mb->literal_histograms_size, tree, storage_ix, storage);
if (BROTLI_IS_OOM(m)) return;
}
if (mb->distance_context_map_size == 0) {
- StoreTrivialContextMap(mb->distance_histograms_size,
+ StoreTrivialContextMap(
+ &arena->context_map_arena, mb->distance_histograms_size,
BROTLI_DISTANCE_CONTEXT_BITS, tree, storage_ix, storage);
} else {
- EncodeContextMap(m,
+ EncodeContextMap(m, &arena->context_map_arena,
mb->distance_context_map, mb->distance_context_map_size,
mb->distance_histograms_size, tree, storage_ix, storage);
if (BROTLI_IS_OOM(m)) return;
}
- BuildAndStoreEntropyCodesLiteral(m, &literal_enc, mb->literal_histograms,
+ BuildAndStoreEntropyCodesLiteral(m, literal_enc, mb->literal_histograms,
mb->literal_histograms_size, BROTLI_NUM_LITERAL_SYMBOLS, tree,
storage_ix, storage);
if (BROTLI_IS_OOM(m)) return;
- BuildAndStoreEntropyCodesCommand(m, &command_enc, mb->command_histograms,
+ BuildAndStoreEntropyCodesCommand(m, command_enc, mb->command_histograms,
mb->command_histograms_size, BROTLI_NUM_COMMAND_SYMBOLS, tree,
storage_ix, storage);
if (BROTLI_IS_OOM(m)) return;
- BuildAndStoreEntropyCodesDistance(m, &distance_enc, mb->distance_histograms,
+ BuildAndStoreEntropyCodesDistance(m, distance_enc, mb->distance_histograms,
mb->distance_histograms_size, num_distance_symbols, tree,
storage_ix, storage);
if (BROTLI_IS_OOM(m)) return;
@@ -1016,12 +1035,12 @@ void BrotliStoreMetaBlock(MemoryManager* m,
for (i = 0; i < n_commands; ++i) {
const Command cmd = commands[i];
size_t cmd_code = cmd.cmd_prefix_;
- StoreSymbol(&command_enc, cmd_code, storage_ix, storage);
+ StoreSymbol(command_enc, cmd_code, storage_ix, storage);
StoreCommandExtra(&cmd, storage_ix, storage);
if (mb->literal_context_map_size == 0) {
size_t j;
for (j = cmd.insert_len_; j != 0; --j) {
- StoreSymbol(&literal_enc, input[pos & mask], storage_ix, storage);
+ StoreSymbol(literal_enc, input[pos & mask], storage_ix, storage);
++pos;
}
} else {
@@ -1030,7 +1049,7 @@ void BrotliStoreMetaBlock(MemoryManager* m,
size_t context =
BROTLI_CONTEXT(prev_byte, prev_byte2, literal_context_lut);
uint8_t literal = input[pos & mask];
- StoreSymbolWithContext(&literal_enc, literal, context,
+ StoreSymbolWithContext(literal_enc, literal, context,
mb->literal_context_map, storage_ix, storage,
BROTLI_LITERAL_CONTEXT_BITS);
prev_byte2 = prev_byte;
@@ -1047,10 +1066,10 @@ void BrotliStoreMetaBlock(MemoryManager* m,
uint32_t distnumextra = cmd.dist_prefix_ >> 10;
uint64_t distextra = cmd.dist_extra_;
if (mb->distance_context_map_size == 0) {
- StoreSymbol(&distance_enc, dist_code, storage_ix, storage);
+ StoreSymbol(distance_enc, dist_code, storage_ix, storage);
} else {
size_t context = CommandDistanceContext(&cmd);
- StoreSymbolWithContext(&distance_enc, dist_code, context,
+ StoreSymbolWithContext(distance_enc, dist_code, context,
mb->distance_context_map, storage_ix, storage,
BROTLI_DISTANCE_CONTEXT_BITS);
}
@@ -1058,9 +1077,10 @@ void BrotliStoreMetaBlock(MemoryManager* m,
}
}
}
- CleanupBlockEncoder(m, &distance_enc);
- CleanupBlockEncoder(m, &command_enc);
- CleanupBlockEncoder(m, &literal_enc);
+ CleanupBlockEncoder(m, distance_enc);
+ CleanupBlockEncoder(m, command_enc);
+ CleanupBlockEncoder(m, literal_enc);
+ BROTLI_FREE(m, arena);
if (is_last) {
JumpToByteBoundary(storage_ix, storage);
}
@@ -1131,54 +1151,60 @@ static void StoreDataWithHuffmanCodes(const uint8_t* input,
}
}
-void BrotliStoreMetaBlockTrivial(MemoryManager* m,
- const uint8_t* input, size_t start_pos, size_t length, size_t mask,
- BROTLI_BOOL is_last, const BrotliEncoderParams* params,
- const Command* commands, size_t n_commands,
- size_t* storage_ix, uint8_t* storage) {
+/* TODO(eustas): pull alloc/dealloc to caller? */
+typedef struct MetablockArena {
HistogramLiteral lit_histo;
HistogramCommand cmd_histo;
HistogramDistance dist_histo;
+ /* TODO(eustas): merge bits and depth? */
uint8_t lit_depth[BROTLI_NUM_LITERAL_SYMBOLS];
uint16_t lit_bits[BROTLI_NUM_LITERAL_SYMBOLS];
uint8_t cmd_depth[BROTLI_NUM_COMMAND_SYMBOLS];
uint16_t cmd_bits[BROTLI_NUM_COMMAND_SYMBOLS];
uint8_t dist_depth[MAX_SIMPLE_DISTANCE_ALPHABET_SIZE];
uint16_t dist_bits[MAX_SIMPLE_DISTANCE_ALPHABET_SIZE];
- HuffmanTree* tree;
+ HuffmanTree tree[MAX_HUFFMAN_TREE_SIZE];
+} MetablockArena;
+
+void BrotliStoreMetaBlockTrivial(MemoryManager* m,
+ const uint8_t* input, size_t start_pos, size_t length, size_t mask,
+ BROTLI_BOOL is_last, const BrotliEncoderParams* params,
+ const Command* commands, size_t n_commands,
+ size_t* storage_ix, uint8_t* storage) {
+ MetablockArena* arena = BROTLI_ALLOC(m, MetablockArena, 1);
uint32_t num_distance_symbols = params->dist.alphabet_size_max;
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(arena)) return;
StoreCompressedMetaBlockHeader(is_last, length, storage_ix, storage);
- HistogramClearLiteral(&lit_histo);
- HistogramClearCommand(&cmd_histo);
- HistogramClearDistance(&dist_histo);
+ HistogramClearLiteral(&arena->lit_histo);
+ HistogramClearCommand(&arena->cmd_histo);
+ HistogramClearDistance(&arena->dist_histo);
BuildHistograms(input, start_pos, mask, commands, n_commands,
- &lit_histo, &cmd_histo, &dist_histo);
+ &arena->lit_histo, &arena->cmd_histo, &arena->dist_histo);
BrotliWriteBits(13, 0, storage_ix, storage);
- tree = BROTLI_ALLOC(m, HuffmanTree, MAX_HUFFMAN_TREE_SIZE);
- if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(tree)) return;
- BuildAndStoreHuffmanTree(lit_histo.data_, BROTLI_NUM_LITERAL_SYMBOLS,
- BROTLI_NUM_LITERAL_SYMBOLS, tree,
- lit_depth, lit_bits,
+ BuildAndStoreHuffmanTree(arena->lit_histo.data_, BROTLI_NUM_LITERAL_SYMBOLS,
+ BROTLI_NUM_LITERAL_SYMBOLS, arena->tree,
+ arena->lit_depth, arena->lit_bits,
storage_ix, storage);
- BuildAndStoreHuffmanTree(cmd_histo.data_, BROTLI_NUM_COMMAND_SYMBOLS,
- BROTLI_NUM_COMMAND_SYMBOLS, tree,
- cmd_depth, cmd_bits,
+ BuildAndStoreHuffmanTree(arena->cmd_histo.data_, BROTLI_NUM_COMMAND_SYMBOLS,
+ BROTLI_NUM_COMMAND_SYMBOLS, arena->tree,
+ arena->cmd_depth, arena->cmd_bits,
storage_ix, storage);
- BuildAndStoreHuffmanTree(dist_histo.data_, MAX_SIMPLE_DISTANCE_ALPHABET_SIZE,
- num_distance_symbols, tree,
- dist_depth, dist_bits,
+ BuildAndStoreHuffmanTree(arena->dist_histo.data_,
+ MAX_SIMPLE_DISTANCE_ALPHABET_SIZE,
+ num_distance_symbols, arena->tree,
+ arena->dist_depth, arena->dist_bits,
storage_ix, storage);
- BROTLI_FREE(m, tree);
StoreDataWithHuffmanCodes(input, start_pos, mask, commands,
- n_commands, lit_depth, lit_bits,
- cmd_depth, cmd_bits,
- dist_depth, dist_bits,
+ n_commands, arena->lit_depth, arena->lit_bits,
+ arena->cmd_depth, arena->cmd_bits,
+ arena->dist_depth, arena->dist_bits,
storage_ix, storage);
+ BROTLI_FREE(m, arena);
if (is_last) {
JumpToByteBoundary(storage_ix, storage);
}
@@ -1189,9 +1215,11 @@ void BrotliStoreMetaBlockFast(MemoryManager* m,
BROTLI_BOOL is_last, const BrotliEncoderParams* params,
const Command* commands, size_t n_commands,
size_t* storage_ix, uint8_t* storage) {
+ MetablockArena* arena = BROTLI_ALLOC(m, MetablockArena, 1);
uint32_t num_distance_symbols = params->dist.alphabet_size_max;
uint32_t distance_alphabet_bits =
Log2FloorNonZero(num_distance_symbols - 1) + 1;
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(arena)) return;
StoreCompressedMetaBlockHeader(is_last, length, storage_ix, storage);
@@ -1202,8 +1230,6 @@ void BrotliStoreMetaBlockFast(MemoryManager* m,
size_t pos = start_pos;
size_t num_literals = 0;
size_t i;
- uint8_t lit_depth[BROTLI_NUM_LITERAL_SYMBOLS];
- uint16_t lit_bits[BROTLI_NUM_LITERAL_SYMBOLS];
for (i = 0; i < n_commands; ++i) {
const Command cmd = commands[i];
size_t j;
@@ -1214,61 +1240,50 @@ void BrotliStoreMetaBlockFast(MemoryManager* m,
num_literals += cmd.insert_len_;
pos += CommandCopyLen(&cmd);
}
- BrotliBuildAndStoreHuffmanTreeFast(m, histogram, num_literals,
+ BrotliBuildAndStoreHuffmanTreeFast(arena->tree, histogram, num_literals,
/* max_bits = */ 8,
- lit_depth, lit_bits,
+ arena->lit_depth, arena->lit_bits,
storage_ix, storage);
- if (BROTLI_IS_OOM(m)) return;
StoreStaticCommandHuffmanTree(storage_ix, storage);
StoreStaticDistanceHuffmanTree(storage_ix, storage);
StoreDataWithHuffmanCodes(input, start_pos, mask, commands,
- n_commands, lit_depth, lit_bits,
+ n_commands, arena->lit_depth, arena->lit_bits,
kStaticCommandCodeDepth,
kStaticCommandCodeBits,
kStaticDistanceCodeDepth,
kStaticDistanceCodeBits,
storage_ix, storage);
} else {
- HistogramLiteral lit_histo;
- HistogramCommand cmd_histo;
- HistogramDistance dist_histo;
- uint8_t lit_depth[BROTLI_NUM_LITERAL_SYMBOLS];
- uint16_t lit_bits[BROTLI_NUM_LITERAL_SYMBOLS];
- uint8_t cmd_depth[BROTLI_NUM_COMMAND_SYMBOLS];
- uint16_t cmd_bits[BROTLI_NUM_COMMAND_SYMBOLS];
- uint8_t dist_depth[MAX_SIMPLE_DISTANCE_ALPHABET_SIZE];
- uint16_t dist_bits[MAX_SIMPLE_DISTANCE_ALPHABET_SIZE];
- HistogramClearLiteral(&lit_histo);
- HistogramClearCommand(&cmd_histo);
- HistogramClearDistance(&dist_histo);
+ HistogramClearLiteral(&arena->lit_histo);
+ HistogramClearCommand(&arena->cmd_histo);
+ HistogramClearDistance(&arena->dist_histo);
BuildHistograms(input, start_pos, mask, commands, n_commands,
- &lit_histo, &cmd_histo, &dist_histo);
- BrotliBuildAndStoreHuffmanTreeFast(m, lit_histo.data_,
- lit_histo.total_count_,
+ &arena->lit_histo, &arena->cmd_histo, &arena->dist_histo);
+ BrotliBuildAndStoreHuffmanTreeFast(arena->tree, arena->lit_histo.data_,
+ arena->lit_histo.total_count_,
/* max_bits = */ 8,
- lit_depth, lit_bits,
+ arena->lit_depth, arena->lit_bits,
storage_ix, storage);
- if (BROTLI_IS_OOM(m)) return;
- BrotliBuildAndStoreHuffmanTreeFast(m, cmd_histo.data_,
- cmd_histo.total_count_,
+ BrotliBuildAndStoreHuffmanTreeFast(arena->tree, arena->cmd_histo.data_,
+ arena->cmd_histo.total_count_,
/* max_bits = */ 10,
- cmd_depth, cmd_bits,
+ arena->cmd_depth, arena->cmd_bits,
storage_ix, storage);
- if (BROTLI_IS_OOM(m)) return;
- BrotliBuildAndStoreHuffmanTreeFast(m, dist_histo.data_,
- dist_histo.total_count_,
+ BrotliBuildAndStoreHuffmanTreeFast(arena->tree, arena->dist_histo.data_,
+ arena->dist_histo.total_count_,
/* max_bits = */
distance_alphabet_bits,
- dist_depth, dist_bits,
+ arena->dist_depth, arena->dist_bits,
storage_ix, storage);
- if (BROTLI_IS_OOM(m)) return;
StoreDataWithHuffmanCodes(input, start_pos, mask, commands,
- n_commands, lit_depth, lit_bits,
- cmd_depth, cmd_bits,
- dist_depth, dist_bits,
+ n_commands, arena->lit_depth, arena->lit_bits,
+ arena->cmd_depth, arena->cmd_bits,
+ arena->dist_depth, arena->dist_bits,
storage_ix, storage);
}
+ BROTLI_FREE(m, arena);
+
if (is_last) {
JumpToByteBoundary(storage_ix, storage);
}
@@ -1309,6 +1324,13 @@ void BrotliStoreUncompressedMetaBlock(BROTLI_BOOL is_final_block,
}
}
+#if defined(BROTLI_TEST)
+void GetBlockLengthPrefixCodeForTest(uint32_t len, size_t* code,
+ uint32_t* n_extra, uint32_t* extra) {
+ GetBlockLengthPrefixCode(len, code, n_extra, extra);
+}
+#endif
+
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.h
index 2ed703bf799..a289509af35 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/brotli_bit_stream.h
@@ -16,13 +16,14 @@
#ifndef BROTLI_ENC_BROTLI_BIT_STREAM_H_
#define BROTLI_ENC_BROTLI_BIT_STREAM_H_
+#include <brotli/types.h>
+
#include "../common/context.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./command.h"
-#include "./entropy_encode.h"
-#include "./memory.h"
-#include "./metablock.h"
+#include "command.h"
+#include "entropy_encode.h"
+#include "memory.h"
+#include "metablock.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -35,7 +36,7 @@ BROTLI_INTERNAL void BrotliStoreHuffmanTree(const uint8_t* depths, size_t num,
HuffmanTree* tree, size_t* storage_ix, uint8_t* storage);
BROTLI_INTERNAL void BrotliBuildAndStoreHuffmanTreeFast(
- MemoryManager* m, const uint32_t* histogram, const size_t histogram_total,
+ HuffmanTree* tree, const uint32_t* histogram, const size_t histogram_total,
const size_t max_bits, uint8_t* depth, uint16_t* bits, size_t* storage_ix,
uint8_t* storage);
@@ -77,6 +78,10 @@ BROTLI_INTERNAL void BrotliStoreUncompressedMetaBlock(
size_t position, size_t mask, size_t len,
size_t* BROTLI_RESTRICT storage_ix, uint8_t* BROTLI_RESTRICT storage);
+#if defined(BROTLI_TEST)
+void GetBlockLengthPrefixCodeForTest(uint32_t, size_t*, uint32_t*, uint32_t*);
+#endif
+
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster.c
index a20dfd385ff..b0faf8114c5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster.c
@@ -6,14 +6,15 @@
/* Functions for clustering similar histograms together. */
-#include "./cluster.h"
+#include "cluster.h"
-#include "../common/platform.h"
#include <brotli/types.h>
-#include "./bit_cost.h" /* BrotliPopulationCost */
-#include "./fast_log.h"
-#include "./histogram.h"
-#include "./memory.h"
+
+#include "../common/platform.h"
+#include "bit_cost.h" /* BrotliPopulationCost */
+#include "fast_log.h"
+#include "histogram.h"
+#include "memory.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -38,15 +39,15 @@ static BROTLI_INLINE double ClusterCostDiff(size_t size_a, size_t size_b) {
#define CODE(X) X
#define FN(X) X ## Literal
-#include "./cluster_inc.h" /* NOLINT(build/include) */
+#include "cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Command
-#include "./cluster_inc.h" /* NOLINT(build/include) */
+#include "cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Distance
-#include "./cluster_inc.h" /* NOLINT(build/include) */
+#include "cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#undef CODE
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster.h
index bb26124d24d..013629c6d95 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster.h
@@ -9,10 +9,11 @@
#ifndef BROTLI_ENC_CLUSTER_H_
#define BROTLI_ENC_CLUSTER_H_
-#include "../common/platform.h"
#include <brotli/types.h>
-#include "./histogram.h"
-#include "./memory.h"
+
+#include "../common/platform.h"
+#include "histogram.h"
+#include "memory.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -28,15 +29,15 @@ typedef struct HistogramPair {
#define CODE(X) /* Declaration */;
#define FN(X) X ## Literal
-#include "./cluster_inc.h" /* NOLINT(build/include) */
+#include "cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Command
-#include "./cluster_inc.h" /* NOLINT(build/include) */
+#include "cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Distance
-#include "./cluster_inc.h" /* NOLINT(build/include) */
+#include "cluster_inc.h" /* NOLINT(build/include) */
#undef FN
#undef CODE
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster_inc.h
index 3d4f40e6012..d6215ef06e9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/cluster_inc.h
@@ -12,8 +12,8 @@
/* Computes the bit cost reduction by combining out[idx1] and out[idx2] and if
it is below a threshold, stores the pair (idx1, idx2) in the *pairs queue. */
BROTLI_INTERNAL void FN(BrotliCompareAndPushToQueue)(
- const HistogramType* out, const uint32_t* cluster_size, uint32_t idx1,
- uint32_t idx2, size_t max_num_pairs, HistogramPair* pairs,
+ const HistogramType* out, HistogramType* tmp, const uint32_t* cluster_size,
+ uint32_t idx1, uint32_t idx2, size_t max_num_pairs, HistogramPair* pairs,
size_t* num_pairs) CODE({
BROTLI_BOOL is_good_pair = BROTLI_FALSE;
HistogramPair p;
@@ -42,10 +42,10 @@ BROTLI_INTERNAL void FN(BrotliCompareAndPushToQueue)(
} else {
double threshold = *num_pairs == 0 ? 1e99 :
BROTLI_MAX(double, 0.0, pairs[0].cost_diff);
- HistogramType combo = out[idx1];
double cost_combo;
- FN(HistogramAddHistogram)(&combo, &out[idx2]);
- cost_combo = FN(BrotliPopulationCost)(&combo);
+ *tmp = out[idx1];
+ FN(HistogramAddHistogram)(tmp, &out[idx2]);
+ cost_combo = FN(BrotliPopulationCost)(tmp);
if (cost_combo < threshold - p.cost_diff) {
p.cost_combo = cost_combo;
is_good_pair = BROTLI_TRUE;
@@ -68,6 +68,7 @@ BROTLI_INTERNAL void FN(BrotliCompareAndPushToQueue)(
})
BROTLI_INTERNAL size_t FN(BrotliHistogramCombine)(HistogramType* out,
+ HistogramType* tmp,
uint32_t* cluster_size,
uint32_t* symbols,
uint32_t* clusters,
@@ -87,7 +88,7 @@ BROTLI_INTERNAL size_t FN(BrotliHistogramCombine)(HistogramType* out,
for (idx1 = 0; idx1 < num_clusters; ++idx1) {
size_t idx2;
for (idx2 = idx1 + 1; idx2 < num_clusters; ++idx2) {
- FN(BrotliCompareAndPushToQueue)(out, cluster_size, clusters[idx1],
+ FN(BrotliCompareAndPushToQueue)(out, tmp, cluster_size, clusters[idx1],
clusters[idx2], max_num_pairs, &pairs[0], &num_pairs);
}
}
@@ -146,8 +147,8 @@ BROTLI_INTERNAL size_t FN(BrotliHistogramCombine)(HistogramType* out,
/* Push new pairs formed with the combined histogram to the heap. */
for (i = 0; i < num_clusters; ++i) {
- FN(BrotliCompareAndPushToQueue)(out, cluster_size, best_idx1, clusters[i],
- max_num_pairs, &pairs[0], &num_pairs);
+ FN(BrotliCompareAndPushToQueue)(out, tmp, cluster_size, best_idx1,
+ clusters[i], max_num_pairs, &pairs[0], &num_pairs);
}
}
return num_clusters;
@@ -155,13 +156,14 @@ BROTLI_INTERNAL size_t FN(BrotliHistogramCombine)(HistogramType* out,
/* What is the bit cost of moving histogram from cur_symbol to candidate. */
BROTLI_INTERNAL double FN(BrotliHistogramBitCostDistance)(
- const HistogramType* histogram, const HistogramType* candidate) CODE({
+ const HistogramType* histogram, const HistogramType* candidate,
+ HistogramType* tmp) CODE({
if (histogram->total_count_ == 0) {
return 0.0;
} else {
- HistogramType tmp = *histogram;
- FN(HistogramAddHistogram)(&tmp, candidate);
- return FN(BrotliPopulationCost)(&tmp) - candidate->bit_cost_;
+ *tmp = *histogram;
+ FN(HistogramAddHistogram)(tmp, candidate);
+ return FN(BrotliPopulationCost)(tmp) - candidate->bit_cost_;
}
})
@@ -171,16 +173,16 @@ BROTLI_INTERNAL double FN(BrotliHistogramBitCostDistance)(
Note: we assume that out[]->bit_cost_ is already up-to-date. */
BROTLI_INTERNAL void FN(BrotliHistogramRemap)(const HistogramType* in,
size_t in_size, const uint32_t* clusters, size_t num_clusters,
- HistogramType* out, uint32_t* symbols) CODE({
+ HistogramType* out, HistogramType* tmp, uint32_t* symbols) CODE({
size_t i;
for (i = 0; i < in_size; ++i) {
uint32_t best_out = i == 0 ? symbols[0] : symbols[i - 1];
double best_bits =
- FN(BrotliHistogramBitCostDistance)(&in[i], &out[best_out]);
+ FN(BrotliHistogramBitCostDistance)(&in[i], &out[best_out], tmp);
size_t j;
for (j = 0; j < num_clusters; ++j) {
const double cur_bits =
- FN(BrotliHistogramBitCostDistance)(&in[i], &out[clusters[j]]);
+ FN(BrotliHistogramBitCostDistance)(&in[i], &out[clusters[j]], tmp);
if (cur_bits < best_bits) {
best_bits = cur_bits;
best_out = clusters[j];
@@ -226,7 +228,7 @@ BROTLI_INTERNAL size_t FN(BrotliHistogramReindex)(MemoryManager* m,
++next_index;
}
}
- /* TODO: by using idea of "cycle-sort" we can avoid allocation of
+ /* TODO(eustas): by using idea of "cycle-sort" we can avoid allocation of
tmp and reduce the number of copying by the factor of 2. */
tmp = BROTLI_ALLOC(m, HistogramType, next_index);
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(tmp)) return 0;
@@ -257,10 +259,12 @@ BROTLI_INTERNAL void FN(BrotliClusterHistograms)(
size_t pairs_capacity = max_input_histograms * max_input_histograms / 2;
/* For the first pass of clustering, we allow all pairs. */
HistogramPair* pairs = BROTLI_ALLOC(m, HistogramPair, pairs_capacity + 1);
+ /* TODO(eustas): move to "persistent" arena? */
+ HistogramType* tmp = BROTLI_ALLOC(m, HistogramType, 1);
size_t i;
if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(cluster_size) ||
- BROTLI_IS_NULL(clusters) || BROTLI_IS_NULL(pairs)) {
+ BROTLI_IS_NULL(clusters) || BROTLI_IS_NULL(pairs)|| BROTLI_IS_NULL(tmp)) {
return;
}
@@ -283,7 +287,7 @@ BROTLI_INTERNAL void FN(BrotliClusterHistograms)(
clusters[num_clusters + j] = (uint32_t)(i + j);
}
num_new_clusters =
- FN(BrotliHistogramCombine)(out, cluster_size,
+ FN(BrotliHistogramCombine)(out, tmp, cluster_size,
&histogram_symbols[i],
&clusters[num_clusters], pairs,
num_to_combine, num_to_combine,
@@ -301,7 +305,7 @@ BROTLI_INTERNAL void FN(BrotliClusterHistograms)(
if (BROTLI_IS_OOM(m)) return;
/* Collapse similar histograms. */
- num_clusters = FN(BrotliHistogramCombine)(out, cluster_size,
+ num_clusters = FN(BrotliHistogramCombine)(out, tmp, cluster_size,
histogram_symbols, clusters,
pairs, num_clusters, in_size,
max_histograms, max_num_pairs);
@@ -310,7 +314,8 @@ BROTLI_INTERNAL void FN(BrotliClusterHistograms)(
BROTLI_FREE(m, cluster_size);
/* Find the optimal map from original histograms to the final ones. */
FN(BrotliHistogramRemap)(in, in_size, clusters, num_clusters,
- out, histogram_symbols);
+ out, tmp, histogram_symbols);
+ BROTLI_FREE(m, tmp);
BROTLI_FREE(m, clusters);
/* Convert the context map to a canonical form. */
*out_size = FN(BrotliHistogramReindex)(m, out, histogram_symbols, in_size);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.c
index 5e6c2491962..bf80561bcab 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.c
@@ -4,7 +4,7 @@
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
-#include "./command.h"
+#include "command.h"
#include <brotli/types.h>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.h
index d84e373d003..ba4de7eab3b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/command.h
@@ -9,12 +9,13 @@
#ifndef BROTLI_ENC_COMMAND_H_
#define BROTLI_ENC_COMMAND_H_
+#include <brotli/types.h>
+
#include "../common/constants.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./fast_log.h"
-#include "./params.h"
-#include "./prefix.h"
+#include "fast_log.h"
+#include "params.h"
+#include "prefix.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compound_dictionary.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compound_dictionary.c
new file mode 100644
index 00000000000..a3b5e6933dd
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compound_dictionary.c
@@ -0,0 +1,207 @@
+/* Copyright 2017 Google Inc. All Rights Reserved.
+
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+#include "compound_dictionary.h"
+
+#include <brotli/types.h>
+
+#include "../common/platform.h"
+#include "memory.h"
+#include "quality.h"
+
+static PreparedDictionary* CreatePreparedDictionaryWithParams(MemoryManager* m,
+ const uint8_t* source, size_t source_size, uint32_t bucket_bits,
+ uint32_t slot_bits, uint32_t hash_bits, uint16_t bucket_limit) {
+ /* Step 1: create "bloated" hasher. */
+ uint32_t num_slots = 1u << slot_bits;
+ uint32_t num_buckets = 1u << bucket_bits;
+ uint32_t hash_shift = 64u - bucket_bits;
+ uint64_t hash_mask = (~((uint64_t)0U)) >> (64 - hash_bits);
+ uint32_t slot_mask = num_slots - 1;
+ size_t alloc_size = (sizeof(uint32_t) << slot_bits) +
+ (sizeof(uint32_t) << slot_bits) +
+ (sizeof(uint16_t) << bucket_bits) +
+ (sizeof(uint32_t) << bucket_bits) +
+ (sizeof(uint32_t) * source_size);
+ uint8_t* flat = NULL;
+ PreparedDictionary* result = NULL;
+ uint16_t* num = NULL;
+ uint32_t* bucket_heads = NULL;
+ uint32_t* next_bucket = NULL;
+ uint32_t* slot_offsets = NULL;
+ uint16_t* heads = NULL;
+ uint32_t* items = NULL;
+ uint8_t** source_ref = NULL;
+ uint32_t i;
+ uint32_t* slot_size = NULL;
+ uint32_t* slot_limit = NULL;
+ uint32_t total_items = 0;
+ if (slot_bits > 16) return NULL;
+ if (slot_bits > bucket_bits) return NULL;
+ if (bucket_bits - slot_bits >= 16) return NULL;
+
+ flat = BROTLI_ALLOC(m, uint8_t, alloc_size);
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(flat)) return NULL;
+
+ slot_size = (uint32_t*)flat;
+ slot_limit = (uint32_t*)(&slot_size[num_slots]);
+ num = (uint16_t*)(&slot_limit[num_slots]);
+ bucket_heads = (uint32_t*)(&num[num_buckets]);
+ next_bucket = (uint32_t*)(&bucket_heads[num_buckets]);
+ memset(num, 0, num_buckets * sizeof(num[0]));
+
+ /* TODO(eustas): apply custom "store" order. */
+ for (i = 0; i + 7 < source_size; ++i) {
+ const uint64_t h = (BROTLI_UNALIGNED_LOAD64LE(&source[i]) & hash_mask) *
+ kPreparedDictionaryHashMul64Long;
+ const uint32_t key = (uint32_t)(h >> hash_shift);
+ uint16_t count = num[key];
+ next_bucket[i] = (count == 0) ? ((uint32_t)(-1)) : bucket_heads[key];
+ bucket_heads[key] = i;
+ count++;
+ if (count > bucket_limit) count = bucket_limit;
+ num[key] = count;
+ }
+
+ /* Step 2: find slot limits. */
+ for (i = 0; i < num_slots; ++i) {
+ BROTLI_BOOL overflow = BROTLI_FALSE;
+ slot_limit[i] = bucket_limit;
+ while (BROTLI_TRUE) {
+ uint32_t limit = slot_limit[i];
+ size_t j;
+ uint32_t count = 0;
+ overflow = BROTLI_FALSE;
+ for (j = i; j < num_buckets; j += num_slots) {
+ uint32_t size = num[j];
+ /* Last chain may span behind 64K limit; overflow happens only if
+ we are about to use 0xFFFF+ as item offset. */
+ if (count >= 0xFFFF) {
+ overflow = BROTLI_TRUE;
+ break;
+ }
+ if (size > limit) size = limit;
+ count += size;
+ }
+ if (!overflow) {
+ slot_size[i] = count;
+ total_items += count;
+ break;
+ }
+ slot_limit[i]--;
+ }
+ }
+
+ /* Step 3: transfer data to "slim" hasher. */
+ alloc_size = sizeof(PreparedDictionary) + (sizeof(uint32_t) << slot_bits) +
+ (sizeof(uint16_t) << bucket_bits) + (sizeof(uint32_t) * total_items) +
+ sizeof(uint8_t*);
+
+ result = (PreparedDictionary*)BROTLI_ALLOC(m, uint8_t, alloc_size);
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(result)) {
+ BROTLI_FREE(m, flat);
+ return NULL;
+ }
+ slot_offsets = (uint32_t*)(&result[1]);
+ heads = (uint16_t*)(&slot_offsets[num_slots]);
+ items = (uint32_t*)(&heads[num_buckets]);
+ source_ref = (uint8_t**)(&items[total_items]);
+
+ result->magic = kLeanPreparedDictionaryMagic;
+ result->num_items = total_items;
+ result->source_size = (uint32_t)source_size;
+ result->hash_bits = hash_bits;
+ result->bucket_bits = bucket_bits;
+ result->slot_bits = slot_bits;
+ BROTLI_UNALIGNED_STORE_PTR(source_ref, source);
+
+ total_items = 0;
+ for (i = 0; i < num_slots; ++i) {
+ slot_offsets[i] = total_items;
+ total_items += slot_size[i];
+ slot_size[i] = 0;
+ }
+ for (i = 0; i < num_buckets; ++i) {
+ uint32_t slot = i & slot_mask;
+ uint32_t count = num[i];
+ uint32_t pos;
+ size_t j;
+ size_t cursor = slot_size[slot];
+ if (count > slot_limit[slot]) count = slot_limit[slot];
+ if (count == 0) {
+ heads[i] = 0xFFFF;
+ continue;
+ }
+ heads[i] = (uint16_t)cursor;
+ cursor += slot_offsets[slot];
+ slot_size[slot] += count;
+ pos = bucket_heads[i];
+ for (j = 0; j < count; j++) {
+ items[cursor++] = pos;
+ pos = next_bucket[pos];
+ }
+ items[cursor - 1] |= 0x80000000;
+ }
+
+ BROTLI_FREE(m, flat);
+ return result;
+}
+
+PreparedDictionary* CreatePreparedDictionary(MemoryManager* m,
+ const uint8_t* source, size_t source_size) {
+ uint32_t bucket_bits = 17;
+ uint32_t slot_bits = 7;
+ uint32_t hash_bits = 40;
+ uint16_t bucket_limit = 32;
+ size_t volume = 16u << bucket_bits;
+ /* Tune parameters to fit dictionary size. */
+ while (volume < source_size && bucket_bits < 22) {
+ bucket_bits++;
+ slot_bits++;
+ volume <<= 1;
+ }
+ return CreatePreparedDictionaryWithParams(m,
+ source, source_size, bucket_bits, slot_bits, hash_bits, bucket_limit);
+}
+
+void DestroyPreparedDictionary(MemoryManager* m,
+ PreparedDictionary* dictionary) {
+ if (!dictionary) return;
+ BROTLI_FREE(m, dictionary);
+}
+
+BROTLI_BOOL AttachPreparedDictionary(
+ CompoundDictionary* compound, const PreparedDictionary* dictionary) {
+ size_t length = 0;
+ size_t index = 0;
+
+ if (compound->num_chunks == SHARED_BROTLI_MAX_COMPOUND_DICTS) {
+ return BROTLI_FALSE;
+ }
+
+ if (!dictionary) return BROTLI_FALSE;
+
+ length = dictionary->source_size;
+ index = compound->num_chunks;
+ compound->total_size += length;
+ compound->chunks[index] = dictionary;
+ compound->chunk_offsets[index + 1] = compound->total_size;
+ {
+ uint32_t* slot_offsets = (uint32_t*)(&dictionary[1]);
+ uint16_t* heads = (uint16_t*)(&slot_offsets[1u << dictionary->slot_bits]);
+ uint32_t* items = (uint32_t*)(&heads[1u << dictionary->bucket_bits]);
+ const void* tail = (void*)&items[dictionary->num_items];
+ if (dictionary->magic == kPreparedDictionaryMagic) {
+ compound->chunk_source[index] = (const uint8_t*)tail;
+ } else {
+ /* dictionary->magic == kLeanPreparedDictionaryMagic */
+ compound->chunk_source[index] =
+ (const uint8_t*)BROTLI_UNALIGNED_LOAD_PTR((const uint8_t**)tail);
+ }
+ }
+ compound->num_chunks++;
+ return BROTLI_TRUE;
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compound_dictionary.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compound_dictionary.h
new file mode 100644
index 00000000000..9c531d5b194
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compound_dictionary.h
@@ -0,0 +1,74 @@
+/* Copyright 2017 Google Inc. All Rights Reserved.
+
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+#ifndef BROTLI_ENC_PREPARED_DICTIONARY_H_
+#define BROTLI_ENC_PREPARED_DICTIONARY_H_
+
+#include <brotli/shared_dictionary.h>
+#include <brotli/types.h>
+
+#include "../common/platform.h"
+#include "../common/constants.h"
+#include "memory.h"
+
+/* "Fat" prepared dictionary, could be cooked outside of C implementation,
+ * e.g. on Java side. LZ77 data is copied inside PreparedDictionary struct. */
+static const uint32_t kPreparedDictionaryMagic = 0xDEBCEDE0;
+
+static const uint32_t kSharedDictionaryMagic = 0xDEBCEDE1;
+
+static const uint32_t kManagedDictionaryMagic = 0xDEBCEDE2;
+
+/* "Lean" prepared dictionary. LZ77 data is referenced. It is the responsibility
+ * of caller of "prepare dictionary" to keep the LZ77 data while prepared
+ * dictionary is in use. */
+static const uint32_t kLeanPreparedDictionaryMagic = 0xDEBCEDE3;
+
+static const uint64_t kPreparedDictionaryHashMul64Long =
+ BROTLI_MAKE_UINT64_T(0x1FE35A7Bu, 0xD3579BD3u);
+
+typedef struct PreparedDictionary {
+ uint32_t magic;
+ uint32_t num_items;
+ uint32_t source_size;
+ uint32_t hash_bits;
+ uint32_t bucket_bits;
+ uint32_t slot_bits;
+
+ /* --- Dynamic size members --- */
+
+ /* uint32_t slot_offsets[1 << slot_bits]; */
+ /* uint16_t heads[1 << bucket_bits]; */
+ /* uint32_t items[variable]; */
+
+ /* [maybe] uint8_t* source_ref, depending on magic. */
+ /* [maybe] uint8_t source[source_size], depending on magic. */
+} PreparedDictionary;
+
+BROTLI_INTERNAL PreparedDictionary* CreatePreparedDictionary(MemoryManager* m,
+ const uint8_t* source, size_t source_size);
+
+BROTLI_INTERNAL void DestroyPreparedDictionary(MemoryManager* m,
+ PreparedDictionary* dictionary);
+
+typedef struct CompoundDictionary {
+ /* LZ77 prefix, compound dictionary */
+ size_t num_chunks;
+ size_t total_size;
+ /* Client instances. */
+ const PreparedDictionary* chunks[SHARED_BROTLI_MAX_COMPOUND_DICTS + 1];
+ const uint8_t* chunk_source[SHARED_BROTLI_MAX_COMPOUND_DICTS + 1];
+ size_t chunk_offsets[SHARED_BROTLI_MAX_COMPOUND_DICTS + 1];
+
+ size_t num_prepared_instances_;
+ /* Owned instances. */
+ PreparedDictionary* prepared_instances_[SHARED_BROTLI_MAX_COMPOUND_DICTS + 1];
+} CompoundDictionary;
+
+BROTLI_INTERNAL BROTLI_BOOL AttachPreparedDictionary(
+ CompoundDictionary* compound, const PreparedDictionary* dictionary);
+
+#endif /* BROTLI_ENC_PREPARED_DICTIONARY */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.c
index 9e50b2098a0..13890eabf62 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.c
@@ -12,19 +12,18 @@
Adapted from the CompressFragment() function in
https://github.com/google/snappy/blob/master/snappy.cc */
-#include "./compress_fragment.h"
+#include "compress_fragment.h"
#include <string.h> /* memcmp, memcpy, memset */
-#include "../common/constants.h"
-#include "../common/platform.h"
#include <brotli/types.h>
-#include "./brotli_bit_stream.h"
-#include "./entropy_encode.h"
-#include "./fast_log.h"
-#include "./find_match_length.h"
-#include "./memory.h"
-#include "./write_bits.h"
+
+#include "../common/platform.h"
+#include "brotli_bit_stream.h"
+#include "entropy_encode.h"
+#include "fast_log.h"
+#include "find_match_length.h"
+#include "write_bits.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -69,16 +68,18 @@ static BROTLI_INLINE BROTLI_BOOL IsMatch(const uint8_t* p1, const uint8_t* p2) {
and thus have to assign a non-zero depth for each literal.
Returns estimated compression ratio millibytes/char for encoding given input
with generated code. */
-static size_t BuildAndStoreLiteralPrefixCode(MemoryManager* m,
+static size_t BuildAndStoreLiteralPrefixCode(BrotliOnePassArena* s,
const uint8_t* input,
const size_t input_size,
uint8_t depths[256],
uint16_t bits[256],
size_t* storage_ix,
uint8_t* storage) {
- uint32_t histogram[256] = { 0 };
+ uint32_t* BROTLI_RESTRICT const histogram = s->histogram;
size_t histogram_total;
size_t i;
+ memset(histogram, 0, sizeof(s->histogram));
+
if (input_size < (1 << 15)) {
for (i = 0; i < input_size; ++i) {
++histogram[input[i]];
@@ -108,10 +109,9 @@ static size_t BuildAndStoreLiteralPrefixCode(MemoryManager* m,
histogram_total += adjust;
}
}
- BrotliBuildAndStoreHuffmanTreeFast(m, histogram, histogram_total,
+ BrotliBuildAndStoreHuffmanTreeFast(s->tree, histogram, histogram_total,
/* max_bits = */ 8,
depths, bits, storage_ix, storage);
- if (BROTLI_IS_OOM(m)) return 0;
{
size_t literal_ratio = 0;
for (i = 0; i < 256; ++i) {
@@ -124,53 +124,56 @@ static size_t BuildAndStoreLiteralPrefixCode(MemoryManager* m,
/* Builds a command and distance prefix code (each 64 symbols) into "depth" and
"bits" based on "histogram" and stores it into the bit stream. */
-static void BuildAndStoreCommandPrefixCode(const uint32_t histogram[128],
- uint8_t depth[128], uint16_t bits[128], size_t* storage_ix,
- uint8_t* storage) {
- /* Tree size for building a tree over 64 symbols is 2 * 64 + 1. */
- HuffmanTree tree[129];
- uint8_t cmd_depth[BROTLI_NUM_COMMAND_SYMBOLS] = { 0 };
- uint16_t cmd_bits[64];
-
- BrotliCreateHuffmanTree(histogram, 64, 15, tree, depth);
- BrotliCreateHuffmanTree(&histogram[64], 64, 14, tree, &depth[64]);
+static void BuildAndStoreCommandPrefixCode(BrotliOnePassArena* s,
+ size_t* storage_ix, uint8_t* storage) {
+ const uint32_t* const histogram = s->cmd_histo;
+ uint8_t* const depth = s->cmd_depth;
+ uint16_t* const bits = s->cmd_bits;
+ uint8_t* BROTLI_RESTRICT const tmp_depth = s->tmp_depth;
+ uint16_t* BROTLI_RESTRICT const tmp_bits = s->tmp_bits;
+ /* TODO(eustas): do only once on initialization. */
+ memset(tmp_depth, 0, BROTLI_NUM_COMMAND_SYMBOLS);
+
+ BrotliCreateHuffmanTree(histogram, 64, 15, s->tree, depth);
+ BrotliCreateHuffmanTree(&histogram[64], 64, 14, s->tree, &depth[64]);
/* We have to jump through a few hoops here in order to compute
the command bits because the symbols are in a different order than in
the full alphabet. This looks complicated, but having the symbols
in this order in the command bits saves a few branches in the Emit*
functions. */
- memcpy(cmd_depth, depth, 24);
- memcpy(cmd_depth + 24, depth + 40, 8);
- memcpy(cmd_depth + 32, depth + 24, 8);
- memcpy(cmd_depth + 40, depth + 48, 8);
- memcpy(cmd_depth + 48, depth + 32, 8);
- memcpy(cmd_depth + 56, depth + 56, 8);
- BrotliConvertBitDepthsToSymbols(cmd_depth, 64, cmd_bits);
- memcpy(bits, cmd_bits, 48);
- memcpy(bits + 24, cmd_bits + 32, 16);
- memcpy(bits + 32, cmd_bits + 48, 16);
- memcpy(bits + 40, cmd_bits + 24, 16);
- memcpy(bits + 48, cmd_bits + 40, 16);
- memcpy(bits + 56, cmd_bits + 56, 16);
+ memcpy(tmp_depth, depth, 24);
+ memcpy(tmp_depth + 24, depth + 40, 8);
+ memcpy(tmp_depth + 32, depth + 24, 8);
+ memcpy(tmp_depth + 40, depth + 48, 8);
+ memcpy(tmp_depth + 48, depth + 32, 8);
+ memcpy(tmp_depth + 56, depth + 56, 8);
+ BrotliConvertBitDepthsToSymbols(tmp_depth, 64, tmp_bits);
+ memcpy(bits, tmp_bits, 48);
+ memcpy(bits + 24, tmp_bits + 32, 16);
+ memcpy(bits + 32, tmp_bits + 48, 16);
+ memcpy(bits + 40, tmp_bits + 24, 16);
+ memcpy(bits + 48, tmp_bits + 40, 16);
+ memcpy(bits + 56, tmp_bits + 56, 16);
BrotliConvertBitDepthsToSymbols(&depth[64], 64, &bits[64]);
{
/* Create the bit length array for the full command alphabet. */
size_t i;
- memset(cmd_depth, 0, 64); /* only 64 first values were used */
- memcpy(cmd_depth, depth, 8);
- memcpy(cmd_depth + 64, depth + 8, 8);
- memcpy(cmd_depth + 128, depth + 16, 8);
- memcpy(cmd_depth + 192, depth + 24, 8);
- memcpy(cmd_depth + 384, depth + 32, 8);
+ memset(tmp_depth, 0, 64); /* only 64 first values were used */
+ memcpy(tmp_depth, depth, 8);
+ memcpy(tmp_depth + 64, depth + 8, 8);
+ memcpy(tmp_depth + 128, depth + 16, 8);
+ memcpy(tmp_depth + 192, depth + 24, 8);
+ memcpy(tmp_depth + 384, depth + 32, 8);
for (i = 0; i < 8; ++i) {
- cmd_depth[128 + 8 * i] = depth[40 + i];
- cmd_depth[256 + 8 * i] = depth[48 + i];
- cmd_depth[448 + 8 * i] = depth[56 + i];
+ tmp_depth[128 + 8 * i] = depth[40 + i];
+ tmp_depth[256 + 8 * i] = depth[48 + i];
+ tmp_depth[448 + 8 * i] = depth[56 + i];
}
+ /* TODO(eustas): could/should full-length machinery be avoided? */
BrotliStoreHuffmanTree(
- cmd_depth, BROTLI_NUM_COMMAND_SYMBOLS, tree, storage_ix, storage);
+ tmp_depth, BROTLI_NUM_COMMAND_SYMBOLS, s->tree, storage_ix, storage);
}
- BrotliStoreHuffmanTree(&depth[64], 64, tree, storage_ix, storage);
+ BrotliStoreHuffmanTree(&depth[64], 64, s->tree, storage_ix, storage);
}
/* REQUIRES: insertlen < 6210 */
@@ -369,11 +372,12 @@ static void RewindBitPosition(const size_t new_storage_ix,
*storage_ix = new_storage_ix;
}
-static BROTLI_BOOL ShouldMergeBlock(
+static BROTLI_BOOL ShouldMergeBlock(BrotliOnePassArena* s,
const uint8_t* data, size_t len, const uint8_t* depths) {
- size_t histo[256] = { 0 };
+ uint32_t* BROTLI_RESTRICT const histo = s->histogram;
static const size_t kSampleRate = 43;
size_t i;
+ memset(histo, 0, sizeof(s->histogram));
for (i = 0; i < len; i += kSampleRate) {
++histo[data[i]];
}
@@ -423,11 +427,14 @@ static uint32_t kCmdHistoSeed[128] = {
};
static BROTLI_INLINE void BrotliCompressFragmentFastImpl(
- MemoryManager* m, const uint8_t* input, size_t input_size,
- BROTLI_BOOL is_last, int* table, size_t table_bits, uint8_t cmd_depth[128],
- uint16_t cmd_bits[128], size_t* cmd_code_numbits, uint8_t* cmd_code,
+ BrotliOnePassArena* s, const uint8_t* input, size_t input_size,
+ BROTLI_BOOL is_last, int* table, size_t table_bits,
size_t* storage_ix, uint8_t* storage) {
- uint32_t cmd_histo[128];
+ uint8_t* BROTLI_RESTRICT const cmd_depth = s->cmd_depth;
+ uint16_t* BROTLI_RESTRICT const cmd_bits = s->cmd_bits;
+ uint32_t* BROTLI_RESTRICT const cmd_histo = s->cmd_histo;
+ uint8_t* BROTLI_RESTRICT const lit_depth = s->lit_depth;
+ uint16_t* BROTLI_RESTRICT const lit_bits = s->lit_bits;
const uint8_t* ip_end;
/* "next_emit" is a pointer to the first byte that is not covered by a
@@ -451,9 +458,6 @@ static BROTLI_INLINE void BrotliCompressFragmentFastImpl(
we can update it later if we decide to extend this meta-block. */
size_t mlen_storage_ix = *storage_ix + 3;
- uint8_t lit_depth[256];
- uint16_t lit_bits[256];
-
size_t literal_ratio;
const uint8_t* ip;
@@ -466,25 +470,24 @@ static BROTLI_INLINE void BrotliCompressFragmentFastImpl(
BrotliWriteBits(13, 0, storage_ix, storage);
literal_ratio = BuildAndStoreLiteralPrefixCode(
- m, input, block_size, lit_depth, lit_bits, storage_ix, storage);
- if (BROTLI_IS_OOM(m)) return;
+ s, input, block_size, s->lit_depth, s->lit_bits, storage_ix, storage);
{
/* Store the pre-compressed command and distance prefix codes. */
size_t i;
- for (i = 0; i + 7 < *cmd_code_numbits; i += 8) {
- BrotliWriteBits(8, cmd_code[i >> 3], storage_ix, storage);
+ for (i = 0; i + 7 < s->cmd_code_numbits; i += 8) {
+ BrotliWriteBits(8, s->cmd_code[i >> 3], storage_ix, storage);
}
}
- BrotliWriteBits(*cmd_code_numbits & 7, cmd_code[*cmd_code_numbits >> 3],
- storage_ix, storage);
+ BrotliWriteBits(s->cmd_code_numbits & 7,
+ s->cmd_code[s->cmd_code_numbits >> 3], storage_ix, storage);
emit_commands:
/* Initialize the command and distance histograms. We will gather
statistics of command and distance codes during the processing
of this block and use it to update the command and distance
prefix codes for the next block. */
- memcpy(cmd_histo, kCmdHistoSeed, sizeof(kCmdHistoSeed));
+ memcpy(s->cmd_histo, kCmdHistoSeed, sizeof(kCmdHistoSeed));
/* "ip" is the input pointer. */
ip = input;
@@ -565,6 +568,8 @@ trawl:
int distance = (int)(base - candidate); /* > 0 */
size_t insert = (size_t)(base - next_emit);
ip += matched;
+ BROTLI_LOG(("[CompressFragment] pos = %d insert = %lu copy = %d\n",
+ (int)(next_emit - base_ip), (unsigned long)insert, 2));
BROTLI_DCHECK(0 == memcmp(base, candidate, matched));
if (BROTLI_PREDICT_TRUE(insert < 6210)) {
EmitInsertLen(insert, cmd_depth, cmd_bits, cmd_histo,
@@ -593,6 +598,12 @@ trawl:
}
EmitCopyLenLastDistance(matched, cmd_depth, cmd_bits, cmd_histo,
storage_ix, storage);
+ BROTLI_LOG(("[CompressFragment] pos = %d distance = %d\n"
+ "[CompressFragment] pos = %d insert = %d copy = %d\n"
+ "[CompressFragment] pos = %d distance = %d\n",
+ (int)(base - base_ip), (int)distance,
+ (int)(base - base_ip) + 2, 0, (int)matched - 2,
+ (int)(base - base_ip) + 2, (int)distance));
next_emit = ip;
if (BROTLI_PREDICT_FALSE(ip >= ip_limit)) {
@@ -630,6 +641,10 @@ trawl:
storage_ix, storage);
EmitDistance((size_t)last_distance, cmd_depth, cmd_bits,
cmd_histo, storage_ix, storage);
+ BROTLI_LOG(("[CompressFragment] pos = %d insert = %d copy = %d\n"
+ "[CompressFragment] pos = %d distance = %d\n",
+ (int)(base - base_ip), 0, (int)matched,
+ (int)(base - base_ip), (int)last_distance));
next_emit = ip;
if (BROTLI_PREDICT_FALSE(ip >= ip_limit)) {
@@ -667,7 +682,7 @@ trawl:
last insert-only command. */
if (input_size > 0 &&
total_block_size + block_size <= (1 << 20) &&
- ShouldMergeBlock(input, block_size, lit_depth)) {
+ ShouldMergeBlock(s, input, block_size, lit_depth)) {
BROTLI_DCHECK(total_block_size > (1 << 16));
/* Update the size of the current meta-block and continue emitting commands.
We can do this because the current size and the new size both have 5
@@ -680,6 +695,8 @@ trawl:
/* Emit the remaining bytes as literals. */
if (next_emit < ip_end) {
const size_t insert = (size_t)(ip_end - next_emit);
+ BROTLI_LOG(("[CompressFragment] pos = %d insert = %lu copy = %d\n",
+ (int)(next_emit - base_ip), (unsigned long)insert, 2));
if (BROTLI_PREDICT_TRUE(insert < 6210)) {
EmitInsertLen(insert, cmd_depth, cmd_bits, cmd_histo,
storage_ix, storage);
@@ -711,20 +728,17 @@ next_block:
/* No block splits, no contexts. */
BrotliWriteBits(13, 0, storage_ix, storage);
literal_ratio = BuildAndStoreLiteralPrefixCode(
- m, input, block_size, lit_depth, lit_bits, storage_ix, storage);
- if (BROTLI_IS_OOM(m)) return;
- BuildAndStoreCommandPrefixCode(cmd_histo, cmd_depth, cmd_bits,
- storage_ix, storage);
+ s, input, block_size, lit_depth, lit_bits, storage_ix, storage);
+ BuildAndStoreCommandPrefixCode(s, storage_ix, storage);
goto emit_commands;
}
if (!is_last) {
/* If this is not the last block, update the command and distance prefix
codes for the next block and store the compressed forms. */
- cmd_code[0] = 0;
- *cmd_code_numbits = 0;
- BuildAndStoreCommandPrefixCode(cmd_histo, cmd_depth, cmd_bits,
- cmd_code_numbits, cmd_code);
+ s->cmd_code[0] = 0;
+ s->cmd_code_numbits = 0;
+ BuildAndStoreCommandPrefixCode(s, &s->cmd_code_numbits, s->cmd_code);
}
}
@@ -732,20 +746,17 @@ next_block:
#define BAKE_METHOD_PARAM_(B) \
static BROTLI_NOINLINE void BrotliCompressFragmentFastImpl ## B( \
- MemoryManager* m, const uint8_t* input, size_t input_size, \
- BROTLI_BOOL is_last, int* table, uint8_t cmd_depth[128], \
- uint16_t cmd_bits[128], size_t* cmd_code_numbits, uint8_t* cmd_code, \
- size_t* storage_ix, uint8_t* storage) { \
- BrotliCompressFragmentFastImpl(m, input, input_size, is_last, table, B, \
- cmd_depth, cmd_bits, cmd_code_numbits, cmd_code, storage_ix, storage); \
+ BrotliOnePassArena* s, const uint8_t* input, size_t input_size, \
+ BROTLI_BOOL is_last, int* table, size_t* storage_ix, uint8_t* storage) { \
+ BrotliCompressFragmentFastImpl(s, input, input_size, is_last, table, B, \
+ storage_ix, storage); \
}
FOR_TABLE_BITS_(BAKE_METHOD_PARAM_)
#undef BAKE_METHOD_PARAM_
void BrotliCompressFragmentFast(
- MemoryManager* m, const uint8_t* input, size_t input_size,
- BROTLI_BOOL is_last, int* table, size_t table_size, uint8_t cmd_depth[128],
- uint16_t cmd_bits[128], size_t* cmd_code_numbits, uint8_t* cmd_code,
+ BrotliOnePassArena* s, const uint8_t* input, size_t input_size,
+ BROTLI_BOOL is_last, int* table, size_t table_size,
size_t* storage_ix, uint8_t* storage) {
const size_t initial_storage_ix = *storage_ix;
const size_t table_bits = Log2FloorNonZero(table_size);
@@ -762,8 +773,7 @@ void BrotliCompressFragmentFast(
#define CASE_(B) \
case B: \
BrotliCompressFragmentFastImpl ## B( \
- m, input, input_size, is_last, table, cmd_depth, cmd_bits, \
- cmd_code_numbits, cmd_code, storage_ix, storage); \
+ s, input, input_size, is_last, table, storage_ix, storage);\
break;
FOR_TABLE_BITS_(CASE_)
#undef CASE_
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.h
index 80007f5dcad..9c0780f8c99 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment.h
@@ -12,14 +12,43 @@
#ifndef BROTLI_ENC_COMPRESS_FRAGMENT_H_
#define BROTLI_ENC_COMPRESS_FRAGMENT_H_
-#include "../common/platform.h"
#include <brotli/types.h>
-#include "./memory.h"
+
+#include "../common/constants.h"
+#include "../common/platform.h"
+#include "entropy_encode.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
+typedef struct BrotliOnePassArena {
+ uint8_t lit_depth[256];
+ uint16_t lit_bits[256];
+
+ /* Command and distance prefix codes (each 64 symbols, stored back-to-back)
+ used for the next block. The command prefix code is over a smaller alphabet
+ with the following 64 symbols:
+ 0 - 15: insert length code 0, copy length code 0 - 15, same distance
+ 16 - 39: insert length code 0, copy length code 0 - 23
+ 40 - 63: insert length code 0 - 23, copy length code 0
+ Note that symbols 16 and 40 represent the same code in the full alphabet,
+ but we do not use either of them. */
+ uint8_t cmd_depth[128];
+ uint16_t cmd_bits[128];
+ uint32_t cmd_histo[128];
+
+ /* The compressed form of the command and distance prefix codes for the next
+ block. */
+ uint8_t cmd_code[512];
+ size_t cmd_code_numbits;
+
+ HuffmanTree tree[2 * BROTLI_NUM_LITERAL_SYMBOLS + 1];
+ uint32_t histogram[256];
+ uint8_t tmp_depth[BROTLI_NUM_COMMAND_SYMBOLS];
+ uint16_t tmp_bits[64];
+} BrotliOnePassArena;
+
/* Compresses "input" string to the "*storage" buffer as one or more complete
meta-blocks, and updates the "*storage_ix" bit position.
@@ -42,15 +71,11 @@ extern "C" {
REQUIRES: "table_size" is an odd (9, 11, 13, 15) power of two
OUTPUT: maximal copy distance <= |input_size|
OUTPUT: maximal copy distance <= BROTLI_MAX_BACKWARD_LIMIT(18) */
-BROTLI_INTERNAL void BrotliCompressFragmentFast(MemoryManager* m,
+BROTLI_INTERNAL void BrotliCompressFragmentFast(BrotliOnePassArena* s,
const uint8_t* input,
size_t input_size,
BROTLI_BOOL is_last,
int* table, size_t table_size,
- uint8_t cmd_depth[128],
- uint16_t cmd_bits[128],
- size_t* cmd_code_numbits,
- uint8_t* cmd_code,
size_t* storage_ix,
uint8_t* storage);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.c
index ca68b38139f..a762679c1f8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.c
@@ -10,20 +10,20 @@
second pass we emit them into the bit stream using prefix codes built based
on the actual command and literal byte histograms. */
-#include "./compress_fragment_two_pass.h"
+#include "compress_fragment_two_pass.h"
#include <string.h> /* memcmp, memcpy, memset */
+#include <brotli/types.h>
+
#include "../common/constants.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./bit_cost.h"
-#include "./brotli_bit_stream.h"
-#include "./entropy_encode.h"
-#include "./fast_log.h"
-#include "./find_match_length.h"
-#include "./memory.h"
-#include "./write_bits.h"
+#include "bit_cost.h"
+#include "brotli_bit_stream.h"
+#include "entropy_encode.h"
+#include "fast_log.h"
+#include "find_match_length.h"
+#include "write_bits.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -66,53 +66,53 @@ static BROTLI_INLINE BROTLI_BOOL IsMatch(const uint8_t* p1, const uint8_t* p2,
/* Builds a command and distance prefix code (each 64 symbols) into "depth" and
"bits" based on "histogram" and stores it into the bit stream. */
-static void BuildAndStoreCommandPrefixCode(
- const uint32_t histogram[128],
- uint8_t depth[128], uint16_t bits[128],
- size_t* storage_ix, uint8_t* storage) {
+static void BuildAndStoreCommandPrefixCode(BrotliTwoPassArena* s,
+ size_t* storage_ix,
+ uint8_t* storage) {
/* Tree size for building a tree over 64 symbols is 2 * 64 + 1. */
- HuffmanTree tree[129];
- uint8_t cmd_depth[BROTLI_NUM_COMMAND_SYMBOLS] = { 0 };
- uint16_t cmd_bits[64];
- BrotliCreateHuffmanTree(histogram, 64, 15, tree, depth);
- BrotliCreateHuffmanTree(&histogram[64], 64, 14, tree, &depth[64]);
+ /* TODO(eustas): initialize once. */
+ memset(s->tmp_depth, 0, sizeof(s->tmp_depth));
+ BrotliCreateHuffmanTree(s->cmd_histo, 64, 15, s->tmp_tree, s->cmd_depth);
+ BrotliCreateHuffmanTree(&s->cmd_histo[64], 64, 14, s->tmp_tree,
+ &s->cmd_depth[64]);
/* We have to jump through a few hoops here in order to compute
the command bits because the symbols are in a different order than in
the full alphabet. This looks complicated, but having the symbols
in this order in the command bits saves a few branches in the Emit*
functions. */
- memcpy(cmd_depth, depth + 24, 24);
- memcpy(cmd_depth + 24, depth, 8);
- memcpy(cmd_depth + 32, depth + 48, 8);
- memcpy(cmd_depth + 40, depth + 8, 8);
- memcpy(cmd_depth + 48, depth + 56, 8);
- memcpy(cmd_depth + 56, depth + 16, 8);
- BrotliConvertBitDepthsToSymbols(cmd_depth, 64, cmd_bits);
- memcpy(bits, cmd_bits + 24, 16);
- memcpy(bits + 8, cmd_bits + 40, 16);
- memcpy(bits + 16, cmd_bits + 56, 16);
- memcpy(bits + 24, cmd_bits, 48);
- memcpy(bits + 48, cmd_bits + 32, 16);
- memcpy(bits + 56, cmd_bits + 48, 16);
- BrotliConvertBitDepthsToSymbols(&depth[64], 64, &bits[64]);
+ memcpy(s->tmp_depth, s->cmd_depth + 24, 24);
+ memcpy(s->tmp_depth + 24, s->cmd_depth, 8);
+ memcpy(s->tmp_depth + 32, s->cmd_depth + 48, 8);
+ memcpy(s->tmp_depth + 40, s->cmd_depth + 8, 8);
+ memcpy(s->tmp_depth + 48, s->cmd_depth + 56, 8);
+ memcpy(s->tmp_depth + 56, s->cmd_depth + 16, 8);
+ BrotliConvertBitDepthsToSymbols(s->tmp_depth, 64, s->tmp_bits);
+ memcpy(s->cmd_bits, s->tmp_bits + 24, 16);
+ memcpy(s->cmd_bits + 8, s->tmp_bits + 40, 16);
+ memcpy(s->cmd_bits + 16, s->tmp_bits + 56, 16);
+ memcpy(s->cmd_bits + 24, s->tmp_bits, 48);
+ memcpy(s->cmd_bits + 48, s->tmp_bits + 32, 16);
+ memcpy(s->cmd_bits + 56, s->tmp_bits + 48, 16);
+ BrotliConvertBitDepthsToSymbols(&s->cmd_depth[64], 64, &s->cmd_bits[64]);
{
/* Create the bit length array for the full command alphabet. */
size_t i;
- memset(cmd_depth, 0, 64); /* only 64 first values were used */
- memcpy(cmd_depth, depth + 24, 8);
- memcpy(cmd_depth + 64, depth + 32, 8);
- memcpy(cmd_depth + 128, depth + 40, 8);
- memcpy(cmd_depth + 192, depth + 48, 8);
- memcpy(cmd_depth + 384, depth + 56, 8);
+ memset(s->tmp_depth, 0, 64); /* only 64 first values were used */
+ memcpy(s->tmp_depth, s->cmd_depth + 24, 8);
+ memcpy(s->tmp_depth + 64, s->cmd_depth + 32, 8);
+ memcpy(s->tmp_depth + 128, s->cmd_depth + 40, 8);
+ memcpy(s->tmp_depth + 192, s->cmd_depth + 48, 8);
+ memcpy(s->tmp_depth + 384, s->cmd_depth + 56, 8);
for (i = 0; i < 8; ++i) {
- cmd_depth[128 + 8 * i] = depth[i];
- cmd_depth[256 + 8 * i] = depth[8 + i];
- cmd_depth[448 + 8 * i] = depth[16 + i];
+ s->tmp_depth[128 + 8 * i] = s->cmd_depth[i];
+ s->tmp_depth[256 + 8 * i] = s->cmd_depth[8 + i];
+ s->tmp_depth[448 + 8 * i] = s->cmd_depth[16 + i];
}
- BrotliStoreHuffmanTree(
- cmd_depth, BROTLI_NUM_COMMAND_SYMBOLS, tree, storage_ix, storage);
+ BrotliStoreHuffmanTree(s->tmp_depth, BROTLI_NUM_COMMAND_SYMBOLS,
+ s->tmp_tree, storage_ix, storage);
}
- BrotliStoreHuffmanTree(&depth[64], 64, tree, storage_ix, storage);
+ BrotliStoreHuffmanTree(&s->cmd_depth[64], 64, s->tmp_tree, storage_ix,
+ storage);
}
static BROTLI_INLINE void EmitInsertLen(
@@ -330,6 +330,8 @@ trawl:
ip += matched;
BROTLI_DCHECK(0 == memcmp(base, candidate, matched));
EmitInsertLen((uint32_t)insert, commands);
+ BROTLI_LOG(("[CompressFragment] pos = %d insert = %d copy = %d\n",
+ (int)(next_emit - base_ip), insert, 2));
memcpy(*literals, next_emit, (size_t)insert);
*literals += insert;
if (distance == last_distance) {
@@ -340,6 +342,12 @@ trawl:
last_distance = distance;
}
EmitCopyLenLastDistance(matched, commands);
+ BROTLI_LOG(("[CompressFragment] pos = %d distance = %d\n"
+ "[CompressFragment] pos = %d insert = %d copy = %d\n"
+ "[CompressFragment] pos = %d distance = %d\n",
+ (int)(base - base_ip), (int)distance,
+ (int)(base - base_ip) + 2, 0, (int)matched - 2,
+ (int)(base - base_ip) + 2, (int)distance));
next_emit = ip;
if (BROTLI_PREDICT_FALSE(ip >= ip_limit)) {
@@ -395,6 +403,10 @@ trawl:
BROTLI_DCHECK(0 == memcmp(base, candidate, matched));
EmitCopyLen(matched, commands);
EmitDistance((uint32_t)last_distance, commands);
+ BROTLI_LOG(("[CompressFragment] pos = %d insert = %d copy = %d\n"
+ "[CompressFragment] pos = %d distance = %d\n",
+ (int)(base - base_ip), 0, (int)matched,
+ (int)(base - base_ip), (int)last_distance));
next_emit = ip;
if (BROTLI_PREDICT_FALSE(ip >= ip_limit)) {
@@ -447,70 +459,71 @@ emit_remainder:
if (next_emit < ip_end) {
const uint32_t insert = (uint32_t)(ip_end - next_emit);
EmitInsertLen(insert, commands);
+ BROTLI_LOG(("[CompressFragment] pos = %d insert = %d copy = %d\n",
+ (int)(next_emit - base_ip), insert, 2));
memcpy(*literals, next_emit, insert);
*literals += insert;
}
}
-static void StoreCommands(MemoryManager* m,
+static void StoreCommands(BrotliTwoPassArena* s,
const uint8_t* literals, const size_t num_literals,
const uint32_t* commands, const size_t num_commands,
size_t* storage_ix, uint8_t* storage) {
static const uint32_t kNumExtraBits[128] = {
- 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 12, 14, 24,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 24,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8,
- 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16,
- 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24,
+ 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5,
+ 6, 7, 8, 9, 10, 12, 14, 24, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 2, 2, 3, 3, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 24,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8,
+ 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16,
+ 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24,
};
static const uint32_t kInsertOffset[24] = {
- 0, 1, 2, 3, 4, 5, 6, 8, 10, 14, 18, 26, 34, 50, 66, 98, 130, 194, 322, 578,
- 1090, 2114, 6210, 22594,
+ 0, 1, 2, 3, 4, 5, 6, 8, 10, 14, 18, 26,
+ 34, 50, 66, 98, 130, 194, 322, 578, 1090, 2114, 6210, 22594,
};
- uint8_t lit_depths[256];
- uint16_t lit_bits[256];
- uint32_t lit_histo[256] = { 0 };
- uint8_t cmd_depths[128] = { 0 };
- uint16_t cmd_bits[128] = { 0 };
- uint32_t cmd_histo[128] = { 0 };
size_t i;
+ memset(s->lit_histo, 0, sizeof(s->lit_histo));
+ /* TODO(eustas): is that necessary? */
+ memset(s->cmd_depth, 0, sizeof(s->cmd_depth));
+ /* TODO(eustas): is that necessary? */
+ memset(s->cmd_bits, 0, sizeof(s->cmd_bits));
+ memset(s->cmd_histo, 0, sizeof(s->cmd_histo));
for (i = 0; i < num_literals; ++i) {
- ++lit_histo[literals[i]];
+ ++s->lit_histo[literals[i]];
}
- BrotliBuildAndStoreHuffmanTreeFast(m, lit_histo, num_literals,
- /* max_bits = */ 8,
- lit_depths, lit_bits,
- storage_ix, storage);
- if (BROTLI_IS_OOM(m)) return;
+ BrotliBuildAndStoreHuffmanTreeFast(s->tmp_tree, s->lit_histo, num_literals,
+ /* max_bits = */ 8, s->lit_depth,
+ s->lit_bits, storage_ix, storage);
for (i = 0; i < num_commands; ++i) {
const uint32_t code = commands[i] & 0xFF;
BROTLI_DCHECK(code < 128);
- ++cmd_histo[code];
+ ++s->cmd_histo[code];
}
- cmd_histo[1] += 1;
- cmd_histo[2] += 1;
- cmd_histo[64] += 1;
- cmd_histo[84] += 1;
- BuildAndStoreCommandPrefixCode(cmd_histo, cmd_depths, cmd_bits,
- storage_ix, storage);
+ s->cmd_histo[1] += 1;
+ s->cmd_histo[2] += 1;
+ s->cmd_histo[64] += 1;
+ s->cmd_histo[84] += 1;
+ BuildAndStoreCommandPrefixCode(s, storage_ix, storage);
for (i = 0; i < num_commands; ++i) {
const uint32_t cmd = commands[i];
const uint32_t code = cmd & 0xFF;
const uint32_t extra = cmd >> 8;
BROTLI_DCHECK(code < 128);
- BrotliWriteBits(cmd_depths[code], cmd_bits[code], storage_ix, storage);
+ BrotliWriteBits(s->cmd_depth[code], s->cmd_bits[code], storage_ix, storage);
BrotliWriteBits(kNumExtraBits[code], extra, storage_ix, storage);
if (code < 24) {
const uint32_t insert = kInsertOffset[code] + extra;
uint32_t j;
for (j = 0; j < insert; ++j) {
const uint8_t lit = *literals;
- BrotliWriteBits(lit_depths[lit], lit_bits[lit], storage_ix, storage);
+ BrotliWriteBits(s->lit_depth[lit], s->lit_bits[lit], storage_ix,
+ storage);
++literals;
}
}
@@ -521,19 +534,19 @@ static void StoreCommands(MemoryManager* m,
#define MIN_RATIO 0.98
#define SAMPLE_RATE 43
-static BROTLI_BOOL ShouldCompress(
+static BROTLI_BOOL ShouldCompress(BrotliTwoPassArena* s,
const uint8_t* input, size_t input_size, size_t num_literals) {
double corpus_size = (double)input_size;
if ((double)num_literals < MIN_RATIO * corpus_size) {
return BROTLI_TRUE;
} else {
- uint32_t literal_histo[256] = { 0 };
const double max_total_bit_cost = corpus_size * 8 * MIN_RATIO / SAMPLE_RATE;
size_t i;
+ memset(s->lit_histo, 0, sizeof(s->lit_histo));
for (i = 0; i < input_size; i += SAMPLE_RATE) {
- ++literal_histo[input[i]];
+ ++s->lit_histo[input[i]];
}
- return TO_BROTLI_BOOL(BitsEntropy(literal_histo, 256) < max_total_bit_cost);
+ return TO_BROTLI_BOOL(BitsEntropy(s->lit_histo, 256) < max_total_bit_cost);
}
}
@@ -555,7 +568,7 @@ static void EmitUncompressedMetaBlock(const uint8_t* input, size_t input_size,
}
static BROTLI_INLINE void BrotliCompressFragmentTwoPassImpl(
- MemoryManager* m, const uint8_t* input, size_t input_size,
+ BrotliTwoPassArena* s, const uint8_t* input, size_t input_size,
BROTLI_BOOL is_last, uint32_t* command_buf, uint8_t* literal_buf,
int* table, size_t table_bits, size_t min_match,
size_t* storage_ix, uint8_t* storage) {
@@ -573,14 +586,13 @@ static BROTLI_INLINE void BrotliCompressFragmentTwoPassImpl(
CreateCommands(input, block_size, input_size, base_ip, table,
table_bits, min_match, &literals, &commands);
num_literals = (size_t)(literals - literal_buf);
- if (ShouldCompress(input, block_size, num_literals)) {
+ if (ShouldCompress(s, input, block_size, num_literals)) {
const size_t num_commands = (size_t)(commands - command_buf);
BrotliStoreMetaBlockHeader(block_size, 0, storage_ix, storage);
/* No block splits, no contexts. */
BrotliWriteBits(13, 0, storage_ix, storage);
- StoreCommands(m, literal_buf, num_literals, command_buf, num_commands,
+ StoreCommands(s, literal_buf, num_literals, command_buf, num_commands,
storage_ix, storage);
- if (BROTLI_IS_OOM(m)) return;
} else {
/* Since we did not find many backward references and the entropy of
the data is close to 8 bits, we can simply emit an uncompressed block.
@@ -597,18 +609,18 @@ static BROTLI_INLINE void BrotliCompressFragmentTwoPassImpl(
#define BAKE_METHOD_PARAM_(B) \
static BROTLI_NOINLINE void BrotliCompressFragmentTwoPassImpl ## B( \
- MemoryManager* m, const uint8_t* input, size_t input_size, \
+ BrotliTwoPassArena* s, const uint8_t* input, size_t input_size, \
BROTLI_BOOL is_last, uint32_t* command_buf, uint8_t* literal_buf, \
int* table, size_t* storage_ix, uint8_t* storage) { \
size_t min_match = (B <= 15) ? 4 : 6; \
- BrotliCompressFragmentTwoPassImpl(m, input, input_size, is_last, command_buf,\
+ BrotliCompressFragmentTwoPassImpl(s, input, input_size, is_last, command_buf,\
literal_buf, table, B, min_match, storage_ix, storage); \
}
FOR_TABLE_BITS_(BAKE_METHOD_PARAM_)
#undef BAKE_METHOD_PARAM_
void BrotliCompressFragmentTwoPass(
- MemoryManager* m, const uint8_t* input, size_t input_size,
+ BrotliTwoPassArena* s, const uint8_t* input, size_t input_size,
BROTLI_BOOL is_last, uint32_t* command_buf, uint8_t* literal_buf,
int* table, size_t table_size, size_t* storage_ix, uint8_t* storage) {
const size_t initial_storage_ix = *storage_ix;
@@ -617,7 +629,7 @@ void BrotliCompressFragmentTwoPass(
#define CASE_(B) \
case B: \
BrotliCompressFragmentTwoPassImpl ## B( \
- m, input, input_size, is_last, command_buf, \
+ s, input, input_size, is_last, command_buf, \
literal_buf, table, storage_ix, storage); \
break;
FOR_TABLE_BITS_(CASE_)
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.h
index 928677df426..6d28d9bb78e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/compress_fragment_two_pass.h
@@ -13,16 +13,34 @@
#ifndef BROTLI_ENC_COMPRESS_FRAGMENT_TWO_PASS_H_
#define BROTLI_ENC_COMPRESS_FRAGMENT_TWO_PASS_H_
-#include "../common/platform.h"
#include <brotli/types.h>
-#include "./memory.h"
+
+#include "../common/constants.h"
+#include "../common/platform.h"
+#include "entropy_encode.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
+/* TODO(eustas): turn to macro. */
static const size_t kCompressFragmentTwoPassBlockSize = 1 << 17;
+typedef struct BrotliTwoPassArena {
+ uint32_t lit_histo[256];
+ uint8_t lit_depth[256];
+ uint16_t lit_bits[256];
+
+ uint32_t cmd_histo[128];
+ uint8_t cmd_depth[128];
+ uint16_t cmd_bits[128];
+
+ /* BuildAndStoreCommandPrefixCode */
+ HuffmanTree tmp_tree[2 * BROTLI_NUM_LITERAL_SYMBOLS + 1];
+ uint8_t tmp_depth[BROTLI_NUM_COMMAND_SYMBOLS];
+ uint16_t tmp_bits[64];
+} BrotliTwoPassArena;
+
/* Compresses "input" string to the "*storage" buffer as one or more complete
meta-blocks, and updates the "*storage_ix" bit position.
@@ -36,7 +54,7 @@ static const size_t kCompressFragmentTwoPassBlockSize = 1 << 17;
REQUIRES: "table_size" is a power of two
OUTPUT: maximal copy distance <= |input_size|
OUTPUT: maximal copy distance <= BROTLI_MAX_BACKWARD_LIMIT(18) */
-BROTLI_INTERNAL void BrotliCompressFragmentTwoPass(MemoryManager* m,
+BROTLI_INTERNAL void BrotliCompressFragmentTwoPass(BrotliTwoPassArena* s,
const uint8_t* input,
size_t input_size,
BROTLI_BOOL is_last,
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/dictionary_hash.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/dictionary_hash.c
index 16d853fe5aa..1a60eb3cdaa 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/dictionary_hash.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/dictionary_hash.c
@@ -7,12 +7,13 @@
/* Hash table on the 4-byte prefixes of static dictionary words. */
#include "../common/platform.h"
-#include "./dictionary_hash.h"
+#include "dictionary_hash.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
+/* GENERATED CODE START */
BROTLI_INTERNAL const uint16_t kStaticDictionaryHashWords[32768] = {
1002,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,1265,0,0,0,0,0,1431,0,0,0,0,0,0,40,0,0,0,
0,155,8,741,0,624,0,0,0,0,0,0,0,0,0,0,0,0,66,503,0,0,0,451,0,0,0,0,0,0,0,835,70,
@@ -1840,6 +1841,7 @@ BROTLI_INTERNAL const uint8_t kStaticDictionaryHashLengths[32768] = {
0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,
10,7,0,0,0,0,0,0,0,0,9,0,0,0,0,4,0,0,0,0,0,0,0,0,0,5,11,0,0,0,0,0,0,0,8,6,0,0,9,
7,0,0,12,4,0,0,0,0,0,0,12,6,0,6,0,7,0,0,8,5,0,0,0,0};
+/* GENERATED CODE END */
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c
index e77009e39ae..95ff2eaf500 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encode.c
@@ -7,6 +7,8 @@
/* Implementation of Brotli compressor. */
#include <brotli/encode.h>
+#include <brotli/shared_dictionary.h>
+#include <brotli/types.h>
#include <stdlib.h> /* free, malloc */
#include <string.h> /* memcpy, memset */
@@ -15,24 +17,26 @@
#include "../common/context.h"
#include "../common/platform.h"
#include "../common/version.h"
-#include "./backward_references.h"
-#include "./backward_references_hq.h"
-#include "./bit_cost.h"
-#include "./brotli_bit_stream.h"
-#include "./compress_fragment.h"
-#include "./compress_fragment_two_pass.h"
-#include "./encoder_dict.h"
-#include "./entropy_encode.h"
-#include "./fast_log.h"
-#include "./hash.h"
-#include "./histogram.h"
-#include "./memory.h"
-#include "./metablock.h"
-#include "./prefix.h"
-#include "./quality.h"
-#include "./ringbuffer.h"
-#include "./utf8_util.h"
-#include "./write_bits.h"
+#include "backward_references.h"
+#include "backward_references_hq.h"
+#include "bit_cost.h"
+#include "brotli_bit_stream.h"
+#include "compress_fragment.h"
+#include "compress_fragment_two_pass.h"
+#include "dictionary_hash.h"
+#include "encoder_dict.h"
+#include "entropy_encode.h"
+#include "fast_log.h"
+#include "hash.h"
+#include "histogram.h"
+#include "memory.h"
+#include "metablock.h"
+#include "prefix.h"
+#include "state.h"
+#include "quality.h"
+#include "ringbuffer.h"
+#include "utf8_util.h"
+#include "write_bits.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -40,94 +44,6 @@ extern "C" {
#define COPY_ARRAY(dst, src) memcpy(dst, src, sizeof(src));
-typedef enum BrotliEncoderStreamState {
- /* Default state. */
- BROTLI_STREAM_PROCESSING = 0,
- /* Intermediate state; after next block is emitted, byte-padding should be
- performed before getting back to default state. */
- BROTLI_STREAM_FLUSH_REQUESTED = 1,
- /* Last metablock was produced; no more input is acceptable. */
- BROTLI_STREAM_FINISHED = 2,
- /* Flushing compressed block and writing meta-data block header. */
- BROTLI_STREAM_METADATA_HEAD = 3,
- /* Writing metadata block body. */
- BROTLI_STREAM_METADATA_BODY = 4
-} BrotliEncoderStreamState;
-
-typedef enum BrotliEncoderFlintState {
- BROTLI_FLINT_NEEDS_2_BYTES = 2,
- BROTLI_FLINT_NEEDS_1_BYTE = 1,
- BROTLI_FLINT_WAITING_FOR_PROCESSING = 0,
- BROTLI_FLINT_WAITING_FOR_FLUSHING = -1,
- BROTLI_FLINT_DONE = -2
-} BrotliEncoderFlintState;
-
-typedef struct BrotliEncoderStateStruct {
- BrotliEncoderParams params;
-
- MemoryManager memory_manager_;
-
- uint64_t input_pos_;
- RingBuffer ringbuffer_;
- size_t cmd_alloc_size_;
- Command* commands_;
- size_t num_commands_;
- size_t num_literals_;
- size_t last_insert_len_;
- uint64_t last_flush_pos_;
- uint64_t last_processed_pos_;
- int dist_cache_[BROTLI_NUM_DISTANCE_SHORT_CODES];
- int saved_dist_cache_[4];
- uint16_t last_bytes_;
- uint8_t last_bytes_bits_;
- /* "Flint" is a tiny uncompressed block emitted before the continuation
- block to unwire literal context from previous data. Despite being int8_t,
- field is actually BrotliEncoderFlintState enum. */
- int8_t flint_;
- uint8_t prev_byte_;
- uint8_t prev_byte2_;
- size_t storage_size_;
- uint8_t* storage_;
-
- Hasher hasher_;
-
- /* Hash table for FAST_ONE_PASS_COMPRESSION_QUALITY mode. */
- int small_table_[1 << 10]; /* 4KiB */
- int* large_table_; /* Allocated only when needed */
- size_t large_table_size_;
- /* Command and distance prefix codes (each 64 symbols, stored back-to-back)
- used for the next block in FAST_ONE_PASS_COMPRESSION_QUALITY. The command
- prefix code is over a smaller alphabet with the following 64 symbols:
- 0 - 15: insert length code 0, copy length code 0 - 15, same distance
- 16 - 39: insert length code 0, copy length code 0 - 23
- 40 - 63: insert length code 0 - 23, copy length code 0
- Note that symbols 16 and 40 represent the same code in the full alphabet,
- but we do not use either of them in FAST_ONE_PASS_COMPRESSION_QUALITY. */
- uint8_t cmd_depths_[128];
- uint16_t cmd_bits_[128];
- /* The compressed form of the command and distance prefix codes for the next
- block in FAST_ONE_PASS_COMPRESSION_QUALITY. */
- uint8_t cmd_code_[512];
- size_t cmd_code_numbits_;
- /* Command and literal buffers for FAST_TWO_PASS_COMPRESSION_QUALITY. */
- uint32_t* command_buf_;
- uint8_t* literal_buf_;
-
- uint8_t* next_out_;
- size_t available_out_;
- size_t total_out_;
- /* Temporary buffer for padding flush bits or metadata block header / body. */
- union {
- uint64_t u64[2];
- uint8_t u8[16];
- } tiny_buf_;
- uint32_t remaining_metadata_bytes_;
- BrotliEncoderStreamState stream_state_;
-
- BROTLI_BOOL is_last_block_emitted_;
- BROTLI_BOOL is_initialized_;
-} BrotliEncoderStateStruct;
-
static size_t InputBlockSize(BrotliEncoderState* s) {
return (size_t)1 << s->params.lgblock;
}
@@ -147,7 +63,7 @@ BROTLI_BOOL BrotliEncoderSetParameter(
BrotliEncoderState* state, BrotliEncoderParameter p, uint32_t value) {
/* Changing parameters on the fly is not implemented yet. */
if (state->is_initialized_) return BROTLI_FALSE;
- /* TODO: Validate/clamp parameters here. */
+ /* TODO(eustas): Validate/clamp parameters here. */
switch (p) {
case BROTLI_PARAM_MODE:
state->params.mode = (BrotliEncoderMode)value;
@@ -283,11 +199,9 @@ static void EncodeWindowBits(int lgwin, BROTLI_BOOL large_window,
}
}
+/* TODO(eustas): move to compress_fragment.c? */
/* Initializes the command and distance prefix codes for the first block. */
-static void InitCommandPrefixCodes(uint8_t cmd_depths[128],
- uint16_t cmd_bits[128],
- uint8_t cmd_code[512],
- size_t* cmd_code_numbits) {
+static void InitCommandPrefixCodes(BrotliOnePassArena* s) {
static const uint8_t kDefaultCommandDepths[128] = {
0, 4, 4, 5, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8,
0, 0, 0, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7,
@@ -320,13 +234,13 @@ static void InitCommandPrefixCodes(uint8_t cmd_depths[128],
0x46, 0xe1, 0xb0, 0xd0, 0x4e, 0xb2, 0xf7, 0x04, 0x00,
};
static const size_t kDefaultCommandCodeNumBits = 448;
- COPY_ARRAY(cmd_depths, kDefaultCommandDepths);
- COPY_ARRAY(cmd_bits, kDefaultCommandBits);
+ COPY_ARRAY(s->cmd_depth, kDefaultCommandDepths);
+ COPY_ARRAY(s->cmd_bits, kDefaultCommandBits);
/* Initialize the pre-compressed form of the command and distance prefix
codes. */
- COPY_ARRAY(cmd_code, kDefaultCommandCode);
- *cmd_code_numbits = kDefaultCommandCodeNumBits;
+ COPY_ARRAY(s->cmd_code, kDefaultCommandCode);
+ s->cmd_code_numbits = kDefaultCommandCodeNumBits;
}
/* Decide about the context map based on the ability of the prediction
@@ -401,7 +315,8 @@ static void ChooseContextMap(int quality,
first 5 bits of literals. */
static BROTLI_BOOL ShouldUseComplexStaticContextMap(const uint8_t* input,
size_t start_pos, size_t length, size_t mask, int quality, size_t size_hint,
- size_t* num_literal_contexts, const uint32_t** literal_context_map) {
+ size_t* num_literal_contexts, const uint32_t** literal_context_map,
+ uint32_t* arena) {
static const uint32_t kStaticContextMapComplexUTF8[64] = {
11, 11, 12, 12, /* 0 special */
0, 0, 0, 0, /* 4 lf */
@@ -426,16 +341,17 @@ static BROTLI_BOOL ShouldUseComplexStaticContextMap(const uint8_t* input,
return BROTLI_FALSE;
} else {
const size_t end_pos = start_pos + length;
- /* To make entropy calculations faster and to fit on the stack, we collect
- histograms over the 5 most significant bits of literals. One histogram
+ /* To make entropy calculations faster, we collect histograms
+ over the 5 most significant bits of literals. One histogram
without context and 13 additional histograms for each context value. */
- uint32_t combined_histo[32] = { 0 };
- uint32_t context_histo[13][32] = { { 0 } };
+ uint32_t* BROTLI_RESTRICT const combined_histo = arena;
+ uint32_t* BROTLI_RESTRICT const context_histo = arena + 32;
uint32_t total = 0;
double entropy[3];
size_t dummy;
size_t i;
ContextLut utf8_lut = BROTLI_CONTEXT_LUT(CONTEXT_UTF8);
+ memset(arena, 0, sizeof(arena[0]) * 32 * 14);
for (; start_pos + 64 <= end_pos; start_pos += 4096) {
const size_t stride_end_pos = start_pos + 64;
uint8_t prev2 = input[start_pos & mask];
@@ -449,7 +365,7 @@ static BROTLI_BOOL ShouldUseComplexStaticContextMap(const uint8_t* input,
BROTLI_CONTEXT(prev1, prev2, utf8_lut)];
++total;
++combined_histo[literal >> 3];
- ++context_histo[context][literal >> 3];
+ ++context_histo[(context << 5) + (literal >> 3)];
prev2 = prev1;
prev1 = literal;
}
@@ -457,7 +373,7 @@ static BROTLI_BOOL ShouldUseComplexStaticContextMap(const uint8_t* input,
entropy[1] = ShannonEntropy(combined_histo, 32, &dummy);
entropy[2] = 0;
for (i = 0; i < 13; ++i) {
- entropy[2] += ShannonEntropy(&context_histo[i][0], 32, &dummy);
+ entropy[2] += ShannonEntropy(context_histo + (i << 5), 32, &dummy);
}
entropy[0] = 1.0 / (double)total;
entropy[1] *= entropy[0];
@@ -481,19 +397,21 @@ static BROTLI_BOOL ShouldUseComplexStaticContextMap(const uint8_t* input,
static void DecideOverLiteralContextModeling(const uint8_t* input,
size_t start_pos, size_t length, size_t mask, int quality, size_t size_hint,
- size_t* num_literal_contexts, const uint32_t** literal_context_map) {
+ size_t* num_literal_contexts, const uint32_t** literal_context_map,
+ uint32_t* arena) {
if (quality < MIN_QUALITY_FOR_CONTEXT_MODELING || length < 64) {
return;
} else if (ShouldUseComplexStaticContextMap(
input, start_pos, length, mask, quality, size_hint,
- num_literal_contexts, literal_context_map)) {
+ num_literal_contexts, literal_context_map, arena)) {
/* Context map was already set, nothing else to do. */
} else {
/* Gather bi-gram data of the UTF8 byte prefixes. To make the analysis of
UTF8 data faster we only examine 64 byte long strides at every 4kB
intervals. */
const size_t end_pos = start_pos + length;
- uint32_t bigram_prefix_histo[9] = { 0 };
+ uint32_t* BROTLI_RESTRICT const bigram_prefix_histo = arena;
+ memset(bigram_prefix_histo, 0, sizeof(arena[0]) * 9);
for (; start_pos + 64 <= end_pos; start_pos += 4096) {
static const int lut[4] = { 0, 0, 1, 2 };
const size_t stride_end_pos = start_pos + 64;
@@ -513,7 +431,7 @@ static void DecideOverLiteralContextModeling(const uint8_t* input,
static BROTLI_BOOL ShouldCompress(
const uint8_t* data, const size_t mask, const uint64_t last_flush_pos,
const size_t bytes, const size_t num_literals, const size_t num_commands) {
- /* TODO: find more precise minimal block overhead. */
+ /* TODO(eustas): find more precise minimal block overhead. */
if (bytes <= 2) return BROTLI_FALSE;
if (num_commands < (bytes >> 8) + 2) {
if ((double)num_literals > 0.99 * (double)bytes) {
@@ -613,10 +531,14 @@ static void WriteMetaBlockInternal(MemoryManager* m,
size_t num_literal_contexts = 1;
const uint32_t* literal_context_map = NULL;
if (!params->disable_literal_context_modeling) {
+ /* TODO(eustas): pull to higher level and reuse. */
+ uint32_t* arena = BROTLI_ALLOC(m, uint32_t, 14 * 32);
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(arena)) return;
DecideOverLiteralContextModeling(
data, wrapped_last_flush_pos, bytes, mask, params->quality,
params->size_hint, &num_literal_contexts,
- &literal_context_map);
+ &literal_context_map, arena);
+ BROTLI_FREE(m, arena);
}
BrotliBuildMetaBlockGreedy(m, data, wrapped_last_flush_pos, mask,
prev_byte, prev_byte2, literal_context_lut, num_literal_contexts,
@@ -681,12 +603,13 @@ static void ChooseDistanceParams(BrotliEncoderParams* params) {
}
}
- BrotliInitDistanceParams(
- params, distance_postfix_bits, num_direct_distance_codes);
+ BrotliInitDistanceParams(&params->dist, distance_postfix_bits,
+ num_direct_distance_codes, params->large_window);
}
static BROTLI_BOOL EnsureInitialized(BrotliEncoderState* s) {
- if (BROTLI_IS_OOM(&s->memory_manager_)) return BROTLI_FALSE;
+ MemoryManager* m = &s->memory_manager_;
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
if (s->is_initialized_) return BROTLI_TRUE;
s->last_bytes_bits_ = 0;
@@ -728,8 +651,12 @@ static BROTLI_BOOL EnsureInitialized(BrotliEncoderState* s) {
}
if (s->params.quality == FAST_ONE_PASS_COMPRESSION_QUALITY) {
- InitCommandPrefixCodes(s->cmd_depths_, s->cmd_bits_,
- s->cmd_code_, &s->cmd_code_numbits_);
+ s->one_pass_arena_ = BROTLI_ALLOC(m, BrotliOnePassArena, 1);
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
+ InitCommandPrefixCodes(s->one_pass_arena_);
+ } else if (s->params.quality == FAST_TWO_PASS_COMPRESSION_QUALITY) {
+ s->two_pass_arena_ = BROTLI_ALLOC(m, BrotliTwoPassArena, 1);
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
}
s->is_initialized_ = BROTLI_TRUE;
@@ -745,7 +672,7 @@ static void BrotliEncoderInitParams(BrotliEncoderParams* params) {
params->stream_offset = 0;
params->size_hint = 0;
params->disable_literal_context_modeling = BROTLI_FALSE;
- BrotliInitEncoderDictionary(&params->dictionary);
+ BrotliInitSharedEncoderDictionary(&params->dictionary);
params->dist.distance_postfix_bits = 0;
params->dist.num_direct_distance_codes = 0;
params->dist.alphabet_size_max =
@@ -754,6 +681,11 @@ static void BrotliEncoderInitParams(BrotliEncoderParams* params) {
params->dist.max_distance = BROTLI_MAX_DISTANCE;
}
+static void BrotliEncoderCleanupParams(MemoryManager* m,
+ BrotliEncoderParams* params) {
+ BrotliCleanupSharedEncoderDictionary(m, &params->dictionary);
+}
+
static void BrotliEncoderInitState(BrotliEncoderState* s) {
BrotliEncoderInitParams(&s->params);
s->input_pos_ = 0;
@@ -769,9 +701,11 @@ static void BrotliEncoderInitState(BrotliEncoderState* s) {
HasherInit(&s->hasher_);
s->large_table_ = NULL;
s->large_table_size_ = 0;
- s->cmd_code_numbits_ = 0;
+ s->one_pass_arena_ = NULL;
+ s->two_pass_arena_ = NULL;
s->command_buf_ = NULL;
s->literal_buf_ = NULL;
+ s->total_in_ = 0;
s->next_out_ = NULL;
s->available_out_ = 0;
s->total_out_ = 0;
@@ -796,13 +730,9 @@ static void BrotliEncoderInitState(BrotliEncoderState* s) {
BrotliEncoderState* BrotliEncoderCreateInstance(
brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque) {
- BrotliEncoderState* state = 0;
- if (!alloc_func && !free_func) {
- state = (BrotliEncoderState*)malloc(sizeof(BrotliEncoderState));
- } else if (alloc_func && free_func) {
- state = (BrotliEncoderState*)alloc_func(opaque, sizeof(BrotliEncoderState));
- }
- if (state == 0) {
+ BrotliEncoderState* state = (BrotliEncoderState*)BrotliBootstrapAlloc(
+ sizeof(BrotliEncoderState), alloc_func, free_func, opaque);
+ if (state == NULL) {
/* BROTLI_DUMP(); */
return 0;
}
@@ -812,19 +742,36 @@ BrotliEncoderState* BrotliEncoderCreateInstance(
return state;
}
+#ifdef BROTLI_REPORTING
+/* When BROTLI_REPORTING is defined extra reporting module have to be linked. */
+void BrotliEncoderOnFinish(const BrotliEncoderState* s);
+#define BROTLI_ENCODER_ON_FINISH(s) BrotliEncoderOnFinish(s);
+#else
+#if !defined(BROTLI_ENCODER_ON_FINISH)
+#define BROTLI_ENCODER_ON_FINISH(s) (void)(s);
+#endif
+#endif
+
static void BrotliEncoderCleanupState(BrotliEncoderState* s) {
MemoryManager* m = &s->memory_manager_;
+
+ BROTLI_ENCODER_ON_FINISH(s);
+
if (BROTLI_IS_OOM(m)) {
BrotliWipeOutMemoryManager(m);
return;
}
+
BROTLI_FREE(m, s->storage_);
BROTLI_FREE(m, s->commands_);
RingBufferFree(m, &s->ringbuffer_);
DestroyHasher(m, &s->hasher_);
BROTLI_FREE(m, s->large_table_);
+ BROTLI_FREE(m, s->one_pass_arena_);
+ BROTLI_FREE(m, s->two_pass_arena_);
BROTLI_FREE(m, s->command_buf_);
BROTLI_FREE(m, s->literal_buf_);
+ BrotliEncoderCleanupParams(m, &s->params);
}
/* Deinitializes and frees BrotliEncoderState instance. */
@@ -832,11 +779,8 @@ void BrotliEncoderDestroyInstance(BrotliEncoderState* state) {
if (!state) {
return;
} else {
- MemoryManager* m = &state->memory_manager_;
- brotli_free_func free_func = m->free_func;
- void* opaque = m->opaque;
BrotliEncoderCleanupState(state);
- free_func(opaque, state);
+ BrotliBootstrapFree(state, &state->memory_manager_);
}
}
@@ -925,6 +869,8 @@ static void ExtendLastCommand(BrotliEncoderState* s, uint32_t* bytes,
uint64_t cmd_dist = (uint64_t)s->dist_cache_[0];
uint32_t distance_code = CommandRestoreDistanceCode(last_command,
&s->params.dist);
+ const CompoundDictionary* dict = &s->params.dictionary.compound;
+ size_t compound_dictionary_size = dict->total_size;
if (distance_code < BROTLI_NUM_DISTANCE_SHORT_CODES ||
distance_code - (BROTLI_NUM_DISTANCE_SHORT_CODES - 1) == cmd_dist) {
if (cmd_dist <= max_distance) {
@@ -935,6 +881,38 @@ static void ExtendLastCommand(BrotliEncoderState* s, uint32_t* bytes,
(*wrapped_last_processed_pos)++;
}
} else {
+ if ((cmd_dist - max_distance - 1) < compound_dictionary_size &&
+ last_copy_len < cmd_dist - max_distance) {
+ size_t address =
+ compound_dictionary_size - (size_t)(cmd_dist - max_distance) +
+ (size_t)last_copy_len;
+ size_t br_index = 0;
+ size_t br_offset;
+ const uint8_t* chunk;
+ size_t chunk_length;
+ while (address >= dict->chunk_offsets[br_index + 1]) br_index++;
+ br_offset = address - dict->chunk_offsets[br_index];
+ chunk = dict->chunk_source[br_index];
+ chunk_length =
+ dict->chunk_offsets[br_index + 1] - dict->chunk_offsets[br_index];
+ while (*bytes != 0 && data[*wrapped_last_processed_pos & mask] ==
+ chunk[br_offset]) {
+ last_command->copy_len_++;
+ (*bytes)--;
+ (*wrapped_last_processed_pos)++;
+ if (++br_offset == chunk_length) {
+ br_index++;
+ br_offset = 0;
+ if (br_index != dict->num_chunks) {
+ chunk = dict->chunk_source[br_index];
+ chunk_length = dict->chunk_offsets[br_index + 1] -
+ dict->chunk_offsets[br_index];
+ } else {
+ break;
+ }
+ }
+ }
+ }
}
/* The copy length is at most the metablock size, and thus expressible. */
GetLengthCode(last_command->insert_len_,
@@ -952,8 +930,8 @@ static void ExtendLastCommand(BrotliEncoderState* s, uint32_t* bytes,
If |*out_size| is positive, |*output| points to the start of the output
data. If |is_last| or |force_flush| is BROTLI_TRUE, an output meta-block is
always created. However, until |is_last| is BROTLI_TRUE encoder may retain up
- to 7 bits of the last byte of output. To force encoder to dump the remaining
- bits use WriteMetadata() to append an empty meta-data block.
+ to 7 bits of the last byte of output. Byte-alignment could be enforced by
+ emitting an empty meta-data block.
Returns BROTLI_FALSE if the size of the input data is larger than
input_block_size().
*/
@@ -968,10 +946,39 @@ static BROTLI_BOOL EncodeData(
MemoryManager* m = &s->memory_manager_;
ContextType literal_context_mode;
ContextLut literal_context_lut;
+ BROTLI_BOOL fast_compress =
+ s->params.quality == FAST_ONE_PASS_COMPRESSION_QUALITY ||
+ s->params.quality == FAST_TWO_PASS_COMPRESSION_QUALITY;
data = s->ringbuffer_.buffer_;
mask = s->ringbuffer_.mask_;
+ if (delta == 0) { /* No new input; still might want to flush or finish. */
+ if (!data) { /* No input has been processed so far. */
+ if (is_last) { /* Emit complete finalized stream. */
+ BROTLI_DCHECK(s->last_bytes_bits_ <= 14);
+ s->last_bytes_ |= (uint16_t)(3u << s->last_bytes_bits_);
+ s->last_bytes_bits_ = (uint8_t)(s->last_bytes_bits_ + 2u);
+ s->tiny_buf_.u8[0] = (uint8_t)s->last_bytes_;
+ s->tiny_buf_.u8[1] = (uint8_t)(s->last_bytes_ >> 8);
+ *output = s->tiny_buf_.u8;
+ *out_size = (s->last_bytes_bits_ + 7u) >> 3u;
+ return BROTLI_TRUE;
+ } else { /* No data, not last -> no-op. */
+ *out_size = 0;
+ return BROTLI_TRUE;
+ }
+ } else {
+ /* Fast compress performs flush every block -> flush is no-op. */
+ if (!is_last && (!force_flush || fast_compress)) { /* Another no-op. */
+ *out_size = 0;
+ return BROTLI_TRUE;
+ }
+ }
+ }
+ BROTLI_DCHECK(data);
+
+ if (s->params.quality > s->params.dictionary.max_quality) return BROTLI_FALSE;
/* Adding more blocks after "last" block is forbidden. */
if (s->is_last_block_emitted_) return BROTLI_FALSE;
if (is_last) s->is_last_block_emitted_ = BROTLI_TRUE;
@@ -991,19 +998,12 @@ static BROTLI_BOOL EncodeData(
}
}
- if (s->params.quality == FAST_ONE_PASS_COMPRESSION_QUALITY ||
- s->params.quality == FAST_TWO_PASS_COMPRESSION_QUALITY) {
+ if (fast_compress) {
uint8_t* storage;
size_t storage_ix = s->last_bytes_bits_;
size_t table_size;
int* table;
- if (delta == 0 && !is_last) {
- /* We have no new input data and we don't have to finish the stream, so
- nothing to do. */
- *out_size = 0;
- return BROTLI_TRUE;
- }
storage = GetBrotliStorage(s, 2 * bytes + 503);
if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
storage[0] = (uint8_t)s->last_bytes_;
@@ -1012,16 +1012,14 @@ static BROTLI_BOOL EncodeData(
if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
if (s->params.quality == FAST_ONE_PASS_COMPRESSION_QUALITY) {
BrotliCompressFragmentFast(
- m, &data[wrapped_last_processed_pos & mask],
+ s->one_pass_arena_, &data[wrapped_last_processed_pos & mask],
bytes, is_last,
table, table_size,
- s->cmd_depths_, s->cmd_bits_,
- &s->cmd_code_numbits_, s->cmd_code_,
&storage_ix, storage);
if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
} else {
BrotliCompressFragmentTwoPass(
- m, &data[wrapped_last_processed_pos & mask],
+ s->two_pass_arena_, &data[wrapped_last_processed_pos & mask],
bytes, is_last,
s->command_buf_, s->literal_buf_,
table, table_size,
@@ -1099,7 +1097,7 @@ static BROTLI_BOOL EncodeData(
const size_t max_commands = max_length / 8;
const size_t processed_bytes = (size_t)(s->input_pos_ - s->last_flush_pos_);
/* If maximal possible additional block doesn't fit metablock, flush now. */
- /* TODO: Postpone decision until next block arrives? */
+ /* TODO(eustas): Postpone decision until next block arrives? */
const BROTLI_BOOL next_input_fits_metablock = TO_BROTLI_BOOL(
processed_bytes + InputBlockSize(s) <= max_length);
/* If block splitting is not used, then flush as soon as there is some
@@ -1192,7 +1190,7 @@ static size_t WriteMetadataHeader(
if (block_size == 0) {
BrotliWriteBits(2, 0, &storage_ix, header);
} else {
- uint32_t nbits = (block_size == 1) ? 0 :
+ uint32_t nbits = (block_size == 1) ? 1 :
(Log2FloorNonZero((uint32_t)block_size - 1) + 1);
uint32_t nbytes = (nbits + 7) / 8;
BrotliWriteBits(2, nbytes, &storage_ix, header);
@@ -1201,228 +1199,6 @@ static size_t WriteMetadataHeader(
return (storage_ix + 7u) >> 3;
}
-static BROTLI_BOOL BrotliCompressBufferQuality10(
- int lgwin, size_t input_size, const uint8_t* input_buffer,
- size_t* encoded_size, uint8_t* encoded_buffer) {
- MemoryManager memory_manager;
- MemoryManager* m = &memory_manager;
-
- const size_t mask = BROTLI_SIZE_MAX >> 1;
- int dist_cache[4] = { 4, 11, 15, 16 };
- int saved_dist_cache[4] = { 4, 11, 15, 16 };
- BROTLI_BOOL ok = BROTLI_TRUE;
- const size_t max_out_size = *encoded_size;
- size_t total_out_size = 0;
- uint16_t last_bytes;
- uint8_t last_bytes_bits;
-
- const size_t hasher_eff_size = BROTLI_MIN(size_t,
- input_size, BROTLI_MAX_BACKWARD_LIMIT(lgwin) + BROTLI_WINDOW_GAP);
-
- BrotliEncoderParams params;
-
- const int lgmetablock = BROTLI_MIN(int, 24, lgwin + 1);
- size_t max_block_size;
- const size_t max_metablock_size = (size_t)1 << lgmetablock;
- const size_t max_literals_per_metablock = max_metablock_size / 8;
- const size_t max_commands_per_metablock = max_metablock_size / 8;
- size_t metablock_start = 0;
- uint8_t prev_byte = 0;
- uint8_t prev_byte2 = 0;
-
- Hasher hasher;
- HasherInit(&hasher);
-
- BrotliEncoderInitParams(&params);
- params.quality = 10;
- params.lgwin = lgwin;
- if (lgwin > BROTLI_MAX_WINDOW_BITS) {
- params.large_window = BROTLI_TRUE;
- }
- SanitizeParams(&params);
- params.lgblock = ComputeLgBlock(&params);
- ChooseDistanceParams(&params);
- max_block_size = (size_t)1 << params.lgblock;
-
- BrotliInitMemoryManager(m, 0, 0, 0);
-
- BROTLI_DCHECK(input_size <= mask + 1);
- EncodeWindowBits(lgwin, params.large_window, &last_bytes, &last_bytes_bits);
- InitOrStitchToPreviousBlock(m, &hasher, input_buffer, mask, &params,
- 0, hasher_eff_size, BROTLI_TRUE);
- if (BROTLI_IS_OOM(m)) goto oom;
-
- while (ok && metablock_start < input_size) {
- const size_t metablock_end =
- BROTLI_MIN(size_t, input_size, metablock_start + max_metablock_size);
- const size_t expected_num_commands =
- (metablock_end - metablock_start) / 12 + 16;
- Command* commands = 0;
- size_t num_commands = 0;
- size_t last_insert_len = 0;
- size_t num_literals = 0;
- size_t metablock_size = 0;
- size_t cmd_alloc_size = 0;
- BROTLI_BOOL is_last;
- uint8_t* storage;
- size_t storage_ix;
-
- ContextType literal_context_mode = ChooseContextMode(&params,
- input_buffer, metablock_start, mask, metablock_end - metablock_start);
- ContextLut literal_context_lut = BROTLI_CONTEXT_LUT(literal_context_mode);
-
- size_t block_start;
- for (block_start = metablock_start; block_start < metablock_end; ) {
- size_t block_size =
- BROTLI_MIN(size_t, metablock_end - block_start, max_block_size);
- ZopfliNode* nodes = BROTLI_ALLOC(m, ZopfliNode, block_size + 1);
- size_t path_size;
- size_t new_cmd_alloc_size;
- if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(nodes)) goto oom;
- BrotliInitZopfliNodes(nodes, block_size + 1);
- StitchToPreviousBlockH10(&hasher.privat._H10, block_size, block_start,
- input_buffer, mask);
- path_size = BrotliZopfliComputeShortestPath(m, block_size, block_start,
- input_buffer, mask, literal_context_lut, &params, dist_cache, &hasher,
- nodes);
- if (BROTLI_IS_OOM(m)) goto oom;
- /* We allocate a command buffer in the first iteration of this loop that
- will be likely big enough for the whole metablock, so that for most
- inputs we will not have to reallocate in later iterations. We do the
- allocation here and not before the loop, because if the input is small,
- this will be allocated after the Zopfli cost model is freed, so this
- will not increase peak memory usage.
- TODO: If the first allocation is too small, increase command
- buffer size exponentially. */
- new_cmd_alloc_size = BROTLI_MAX(size_t, expected_num_commands,
- num_commands + path_size + 1);
- if (cmd_alloc_size != new_cmd_alloc_size) {
- Command* new_commands = BROTLI_ALLOC(m, Command, new_cmd_alloc_size);
- if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(new_commands)) goto oom;
- cmd_alloc_size = new_cmd_alloc_size;
- if (commands) {
- memcpy(new_commands, commands, sizeof(Command) * num_commands);
- BROTLI_FREE(m, commands);
- }
- commands = new_commands;
- }
- BrotliZopfliCreateCommands(block_size, block_start, &nodes[0], dist_cache,
- &last_insert_len, &params, &commands[num_commands], &num_literals);
- num_commands += path_size;
- block_start += block_size;
- metablock_size += block_size;
- BROTLI_FREE(m, nodes);
- if (num_literals > max_literals_per_metablock ||
- num_commands > max_commands_per_metablock) {
- break;
- }
- }
-
- if (last_insert_len > 0) {
- InitInsertCommand(&commands[num_commands++], last_insert_len);
- num_literals += last_insert_len;
- }
-
- is_last = TO_BROTLI_BOOL(metablock_start + metablock_size == input_size);
- storage = NULL;
- storage_ix = last_bytes_bits;
-
- if (metablock_size == 0) {
- /* Write the ISLAST and ISEMPTY bits. */
- storage = BROTLI_ALLOC(m, uint8_t, 16);
- if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(storage)) goto oom;
- storage[0] = (uint8_t)last_bytes;
- storage[1] = (uint8_t)(last_bytes >> 8);
- BrotliWriteBits(2, 3, &storage_ix, storage);
- storage_ix = (storage_ix + 7u) & ~7u;
- } else if (!ShouldCompress(input_buffer, mask, metablock_start,
- metablock_size, num_literals, num_commands)) {
- /* Restore the distance cache, as its last update by
- CreateBackwardReferences is now unused. */
- memcpy(dist_cache, saved_dist_cache, 4 * sizeof(dist_cache[0]));
- storage = BROTLI_ALLOC(m, uint8_t, metablock_size + 16);
- if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(storage)) goto oom;
- storage[0] = (uint8_t)last_bytes;
- storage[1] = (uint8_t)(last_bytes >> 8);
- BrotliStoreUncompressedMetaBlock(is_last, input_buffer,
- metablock_start, mask, metablock_size,
- &storage_ix, storage);
- } else {
- MetaBlockSplit mb;
- BrotliEncoderParams block_params = params;
- InitMetaBlockSplit(&mb);
- BrotliBuildMetaBlock(m, input_buffer, metablock_start, mask,
- &block_params,
- prev_byte, prev_byte2,
- commands, num_commands,
- literal_context_mode,
- &mb);
- if (BROTLI_IS_OOM(m)) goto oom;
- {
- /* The number of distance symbols effectively used for distance
- histograms. It might be less than distance alphabet size
- for "Large Window Brotli" (32-bit). */
- BrotliOptimizeHistograms(block_params.dist.alphabet_size_limit, &mb);
- }
- storage = BROTLI_ALLOC(m, uint8_t, 2 * metablock_size + 503);
- if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(storage)) goto oom;
- storage[0] = (uint8_t)last_bytes;
- storage[1] = (uint8_t)(last_bytes >> 8);
- BrotliStoreMetaBlock(m, input_buffer, metablock_start, metablock_size,
- mask, prev_byte, prev_byte2,
- is_last,
- &block_params,
- literal_context_mode,
- commands, num_commands,
- &mb,
- &storage_ix, storage);
- if (BROTLI_IS_OOM(m)) goto oom;
- if (metablock_size + 4 < (storage_ix >> 3)) {
- /* Restore the distance cache and last byte. */
- memcpy(dist_cache, saved_dist_cache, 4 * sizeof(dist_cache[0]));
- storage[0] = (uint8_t)last_bytes;
- storage[1] = (uint8_t)(last_bytes >> 8);
- storage_ix = last_bytes_bits;
- BrotliStoreUncompressedMetaBlock(is_last, input_buffer,
- metablock_start, mask,
- metablock_size, &storage_ix, storage);
- }
- DestroyMetaBlockSplit(m, &mb);
- }
- last_bytes = (uint16_t)(storage[storage_ix >> 3]);
- last_bytes_bits = storage_ix & 7u;
- metablock_start += metablock_size;
- if (metablock_start < input_size) {
- prev_byte = input_buffer[metablock_start - 1];
- prev_byte2 = input_buffer[metablock_start - 2];
- }
- /* Save the state of the distance cache in case we need to restore it for
- emitting an uncompressed block. */
- memcpy(saved_dist_cache, dist_cache, 4 * sizeof(dist_cache[0]));
-
- {
- const size_t out_size = storage_ix >> 3;
- total_out_size += out_size;
- if (total_out_size <= max_out_size) {
- memcpy(encoded_buffer, storage, out_size);
- encoded_buffer += out_size;
- } else {
- ok = BROTLI_FALSE;
- }
- }
- BROTLI_FREE(m, storage);
- BROTLI_FREE(m, commands);
- }
-
- *encoded_size = total_out_size;
- DestroyHasher(m, &hasher);
- return ok;
-
-oom:
- BrotliWipeOutMemoryManager(m);
- return BROTLI_FALSE;
-}
-
size_t BrotliEncoderMaxCompressedSize(size_t input_size) {
/* [window bits / empty metadata] + N * [uncompressed] + [last empty] */
size_t num_large_blocks = input_size >> 14;
@@ -1470,7 +1246,8 @@ static size_t MakeUncompressedStream(
BROTLI_BOOL BrotliEncoderCompress(
int quality, int lgwin, BrotliEncoderMode mode, size_t input_size,
- const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)], size_t* encoded_size,
+ const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)],
+ size_t* encoded_size,
uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]) {
BrotliEncoderState* s;
size_t out_size = *encoded_size;
@@ -1487,17 +1264,6 @@ BROTLI_BOOL BrotliEncoderCompress(
*encoded_buffer = 6;
return BROTLI_TRUE;
}
- if (quality == 10) {
- /* TODO: Implement this direct path for all quality levels. */
- const int lg_win = BROTLI_MIN(int, BROTLI_LARGE_MAX_WINDOW_BITS,
- BROTLI_MAX(int, 16, lgwin));
- int ok = BrotliCompressBufferQuality10(lg_win, input_size, input_buffer,
- encoded_size, encoded_buffer);
- if (!ok || (max_out_size && *encoded_size > max_out_size)) {
- goto fallback;
- }
- return BROTLI_TRUE;
- }
s = BrotliEncoderCreateInstance(0, 0, 0);
if (!s) {
@@ -1509,6 +1275,7 @@ BROTLI_BOOL BrotliEncoderCompress(
uint8_t* next_out = encoded_buffer;
size_t total_out = 0;
BROTLI_BOOL result = BROTLI_FALSE;
+ /* TODO(eustas): check that parameters are sane. */
BrotliEncoderSetParameter(s, BROTLI_PARAM_QUALITY, (uint32_t)quality);
BrotliEncoderSetParameter(s, BROTLI_PARAM_LGWIN, (uint32_t)lgwin);
BrotliEncoderSetParameter(s, BROTLI_PARAM_MODE, (uint32_t)mode);
@@ -1560,6 +1327,18 @@ static void InjectBytePaddingBlock(BrotliEncoderState* s) {
s->available_out_ += (seal_bits + 7) >> 3;
}
+/* Fills the |total_out|, if it is not NULL. */
+static void SetTotalOut(BrotliEncoderState* s, size_t* total_out) {
+ if (total_out) {
+ /* Saturating conversion uint64_t -> size_t */
+ size_t result = (size_t)-1;
+ if (s->total_out_ < result) {
+ result = (size_t)s->total_out_;
+ }
+ *total_out = result;
+ }
+}
+
/* Injects padding bits or pushes compressed data to output.
Returns false if nothing is done. */
static BROTLI_BOOL InjectFlushOrPushOutput(BrotliEncoderState* s,
@@ -1579,7 +1358,7 @@ static BROTLI_BOOL InjectFlushOrPushOutput(BrotliEncoderState* s,
s->next_out_ += copy_output_size;
s->available_out_ -= copy_output_size;
s->total_out_ += copy_output_size;
- if (total_out) *total_out = s->total_out_;
+ SetTotalOut(s, total_out);
return BROTLI_TRUE;
}
@@ -1676,19 +1455,19 @@ static BROTLI_BOOL BrotliEncoderCompressStreamFast(
if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
if (s->params.quality == FAST_ONE_PASS_COMPRESSION_QUALITY) {
- BrotliCompressFragmentFast(m, *next_in, block_size, is_last, table,
- table_size, s->cmd_depths_, s->cmd_bits_, &s->cmd_code_numbits_,
- s->cmd_code_, &storage_ix, storage);
+ BrotliCompressFragmentFast(s->one_pass_arena_, *next_in, block_size,
+ is_last, table, table_size, &storage_ix, storage);
if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
} else {
- BrotliCompressFragmentTwoPass(m, *next_in, block_size, is_last,
- command_buf, literal_buf, table, table_size,
+ BrotliCompressFragmentTwoPass(s->two_pass_arena_, *next_in, block_size,
+ is_last, command_buf, literal_buf, table, table_size,
&storage_ix, storage);
if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
}
if (block_size != 0) {
*next_in += block_size;
*available_in -= block_size;
+ s->total_in_ += block_size;
}
if (inplace) {
size_t out_bytes = storage_ix >> 3;
@@ -1697,7 +1476,7 @@ static BROTLI_BOOL BrotliEncoderCompressStreamFast(
*next_out += out_bytes;
*available_out -= out_bytes;
s->total_out_ += out_bytes;
- if (total_out) *total_out = s->total_out_;
+ SetTotalOut(s, total_out);
} else {
size_t out_bytes = storage_ix >> 3;
s->next_out_ = storage;
@@ -1766,6 +1545,7 @@ static BROTLI_BOOL ProcessMetadata(
memcpy(*next_out, *next_in, copy);
*next_in += copy;
*available_in -= copy;
+ s->total_in_ += copy; /* not actually data input, though */
s->remaining_metadata_bytes_ -= copy;
*next_out += copy;
*available_out -= copy;
@@ -1776,6 +1556,7 @@ static BROTLI_BOOL ProcessMetadata(
memcpy(s->next_out_, *next_in, copy);
*next_in += copy;
*available_in -= copy;
+ s->total_in_ += copy; /* not actually data input, though */
s->remaining_metadata_bytes_ -= copy;
s->available_out_ = copy;
}
@@ -1803,7 +1584,7 @@ static void UpdateSizeHint(BrotliEncoderState* s, size_t available_in) {
BROTLI_BOOL BrotliEncoderCompressStream(
BrotliEncoderState* s, BrotliEncoderOperation op, size_t* available_in,
- const uint8_t** next_in, size_t* available_out,uint8_t** next_out,
+ const uint8_t** next_in, size_t* available_out, uint8_t** next_out,
size_t* total_out) {
if (!EnsureInitialized(s)) return BROTLI_FALSE;
@@ -1845,6 +1626,7 @@ BROTLI_BOOL BrotliEncoderCompressStream(
CopyInputToRingBuffer(s, copy_input_size, *next_in);
*next_in += copy_input_size;
*available_in -= copy_input_size;
+ s->total_in_ += copy_input_size;
if (s->flint_ > 0) s->flint_ = (int8_t)(s->flint_ - (int)copy_input_size);
continue;
}
@@ -1922,6 +1704,293 @@ uint32_t BrotliEncoderVersion(void) {
return BROTLI_VERSION;
}
+BrotliEncoderPreparedDictionary* BrotliEncoderPrepareDictionary(
+ BrotliSharedDictionaryType type, size_t size,
+ const uint8_t data[BROTLI_ARRAY_PARAM(size)], int quality,
+ brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque) {
+ ManagedDictionary* managed_dictionary = NULL;
+ BROTLI_BOOL type_is_known = BROTLI_FALSE;
+ type_is_known |= (type == BROTLI_SHARED_DICTIONARY_RAW);
+#if defined(BROTLI_EXPERIMENTAL)
+ type_is_known |= (type == BROTLI_SHARED_DICTIONARY_SERIALIZED);
+#endif /* BROTLI_EXPERIMENTAL */
+ if (!type_is_known) {
+ return NULL;
+ }
+ managed_dictionary =
+ BrotliCreateManagedDictionary(alloc_func, free_func, opaque);
+ if (managed_dictionary == NULL) {
+ return NULL;
+ }
+ if (type == BROTLI_SHARED_DICTIONARY_RAW) {
+ managed_dictionary->dictionary = (uint32_t*)CreatePreparedDictionary(
+ &managed_dictionary->memory_manager_, data, size);
+ }
+#if defined(BROTLI_EXPERIMENTAL)
+ if (type == BROTLI_SHARED_DICTIONARY_SERIALIZED) {
+ SharedEncoderDictionary* dict = (SharedEncoderDictionary*)BrotliAllocate(
+ &managed_dictionary->memory_manager_, sizeof(SharedEncoderDictionary));
+ managed_dictionary->dictionary = (uint32_t*)dict;
+ if (dict != NULL) {
+ BROTLI_BOOL ok = BrotliInitCustomSharedEncoderDictionary(
+ &managed_dictionary->memory_manager_, data, size, quality, dict);
+ if (!ok) {
+ BrotliFree(&managed_dictionary->memory_manager_, dict);
+ managed_dictionary->dictionary = NULL;
+ }
+ }
+ }
+#else /* BROTLI_EXPERIMENTAL */
+ (void)quality;
+#endif /* BROTLI_EXPERIMENTAL */
+ if (managed_dictionary->dictionary == NULL) {
+ BrotliDestroyManagedDictionary(managed_dictionary);
+ return NULL;
+ }
+ return (BrotliEncoderPreparedDictionary*)managed_dictionary;
+}
+
+void BrotliEncoderDestroyPreparedDictionary(
+ BrotliEncoderPreparedDictionary* dictionary) {
+ ManagedDictionary* dict = (ManagedDictionary*)dictionary;
+ if (!dictionary) return;
+ /* First field of dictionary structs. */
+ /* Only managed dictionaries are eligible for destruction by this method. */
+ if (dict->magic != kManagedDictionaryMagic) {
+ return;
+ }
+ if (dict->dictionary == NULL) {
+ /* This should never ever happen. */
+ } else if (*dict->dictionary == kLeanPreparedDictionaryMagic) {
+ DestroyPreparedDictionary(
+ &dict->memory_manager_, (PreparedDictionary*)dict->dictionary);
+ } else if (*dict->dictionary == kSharedDictionaryMagic) {
+ BrotliCleanupSharedEncoderDictionary(&dict->memory_manager_,
+ (SharedEncoderDictionary*)dict->dictionary);
+ BrotliFree(&dict->memory_manager_, dict->dictionary);
+ } else {
+ /* There is also kPreparedDictionaryMagic, but such instances should be
+ * constructed and destroyed by different means. */
+ }
+ dict->dictionary = NULL;
+ BrotliDestroyManagedDictionary(dict);
+}
+
+BROTLI_BOOL BrotliEncoderAttachPreparedDictionary(BrotliEncoderState* state,
+ const BrotliEncoderPreparedDictionary* dictionary) {
+ /* First field of dictionary structs */
+ const BrotliEncoderPreparedDictionary* dict = dictionary;
+ uint32_t magic = *((const uint32_t*)dict);
+ SharedEncoderDictionary* current = NULL;
+ if (magic == kManagedDictionaryMagic) {
+ /* Unwrap managed dictionary. */
+ ManagedDictionary* managed_dictionary = (ManagedDictionary*)dict;
+ magic = *managed_dictionary->dictionary;
+ dict = (BrotliEncoderPreparedDictionary*)managed_dictionary->dictionary;
+ }
+ current = &state->params.dictionary;
+ if (magic == kPreparedDictionaryMagic ||
+ magic == kLeanPreparedDictionaryMagic) {
+ const PreparedDictionary* prepared = (const PreparedDictionary*)dict;
+ if (!AttachPreparedDictionary(&current->compound, prepared)) {
+ return BROTLI_FALSE;
+ }
+ } else if (magic == kSharedDictionaryMagic) {
+ const SharedEncoderDictionary* attached =
+ (const SharedEncoderDictionary*)dict;
+ BROTLI_BOOL was_default = !current->contextual.context_based &&
+ current->contextual.num_dictionaries == 1 &&
+ current->contextual.dict[0]->hash_table_words ==
+ kStaticDictionaryHashWords &&
+ current->contextual.dict[0]->hash_table_lengths ==
+ kStaticDictionaryHashLengths;
+ BROTLI_BOOL new_default = !attached->contextual.context_based &&
+ attached->contextual.num_dictionaries == 1 &&
+ attached->contextual.dict[0]->hash_table_words ==
+ kStaticDictionaryHashWords &&
+ attached->contextual.dict[0]->hash_table_lengths ==
+ kStaticDictionaryHashLengths;
+ size_t i;
+ if (state->is_initialized_) return BROTLI_FALSE;
+ current->max_quality =
+ BROTLI_MIN(int, current->max_quality, attached->max_quality);
+ for (i = 0; i < attached->compound.num_chunks; i++) {
+ if (!AttachPreparedDictionary(&current->compound,
+ attached->compound.chunks[i])) {
+ return BROTLI_FALSE;
+ }
+ }
+ if (!new_default) {
+ if (!was_default) return BROTLI_FALSE;
+ /* Copy by value, but then set num_instances_ to 0 because their memory
+ is managed by attached, not by current */
+ current->contextual = attached->contextual;
+ current->contextual.num_instances_ = 0;
+ }
+ } else {
+ return BROTLI_FALSE;
+ }
+ return BROTLI_TRUE;
+}
+
+size_t BrotliEncoderEstimatePeakMemoryUsage(int quality, int lgwin,
+ size_t input_size) {
+ BrotliEncoderParams params;
+ size_t memory_manager_slots = BROTLI_ENCODER_MEMORY_MANAGER_SLOTS;
+ size_t memory_manager_size = memory_manager_slots * sizeof(void*);
+ BrotliEncoderInitParams(&params);
+ params.quality = quality;
+ params.lgwin = lgwin;
+ params.size_hint = input_size;
+ params.large_window = lgwin > BROTLI_MAX_WINDOW_BITS;
+ SanitizeParams(&params);
+ params.lgblock = ComputeLgBlock(&params);
+ ChooseHasher(&params, &params.hasher);
+ if (params.quality == FAST_ONE_PASS_COMPRESSION_QUALITY ||
+ params.quality == FAST_TWO_PASS_COMPRESSION_QUALITY) {
+ size_t state_size = sizeof(BrotliEncoderState);
+ size_t block_size = BROTLI_MIN(size_t, input_size, (1ul << params.lgwin));
+ size_t hash_table_size =
+ HashTableSize(MaxHashTableSize(params.quality), block_size);
+ size_t hash_size =
+ (hash_table_size < (1u << 10)) ? 0 : sizeof(int) * hash_table_size;
+ size_t cmdbuf_size = params.quality == FAST_TWO_PASS_COMPRESSION_QUALITY ?
+ 5 * BROTLI_MIN(size_t, block_size, 1ul << 17) : 0;
+ if (params.quality == FAST_ONE_PASS_COMPRESSION_QUALITY) {
+ state_size += sizeof(BrotliOnePassArena);
+ } else {
+ state_size += sizeof(BrotliTwoPassArena);
+ }
+ return hash_size + cmdbuf_size + state_size;
+ } else {
+ size_t short_ringbuffer_size = (size_t)1 << params.lgblock;
+ int ringbuffer_bits = ComputeRbBits(&params);
+ size_t ringbuffer_size = input_size < short_ringbuffer_size ?
+ input_size : (1u << ringbuffer_bits) + short_ringbuffer_size;
+ size_t hash_size[4] = {0};
+ size_t metablock_size =
+ BROTLI_MIN(size_t, input_size, MaxMetablockSize(&params));
+ size_t inputblock_size =
+ BROTLI_MIN(size_t, input_size, (size_t)1 << params.lgblock);
+ size_t cmdbuf_size = metablock_size * 2 + inputblock_size * 6;
+ size_t outbuf_size = metablock_size * 2 + 503;
+ size_t histogram_size = 0;
+ HasherSize(&params, BROTLI_TRUE, input_size, hash_size);
+ if (params.quality < MIN_QUALITY_FOR_BLOCK_SPLIT) {
+ cmdbuf_size = BROTLI_MIN(size_t, cmdbuf_size,
+ MAX_NUM_DELAYED_SYMBOLS * sizeof(Command) + inputblock_size * 12);
+ }
+ if (params.quality >= MIN_QUALITY_FOR_HQ_BLOCK_SPLITTING) {
+ /* Only a very rough estimation, based on enwik8. */
+ histogram_size = 200 << 20;
+ } else if (params.quality >= MIN_QUALITY_FOR_BLOCK_SPLIT) {
+ size_t literal_histograms =
+ BROTLI_MIN(size_t, metablock_size / 6144, 256);
+ size_t command_histograms =
+ BROTLI_MIN(size_t, metablock_size / 6144, 256);
+ size_t distance_histograms =
+ BROTLI_MIN(size_t, metablock_size / 6144, 256);
+ histogram_size = literal_histograms * sizeof(HistogramLiteral) +
+ command_histograms * sizeof(HistogramCommand) +
+ distance_histograms * sizeof(HistogramDistance);
+ }
+ return (memory_manager_size + ringbuffer_size +
+ hash_size[0] + hash_size[1] + hash_size[2] + hash_size[3] +
+ cmdbuf_size +
+ outbuf_size +
+ histogram_size);
+ }
+}
+size_t BrotliEncoderGetPreparedDictionarySize(
+ const BrotliEncoderPreparedDictionary* prepared_dictionary) {
+ /* First field of dictionary structs */
+ const BrotliEncoderPreparedDictionary* prepared = prepared_dictionary;
+ uint32_t magic = *((const uint32_t*)prepared);
+ size_t overhead = 0;
+ if (magic == kManagedDictionaryMagic) {
+ const ManagedDictionary* managed = (const ManagedDictionary*)prepared;
+ overhead = sizeof(ManagedDictionary);
+ magic = *managed->dictionary;
+ prepared = (const BrotliEncoderPreparedDictionary*)managed->dictionary;
+ }
+
+ if (magic == kPreparedDictionaryMagic) {
+ const PreparedDictionary* dictionary =
+ (const PreparedDictionary*)prepared;
+ /* Keep in sync with step 3 of CreatePreparedDictionary */
+ return sizeof(PreparedDictionary) + dictionary->source_size +
+ (sizeof(uint32_t) << dictionary->slot_bits) +
+ (sizeof(uint16_t) << dictionary->bucket_bits) +
+ (sizeof(uint32_t) * dictionary->num_items) + overhead;
+ } else if (magic == kLeanPreparedDictionaryMagic) {
+ const PreparedDictionary* dictionary =
+ (const PreparedDictionary*)prepared;
+ /* Keep in sync with step 3 of CreatePreparedDictionary */
+ return sizeof(PreparedDictionary) + sizeof(uint8_t*) +
+ (sizeof(uint32_t) << dictionary->slot_bits) +
+ (sizeof(uint16_t) << dictionary->bucket_bits) +
+ (sizeof(uint32_t) * dictionary->num_items) + overhead;
+ } else if (magic == kSharedDictionaryMagic) {
+ const SharedEncoderDictionary* dictionary =
+ (const SharedEncoderDictionary*)prepared;
+ const CompoundDictionary* compound = &dictionary->compound;
+ const ContextualEncoderDictionary* contextual = &dictionary->contextual;
+ size_t result = sizeof(*dictionary);
+ size_t i;
+ size_t num_instances;
+ const BrotliEncoderDictionary* instances;
+ for (i = 0; i < compound->num_prepared_instances_; i++) {
+ size_t size = BrotliEncoderGetPreparedDictionarySize(
+ (const BrotliEncoderPreparedDictionary*)
+ compound->prepared_instances_[i]);
+ if (!size) return 0; /* error */
+ result += size;
+ }
+ if (contextual->context_based) {
+ num_instances = contextual->num_instances_;
+ instances = contextual->instances_;
+ result += sizeof(*instances) * num_instances;
+ } else {
+ num_instances = 1;
+ instances = &contextual->instance_;
+ }
+ for (i = 0; i < num_instances; i++) {
+ const BrotliEncoderDictionary* dict = &instances[i];
+ result += dict->trie.pool_capacity * sizeof(BrotliTrieNode);
+ if (dict->hash_table_data_words_) {
+ result += sizeof(kStaticDictionaryHashWords);
+ }
+ if (dict->hash_table_data_lengths_) {
+ result += sizeof(kStaticDictionaryHashLengths);
+ }
+ if (dict->buckets_data_) {
+ result += sizeof(*dict->buckets_data_) * dict->buckets_alloc_size_;
+ }
+ if (dict->dict_words_data_) {
+ result += sizeof(*dict->dict_words) * dict->dict_words_alloc_size_;
+ }
+ if (dict->words_instance_) {
+ result += sizeof(*dict->words_instance_);
+ /* data_size not added here: it is never allocated by the
+ SharedEncoderDictionary, instead it always points to the file
+ already loaded in memory. So if the caller wants to include
+ this memory as well, add the size of the loaded dictionary
+ file to this. */
+ }
+ }
+ return result + overhead;
+ }
+ return 0; /* error */
+}
+
+#if defined(BROTLI_TEST)
+size_t MakeUncompressedStreamForTest(const uint8_t*, size_t, uint8_t*);
+size_t MakeUncompressedStreamForTest(
+ const uint8_t* input, size_t input_size, uint8_t* output) {
+ return MakeUncompressedStream(input, input_size, output);
+}
+#endif
+
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.c
index c9e963b89d2..6602c55a24e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.c
@@ -4,18 +4,45 @@
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
-#include "./encoder_dict.h"
+#include "encoder_dict.h"
+
+#include <stdlib.h> /* malloc, free */
#include "../common/dictionary.h"
+#include "../common/platform.h"
+#include "../common/shared_dictionary_internal.h"
#include "../common/transform.h"
-#include "./dictionary_hash.h"
-#include "./hash.h"
+#include "compound_dictionary.h"
+#include "dictionary_hash.h"
+#include "memory.h"
+#include "quality.h"
+#include "hash.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
-void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict) {
+#define NUM_HASH_BITS 15u
+#define NUM_HASH_BUCKETS (1u << NUM_HASH_BITS)
+
+static void BrotliTrieInit(BrotliTrie* trie) {
+ trie->pool_capacity = 0;
+ trie->pool_size = 0;
+ trie->pool = 0;
+
+ /* Set up the root node */
+ trie->root.single = 0;
+ trie->root.len_ = 0;
+ trie->root.idx_ = 0;
+ trie->root.sub = 0;
+}
+
+static void BrotliTrieFree(MemoryManager* m, BrotliTrie* trie) {
+ BrotliFree(m, trie->pool);
+}
+
+/* Initializes to RFC 7932 static dictionary / transforms. */
+static void InitEncoderDictionary(BrotliEncoderDictionary* dict) {
dict->words = BrotliGetDictionary();
dict->num_transforms = (uint32_t)BrotliGetTransforms()->num_transforms;
@@ -26,8 +53,588 @@ void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict) {
dict->cutoffTransformsCount = kCutoffTransformsCount;
dict->cutoffTransforms = kCutoffTransforms;
+
+ dict->parent = 0;
+
+ dict->hash_table_data_words_ = 0;
+ dict->hash_table_data_lengths_ = 0;
+ dict->buckets_alloc_size_ = 0;
+ dict->buckets_data_ = 0;
+ dict->dict_words_alloc_size_ = 0;
+ dict->dict_words_data_ = 0;
+ dict->words_instance_ = 0;
+ dict->has_words_heavy = BROTLI_FALSE;
+ BrotliTrieInit(&dict->trie);
+}
+
+static void BrotliDestroyEncoderDictionary(MemoryManager* m,
+ BrotliEncoderDictionary* dict) {
+ BrotliFree(m, dict->hash_table_data_words_);
+ BrotliFree(m, dict->hash_table_data_lengths_);
+ BrotliFree(m, dict->buckets_data_);
+ BrotliFree(m, dict->dict_words_data_);
+ BrotliFree(m, dict->words_instance_);
+ BrotliTrieFree(m, &dict->trie);
+}
+
+#if defined(BROTLI_EXPERIMENTAL)
+/* Word length must be at least 4 bytes */
+static uint32_t Hash(const uint8_t* data, int bits) {
+ uint32_t h = BROTLI_UNALIGNED_LOAD32LE(data) * kHashMul32;
+ /* The higher bits contain more mixture from the multiplication,
+ so we take our results from there. */
+ return h >> (32 - bits);
+}
+
+/* Theoretical max possible word size after transform */
+#define kTransformedBufferSize \
+ (256 + 256 + SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH)
+
+/* To be safe buffer must have at least kTransformedBufferSize */
+static void TransformedDictionaryWord(uint32_t word_idx, int len, int transform,
+ const BrotliTransforms* transforms,
+ const BrotliEncoderDictionary* dict,
+ uint8_t* buffer, size_t* size) {
+ const uint8_t* dict_word = &dict->words->data[
+ dict->words->offsets_by_length[len] + (uint32_t)len * word_idx];
+ *size = (size_t)BrotliTransformDictionaryWord(buffer, dict_word, len,
+ transforms, transform);
+}
+
+static DictWord MakeDictWord(uint8_t len, uint8_t transform, uint16_t idx) {
+ DictWord result;
+ result.len = len;
+ result.transform = transform;
+ result.idx = idx;
+ return result;
+}
+
+static uint32_t BrotliTrieAlloc(MemoryManager* m, size_t num, BrotliTrie* trie,
+ BrotliTrieNode** keep) {
+ uint32_t result;
+ uint32_t keep_index = 0;
+ if (keep && *keep != &trie->root) {
+ /* Optional node to keep, since address may change after re-allocating */
+ keep_index = (uint32_t)(*keep - trie->pool);
+ }
+ if (trie->pool_size == 0) {
+ /* Have a dummy node in the front. We do not want the result to be 0, it
+ must be at least 1, 0 represents "null pointer" */
+ trie->pool_size = 1;
+ }
+ BROTLI_ENSURE_CAPACITY(m, BrotliTrieNode, trie->pool, trie->pool_capacity,
+ trie->pool_size + num);
+ if (BROTLI_IS_OOM(m)) return 0;
+ /* Init the new nodes to empty */
+ memset(trie->pool + trie->pool_size, 0, sizeof(*trie->pool) * num);
+ result = (uint32_t)trie->pool_size;
+ trie->pool_size += num;
+ if (keep && *keep != &trie->root) {
+ *keep = trie->pool + keep_index;
+ }
+ return result;
+}
+
+/**
+ * len and idx: payload for last node
+ * word, size: the string
+ * index: position in the string
+ */
+static BROTLI_BOOL BrotliTrieNodeAdd(MemoryManager* m, uint8_t len,
+ uint32_t idx, const uint8_t* word, size_t size, int index,
+ BrotliTrieNode* node, BrotliTrie* trie) {
+ BrotliTrieNode* child = 0;
+ uint8_t c;
+ if ((size_t)index == size) {
+ if (!node->len_ || idx < node->idx_) {
+ node->len_ = len;
+ node->idx_ = idx;
+ }
+ return BROTLI_TRUE;
+ }
+ c = word[index];
+ if (node->single && c != node->c) {
+ BrotliTrieNode old = trie->pool[node->sub];
+ uint32_t new_nodes = BrotliTrieAlloc(m, 32, trie, &node);
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
+ node->single = 0;
+ node->sub = new_nodes;
+ trie->pool[node->sub + (node->c >> 4)].sub = new_nodes + 16;
+ trie->pool[trie->pool[node->sub + (node->c >> 4)].sub + (node->c & 15)] =
+ old;
+ }
+ if (!node->sub) {
+ uint32_t new_node = BrotliTrieAlloc(m, 1, trie, &node);
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
+ node->single = 1;
+ node->c = c;
+ node->sub = new_node;
+ }
+ if (node->single) {
+ child = &trie->pool[node->sub];
+ } else {
+ if (!trie->pool[node->sub + (c >> 4)].sub) {
+ uint32_t new_nodes = BrotliTrieAlloc(m, 16, trie, &node);
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
+ trie->pool[node->sub + (c >> 4)].sub = new_nodes;
+ }
+ child = &trie->pool[trie->pool[node->sub + (c >> 4)].sub + (c & 15)];
+ }
+ return BrotliTrieNodeAdd(m, len, idx, word, size, index + 1, child, trie);
+}
+
+static BROTLI_BOOL BrotliTrieAdd(MemoryManager* m, uint8_t len, uint32_t idx,
+ const uint8_t* word, size_t size, BrotliTrie* trie) {
+ return BrotliTrieNodeAdd(m, len, idx, word, size, 0, &trie->root, trie);
+}
+
+const BrotliTrieNode* BrotliTrieSub(const BrotliTrie* trie,
+ const BrotliTrieNode* node, uint8_t c) {
+ BrotliTrieNode* temp_node;
+ if (node->single) {
+ if (node->c == c) return &trie->pool[node->sub];
+ return 0;
+ }
+ if (!node->sub) return 0;
+ temp_node = &trie->pool[node->sub + (c >> 4)];
+ if (!temp_node->sub) return 0;
+ return &trie->pool[temp_node->sub + (c & 15)];
+}
+
+static const BrotliTrieNode* BrotliTrieFind(const BrotliTrie* trie,
+ const uint8_t* word, size_t size) {
+ const BrotliTrieNode* node = &trie->root;
+ size_t i;
+ for (i = 0; i < size; i++) {
+ node = BrotliTrieSub(trie, node, word[i]);
+ if (!node) return 0;
+ }
+ return node;
+}
+
+static BROTLI_BOOL BuildDictionaryLut(MemoryManager* m,
+ const BrotliTransforms* transforms,
+ BrotliEncoderDictionary* dict) {
+ uint32_t i;
+ DictWord* dict_words;
+ uint16_t* buckets;
+ DictWord** words_by_hash;
+ size_t* words_by_hash_size;
+ size_t* words_by_hash_capacity;
+ BrotliTrie dedup;
+ uint8_t word[kTransformedBufferSize];
+ size_t word_size;
+ size_t total = 0;
+ uint8_t l;
+ uint16_t idx;
+
+ BrotliTrieInit(&dedup);
+
+ words_by_hash = (DictWord**)BrotliAllocate(m,
+ sizeof(*words_by_hash) * NUM_HASH_BUCKETS);
+ words_by_hash_size = (size_t*)BrotliAllocate(m,
+ sizeof(*words_by_hash_size) * NUM_HASH_BUCKETS);
+ words_by_hash_capacity = (size_t*)BrotliAllocate(m,
+ sizeof(*words_by_hash_capacity) * NUM_HASH_BUCKETS);
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
+ memset(words_by_hash, 0, sizeof(*words_by_hash) * NUM_HASH_BUCKETS);
+ memset(words_by_hash_size, 0, sizeof(*words_by_hash_size) * NUM_HASH_BUCKETS);
+ memset(words_by_hash_capacity, 0,
+ sizeof(*words_by_hash_capacity) * NUM_HASH_BUCKETS);
+
+ if (transforms->num_transforms > 0) {
+ for (l = SHARED_BROTLI_MIN_DICTIONARY_WORD_LENGTH;
+ l <= SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH; ++l) {
+ uint16_t n = dict->words->size_bits_by_length[l] ?
+ (uint16_t)(1 << dict->words->size_bits_by_length[l]) : 0u;
+ for (idx = 0; idx < n; ++idx) {
+ uint32_t key;
+ /* First transform (usually identity) */
+ TransformedDictionaryWord(idx, l, 0, transforms, dict, word,
+ &word_size);
+ /* Cannot hash words smaller than 4 bytes */
+ if (word_size < 4) {
+ /* Break instead of continue, all next words of this length will have
+ same length after transform */
+ break;
+ }
+ if (!BrotliTrieAdd(m, 0, idx, word, word_size, &dedup)) {
+ return BROTLI_FALSE;
+ }
+ key = Hash(word, NUM_HASH_BITS);
+ BROTLI_ENSURE_CAPACITY_APPEND(m, DictWord, words_by_hash[key],
+ words_by_hash_capacity[key], words_by_hash_size[key],
+ MakeDictWord(l, 0, idx));
+ ++total;
+ }
+ }
+ }
+
+ /* These LUT transforms only supported if no custom transforms. This is
+ ok, we will use the heavy trie instead. */
+ if (transforms == BrotliGetTransforms()) {
+ for (l = SHARED_BROTLI_MIN_DICTIONARY_WORD_LENGTH;
+ l <= SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH; ++l) {
+ uint16_t n = dict->words->size_bits_by_length[l] ?
+ (uint16_t)(1 << dict->words->size_bits_by_length[l]) : 0u;
+ for (idx = 0; idx < n; ++idx) {
+ int k;
+ BROTLI_BOOL is_ascii = BROTLI_TRUE;
+ size_t offset = dict->words->offsets_by_length[l] + (size_t)l * idx;
+ const uint8_t* data = &dict->words->data[offset];
+ for (k = 0; k < l; ++k) {
+ if (data[k] >= 128) is_ascii = BROTLI_FALSE;
+ }
+ if (data[0] < 128) {
+ int transform = 9; /* {empty, uppercase first, empty} */
+ uint32_t ix = idx + (uint32_t)transform * n;
+ const BrotliTrieNode* it;
+ TransformedDictionaryWord(idx, l, transform, transforms,
+ dict, word, &word_size);
+ it = BrotliTrieFind(&dedup, word, word_size);
+ if (!it || it->idx_ > ix) {
+ uint32_t key = Hash(word, NUM_HASH_BITS);
+ if (!BrotliTrieAdd(m, 0, ix, word, word_size, &dedup)) {
+ return BROTLI_FALSE;
+ }
+ BROTLI_ENSURE_CAPACITY_APPEND(m, DictWord, words_by_hash[key],
+ words_by_hash_capacity[key], words_by_hash_size[key],
+ MakeDictWord(l, BROTLI_TRANSFORM_UPPERCASE_FIRST, idx));
+ ++total;
+ }
+ }
+ if (is_ascii) {
+ int transform = 44; /* {empty, uppercase all, empty} */
+ uint32_t ix = idx + (uint32_t)transform * n;
+ const BrotliTrieNode* it;
+ TransformedDictionaryWord(idx, l, transform, transforms,
+ dict, word, &word_size);
+ it = BrotliTrieFind(&dedup, word, word_size);
+ if (!it || it->idx_ > ix) {
+ uint32_t key = Hash(word, NUM_HASH_BITS);
+ if (!BrotliTrieAdd(m, 0, ix, word, word_size, &dedup)) {
+ return BROTLI_FALSE;
+ }
+ BROTLI_ENSURE_CAPACITY_APPEND(m, DictWord, words_by_hash[key],
+ words_by_hash_capacity[key], words_by_hash_size[key],
+ MakeDictWord(l, BROTLI_TRANSFORM_UPPERCASE_ALL, idx));
+ ++total;
+ }
+ }
+ }
+ }
+ }
+
+ dict_words = (DictWord*)BrotliAllocate(m,
+ sizeof(*dict->dict_words) * (total + 1));
+ buckets = (uint16_t*)BrotliAllocate(m,
+ sizeof(*dict->buckets) * NUM_HASH_BUCKETS);
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
+ dict->dict_words_alloc_size_ = total + 1;
+ dict->dict_words = dict->dict_words_data_ = dict_words;
+ dict->buckets_alloc_size_ = NUM_HASH_BUCKETS;
+ dict->buckets = dict->buckets_data_ = buckets;
+
+ /* Unused; makes offsets start from 1. */
+ dict_words[0] = MakeDictWord(0, 0, 0);
+ total = 1;
+ for (i = 0; i < NUM_HASH_BUCKETS; ++i) {
+ size_t num_words = words_by_hash_size[i];
+ if (num_words > 0) {
+ buckets[i] = (uint16_t)(total);
+ memcpy(&dict_words[total], &words_by_hash[i][0],
+ sizeof(dict_words[0]) * num_words);
+ total += num_words;
+ dict_words[total - 1].len |= 0x80;
+ } else {
+ buckets[i] = 0;
+ }
+ }
+
+ for (i = 0; i < NUM_HASH_BUCKETS; ++i) {
+ BrotliFree(m, words_by_hash[i]);
+ }
+ BrotliFree(m, words_by_hash);
+ BrotliFree(m, words_by_hash_size);
+ BrotliFree(m, words_by_hash_capacity);
+ BrotliTrieFree(m, &dedup);
+
+ return BROTLI_TRUE;
+}
+
+static void BuildDictionaryHashTable(uint16_t* hash_table_words,
+ uint8_t* hash_table_lengths, const BrotliDictionary* dict) {
+ int j, len;
+ /* The order of the loops is such that in case of collision, words with
+ shorter length are preferred, and in case of same length, words with
+ smaller index. There is only a single word per bucket. */
+ /* TODO(lode): consider adding optional user-supplied frequency_map to use
+ for preferred words instead, this can make the encoder better for
+ quality 9 and below without affecting the decoder */
+ memset(hash_table_words, 0, sizeof(kStaticDictionaryHashWords));
+ memset(hash_table_lengths, 0, sizeof(kStaticDictionaryHashLengths));
+ for (len = SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH;
+ len >= SHARED_BROTLI_MIN_DICTIONARY_WORD_LENGTH; --len) {
+ const size_t num_words = dict->size_bits_by_length[len] ?
+ (1u << dict->size_bits_by_length[len]) : 0;
+ for (j = (int)num_words - 1; j >= 0; --j) {
+ size_t offset = dict->offsets_by_length[len] +
+ (size_t)len * (size_t)j;
+ const uint8_t* word = &dict->data[offset];
+ const uint32_t key = Hash(word, 14);
+ int idx = (int)(key << 1) + (len < 8 ? 1 : 0);
+ BROTLI_DCHECK(idx < (int)NUM_HASH_BUCKETS);
+ hash_table_words[idx] = (uint16_t)j;
+ hash_table_lengths[idx] = (uint8_t)len;
+ }
+ }
}
+static BROTLI_BOOL GenerateWordsHeavy(MemoryManager* m,
+ const BrotliTransforms* transforms,
+ BrotliEncoderDictionary* dict) {
+ int i, j, l;
+ for (j = (int)transforms->num_transforms - 1; j >= 0 ; --j) {
+ for (l = 0; l < 32; l++) {
+ int num = (int)((1u << dict->words->size_bits_by_length[l]) & ~1u);
+ for (i = 0; i < num; i++) {
+ uint8_t transformed[kTransformedBufferSize];
+ size_t size;
+ TransformedDictionaryWord(
+ (uint32_t)i, l, j, transforms, dict, transformed, &size);
+ if (size < 4) continue;
+ if (!BrotliTrieAdd(m, (uint8_t)l, (uint32_t)(i + num * j),
+ transformed, size, &dict->trie)) {
+ return BROTLI_FALSE;
+ }
+ }
+ }
+ }
+ return BROTLI_TRUE;
+}
+
+/* Computes cutoffTransformsCount (in count) and cutoffTransforms (in data) for
+ the custom transforms, where possible within the limits of the
+ cutoffTransforms encoding. The fast encoder uses this to do fast lookup for
+ transforms that remove the N last characters (OmitLast). */
+static void ComputeCutoffTransforms(
+ const BrotliTransforms* transforms,
+ uint32_t* count, uint64_t* data) {
+ int i;
+ /* The encoding in a 64-bit integer of transform N in the data is: (N << 2) +
+ ((cutoffTransforms >> (N * 6)) & 0x3F), so for example the identity
+ transform code must be 0-63, for N=1 the transform code must be 4-67, ...,
+ for N=9 it must be 36-99.
+ TODO(lode): consider a simple flexible uint8_t[10] instead of the uint64_t
+ for the cutoff transforms, so that shared dictionaries can have the
+ OmitLast transforms anywhere without loss. */
+ *count = 0;
+ *data = 0;
+ for (i = 0; i < BROTLI_TRANSFORMS_MAX_CUT_OFF + 1; i++) {
+ int idx = transforms->cutOffTransforms[i];
+ if (idx == -1) break; /* Not found */
+ if (idx < (i << 2)) break; /* Too small for the encoding */
+ if (idx >= (i << 2) + 64) break; /* Too large for the encoding */
+ (*count)++;
+ *data |= (uint64_t)(((uint64_t)idx -
+ ((uint64_t)i << 2u)) << ((uint64_t)i * 6u));
+ }
+}
+
+static BROTLI_BOOL ComputeDictionary(MemoryManager* m, int quality,
+ const BrotliTransforms* transforms,
+ BrotliEncoderDictionary* current) {
+ int default_words = current->words == BrotliGetDictionary();
+ int default_transforms = transforms == BrotliGetTransforms();
+
+ if (default_words && default_transforms) {
+ /* hashes are already set to Brotli defaults */
+ return BROTLI_TRUE;
+ }
+
+ current->hash_table_data_words_ = (uint16_t*)BrotliAllocate(
+ m, sizeof(kStaticDictionaryHashWords));
+ current->hash_table_data_lengths_ = (uint8_t*)BrotliAllocate(
+ m, sizeof(kStaticDictionaryHashLengths));
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
+ current->hash_table_words = current->hash_table_data_words_;
+ current->hash_table_lengths = current->hash_table_data_lengths_;
+
+ BuildDictionaryHashTable(current->hash_table_data_words_,
+ current->hash_table_data_lengths_, current->words);
+
+ ComputeCutoffTransforms(transforms,
+ &current->cutoffTransformsCount, &current->cutoffTransforms);
+
+ /* Only compute the data for slow encoder if the requested quality is high
+ enough to need it */
+ if (quality >= ZOPFLIFICATION_QUALITY) {
+ if (!BuildDictionaryLut(m, transforms, current)) return BROTLI_FALSE;
+
+ /* For the built-in Brotli transforms, there is a hard-coded function to
+ handle all transforms, but for custom transforms, we use the following
+ large hammer instead */
+ current->has_words_heavy = !default_transforms;
+ if (current->has_words_heavy) {
+ if (!GenerateWordsHeavy(m, transforms, current)) return BROTLI_FALSE;
+ }
+ }
+
+ return BROTLI_TRUE;
+}
+#endif /* BROTLI_EXPERIMENTAL */
+
+void BrotliInitSharedEncoderDictionary(SharedEncoderDictionary* dict) {
+ dict->magic = kSharedDictionaryMagic;
+
+ dict->compound.num_chunks = 0;
+ dict->compound.total_size = 0;
+ dict->compound.chunk_offsets[0] = 0;
+ dict->compound.num_prepared_instances_ = 0;
+
+ dict->contextual.context_based = 0;
+ dict->contextual.num_dictionaries = 1;
+ dict->contextual.instances_ = 0;
+ dict->contextual.num_instances_ = 1; /* The instance_ field */
+ dict->contextual.dict[0] = &dict->contextual.instance_;
+ InitEncoderDictionary(&dict->contextual.instance_);
+ dict->contextual.instance_.parent = &dict->contextual;
+
+ dict->max_quality = BROTLI_MAX_QUALITY;
+}
+
+#if defined(BROTLI_EXPERIMENTAL)
+/* TODO(eustas): make sure that tooling will warn user if not all the cutoff
+ transforms are available (for low-quality encoder). */
+static BROTLI_BOOL InitCustomSharedEncoderDictionary(
+ MemoryManager* m, const BrotliSharedDictionary* decoded_dict,
+ int quality, SharedEncoderDictionary* dict) {
+ ContextualEncoderDictionary* contextual;
+ CompoundDictionary* compound;
+ BrotliEncoderDictionary* instances;
+ int i;
+ BrotliInitSharedEncoderDictionary(dict);
+
+ contextual = &dict->contextual;
+ compound = &dict->compound;
+
+ for (i = 0; i < (int)decoded_dict->num_prefix; i++) {
+ PreparedDictionary* prepared = CreatePreparedDictionary(m,
+ decoded_dict->prefix[i], decoded_dict->prefix_size[i]);
+ AttachPreparedDictionary(compound, prepared);
+ /* remember for cleanup */
+ compound->prepared_instances_[
+ compound->num_prepared_instances_++] = prepared;
+ }
+
+ dict->max_quality = quality;
+ contextual->context_based = decoded_dict->context_based;
+ if (decoded_dict->context_based) {
+ memcpy(contextual->context_map, decoded_dict->context_map,
+ SHARED_BROTLI_NUM_DICTIONARY_CONTEXTS);
+ }
+
+ contextual->num_dictionaries = decoded_dict->num_dictionaries;
+ contextual->num_instances_ = decoded_dict->num_dictionaries;
+ if (contextual->num_instances_ == 1) {
+ instances = &contextual->instance_;
+ } else {
+ contextual->instances_ = (BrotliEncoderDictionary*)
+ BrotliAllocate(m, sizeof(*contextual->instances_) *
+ contextual->num_instances_);
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
+ instances = contextual->instances_;
+ }
+ for (i = 0; i < (int)contextual->num_instances_; i++) {
+ BrotliEncoderDictionary* current = &instances[i];
+ InitEncoderDictionary(current);
+ current->parent = &dict->contextual;
+ if (decoded_dict->words[i] == BrotliGetDictionary()) {
+ current->words = BrotliGetDictionary();
+ } else {
+ current->words_instance_ = (BrotliDictionary*)BrotliAllocate(
+ m, sizeof(BrotliDictionary));
+ if (BROTLI_IS_OOM(m)) return BROTLI_FALSE;
+ *current->words_instance_ = *decoded_dict->words[i];
+ current->words = current->words_instance_;
+ }
+ current->num_transforms =
+ (uint32_t)decoded_dict->transforms[i]->num_transforms;
+ if (!ComputeDictionary(
+ m, quality, decoded_dict->transforms[i], current)) {
+ return BROTLI_FALSE;
+ }
+
+ contextual->dict[i] = current;
+ }
+
+ return BROTLI_TRUE; /* success */
+}
+
+BROTLI_BOOL BrotliInitCustomSharedEncoderDictionary(
+ MemoryManager* m, const uint8_t* encoded_dict, size_t size,
+ int quality, SharedEncoderDictionary* dict) {
+ BROTLI_BOOL success = BROTLI_FALSE;
+ BrotliSharedDictionary* decoded_dict = BrotliSharedDictionaryCreateInstance(
+ m->alloc_func, m->free_func, m->opaque);
+ if (!decoded_dict) { /* OOM */
+ return BROTLI_FALSE;
+ }
+ success = BrotliSharedDictionaryAttach(
+ decoded_dict, BROTLI_SHARED_DICTIONARY_SERIALIZED, size, encoded_dict);
+ if (success) {
+ success = InitCustomSharedEncoderDictionary(m,
+ decoded_dict, quality, dict);
+ }
+ BrotliSharedDictionaryDestroyInstance(decoded_dict);
+ return success;
+}
+#endif /* BROTLI_EXPERIMENTAL */
+
+void BrotliCleanupSharedEncoderDictionary(MemoryManager* m,
+ SharedEncoderDictionary* dict) {
+ size_t i;
+ for (i = 0; i < dict->compound.num_prepared_instances_; i++) {
+ DestroyPreparedDictionary(m,
+ (PreparedDictionary*)dict->compound.prepared_instances_[i]);
+ }
+ if (dict->contextual.num_instances_ == 1) {
+ BrotliDestroyEncoderDictionary(m, &dict->contextual.instance_);
+ } else if (dict->contextual.num_instances_ > 1) {
+ for (i = 0; i < dict->contextual.num_instances_; i++) {
+ BrotliDestroyEncoderDictionary(m, &dict->contextual.instances_[i]);
+ }
+ BrotliFree(m, dict->contextual.instances_);
+ }
+}
+
+ManagedDictionary* BrotliCreateManagedDictionary(
+ brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque) {
+ ManagedDictionary* result = (ManagedDictionary*)BrotliBootstrapAlloc(
+ sizeof(ManagedDictionary), alloc_func, free_func, opaque);
+ if (result == NULL) return NULL;
+
+ result->magic = kManagedDictionaryMagic;
+ BrotliInitMemoryManager(
+ &result->memory_manager_, alloc_func, free_func, opaque);
+ result->dictionary = NULL;
+
+ return result;
+}
+
+void BrotliDestroyManagedDictionary(ManagedDictionary* dictionary) {
+ if (!dictionary) return;
+ BrotliBootstrapFree(dictionary, &dictionary->memory_manager_);
+}
+
+/* Escalate internal functions visibility; for testing purposes only. */
+#if defined(BROTLI_TEST)
+void InitEncoderDictionaryForTest(BrotliEncoderDictionary*);
+void InitEncoderDictionaryForTest(BrotliEncoderDictionary* d) {
+ InitEncoderDictionary(d);
+}
+#endif
+
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.h
index a1c329fbf49..27dcbcd2f33 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/encoder_dict.h
@@ -7,15 +7,56 @@
#ifndef BROTLI_ENC_ENCODER_DICT_H_
#define BROTLI_ENC_ENCODER_DICT_H_
+#include <brotli/shared_dictionary.h>
+#include <brotli/types.h>
+
#include "../common/dictionary.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./static_dict_lut.h"
+#include "compound_dictionary.h"
+#include "memory.h"
+#include "static_dict_lut.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
+/*
+Dictionary hierarchy for Encoder:
+-SharedEncoderDictionary
+--CompoundDictionary
+---PreparedDictionary [up to 15x]
+ = prefix dictionary with precomputed hashes
+--ContextualEncoderDictionary
+---BrotliEncoderDictionary [up to 64x]
+ = for each context, precomputed static dictionary with words + transforms
+
+Dictionary hiearchy from common: similar, but without precomputed hashes
+-BrotliSharedDictionary
+--BrotliDictionary [up to 64x]
+--BrotliTransforms [up to 64x]
+--const uint8_t* prefix [up to 15x]: compound dictionaries
+*/
+
+typedef struct BrotliTrieNode {
+ uint8_t single; /* if 1, sub is a single node for c instead of 256 */
+ uint8_t c;
+ uint8_t len_; /* untransformed length */
+ uint32_t idx_; /* word index + num words * transform index */
+ uint32_t sub; /* index of sub node(s) in the pool */
+} BrotliTrieNode;
+
+typedef struct BrotliTrie {
+ BrotliTrieNode* pool;
+ size_t pool_capacity;
+ size_t pool_size;
+ BrotliTrieNode root;
+} BrotliTrie;
+
+#if defined(BROTLI_EXPERIMENTAL)
+BROTLI_INTERNAL const BrotliTrieNode* BrotliTrieSub(const BrotliTrie* trie,
+ const BrotliTrieNode* node, uint8_t c);
+#endif /* BROTLI_EXPERIMENTAL */
+
/* Dictionary data (words and transforms) for 1 possible context */
typedef struct BrotliEncoderDictionary {
const BrotliDictionary* words;
@@ -32,9 +73,82 @@ typedef struct BrotliEncoderDictionary {
/* from static_dict_lut.h, for slow encoder */
const uint16_t* buckets;
const DictWord* dict_words;
+ /* Heavy version, for use by slow encoder when there are custom transforms.
+ Contains every possible transformed dictionary word in a trie. It encodes
+ about as fast as the non-heavy encoder but consumes a lot of memory and
+ takes time to build. */
+ BrotliTrie trie;
+ BROTLI_BOOL has_words_heavy;
+
+ /* Reference to other dictionaries. */
+ const struct ContextualEncoderDictionary* parent;
+
+ /* Allocated memory, used only when not using the Brotli defaults */
+ uint16_t* hash_table_data_words_;
+ uint8_t* hash_table_data_lengths_;
+ size_t buckets_alloc_size_;
+ uint16_t* buckets_data_;
+ size_t dict_words_alloc_size_;
+ DictWord* dict_words_data_;
+ BrotliDictionary* words_instance_;
} BrotliEncoderDictionary;
-BROTLI_INTERNAL void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict);
+/* Dictionary data for all 64 contexts */
+typedef struct ContextualEncoderDictionary {
+ BROTLI_BOOL context_based;
+ uint8_t num_dictionaries;
+ uint8_t context_map[SHARED_BROTLI_NUM_DICTIONARY_CONTEXTS];
+ const BrotliEncoderDictionary* dict[SHARED_BROTLI_NUM_DICTIONARY_CONTEXTS];
+
+ /* If num_instances_ is 1, instance_ is used, else dynamic allocation with
+ instances_ is used. */
+ size_t num_instances_;
+ BrotliEncoderDictionary instance_;
+ BrotliEncoderDictionary* instances_;
+} ContextualEncoderDictionary;
+
+typedef struct SharedEncoderDictionary {
+ /* Magic value to distinguish this struct from PreparedDictionary for
+ certain external usages. */
+ uint32_t magic;
+
+ /* LZ77 prefix, compound dictionary */
+ CompoundDictionary compound;
+
+ /* Custom static dictionary (optionally context-based) */
+ ContextualEncoderDictionary contextual;
+
+ /* The maximum quality the dictionary was computed for */
+ int max_quality;
+} SharedEncoderDictionary;
+
+typedef struct ManagedDictionary {
+ uint32_t magic;
+ MemoryManager memory_manager_;
+ uint32_t* dictionary;
+} ManagedDictionary;
+
+/* Initializes to the brotli built-in dictionary */
+BROTLI_INTERNAL void BrotliInitSharedEncoderDictionary(
+ SharedEncoderDictionary* dict);
+
+#if defined(BROTLI_EXPERIMENTAL)
+/* Initializes to shared dictionary that will be parsed from
+ encoded_dict. Requires that you keep the encoded_dict buffer
+ around, parts of data will point to it. */
+BROTLI_INTERNAL BROTLI_BOOL BrotliInitCustomSharedEncoderDictionary(
+ MemoryManager* m, const uint8_t* encoded_dict, size_t size,
+ int quality, SharedEncoderDictionary* dict);
+#endif /* BROTLI_EXPERIMENTAL */
+
+BROTLI_INTERNAL void BrotliCleanupSharedEncoderDictionary(
+ MemoryManager* m, SharedEncoderDictionary* dict);
+
+BROTLI_INTERNAL ManagedDictionary* BrotliCreateManagedDictionary(
+ brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque);
+
+BROTLI_INTERNAL void BrotliDestroyManagedDictionary(
+ ManagedDictionary* dictionary);
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode.c
index b50ccb5d1f6..9aed43b6eb3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode.c
@@ -6,13 +6,14 @@
/* Entropy encoding (Huffman) utilities. */
-#include "./entropy_encode.h"
+#include "entropy_encode.h"
#include <string.h> /* memset */
+#include <brotli/types.h>
+
#include "../common/constants.h"
#include "../common/platform.h"
-#include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode.h
index 9618e1d3592..e1c779cc6f4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode.h
@@ -9,9 +9,10 @@
#ifndef BROTLI_ENC_ENTROPY_ENCODE_H_
#define BROTLI_ENC_ENTROPY_ENCODE_H_
-#include "../common/platform.h"
#include <brotli/types.h>
+#include "../common/platform.h"
+
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode_static.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode_static.h
index 62b99a954c5..ecff1fe9eeb 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode_static.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/entropy_encode_static.h
@@ -9,10 +9,11 @@
#ifndef BROTLI_ENC_ENTROPY_ENCODE_STATIC_H_
#define BROTLI_ENC_ENTROPY_ENCODE_STATIC_H_
+#include <brotli/types.h>
+
#include "../common/constants.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./write_bits.h"
+#include "write_bits.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -76,6 +77,7 @@ static const uint8_t kStaticDistanceCodeDepth[64] = {
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
};
+/* GENERATED CODE START */
static const uint32_t kCodeLengthBits[18] = {
0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 15, 31, 0, 11, 7,
};
@@ -531,6 +533,7 @@ static BROTLI_INLINE void StoreStaticDistanceHuffmanTree(
size_t* storage_ix, uint8_t* storage) {
BrotliWriteBits(28, 0x0369DC03u, storage_ix, storage);
}
+/* GENERATED CODE END */
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.c
index 2319baeb740..2fa0efcf862 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.c
@@ -4,7 +4,7 @@
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
-#include "./fast_log.h"
+#include "fast_log.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.h
index 2094f13e556..f82f4cffc84 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/fast_log.h
@@ -11,9 +11,10 @@
#include <math.h>
-#include "../common/platform.h"
#include <brotli/types.h>
+#include "../common/platform.h"
+
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/find_match_length.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/find_match_length.h
index f8853a70fbb..f3de0bdb6b0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/find_match_length.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/find_match_length.h
@@ -9,9 +9,10 @@
#ifndef BROTLI_ENC_FIND_MATCH_LENGTH_H_
#define BROTLI_ENC_FIND_MATCH_LENGTH_H_
-#include "../common/platform.h"
#include <brotli/types.h>
+#include "../common/platform.h"
+
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
@@ -21,31 +22,23 @@ extern "C" {
static BROTLI_INLINE size_t FindMatchLengthWithLimit(const uint8_t* s1,
const uint8_t* s2,
size_t limit) {
- size_t matched = 0;
- size_t limit2 = (limit >> 3) + 1; /* + 1 is for pre-decrement in while */
- while (BROTLI_PREDICT_TRUE(--limit2)) {
- if (BROTLI_PREDICT_FALSE(BROTLI_UNALIGNED_LOAD64LE(s2) ==
- BROTLI_UNALIGNED_LOAD64LE(s1 + matched))) {
- s2 += 8;
- matched += 8;
- } else {
- uint64_t x = BROTLI_UNALIGNED_LOAD64LE(s2) ^
- BROTLI_UNALIGNED_LOAD64LE(s1 + matched);
+ const uint8_t *s1_orig = s1;
+ for (; limit >= 8; limit -= 8) {
+ uint64_t x = BROTLI_UNALIGNED_LOAD64LE(s2) ^
+ BROTLI_UNALIGNED_LOAD64LE(s1);
+ s2 += 8;
+ if (x != 0) {
size_t matching_bits = (size_t)BROTLI_TZCNT64(x);
- matched += matching_bits >> 3;
- return matched;
+ return (size_t)(s1 - s1_orig) + (matching_bits >> 3);
}
+ s1 += 8;
}
- limit = (limit & 7) + 1; /* + 1 is for pre-decrement in while */
- while (--limit) {
- if (BROTLI_PREDICT_TRUE(s1[matched] == *s2)) {
- ++s2;
- ++matched;
- } else {
- return matched;
- }
+ while (limit && *s1 == *s2) {
+ limit--;
+ ++s2;
+ ++s1;
}
- return matched;
+ return (size_t)(s1 - s1_orig);
}
#else
static BROTLI_INLINE size_t FindMatchLengthWithLimit(const uint8_t* s1,
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash.h
index 6362f69b9f5..5677d82920b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash.h
@@ -10,33 +10,49 @@
#ifndef BROTLI_ENC_HASH_H_
#define BROTLI_ENC_HASH_H_
+#include <stdlib.h> /* exit */
#include <string.h> /* memcmp, memset */
+#include <brotli/types.h>
+
#include "../common/constants.h"
#include "../common/dictionary.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./encoder_dict.h"
-#include "./fast_log.h"
-#include "./find_match_length.h"
-#include "./memory.h"
-#include "./quality.h"
-#include "./static_dict.h"
+#include "compound_dictionary.h"
+#include "encoder_dict.h"
+#include "fast_log.h"
+#include "find_match_length.h"
+#include "memory.h"
+#include "quality.h"
+#include "static_dict.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
typedef struct {
- /* Dynamically allocated area; first member for quickest access. */
- void* extra;
+ /**
+ * Dynamically allocated areas; regular hasher uses one or two allocations;
+ * "composite" hasher uses up to 4 allocations.
+ */
+ void* extra[4];
+
+ /**
+ * False before the fisrt invocation of HasherSetup (where "extra" memory)
+ * is allocated.
+ */
+ BROTLI_BOOL is_setup_;
size_t dict_num_lookups;
size_t dict_num_matches;
BrotliHasherParams params;
- /* False if hasher needs to be "prepared" before use. */
+ /**
+ * False if hasher needs to be "prepared" before use (before the first
+ * invocation of HasherSetup or after HasherReset). "preparation" is hasher
+ * data initialization (using input ringbuffer).
+ */
BROTLI_BOOL is_prepared_;
} HasherCommon;
@@ -62,8 +78,7 @@ typedef struct HasherSearchResult {
for this use.
* The number has been tuned heuristically against compression benchmarks. */
static const uint32_t kHashMul32 = 0x1E35A7BD;
-static const uint64_t kHashMul64 = BROTLI_MAKE_UINT64_T(0x1E35A7BD, 0x1E35A7BD);
-static const uint64_t kHashMul64Long =
+static const uint64_t kHashMul64 =
BROTLI_MAKE_UINT64_T(0x1FE35A7Bu, 0xD3579BD3u);
static BROTLI_INLINE uint32_t Hash14(const uint8_t* data) {
@@ -232,7 +247,7 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define BUCKET_BITS 17
#define MAX_TREE_SEARCH_DEPTH 64
#define MAX_TREE_COMP_LENGTH 128
-#include "./hash_to_binary_tree_inc.h" /* NOLINT(build/include) */
+#include "hash_to_binary_tree_inc.h" /* NOLINT(build/include) */
#undef MAX_TREE_SEARCH_DEPTH
#undef MAX_TREE_COMP_LENGTH
#undef BUCKET_BITS
@@ -249,7 +264,7 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define BUCKET_SWEEP_BITS 0
#define HASH_LEN 5
#define USE_DICTIONARY 1
-#include "./hash_longest_match_quickly_inc.h" /* NOLINT(build/include) */
+#include "hash_longest_match_quickly_inc.h" /* NOLINT(build/include) */
#undef BUCKET_SWEEP_BITS
#undef USE_DICTIONARY
#undef HASHER
@@ -257,7 +272,7 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define HASHER() H3
#define BUCKET_SWEEP_BITS 1
#define USE_DICTIONARY 0
-#include "./hash_longest_match_quickly_inc.h" /* NOLINT(build/include) */
+#include "hash_longest_match_quickly_inc.h" /* NOLINT(build/include) */
#undef USE_DICTIONARY
#undef BUCKET_SWEEP_BITS
#undef BUCKET_BITS
@@ -267,7 +282,7 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define BUCKET_BITS 17
#define BUCKET_SWEEP_BITS 2
#define USE_DICTIONARY 1
-#include "./hash_longest_match_quickly_inc.h" /* NOLINT(build/include) */
+#include "hash_longest_match_quickly_inc.h" /* NOLINT(build/include) */
#undef USE_DICTIONARY
#undef HASH_LEN
#undef BUCKET_SWEEP_BITS
@@ -275,11 +290,11 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#undef HASHER
#define HASHER() H5
-#include "./hash_longest_match_inc.h" /* NOLINT(build/include) */
+#include "hash_longest_match_inc.h" /* NOLINT(build/include) */
#undef HASHER
#define HASHER() H6
-#include "./hash_longest_match64_inc.h" /* NOLINT(build/include) */
+#include "hash_longest_match64_inc.h" /* NOLINT(build/include) */
#undef HASHER
#define BUCKET_BITS 15
@@ -288,13 +303,13 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define NUM_BANKS 1
#define BANK_BITS 16
#define HASHER() H40
-#include "./hash_forgetful_chain_inc.h" /* NOLINT(build/include) */
+#include "hash_forgetful_chain_inc.h" /* NOLINT(build/include) */
#undef HASHER
#undef NUM_LAST_DISTANCES_TO_CHECK
#define NUM_LAST_DISTANCES_TO_CHECK 10
#define HASHER() H41
-#include "./hash_forgetful_chain_inc.h" /* NOLINT(build/include) */
+#include "hash_forgetful_chain_inc.h" /* NOLINT(build/include) */
#undef HASHER
#undef NUM_LAST_DISTANCES_TO_CHECK
#undef NUM_BANKS
@@ -304,7 +319,7 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define NUM_BANKS 512
#define BANK_BITS 9
#define HASHER() H42
-#include "./hash_forgetful_chain_inc.h" /* NOLINT(build/include) */
+#include "hash_forgetful_chain_inc.h" /* NOLINT(build/include) */
#undef HASHER
#undef NUM_LAST_DISTANCES_TO_CHECK
#undef NUM_BANKS
@@ -317,7 +332,7 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define BUCKET_SWEEP_BITS 2
#define HASH_LEN 7
#define USE_DICTIONARY 0
-#include "./hash_longest_match_quickly_inc.h" /* NOLINT(build/include) */
+#include "hash_longest_match_quickly_inc.h" /* NOLINT(build/include) */
#undef USE_DICTIONARY
#undef HASH_LEN
#undef BUCKET_SWEEP_BITS
@@ -331,14 +346,14 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define JUMP 4
#define NUMBUCKETS 16777216
#define MASK ((NUMBUCKETS * 64) - 1)
-#include "./hash_rolling_inc.h" /* NOLINT(build/include) */
+#include "hash_rolling_inc.h" /* NOLINT(build/include) */
#undef JUMP
#undef HASHER
#define HASHER() HROLLING
#define JUMP 1
-#include "./hash_rolling_inc.h" /* NOLINT(build/include) */
+#include "hash_rolling_inc.h" /* NOLINT(build/include) */
#undef MASK
#undef NUMBUCKETS
#undef JUMP
@@ -348,7 +363,7 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define HASHER() H35
#define HASHER_A H3
#define HASHER_B HROLLING_FAST
-#include "./hash_composite_inc.h" /* NOLINT(build/include) */
+#include "hash_composite_inc.h" /* NOLINT(build/include) */
#undef HASHER_A
#undef HASHER_B
#undef HASHER
@@ -356,7 +371,7 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define HASHER() H55
#define HASHER_A H54
#define HASHER_B HROLLING_FAST
-#include "./hash_composite_inc.h" /* NOLINT(build/include) */
+#include "hash_composite_inc.h" /* NOLINT(build/include) */
#undef HASHER_A
#undef HASHER_B
#undef HASHER
@@ -364,7 +379,7 @@ static BROTLI_INLINE size_t BackwardMatchLengthCode(const BackwardMatch* self) {
#define HASHER() H65
#define HASHER_A H6
#define HASHER_B HROLLING
-#include "./hash_composite_inc.h" /* NOLINT(build/include) */
+#include "hash_composite_inc.h" /* NOLINT(build/include) */
#undef HASHER_A
#undef HASHER_B
#undef HASHER
@@ -391,43 +406,55 @@ typedef struct {
/* MUST be invoked before any other method. */
static BROTLI_INLINE void HasherInit(Hasher* hasher) {
- hasher->common.extra = NULL;
+ hasher->common.is_setup_ = BROTLI_FALSE;
+ hasher->common.extra[0] = NULL;
+ hasher->common.extra[1] = NULL;
+ hasher->common.extra[2] = NULL;
+ hasher->common.extra[3] = NULL;
}
static BROTLI_INLINE void DestroyHasher(MemoryManager* m, Hasher* hasher) {
- if (hasher->common.extra == NULL) return;
- BROTLI_FREE(m, hasher->common.extra);
+ if (hasher->common.extra[0] != NULL) BROTLI_FREE(m, hasher->common.extra[0]);
+ if (hasher->common.extra[1] != NULL) BROTLI_FREE(m, hasher->common.extra[1]);
+ if (hasher->common.extra[2] != NULL) BROTLI_FREE(m, hasher->common.extra[2]);
+ if (hasher->common.extra[3] != NULL) BROTLI_FREE(m, hasher->common.extra[3]);
}
static BROTLI_INLINE void HasherReset(Hasher* hasher) {
hasher->common.is_prepared_ = BROTLI_FALSE;
}
-static BROTLI_INLINE size_t HasherSize(const BrotliEncoderParams* params,
- BROTLI_BOOL one_shot, const size_t input_size) {
+static BROTLI_INLINE void HasherSize(const BrotliEncoderParams* params,
+ BROTLI_BOOL one_shot, const size_t input_size, size_t* alloc_size) {
switch (params->hasher.type) {
-#define SIZE_(N) \
- case N: \
- return HashMemAllocInBytesH ## N(params, one_shot, input_size);
+#define SIZE_(N) \
+ case N: \
+ HashMemAllocInBytesH ## N(params, one_shot, input_size, alloc_size); \
+ break;
FOR_ALL_HASHERS(SIZE_)
#undef SIZE_
default:
break;
}
- return 0; /* Default case. */
}
static BROTLI_INLINE void HasherSetup(MemoryManager* m, Hasher* hasher,
BrotliEncoderParams* params, const uint8_t* data, size_t position,
size_t input_size, BROTLI_BOOL is_last) {
BROTLI_BOOL one_shot = (position == 0 && is_last);
- if (hasher->common.extra == NULL) {
- size_t alloc_size;
+ if (!hasher->common.is_setup_) {
+ size_t alloc_size[4] = {0};
+ size_t i;
ChooseHasher(params, &params->hasher);
- alloc_size = HasherSize(params, one_shot, input_size);
- hasher->common.extra = BROTLI_ALLOC(m, uint8_t, alloc_size);
- if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(hasher->common.extra)) return;
hasher->common.params = params->hasher;
+ hasher->common.dict_num_lookups = 0;
+ hasher->common.dict_num_matches = 0;
+ HasherSize(params, one_shot, input_size, alloc_size);
+ for (i = 0; i < 4; ++i) {
+ if (alloc_size[i] == 0) continue;
+ hasher->common.extra[i] = BROTLI_ALLOC(m, uint8_t, alloc_size[i]);
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(hasher->common.extra[i])) return;
+ }
switch (hasher->common.params.type) {
#define INITIALIZE_(N) \
case N: \
@@ -440,6 +467,7 @@ static BROTLI_INLINE void HasherSetup(MemoryManager* m, Hasher* hasher,
break;
}
HasherReset(hasher);
+ hasher->common.is_setup_ = BROTLI_TRUE;
}
if (!hasher->common.is_prepared_) {
@@ -454,10 +482,6 @@ static BROTLI_INLINE void HasherSetup(MemoryManager* m, Hasher* hasher,
#undef PREPARE_
default: break;
}
- if (position == 0) {
- hasher->common.dict_num_lookups = 0;
- hasher->common.dict_num_matches = 0;
- }
hasher->common.is_prepared_ = BROTLI_TRUE;
}
}
@@ -481,6 +505,222 @@ static BROTLI_INLINE void InitOrStitchToPreviousBlock(
}
}
+/* NB: when seamless dictionary-ring-buffer copies are implemented, don't forget
+ to add proper guards for non-zero-BROTLI_PARAM_STREAM_OFFSET. */
+static BROTLI_INLINE void FindCompoundDictionaryMatch(
+ const PreparedDictionary* self, const uint8_t* BROTLI_RESTRICT data,
+ const size_t ring_buffer_mask, const int* BROTLI_RESTRICT distance_cache,
+ const size_t cur_ix, const size_t max_length, const size_t distance_offset,
+ const size_t max_distance, HasherSearchResult* BROTLI_RESTRICT out) {
+ const uint32_t source_size = self->source_size;
+ const size_t boundary = distance_offset - source_size;
+ const uint32_t hash_bits = self->hash_bits;
+ const uint32_t bucket_bits = self->bucket_bits;
+ const uint32_t slot_bits = self->slot_bits;
+
+ const uint32_t hash_shift = 64u - bucket_bits;
+ const uint32_t slot_mask = (~((uint32_t)0U)) >> (32 - slot_bits);
+ const uint64_t hash_mask = (~((uint64_t)0U)) >> (64 - hash_bits);
+
+ const uint32_t* slot_offsets = (uint32_t*)(&self[1]);
+ const uint16_t* heads = (uint16_t*)(&slot_offsets[1u << slot_bits]);
+ const uint32_t* items = (uint32_t*)(&heads[1u << bucket_bits]);
+ const uint8_t* source = NULL;
+
+ const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
+ score_t best_score = out->score;
+ size_t best_len = out->len;
+ size_t i;
+ const uint64_t h =
+ (BROTLI_UNALIGNED_LOAD64LE(&data[cur_ix_masked]) & hash_mask) *
+ kPreparedDictionaryHashMul64Long;
+ const uint32_t key = (uint32_t)(h >> hash_shift);
+ const uint32_t slot = key & slot_mask;
+ const uint32_t head = heads[key];
+ const uint32_t* BROTLI_RESTRICT chain = &items[slot_offsets[slot] + head];
+ uint32_t item = (head == 0xFFFF) ? 1 : 0;
+
+ const void* tail = (void*)&items[self->num_items];
+ if (self->magic == kPreparedDictionaryMagic) {
+ source = (const uint8_t*)tail;
+ } else {
+ /* kLeanPreparedDictionaryMagic */
+ source = (const uint8_t*)BROTLI_UNALIGNED_LOAD_PTR((const uint8_t**)tail);
+ }
+
+ for (i = 0; i < 4; ++i) {
+ const size_t distance = (size_t)distance_cache[i];
+ size_t offset;
+ size_t limit;
+ size_t len;
+ if (distance <= boundary || distance > distance_offset) continue;
+ offset = distance_offset - distance;
+ limit = source_size - offset;
+ limit = limit > max_length ? max_length : limit;
+ len = FindMatchLengthWithLimit(&source[offset], &data[cur_ix_masked],
+ limit);
+ if (len >= 2) {
+ score_t score = BackwardReferenceScoreUsingLastDistance(len);
+ if (best_score < score) {
+ if (i != 0) score -= BackwardReferencePenaltyUsingLastDistance(i);
+ if (best_score < score) {
+ best_score = score;
+ if (len > best_len) best_len = len;
+ out->len = len;
+ out->len_code_delta = 0;
+ out->distance = distance;
+ out->score = best_score;
+ }
+ }
+ }
+ }
+ while (item == 0) {
+ size_t offset;
+ size_t distance;
+ size_t limit;
+ item = *chain;
+ chain++;
+ offset = item & 0x7FFFFFFF;
+ item &= 0x80000000;
+ distance = distance_offset - offset;
+ limit = source_size - offset;
+ limit = (limit > max_length) ? max_length : limit;
+ if (distance > max_distance) continue;
+ if (cur_ix_masked + best_len > ring_buffer_mask ||
+ best_len >= limit ||
+ data[cur_ix_masked + best_len] != source[offset + best_len]) {
+ continue;
+ }
+ {
+ const size_t len = FindMatchLengthWithLimit(&source[offset],
+ &data[cur_ix_masked],
+ limit);
+ if (len >= 4) {
+ score_t score = BackwardReferenceScore(len, distance);
+ if (best_score < score) {
+ best_score = score;
+ best_len = len;
+ out->len = best_len;
+ out->len_code_delta = 0;
+ out->distance = distance;
+ out->score = best_score;
+ }
+ }
+ }
+ }
+}
+
+/* NB: when seamless dictionary-ring-buffer copies are implemented, don't forget
+ to add proper guards for non-zero-BROTLI_PARAM_STREAM_OFFSET. */
+static BROTLI_INLINE size_t FindAllCompoundDictionaryMatches(
+ const PreparedDictionary* self, const uint8_t* BROTLI_RESTRICT data,
+ const size_t ring_buffer_mask, const size_t cur_ix, const size_t min_length,
+ const size_t max_length, const size_t distance_offset,
+ const size_t max_distance, BackwardMatch* matches, size_t match_limit) {
+ const uint32_t source_size = self->source_size;
+ const uint32_t hash_bits = self->hash_bits;
+ const uint32_t bucket_bits = self->bucket_bits;
+ const uint32_t slot_bits = self->slot_bits;
+
+ const uint32_t hash_shift = 64u - bucket_bits;
+ const uint32_t slot_mask = (~((uint32_t)0U)) >> (32 - slot_bits);
+ const uint64_t hash_mask = (~((uint64_t)0U)) >> (64 - hash_bits);
+
+ const uint32_t* slot_offsets = (uint32_t*)(&self[1]);
+ const uint16_t* heads = (uint16_t*)(&slot_offsets[1u << slot_bits]);
+ const uint32_t* items = (uint32_t*)(&heads[1u << bucket_bits]);
+ const uint8_t* source = NULL;
+
+ const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
+ size_t best_len = min_length;
+ const uint64_t h =
+ (BROTLI_UNALIGNED_LOAD64LE(&data[cur_ix_masked]) & hash_mask) *
+ kPreparedDictionaryHashMul64Long;
+ const uint32_t key = (uint32_t)(h >> hash_shift);
+ const uint32_t slot = key & slot_mask;
+ const uint32_t head = heads[key];
+ const uint32_t* BROTLI_RESTRICT chain = &items[slot_offsets[slot] + head];
+ uint32_t item = (head == 0xFFFF) ? 1 : 0;
+ size_t found = 0;
+
+ const void* tail = (void*)&items[self->num_items];
+ if (self->magic == kPreparedDictionaryMagic) {
+ source = (const uint8_t*)tail;
+ } else {
+ /* kLeanPreparedDictionaryMagic */
+ source = (const uint8_t*)BROTLI_UNALIGNED_LOAD_PTR((const uint8_t**)tail);
+ }
+
+ while (item == 0) {
+ size_t offset;
+ size_t distance;
+ size_t limit;
+ size_t len;
+ item = *chain;
+ chain++;
+ offset = item & 0x7FFFFFFF;
+ item &= 0x80000000;
+ distance = distance_offset - offset;
+ limit = source_size - offset;
+ limit = (limit > max_length) ? max_length : limit;
+ if (distance > max_distance) continue;
+ if (cur_ix_masked + best_len > ring_buffer_mask ||
+ best_len >= limit ||
+ data[cur_ix_masked + best_len] != source[offset + best_len]) {
+ continue;
+ }
+ len = FindMatchLengthWithLimit(
+ &source[offset], &data[cur_ix_masked], limit);
+ if (len > best_len) {
+ best_len = len;
+ InitBackwardMatch(matches++, distance, len);
+ found++;
+ if (found == match_limit) break;
+ }
+ }
+ return found;
+}
+
+static BROTLI_INLINE void LookupCompoundDictionaryMatch(
+ const CompoundDictionary* addon, const uint8_t* BROTLI_RESTRICT data,
+ const size_t ring_buffer_mask, const int* BROTLI_RESTRICT distance_cache,
+ const size_t cur_ix, const size_t max_length,
+ const size_t max_ring_buffer_distance, const size_t max_distance,
+ HasherSearchResult* sr) {
+ size_t base_offset = max_ring_buffer_distance + 1 + addon->total_size - 1;
+ size_t d;
+ for (d = 0; d < addon->num_chunks; ++d) {
+ /* Only one prepared dictionary type is currently supported. */
+ FindCompoundDictionaryMatch(
+ (const PreparedDictionary*)addon->chunks[d], data, ring_buffer_mask,
+ distance_cache, cur_ix, max_length,
+ base_offset - addon->chunk_offsets[d], max_distance, sr);
+ }
+}
+
+static BROTLI_INLINE size_t LookupAllCompoundDictionaryMatches(
+ const CompoundDictionary* addon, const uint8_t* BROTLI_RESTRICT data,
+ const size_t ring_buffer_mask, const size_t cur_ix, size_t min_length,
+ const size_t max_length, const size_t max_ring_buffer_distance,
+ const size_t max_distance, BackwardMatch* matches,
+ size_t match_limit) {
+ size_t base_offset = max_ring_buffer_distance + 1 + addon->total_size - 1;
+ size_t d;
+ size_t total_found = 0;
+ for (d = 0; d < addon->num_chunks; ++d) {
+ /* Only one prepared dictionary type is currently supported. */
+ total_found += FindAllCompoundDictionaryMatches(
+ (const PreparedDictionary*)addon->chunks[d], data, ring_buffer_mask,
+ cur_ix, min_length, max_length, base_offset - addon->chunk_offsets[d],
+ max_distance, matches + total_found, match_limit - total_found);
+ if (total_found == match_limit) break;
+ if (total_found > 0) {
+ min_length = BackwardMatchLength(&matches[total_found - 1]);
+ }
+ }
+ return total_found;
+}
+
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_composite_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_composite_inc.h
index cba156c0e23..3923bc72c82 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_composite_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_composite_inc.h
@@ -30,10 +30,10 @@ static BROTLI_INLINE size_t FN(StoreLookahead)(void) {
typedef struct HashComposite {
HASHER_A ha;
HASHER_B hb;
+ HasherCommon ha_common;
HasherCommon hb_common;
/* Shortcuts. */
- void* extra;
HasherCommon* common;
BROTLI_BOOL fresh;
@@ -43,12 +43,12 @@ typedef struct HashComposite {
static void FN(Initialize)(HasherCommon* common,
HashComposite* BROTLI_RESTRICT self, const BrotliEncoderParams* params) {
self->common = common;
- self->extra = common->extra;
+ self->ha_common = *self->common;
self->hb_common = *self->common;
self->fresh = BROTLI_TRUE;
self->params = params;
- /* TODO: Initialize of the hashers is defered to Prepare (and params
+ /* TODO(lode): Initialize of the hashers is deferred to Prepare (and params
remembered here) because we don't get the one_shot and input_size params
here that are needed to know the memory size of them. Instead provide
those params to all hashers FN(Initialize) */
@@ -59,21 +59,36 @@ static void FN(Prepare)(
size_t input_size, const uint8_t* BROTLI_RESTRICT data) {
if (self->fresh) {
self->fresh = BROTLI_FALSE;
- self->hb_common.extra = (uint8_t*)self->extra +
- FN_A(HashMemAllocInBytes)(self->params, one_shot, input_size);
-
- FN_A(Initialize)(self->common, &self->ha, self->params);
+ self->ha_common.extra[0] = self->common->extra[0];
+ self->ha_common.extra[1] = self->common->extra[1];
+ self->ha_common.extra[2] = NULL;
+ self->ha_common.extra[3] = NULL;
+ self->hb_common.extra[0] = self->common->extra[2];
+ self->hb_common.extra[1] = self->common->extra[3];
+ self->hb_common.extra[2] = NULL;
+ self->hb_common.extra[3] = NULL;
+
+ FN_A(Initialize)(&self->ha_common, &self->ha, self->params);
FN_B(Initialize)(&self->hb_common, &self->hb, self->params);
}
FN_A(Prepare)(&self->ha, one_shot, input_size, data);
FN_B(Prepare)(&self->hb, one_shot, input_size, data);
}
-static BROTLI_INLINE size_t FN(HashMemAllocInBytes)(
+static BROTLI_INLINE void FN(HashMemAllocInBytes)(
const BrotliEncoderParams* params, BROTLI_BOOL one_shot,
- size_t input_size) {
- return FN_A(HashMemAllocInBytes)(params, one_shot, input_size) +
- FN_B(HashMemAllocInBytes)(params, one_shot, input_size);
+ size_t input_size, size_t* alloc_size) {
+ size_t alloc_size_a[4] = {0};
+ size_t alloc_size_b[4] = {0};
+ FN_A(HashMemAllocInBytes)(params, one_shot, input_size, alloc_size_a);
+ FN_B(HashMemAllocInBytes)(params, one_shot, input_size, alloc_size_b);
+ /* Should never happen. */
+ if (alloc_size_a[2] != 0 || alloc_size_a[3] != 0) exit(EXIT_FAILURE);
+ if (alloc_size_b[2] != 0 || alloc_size_b[3] != 0) exit(EXIT_FAILURE);
+ alloc_size[0] = alloc_size_a[0];
+ alloc_size[1] = alloc_size_a[1];
+ alloc_size[2] = alloc_size_b[0];
+ alloc_size[3] = alloc_size_b[1];
}
static BROTLI_INLINE void FN(Store)(HashComposite* BROTLI_RESTRICT self,
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_forgetful_chain_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_forgetful_chain_inc.h
index bfae6ba6a20..48e1cdcdf2e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_forgetful_chain_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_forgetful_chain_inc.h
@@ -49,7 +49,7 @@ typedef struct HashForgetfulChain {
size_t max_hops;
/* Shortcuts. */
- void* extra;
+ void* extra[2];
HasherCommon* common;
/* --- Dynamic size members --- */
@@ -77,14 +77,15 @@ static uint8_t* FN(TinyHash)(void* extra) {
}
static FN(Bank)* FN(Banks)(void* extra) {
- return (FN(Bank)*)(&FN(TinyHash)(extra)[65536]);
+ return (FN(Bank)*)(extra);
}
static void FN(Initialize)(
HasherCommon* common, HashForgetfulChain* BROTLI_RESTRICT self,
const BrotliEncoderParams* params) {
self->common = common;
- self->extra = common->extra;
+ self->extra[0] = common->extra[0];
+ self->extra[1] = common->extra[1];
self->max_hops = (params->quality > 6 ? 7u : 8u) << (params->quality - 4);
}
@@ -92,9 +93,9 @@ static void FN(Initialize)(
static void FN(Prepare)(
HashForgetfulChain* BROTLI_RESTRICT self, BROTLI_BOOL one_shot,
size_t input_size, const uint8_t* BROTLI_RESTRICT data) {
- uint32_t* BROTLI_RESTRICT addr = FN(Addr)(self->extra);
- uint16_t* BROTLI_RESTRICT head = FN(Head)(self->extra);
- uint8_t* BROTLI_RESTRICT tiny_hash = FN(TinyHash)(self->extra);
+ uint32_t* BROTLI_RESTRICT addr = FN(Addr)(self->extra[0]);
+ uint16_t* BROTLI_RESTRICT head = FN(Head)(self->extra[0]);
+ uint8_t* BROTLI_RESTRICT tiny_hash = FN(TinyHash)(self->extra[0]);
/* Partial preparation is 100 times slower (per socket). */
size_t partial_prepare_threshold = BUCKET_SIZE >> 6;
if (one_shot && input_size <= partial_prepare_threshold) {
@@ -116,24 +117,25 @@ static void FN(Prepare)(
memset(self->free_slot_idx, 0, sizeof(self->free_slot_idx));
}
-static BROTLI_INLINE size_t FN(HashMemAllocInBytes)(
+static BROTLI_INLINE void FN(HashMemAllocInBytes)(
const BrotliEncoderParams* params, BROTLI_BOOL one_shot,
- size_t input_size) {
+ size_t input_size, size_t* alloc_size) {
BROTLI_UNUSED(params);
BROTLI_UNUSED(one_shot);
BROTLI_UNUSED(input_size);
- return sizeof(uint32_t) * BUCKET_SIZE + sizeof(uint16_t) * BUCKET_SIZE +
- sizeof(uint8_t) * 65536 + sizeof(FN(Bank)) * NUM_BANKS;
+ alloc_size[0] = sizeof(uint32_t) * BUCKET_SIZE +
+ sizeof(uint16_t) * BUCKET_SIZE + sizeof(uint8_t) * 65536;
+ alloc_size[1] = sizeof(FN(Bank)) * NUM_BANKS;
}
/* Look at 4 bytes at &data[ix & mask]. Compute a hash from these, and prepend
node to corresponding chain; also update tiny_hash for current position. */
static BROTLI_INLINE void FN(Store)(HashForgetfulChain* BROTLI_RESTRICT self,
const uint8_t* BROTLI_RESTRICT data, const size_t mask, const size_t ix) {
- uint32_t* BROTLI_RESTRICT addr = FN(Addr)(self->extra);
- uint16_t* BROTLI_RESTRICT head = FN(Head)(self->extra);
- uint8_t* BROTLI_RESTRICT tiny_hash = FN(TinyHash)(self->extra);
- FN(Bank)* BROTLI_RESTRICT banks = FN(Banks)(self->extra);
+ uint32_t* BROTLI_RESTRICT addr = FN(Addr)(self->extra[0]);
+ uint16_t* BROTLI_RESTRICT head = FN(Head)(self->extra[0]);
+ uint8_t* BROTLI_RESTRICT tiny_hash = FN(TinyHash)(self->extra[0]);
+ FN(Bank)* BROTLI_RESTRICT banks = FN(Banks)(self->extra[1]);
const size_t key = FN(HashBytes)(&data[ix & mask]);
const size_t bank = key & (NUM_BANKS - 1);
const size_t idx = self->free_slot_idx[bank]++ & (BANK_SIZE - 1);
@@ -196,10 +198,10 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
const size_t cur_ix, const size_t max_length, const size_t max_backward,
const size_t dictionary_distance, const size_t max_distance,
HasherSearchResult* BROTLI_RESTRICT out) {
- uint32_t* BROTLI_RESTRICT addr = FN(Addr)(self->extra);
- uint16_t* BROTLI_RESTRICT head = FN(Head)(self->extra);
- uint8_t* BROTLI_RESTRICT tiny_hashes = FN(TinyHash)(self->extra);
- FN(Bank)* BROTLI_RESTRICT banks = FN(Banks)(self->extra);
+ uint32_t* BROTLI_RESTRICT addr = FN(Addr)(self->extra[0]);
+ uint16_t* BROTLI_RESTRICT head = FN(Head)(self->extra[0]);
+ uint8_t* BROTLI_RESTRICT tiny_hashes = FN(TinyHash)(self->extra[0]);
+ FN(Bank)* BROTLI_RESTRICT banks = FN(Banks)(self->extra[1]);
const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
/* Don't accept a short copy from far away. */
score_t min_score = out->score;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match64_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match64_inc.h
index 956fb304b36..e48fc615544 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match64_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match64_inc.h
@@ -20,13 +20,12 @@ static BROTLI_INLINE size_t FN(HashTypeLength)(void) { return 8; }
static BROTLI_INLINE size_t FN(StoreLookahead)(void) { return 8; }
/* HashBytes is the function that chooses the bucket to place the address in. */
-static BROTLI_INLINE uint32_t FN(HashBytes)(const uint8_t* BROTLI_RESTRICT data,
- const uint64_t mask,
- const int shift) {
- const uint64_t h = (BROTLI_UNALIGNED_LOAD64LE(data) & mask) * kHashMul64Long;
+static BROTLI_INLINE size_t FN(HashBytes)(const uint8_t* BROTLI_RESTRICT data,
+ uint64_t hash_mul) {
+ const uint64_t h = BROTLI_UNALIGNED_LOAD64LE(data) * hash_mul;
/* The higher bits contain more mixture from the multiplication,
so we take our results from there. */
- return (uint32_t)(h >> shift);
+ return (size_t)(h >> (64 - 15));
}
typedef struct HashLongestMatch {
@@ -35,10 +34,8 @@ typedef struct HashLongestMatch {
/* Only block_size_ newest backward references are kept,
and the older are forgotten. */
size_t block_size_;
- /* Left-shift for computing hash bucket index from hash value. */
- int hash_shift_;
- /* Mask for selecting the next 4-8 bytes of input */
- uint64_t hash_mask_;
+ /* Hash multiplier tuned to match length. */
+ uint64_t hash_mul_;
/* Mask for accessing entries in a block (in a ring-buffer manner). */
uint32_t block_mask_;
@@ -63,16 +60,16 @@ static void FN(Initialize)(
self->common_ = common;
BROTLI_UNUSED(params);
- self->hash_shift_ = 64 - common->params.bucket_bits;
- self->hash_mask_ = (~((uint64_t)0U)) >> (64 - 8 * common->params.hash_len);
+ self->hash_mul_ = kHashMul64 << (64 - 5 * 8);
+ BROTLI_DCHECK(common->params.bucket_bits == 15);
self->bucket_size_ = (size_t)1 << common->params.bucket_bits;
self->block_bits_ = common->params.block_bits;
self->block_size_ = (size_t)1 << common->params.block_bits;
self->block_mask_ = (uint32_t)(self->block_size_ - 1);
self->num_last_distances_to_check_ =
common->params.num_last_distances_to_check;
- self->num_ = (uint16_t*)common->extra;
- self->buckets_ = (uint32_t*)&self->num_[self->bucket_size_];
+ self->num_ = (uint16_t*)common->extra[0];
+ self->buckets_ = (uint32_t*)common->extra[1];
}
static void FN(Prepare)(
@@ -84,8 +81,7 @@ static void FN(Prepare)(
if (one_shot && input_size <= partial_prepare_threshold) {
size_t i;
for (i = 0; i < input_size; ++i) {
- const uint32_t key = FN(HashBytes)(&data[i], self->hash_mask_,
- self->hash_shift_);
+ const size_t key = FN(HashBytes)(&data[i], self->hash_mul_);
num[key] = 0;
}
} else {
@@ -93,15 +89,15 @@ static void FN(Prepare)(
}
}
-static BROTLI_INLINE size_t FN(HashMemAllocInBytes)(
+static BROTLI_INLINE void FN(HashMemAllocInBytes)(
const BrotliEncoderParams* params, BROTLI_BOOL one_shot,
- size_t input_size) {
+ size_t input_size, size_t* alloc_size) {
size_t bucket_size = (size_t)1 << params->hasher.bucket_bits;
size_t block_size = (size_t)1 << params->hasher.block_bits;
BROTLI_UNUSED(one_shot);
BROTLI_UNUSED(input_size);
- return sizeof(uint16_t) * bucket_size +
- sizeof(uint32_t) * bucket_size * block_size;
+ alloc_size[0] = sizeof(uint16_t) * bucket_size;
+ alloc_size[1] = sizeof(uint32_t) * bucket_size * block_size;
}
/* Look at 4 bytes at &data[ix & mask].
@@ -111,8 +107,7 @@ static BROTLI_INLINE void FN(Store)(
const size_t mask, const size_t ix) {
uint16_t* BROTLI_RESTRICT num = self->num_;
uint32_t* BROTLI_RESTRICT buckets = self->buckets_;
- const uint32_t key = FN(HashBytes)(&data[ix & mask], self->hash_mask_,
- self->hash_shift_);
+ const size_t key = FN(HashBytes)(&data[ix & mask], self->hash_mul_);
const size_t minor_ix = num[key] & self->block_mask_;
const size_t offset = minor_ix + (key << self->block_bits_);
++num[key];
@@ -217,14 +212,17 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
}
}
{
- const uint32_t key = FN(HashBytes)(
- &data[cur_ix_masked], self->hash_mask_, self->hash_shift_);
+ const size_t key = FN(HashBytes)(&data[cur_ix_masked], self->hash_mul_);
uint32_t* BROTLI_RESTRICT bucket = &buckets[key << self->block_bits_];
const size_t down =
(num[key] > self->block_size_) ?
(num[key] - self->block_size_) : 0u;
- for (i = num[key]; i > down;) {
+ const uint32_t first4 = BrotliUnalignedRead32(data + cur_ix_masked);
+ const size_t max_length_m4 = max_length - 4;
+ i = num[key];
+ for (; i > down;) {
size_t prev_ix = bucket[--i & self->block_mask_];
+ uint32_t current4;
const size_t backward = cur_ix - prev_ix;
if (BROTLI_PREDICT_FALSE(backward > max_backward)) {
break;
@@ -235,22 +233,19 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
data[cur_ix_masked + best_len] != data[prev_ix + best_len]) {
continue;
}
+ current4 = BrotliUnalignedRead32(data + prev_ix);
+ if (first4 != current4) continue;
{
- const size_t len = FindMatchLengthWithLimit(&data[prev_ix],
- &data[cur_ix_masked],
- max_length);
- if (len >= 4) {
- /* Comparing for >= 3 does not change the semantics, but just saves
- for a few unnecessary binary logarithms in backward reference
- score, since we are not interested in such short matches. */
- score_t score = BackwardReferenceScore(len, backward);
- if (best_score < score) {
- best_score = score;
- best_len = len;
- out->len = best_len;
- out->distance = backward;
- out->score = best_score;
- }
+ const size_t len = FindMatchLengthWithLimit(&data[prev_ix + 4],
+ &data[cur_ix_masked + 4],
+ max_length_m4) + 4;
+ const score_t score = BackwardReferenceScore(len, backward);
+ if (best_score < score) {
+ best_score = score;
+ best_len = len;
+ out->len = best_len;
+ out->distance = backward;
+ out->score = best_score;
}
}
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match_inc.h
index 27f4463d7f3..788e9ef9937 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match_inc.h
@@ -54,10 +54,6 @@ typedef struct HashLongestMatch {
uint32_t* buckets_; /* uint32_t[bucket_size * block_size]; */
} HashLongestMatch;
-static BROTLI_INLINE uint16_t* FN(Num)(void* extra) {
- return (uint16_t*)extra;
-}
-
static void FN(Initialize)(
HasherCommon* common, HashLongestMatch* BROTLI_RESTRICT self,
const BrotliEncoderParams* params) {
@@ -68,8 +64,8 @@ static void FN(Initialize)(
self->bucket_size_ = (size_t)1 << common->params.bucket_bits;
self->block_size_ = (size_t)1 << common->params.block_bits;
self->block_mask_ = (uint32_t)(self->block_size_ - 1);
- self->num_ = (uint16_t*)common->extra;
- self->buckets_ = (uint32_t*)(&self->num_[self->bucket_size_]);
+ self->num_ = (uint16_t*)common->extra[0];
+ self->buckets_ = (uint32_t*)common->extra[1];
self->block_bits_ = common->params.block_bits;
self->num_last_distances_to_check_ =
common->params.num_last_distances_to_check;
@@ -92,15 +88,15 @@ static void FN(Prepare)(
}
}
-static BROTLI_INLINE size_t FN(HashMemAllocInBytes)(
+static BROTLI_INLINE void FN(HashMemAllocInBytes)(
const BrotliEncoderParams* params, BROTLI_BOOL one_shot,
- size_t input_size) {
+ size_t input_size, size_t* alloc_size) {
size_t bucket_size = (size_t)1 << params->hasher.bucket_bits;
size_t block_size = (size_t)1 << params->hasher.block_bits;
BROTLI_UNUSED(one_shot);
BROTLI_UNUSED(input_size);
- return sizeof(uint16_t) * bucket_size +
- sizeof(uint32_t) * bucket_size * block_size;
+ alloc_size[0] = sizeof(uint16_t) * bucket_size;
+ alloc_size[1] = sizeof(uint32_t) * bucket_size * block_size;
}
/* Look at 4 bytes at &data[ix & mask].
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match_quickly_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match_quickly_inc.h
index e5ba840ab97..54397ef8917 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match_quickly_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_longest_match_quickly_inc.h
@@ -49,7 +49,7 @@ static void FN(Initialize)(
self->common = common;
BROTLI_UNUSED(params);
- self->buckets_ = (uint32_t*)common->extra;
+ self->buckets_ = (uint32_t*)common->extra[0];
}
static void FN(Prepare)(
@@ -80,13 +80,13 @@ static void FN(Prepare)(
}
}
-static BROTLI_INLINE size_t FN(HashMemAllocInBytes)(
+static BROTLI_INLINE void FN(HashMemAllocInBytes)(
const BrotliEncoderParams* params, BROTLI_BOOL one_shot,
- size_t input_size) {
+ size_t input_size, size_t* alloc_size) {
BROTLI_UNUSED(params);
BROTLI_UNUSED(one_shot);
BROTLI_UNUSED(input_size);
- return sizeof(uint32_t) * BUCKET_SIZE;
+ alloc_size[0] = sizeof(uint32_t) * BUCKET_SIZE;
}
/* Look at 5 bytes at &data[ix & mask].
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_rolling_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_rolling_inc.h
index 586ae738591..4c7a6b199ad 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_rolling_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_rolling_inc.h
@@ -67,7 +67,7 @@ static void FN(Initialize)(
self->factor_remove *= self->factor;
}
- self->table = (uint32_t*)common->extra;
+ self->table = (uint32_t*)common->extra[0];
for (i = 0; i < NUMBUCKETS; i++) {
self->table[i] = FN(kInvalidPos);
}
@@ -88,13 +88,13 @@ static void FN(Prepare)(HashRolling* BROTLI_RESTRICT self, BROTLI_BOOL one_shot,
BROTLI_UNUSED(one_shot);
}
-static BROTLI_INLINE size_t FN(HashMemAllocInBytes)(
+static BROTLI_INLINE void FN(HashMemAllocInBytes)(
const BrotliEncoderParams* params, BROTLI_BOOL one_shot,
- size_t input_size) {
- return NUMBUCKETS * sizeof(uint32_t);
+ size_t input_size, size_t* alloc_size) {
BROTLI_UNUSED(params);
BROTLI_UNUSED(one_shot);
BROTLI_UNUSED(input_size);
+ alloc_size[0] = NUMBUCKETS * sizeof(uint32_t);
}
static BROTLI_INLINE void FN(Store)(HashRolling* BROTLI_RESTRICT self,
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_to_binary_tree_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_to_binary_tree_inc.h
index 9880e0aef68..a639d2d4b0d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_to_binary_tree_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/hash_to_binary_tree_inc.h
@@ -57,8 +57,8 @@ typedef struct HashToBinaryTree {
static void FN(Initialize)(
HasherCommon* common, HashToBinaryTree* BROTLI_RESTRICT self,
const BrotliEncoderParams* params) {
- self->buckets_ = (uint32_t*)common->extra;
- self->forest_ = &self->buckets_[BUCKET_SIZE];
+ self->buckets_ = (uint32_t*)common->extra[0];
+ self->forest_ = (uint32_t*)common->extra[1];
self->window_mask_ = (1u << params->lgwin) - 1u;
self->invalid_pos_ = (uint32_t)(0 - self->window_mask_);
@@ -78,14 +78,15 @@ static void FN(Prepare)
}
}
-static BROTLI_INLINE size_t FN(HashMemAllocInBytes)(
+static BROTLI_INLINE void FN(HashMemAllocInBytes)(
const BrotliEncoderParams* params, BROTLI_BOOL one_shot,
- size_t input_size) {
+ size_t input_size, size_t* alloc_size) {
size_t num_nodes = (size_t)1 << params->lgwin;
if (one_shot && input_size < num_nodes) {
num_nodes = input_size;
}
- return sizeof(uint32_t) * BUCKET_SIZE + 2 * sizeof(uint32_t) * num_nodes;
+ alloc_size[0] = sizeof(uint32_t) * BUCKET_SIZE;
+ alloc_size[1] = 2 * sizeof(uint32_t) * num_nodes;
}
static BROTLI_INLINE size_t FN(LeftChildIndex)(
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/histogram.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/histogram.c
index 6da2ff6bb43..4dbb87f9070 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/histogram.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/histogram.c
@@ -6,11 +6,11 @@
/* Build per-context histograms of literals, commands and distance codes. */
-#include "./histogram.h"
+#include "histogram.h"
#include "../common/context.h"
-#include "./block_splitter.h"
-#include "./command.h"
+#include "block_splitter.h"
+#include "command.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -63,7 +63,7 @@ void BrotliBuildHistogramsWithContext(
BlockSplitIteratorNext(&insert_and_copy_it);
HistogramAddCommand(&insert_and_copy_histograms[insert_and_copy_it.type_],
cmd->cmd_prefix_);
- /* TODO: unwrap iterator blocks. */
+ /* TODO(eustas): unwrap iterator blocks. */
for (j = cmd->insert_len_; j != 0; --j) {
size_t context;
BlockSplitIteratorNext(&literal_it);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/histogram.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/histogram.h
index 42af3c3f9d1..d1abd973c18 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/histogram.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/histogram.h
@@ -11,12 +11,13 @@
#include <string.h> /* memset */
+#include <brotli/types.h>
+
#include "../common/constants.h"
#include "../common/context.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./block_splitter.h"
-#include "./command.h"
+#include "block_splitter.h"
+#include "command.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -28,7 +29,7 @@ extern "C" {
#define FN(X) X ## Literal
#define DATA_SIZE BROTLI_NUM_LITERAL_SYMBOLS
#define DataType uint8_t
-#include "./histogram_inc.h" /* NOLINT(build/include) */
+#include "histogram_inc.h" /* NOLINT(build/include) */
#undef DataType
#undef DATA_SIZE
#undef FN
@@ -36,13 +37,13 @@ extern "C" {
#define FN(X) X ## Command
#define DataType uint16_t
#define DATA_SIZE BROTLI_NUM_COMMAND_SYMBOLS
-#include "./histogram_inc.h" /* NOLINT(build/include) */
+#include "histogram_inc.h" /* NOLINT(build/include) */
#undef DATA_SIZE
#undef FN
#define FN(X) X ## Distance
#define DATA_SIZE BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS
-#include "./histogram_inc.h" /* NOLINT(build/include) */
+#include "histogram_inc.h" /* NOLINT(build/include) */
#undef DataType
#undef DATA_SIZE
#undef FN
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/literal_cost.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/literal_cost.c
index c231100e341..2ac847f3c98 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/literal_cost.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/literal_cost.c
@@ -7,12 +7,15 @@
/* Literal cost model to allow backward reference replacement to be efficient.
*/
-#include "./literal_cost.h"
+#include "literal_cost.h"
+
+#include <string.h> /* memset */
-#include "../common/platform.h"
#include <brotli/types.h>
-#include "./fast_log.h"
-#include "./utf8_util.h"
+
+#include "../common/platform.h"
+#include "fast_log.h"
+#include "utf8_util.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -54,22 +57,23 @@ static size_t DecideMultiByteStatsLevel(size_t pos, size_t len, size_t mask,
}
static void EstimateBitCostsForLiteralsUTF8(size_t pos, size_t len, size_t mask,
- const uint8_t* data, float* cost) {
+ const uint8_t* data,
+ size_t* histogram, float* cost) {
/* max_utf8 is 0 (normal ASCII single byte modeling),
1 (for 2-byte UTF-8 modeling), or 2 (for 3-byte UTF-8 modeling). */
const size_t max_utf8 = DecideMultiByteStatsLevel(pos, len, mask, data);
- size_t histogram[3][256] = { { 0 } };
size_t window_half = 495;
size_t in_window = BROTLI_MIN(size_t, window_half, len);
size_t in_window_utf8[3] = { 0 };
-
size_t i;
+ memset(histogram, 0, 3 * 256 * sizeof(histogram[0]));
+
{ /* Bootstrap histograms. */
size_t last_c = 0;
size_t utf8_pos = 0;
for (i = 0; i < in_window; ++i) {
size_t c = data[(pos + i) & mask];
- ++histogram[utf8_pos][c];
+ ++histogram[256 * utf8_pos + c];
++in_window_utf8[utf8_pos];
utf8_pos = UTF8Position(last_c, c, max_utf8);
last_c = c;
@@ -85,7 +89,7 @@ static void EstimateBitCostsForLiteralsUTF8(size_t pos, size_t len, size_t mask,
size_t last_c =
i < window_half + 2 ? 0 : data[(pos + i - window_half - 2) & mask];
size_t utf8_pos2 = UTF8Position(last_c, c, max_utf8);
- --histogram[utf8_pos2][data[(pos + i - window_half) & mask]];
+ --histogram[256 * utf8_pos2 + data[(pos + i - window_half) & mask]];
--in_window_utf8[utf8_pos2];
}
if (i + window_half < len) {
@@ -93,7 +97,7 @@ static void EstimateBitCostsForLiteralsUTF8(size_t pos, size_t len, size_t mask,
size_t c = data[(pos + i + window_half - 1) & mask];
size_t last_c = data[(pos + i + window_half - 2) & mask];
size_t utf8_pos2 = UTF8Position(last_c, c, max_utf8);
- ++histogram[utf8_pos2][data[(pos + i + window_half) & mask]];
+ ++histogram[256 * utf8_pos2 + data[(pos + i + window_half) & mask]];
++in_window_utf8[utf8_pos2];
}
{
@@ -101,7 +105,7 @@ static void EstimateBitCostsForLiteralsUTF8(size_t pos, size_t len, size_t mask,
size_t last_c = i < 2 ? 0 : data[(pos + i - 2) & mask];
size_t utf8_pos = UTF8Position(last_c, c, max_utf8);
size_t masked_pos = (pos + i) & mask;
- size_t histo = histogram[utf8_pos][data[masked_pos]];
+ size_t histo = histogram[256 * utf8_pos + data[masked_pos]];
double lit_cost;
if (histo == 0) {
histo = 1;
@@ -125,17 +129,18 @@ static void EstimateBitCostsForLiteralsUTF8(size_t pos, size_t len, size_t mask,
}
void BrotliEstimateBitCostsForLiterals(size_t pos, size_t len, size_t mask,
- const uint8_t* data, float* cost) {
+ const uint8_t* data,
+ size_t* histogram, float* cost) {
if (BrotliIsMostlyUTF8(data, pos, mask, len, kMinUTF8Ratio)) {
- EstimateBitCostsForLiteralsUTF8(pos, len, mask, data, cost);
+ EstimateBitCostsForLiteralsUTF8(pos, len, mask, data, histogram, cost);
return;
} else {
- size_t histogram[256] = { 0 };
size_t window_half = 2000;
size_t in_window = BROTLI_MIN(size_t, window_half, len);
+ size_t i;
+ memset(histogram, 0, 256 * sizeof(histogram[0]));
/* Bootstrap histogram. */
- size_t i;
for (i = 0; i < in_window; ++i) {
++histogram[data[(pos + i) & mask]];
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/literal_cost.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/literal_cost.h
index 8f53f39d3f2..284a8e5af73 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/literal_cost.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/literal_cost.h
@@ -10,9 +10,10 @@
#ifndef BROTLI_ENC_LITERAL_COST_H_
#define BROTLI_ENC_LITERAL_COST_H_
-#include "../common/platform.h"
#include <brotli/types.h>
+#include "../common/platform.h"
+
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
@@ -21,7 +22,8 @@ extern "C" {
ring-buffer (data, mask) will take entropy coded and writes these estimates
to the cost[0..len) array. */
BROTLI_INTERNAL void BrotliEstimateBitCostsForLiterals(
- size_t pos, size_t len, size_t mask, const uint8_t* data, float* cost);
+ size_t pos, size_t len, size_t mask, const uint8_t* data, size_t* histogram,
+ float* cost);
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/memory.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/memory.c
index f6ed7e3cb75..bb5e364198e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/memory.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/memory.c
@@ -7,21 +7,22 @@
/* Algorithms for distributing the literals and commands of a metablock between
block types and contexts. */
-#include "./memory.h"
+#include "memory.h"
#include <stdlib.h> /* exit, free, malloc */
#include <string.h> /* memcpy */
-#include "../common/platform.h"
#include <brotli/types.h>
+#include "../common/platform.h"
+
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
-#define MAX_PERM_ALLOCATED 128
-#define MAX_NEW_ALLOCATED 64
-#define MAX_NEW_FREED 64
+#define MAX_NEW_ALLOCATED (BROTLI_ENCODER_MEMORY_MANAGER_SLOTS >> 2)
+#define MAX_NEW_FREED (BROTLI_ENCODER_MEMORY_MANAGER_SLOTS >> 2)
+#define MAX_PERM_ALLOCATED (BROTLI_ENCODER_MEMORY_MANAGER_SLOTS >> 1)
#define PERM_ALLOCATED_OFFSET 0
#define NEW_ALLOCATED_OFFSET MAX_PERM_ALLOCATED
@@ -67,6 +68,7 @@ void BrotliWipeOutMemoryManager(MemoryManager* m) {
static void SortPointers(void** items, const size_t n) {
/* Shell sort. */
+ /* TODO(eustas): fine-tune for "many slots" case */
static const size_t gaps[] = {23, 10, 4, 1};
int g = 0;
for (; g < 4; ++g) {
@@ -165,6 +167,28 @@ void BrotliWipeOutMemoryManager(MemoryManager* m) {
#endif /* BROTLI_ENCODER_EXIT_ON_OOM */
+void* BrotliBootstrapAlloc(size_t size,
+ brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque) {
+ if (!alloc_func && !free_func) {
+ return malloc(size);
+ } else if (alloc_func && free_func) {
+ return alloc_func(opaque, size);
+ }
+ return NULL;
+}
+
+void BrotliBootstrapFree(void* address, MemoryManager* m) {
+ if (!address) {
+ /* Should not happen! */
+ return;
+ } else {
+ /* Copy values, as those would be freed. */
+ brotli_free_func free_func = m->free_func;
+ void* opaque = m->opaque;
+ free_func(opaque, address);
+ }
+}
+
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/memory.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/memory.h
index 832e7b2b6e3..a4417df4cb2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/memory.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/memory.h
@@ -11,9 +11,10 @@
#include <string.h> /* memcpy */
-#include "../common/platform.h"
#include <brotli/types.h>
+#include "../common/platform.h"
+
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
@@ -23,6 +24,16 @@ extern "C" {
#define BROTLI_ENCODER_EXIT_ON_OOM
#endif
+#if !defined(BROTLI_ENCODER_EXIT_ON_OOM)
+#if defined(BROTLI_EXPERIMENTAL)
+#define BROTLI_ENCODER_MEMORY_MANAGER_SLOTS (48*1024)
+#else /* BROTLI_EXPERIMENTAL */
+#define BROTLI_ENCODER_MEMORY_MANAGER_SLOTS 256
+#endif /* BROTLI_EXPERIMENTAL */
+#else /* BROTLI_ENCODER_EXIT_ON_OOM */
+#define BROTLI_ENCODER_MEMORY_MANAGER_SLOTS 0
+#endif /* BROTLI_ENCODER_EXIT_ON_OOM */
+
typedef struct MemoryManager {
brotli_alloc_func alloc_func;
brotli_free_func free_func;
@@ -32,7 +43,7 @@ typedef struct MemoryManager {
size_t perm_allocated;
size_t new_allocated;
size_t new_freed;
- void* pointers[256];
+ void* pointers[BROTLI_ENCODER_MEMORY_MANAGER_SLOTS];
#endif /* BROTLI_ENCODER_EXIT_ON_OOM */
} MemoryManager;
@@ -107,6 +118,12 @@ V: value to append
A[(S) - 1] = (V); \
}
+/* "Bootstrap" allocations are not tracked by memory manager; should be used
+ only to allocate MemoryManager itself (or structure containing it). */
+BROTLI_INTERNAL void* BrotliBootstrapAlloc(size_t size,
+ brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque);
+BROTLI_INTERNAL void BrotliBootstrapFree(void* address, MemoryManager* m);
+
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock.c
index 5aa4d4f17c8..0c5c078d05e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock.c
@@ -7,27 +7,27 @@
/* Algorithms for distributing the literals and commands of a metablock between
block types and contexts. */
-#include "./metablock.h"
+#include "metablock.h"
+
+#include <brotli/types.h>
#include "../common/constants.h"
#include "../common/context.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./bit_cost.h"
-#include "./block_splitter.h"
-#include "./cluster.h"
-#include "./entropy_encode.h"
-#include "./histogram.h"
-#include "./memory.h"
-#include "./quality.h"
+#include "bit_cost.h"
+#include "block_splitter.h"
+#include "cluster.h"
+#include "entropy_encode.h"
+#include "histogram.h"
+#include "memory.h"
+#include "quality.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
-void BrotliInitDistanceParams(BrotliEncoderParams* params,
- uint32_t npostfix, uint32_t ndirect) {
- BrotliDistanceParams* dist_params = &params->dist;
+void BrotliInitDistanceParams(BrotliDistanceParams* dist_params,
+ uint32_t npostfix, uint32_t ndirect, BROTLI_BOOL large_window) {
uint32_t alphabet_size_max;
uint32_t alphabet_size_limit;
uint32_t max_distance;
@@ -41,7 +41,7 @@ void BrotliInitDistanceParams(BrotliEncoderParams* params,
max_distance = ndirect + (1U << (BROTLI_MAX_DISTANCE_BITS + npostfix + 2)) -
(1U << (npostfix + 2));
- if (params->large_window) {
+ if (large_window) {
BrotliDistanceCodeLimit limit = BrotliCalculateDistanceCodeLimit(
BROTLI_MAX_ALLOWED_DISTANCE, npostfix, ndirect);
alphabet_size_max = BROTLI_DISTANCE_ALPHABET_SIZE(
@@ -83,14 +83,14 @@ static BROTLI_BOOL ComputeDistanceCost(const Command* cmds,
size_t num_commands,
const BrotliDistanceParams* orig_params,
const BrotliDistanceParams* new_params,
- double* cost) {
+ double* cost,
+ HistogramDistance* tmp) {
size_t i;
BROTLI_BOOL equal_params = BROTLI_FALSE;
uint16_t dist_prefix;
uint32_t dist_extra;
double extra_bits = 0.0;
- HistogramDistance histo;
- HistogramClearDistance(&histo);
+ HistogramClearDistance(tmp);
if (orig_params->distance_postfix_bits == new_params->distance_postfix_bits &&
orig_params->num_direct_distance_codes ==
@@ -114,12 +114,12 @@ static BROTLI_BOOL ComputeDistanceCost(const Command* cmds,
&dist_prefix,
&dist_extra);
}
- HistogramAddDistance(&histo, dist_prefix & 0x3FF);
+ HistogramAddDistance(tmp, dist_prefix & 0x3FF);
extra_bits += dist_prefix >> 10;
}
}
- *cost = BrotliPopulationCostDistance(&histo) + extra_bits;
+ *cost = BrotliPopulationCostDistance(tmp) + extra_bits;
return BROTLI_TRUE;
}
@@ -147,43 +147,46 @@ void BrotliBuildMetaBlock(MemoryManager* m,
uint32_t ndirect_msb = 0;
BROTLI_BOOL check_orig = BROTLI_TRUE;
double best_dist_cost = 1e99;
- BrotliEncoderParams orig_params = *params;
- BrotliEncoderParams new_params = *params;
+ BrotliDistanceParams orig_params = params->dist;
+ BrotliDistanceParams new_params = params->dist;
+ HistogramDistance* tmp = BROTLI_ALLOC(m, HistogramDistance, 1);
+
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(tmp)) return;
for (npostfix = 0; npostfix <= BROTLI_MAX_NPOSTFIX; npostfix++) {
for (; ndirect_msb < 16; ndirect_msb++) {
uint32_t ndirect = ndirect_msb << npostfix;
BROTLI_BOOL skip;
double dist_cost;
- BrotliInitDistanceParams(&new_params, npostfix, ndirect);
- if (npostfix == orig_params.dist.distance_postfix_bits &&
- ndirect == orig_params.dist.num_direct_distance_codes) {
+ BrotliInitDistanceParams(&new_params, npostfix, ndirect,
+ params->large_window);
+ if (npostfix == orig_params.distance_postfix_bits &&
+ ndirect == orig_params.num_direct_distance_codes) {
check_orig = BROTLI_FALSE;
}
skip = !ComputeDistanceCost(
- cmds, num_commands,
- &orig_params.dist, &new_params.dist, &dist_cost);
+ cmds, num_commands, &orig_params, &new_params, &dist_cost, tmp);
if (skip || (dist_cost > best_dist_cost)) {
break;
}
best_dist_cost = dist_cost;
- params->dist = new_params.dist;
+ params->dist = new_params;
}
if (ndirect_msb > 0) ndirect_msb--;
ndirect_msb /= 2;
}
if (check_orig) {
double dist_cost;
- ComputeDistanceCost(cmds, num_commands,
- &orig_params.dist, &orig_params.dist, &dist_cost);
+ ComputeDistanceCost(cmds, num_commands, &orig_params, &orig_params,
+ &dist_cost, tmp);
if (dist_cost < best_dist_cost) {
/* NB: currently unused; uncomment when more param tuning is added. */
/* best_dist_cost = dist_cost; */
- params->dist = orig_params.dist;
+ params->dist = orig_params;
}
}
- RecomputeDistancePrefixes(cmds, num_commands,
- &orig_params.dist, &params->dist);
+ BROTLI_FREE(m, tmp);
+ RecomputeDistancePrefixes(cmds, num_commands, &orig_params, &params->dist);
BrotliSplitBlock(m, cmds, num_commands,
ringbuffer, pos, mask, params,
@@ -284,15 +287,15 @@ void BrotliBuildMetaBlock(MemoryManager* m,
}
#define FN(X) X ## Literal
-#include "./metablock_inc.h" /* NOLINT(build/include) */
+#include "metablock_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Command
-#include "./metablock_inc.h" /* NOLINT(build/include) */
+#include "metablock_inc.h" /* NOLINT(build/include) */
#undef FN
#define FN(X) X ## Distance
-#include "./metablock_inc.h" /* NOLINT(build/include) */
+#include "metablock_inc.h" /* NOLINT(build/include) */
#undef FN
#define BROTLI_MAX_STATIC_CONTEXTS 13
@@ -535,17 +538,21 @@ static void MapStaticContexts(MemoryManager* m,
}
}
-static BROTLI_INLINE void BrotliBuildMetaBlockGreedyInternal(
- MemoryManager* m, const uint8_t* ringbuffer, size_t pos, size_t mask,
- uint8_t prev_byte, uint8_t prev_byte2, ContextLut literal_context_lut,
- const size_t num_contexts, const uint32_t* static_context_map,
- const Command* commands, size_t n_commands, MetaBlockSplit* mb) {
+typedef struct GreedyMetablockArena {
union {
BlockSplitterLiteral plain;
ContextBlockSplitter ctx;
} lit_blocks;
BlockSplitterCommand cmd_blocks;
BlockSplitterDistance dist_blocks;
+} GreedyMetablockArena;
+
+static BROTLI_INLINE void BrotliBuildMetaBlockGreedyInternal(
+ MemoryManager* m, GreedyMetablockArena* arena, const uint8_t* ringbuffer,
+ size_t pos, size_t mask, uint8_t prev_byte, uint8_t prev_byte2,
+ ContextLut literal_context_lut, const size_t num_contexts,
+ const uint32_t* static_context_map, const Command* commands,
+ size_t n_commands, MetaBlockSplit* mb) {
size_t num_literals = 0;
size_t i;
for (i = 0; i < n_commands; ++i) {
@@ -553,20 +560,20 @@ static BROTLI_INLINE void BrotliBuildMetaBlockGreedyInternal(
}
if (num_contexts == 1) {
- InitBlockSplitterLiteral(m, &lit_blocks.plain, 256, 512, 400.0,
+ InitBlockSplitterLiteral(m, &arena->lit_blocks.plain, 256, 512, 400.0,
num_literals, &mb->literal_split, &mb->literal_histograms,
&mb->literal_histograms_size);
} else {
- InitContextBlockSplitter(m, &lit_blocks.ctx, 256, num_contexts, 512, 400.0,
- num_literals, &mb->literal_split, &mb->literal_histograms,
+ InitContextBlockSplitter(m, &arena->lit_blocks.ctx, 256, num_contexts, 512,
+ 400.0, num_literals, &mb->literal_split, &mb->literal_histograms,
&mb->literal_histograms_size);
}
if (BROTLI_IS_OOM(m)) return;
- InitBlockSplitterCommand(m, &cmd_blocks, BROTLI_NUM_COMMAND_SYMBOLS, 1024,
- 500.0, n_commands, &mb->command_split, &mb->command_histograms,
+ InitBlockSplitterCommand(m, &arena->cmd_blocks, BROTLI_NUM_COMMAND_SYMBOLS,
+ 1024, 500.0, n_commands, &mb->command_split, &mb->command_histograms,
&mb->command_histograms_size);
if (BROTLI_IS_OOM(m)) return;
- InitBlockSplitterDistance(m, &dist_blocks, 64, 512, 100.0, n_commands,
+ InitBlockSplitterDistance(m, &arena->dist_blocks, 64, 512, 100.0, n_commands,
&mb->distance_split, &mb->distance_histograms,
&mb->distance_histograms_size);
if (BROTLI_IS_OOM(m)) return;
@@ -574,15 +581,15 @@ static BROTLI_INLINE void BrotliBuildMetaBlockGreedyInternal(
for (i = 0; i < n_commands; ++i) {
const Command cmd = commands[i];
size_t j;
- BlockSplitterAddSymbolCommand(&cmd_blocks, cmd.cmd_prefix_);
+ BlockSplitterAddSymbolCommand(&arena->cmd_blocks, cmd.cmd_prefix_);
for (j = cmd.insert_len_; j != 0; --j) {
uint8_t literal = ringbuffer[pos & mask];
if (num_contexts == 1) {
- BlockSplitterAddSymbolLiteral(&lit_blocks.plain, literal);
+ BlockSplitterAddSymbolLiteral(&arena->lit_blocks.plain, literal);
} else {
size_t context =
BROTLI_CONTEXT(prev_byte, prev_byte2, literal_context_lut);
- ContextBlockSplitterAddSymbol(&lit_blocks.ctx, m, literal,
+ ContextBlockSplitterAddSymbol(&arena->lit_blocks.ctx, m, literal,
static_context_map[context]);
if (BROTLI_IS_OOM(m)) return;
}
@@ -595,21 +602,24 @@ static BROTLI_INLINE void BrotliBuildMetaBlockGreedyInternal(
prev_byte2 = ringbuffer[(pos - 2) & mask];
prev_byte = ringbuffer[(pos - 1) & mask];
if (cmd.cmd_prefix_ >= 128) {
- BlockSplitterAddSymbolDistance(&dist_blocks, cmd.dist_prefix_ & 0x3FF);
+ BlockSplitterAddSymbolDistance(
+ &arena->dist_blocks, cmd.dist_prefix_ & 0x3FF);
}
}
}
if (num_contexts == 1) {
BlockSplitterFinishBlockLiteral(
- &lit_blocks.plain, /* is_final = */ BROTLI_TRUE);
+ &arena->lit_blocks.plain, /* is_final = */ BROTLI_TRUE);
} else {
ContextBlockSplitterFinishBlock(
- &lit_blocks.ctx, m, /* is_final = */ BROTLI_TRUE);
+ &arena->lit_blocks.ctx, m, /* is_final = */ BROTLI_TRUE);
if (BROTLI_IS_OOM(m)) return;
}
- BlockSplitterFinishBlockCommand(&cmd_blocks, /* is_final = */ BROTLI_TRUE);
- BlockSplitterFinishBlockDistance(&dist_blocks, /* is_final = */ BROTLI_TRUE);
+ BlockSplitterFinishBlockCommand(
+ &arena->cmd_blocks, /* is_final = */ BROTLI_TRUE);
+ BlockSplitterFinishBlockDistance(
+ &arena->dist_blocks, /* is_final = */ BROTLI_TRUE);
if (num_contexts > 1) {
MapStaticContexts(m, num_contexts, static_context_map, mb);
@@ -628,14 +638,18 @@ void BrotliBuildMetaBlockGreedy(MemoryManager* m,
const Command* commands,
size_t n_commands,
MetaBlockSplit* mb) {
+ GreedyMetablockArena* arena = BROTLI_ALLOC(m, GreedyMetablockArena, 1);
+ if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(arena)) return;
if (num_contexts == 1) {
- BrotliBuildMetaBlockGreedyInternal(m, ringbuffer, pos, mask, prev_byte,
- prev_byte2, literal_context_lut, 1, NULL, commands, n_commands, mb);
+ BrotliBuildMetaBlockGreedyInternal(m, arena, ringbuffer, pos, mask,
+ prev_byte, prev_byte2, literal_context_lut, 1, NULL, commands,
+ n_commands, mb);
} else {
- BrotliBuildMetaBlockGreedyInternal(m, ringbuffer, pos, mask, prev_byte,
- prev_byte2, literal_context_lut, num_contexts, static_context_map,
- commands, n_commands, mb);
+ BrotliBuildMetaBlockGreedyInternal(m, arena, ringbuffer, pos, mask,
+ prev_byte, prev_byte2, literal_context_lut, num_contexts,
+ static_context_map, commands, n_commands, mb);
}
+ BROTLI_FREE(m, arena);
}
void BrotliOptimizeHistograms(uint32_t num_distance_codes,
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock.h
index 334a79a443c..db38f8fd217 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock.h
@@ -10,14 +10,15 @@
#ifndef BROTLI_ENC_METABLOCK_H_
#define BROTLI_ENC_METABLOCK_H_
+#include <brotli/types.h>
+
#include "../common/context.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./block_splitter.h"
-#include "./command.h"
-#include "./histogram.h"
-#include "./memory.h"
-#include "./quality.h"
+#include "block_splitter.h"
+#include "command.h"
+#include "histogram.h"
+#include "memory.h"
+#include "quality.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -95,8 +96,8 @@ BROTLI_INTERNAL void BrotliBuildMetaBlockGreedy(
BROTLI_INTERNAL void BrotliOptimizeHistograms(uint32_t num_distance_codes,
MetaBlockSplit* mb);
-BROTLI_INTERNAL void BrotliInitDistanceParams(BrotliEncoderParams* params,
- uint32_t npostfix, uint32_t ndirect);
+BROTLI_INTERNAL void BrotliInitDistanceParams(BrotliDistanceParams* params,
+ uint32_t npostfix, uint32_t ndirect, BROTLI_BOOL large_window);
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock_inc.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock_inc.h
index ed507ef5ef4..f9393869ab1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock_inc.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/metablock_inc.h
@@ -27,6 +27,9 @@ typedef struct FN(BlockSplitter) {
HistogramType* histograms_; /* not owned */
size_t* histograms_size_; /* not owned */
+ /* Temporary storage for BlockSplitterFinishBlock. */
+ HistogramType combined_histo[2];
+
/* The number of symbols that we want to collect before deciding on whether
or not to merge the block with a previous one or emit a new block. */
size_t target_block_size_;
@@ -104,17 +107,16 @@ static void FN(BlockSplitterFinishBlock)(
} else if (self->block_size_ > 0) {
double entropy = BitsEntropy(histograms[self->curr_histogram_ix_].data_,
self->alphabet_size_);
- HistogramType combined_histo[2];
double combined_entropy[2];
double diff[2];
size_t j;
for (j = 0; j < 2; ++j) {
size_t last_histogram_ix = self->last_histogram_ix_[j];
- combined_histo[j] = histograms[self->curr_histogram_ix_];
- FN(HistogramAddHistogram)(&combined_histo[j],
+ self->combined_histo[j] = histograms[self->curr_histogram_ix_];
+ FN(HistogramAddHistogram)(&self->combined_histo[j],
&histograms[last_histogram_ix]);
combined_entropy[j] = BitsEntropy(
- &combined_histo[j].data_[0], self->alphabet_size_);
+ &self->combined_histo[j].data_[0], self->alphabet_size_);
diff[j] = combined_entropy[j] - entropy - last_entropy[j];
}
@@ -141,7 +143,7 @@ static void FN(BlockSplitterFinishBlock)(
split->lengths[self->num_blocks_] = (uint32_t)self->block_size_;
split->types[self->num_blocks_] = split->types[self->num_blocks_ - 2];
BROTLI_SWAP(size_t, self->last_histogram_ix_, 0, 1);
- histograms[self->last_histogram_ix_[0]] = combined_histo[1];
+ histograms[self->last_histogram_ix_[0]] = self->combined_histo[1];
last_entropy[1] = last_entropy[0];
last_entropy[0] = combined_entropy[1];
++self->num_blocks_;
@@ -152,7 +154,7 @@ static void FN(BlockSplitterFinishBlock)(
} else {
/* Combine this block with last block. */
split->lengths[self->num_blocks_ - 1] += (uint32_t)self->block_size_;
- histograms[self->last_histogram_ix_[0]] = combined_histo[0];
+ histograms[self->last_histogram_ix_[0]] = self->combined_histo[0];
last_entropy[0] = combined_entropy[0];
if (split->num_types == 1) {
last_entropy[1] = last_entropy[0];
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/params.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/params.h
index 54a7f007363..78b2ab60828 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/params.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/params.h
@@ -10,13 +10,13 @@
#define BROTLI_ENC_PARAMS_H_
#include <brotli/encode.h>
-#include "./encoder_dict.h"
+
+#include "encoder_dict.h"
typedef struct BrotliHasherParams {
int type;
int bucket_bits;
int block_bits;
- int hash_len;
int num_last_distances_to_check;
} BrotliHasherParams;
@@ -40,7 +40,8 @@ typedef struct BrotliEncoderParams {
BROTLI_BOOL large_window;
BrotliHasherParams hasher;
BrotliDistanceParams dist;
- BrotliEncoderDictionary dictionary;
+ /* TODO(eustas): rename to BrotliShared... */
+ SharedEncoderDictionary dictionary;
} BrotliEncoderParams;
#endif /* BROTLI_ENC_PARAMS_H_ */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/prefix.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/prefix.h
index fd359a478d4..0f006f1614f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/prefix.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/prefix.h
@@ -10,10 +10,11 @@
#ifndef BROTLI_ENC_PREFIX_H_
#define BROTLI_ENC_PREFIX_H_
+#include <brotli/types.h>
+
#include "../common/constants.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./fast_log.h"
+#include "fast_log.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/quality.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/quality.h
index 5f4d0345037..ffdfd72fb4a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/quality.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/quality.h
@@ -10,9 +10,10 @@
#ifndef BROTLI_ENC_QUALITY_H_
#define BROTLI_ENC_QUALITY_H_
-#include "../common/platform.h"
#include <brotli/encode.h>
-#include "./params.h"
+
+#include "../common/platform.h"
+#include "params.h"
#define FAST_ONE_PASS_COMPRESSION_QUALITY 0
#define FAST_TWO_PASS_COMPRESSION_QUALITY 1
@@ -118,6 +119,41 @@ static BROTLI_INLINE size_t LiteralSpreeLengthForSparseSearch(
return params->quality < 9 ? 64 : 512;
}
+/* Quality to hasher mapping:
+
+ - q02: h02 (longest_match_quickly), b16, l5
+
+ - q03: h03 (longest_match_quickly), b17, l5
+
+ - q04: h04 (longest_match_quickly), b17, l5
+ - q04: h54 (longest_match_quickly), b20, l7 | for large files
+
+ - q05: h05 (longest_match ), b14, l4
+ - q05: h06 (longest_match64 ), b15, l5 | for large files
+ - q05: h40 (forgetful_chain ), b15, l4 | for small window
+
+ - q06: h05 (longest_match ), b14, l4
+ - q06: h06 (longest_match64 ), b15, l5 | for large files
+ - q06: h40 (forgetful_chain ), b15, l4 | for small window
+
+ - q07: h05 (longest_match ), b15, l4
+ - q07: h06 (longest_match64 ), b15, l5 | for large files
+ - q07: h41 (forgetful_chain ), b15, l4 | for small window
+
+ - q08: h05 (longest_match ), b15, l4
+ - q08: h06 (longest_match64 ), b15, l5 | for large files
+ - q08: h41 (forgetful_chain ), b15, l4 | for small window
+
+ - q09: h05 (longest_match ), b15, l4
+ - q09: h06 (longest_match64 ), b15, l5 | for large files
+ - q09: h42 (forgetful_chain ), b15, l4 | for small window
+
+ - q10: t10 (to_binary_tree ), b17, l128
+
+ - q11: t10 (to_binary_tree ), b17, l128
+
+ Where "q" is quality, "h" is hasher type, "b" is bucket bits,
+ "l" is source len. */
static BROTLI_INLINE void ChooseHasher(const BrotliEncoderParams* params,
BrotliHasherParams* hparams) {
if (params->quality > 9) {
@@ -132,10 +168,11 @@ static BROTLI_INLINE void ChooseHasher(const BrotliEncoderParams* params,
hparams->type = 6;
hparams->block_bits = params->quality - 1;
hparams->bucket_bits = 15;
- hparams->hash_len = 5;
hparams->num_last_distances_to_check =
params->quality < 7 ? 4 : params->quality < 9 ? 10 : 16;
} else {
+ /* TODO(eustas): often previous setting (H6) is faster and denser; consider
+ adding an option to use it. */
hparams->type = 5;
hparams->block_bits = params->quality - 1;
hparams->bucket_bits = params->quality < 7 ? 14 : 15;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/ringbuffer.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/ringbuffer.h
index 8dce1480399..27245b7f390 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/ringbuffer.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/ringbuffer.h
@@ -11,10 +11,11 @@
#include <string.h> /* memcpy */
-#include "../common/platform.h"
#include <brotli/types.h>
-#include "./memory.h"
-#include "./quality.h"
+
+#include "../common/platform.h"
+#include "memory.h"
+#include "quality.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/state.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/state.h
new file mode 100644
index 00000000000..cb82987701f
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/state.h
@@ -0,0 +1,104 @@
+/* Copyright 2022 Google Inc. All Rights Reserved.
+
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* Encoder state. */
+
+#ifndef BROTLI_ENC_STATE_H_
+#define BROTLI_ENC_STATE_H_
+
+#include <brotli/types.h>
+
+#include "command.h"
+#include "compress_fragment.h"
+#include "compress_fragment_two_pass.h"
+#include "hash.h"
+#include "memory.h"
+#include "params.h"
+#include "ringbuffer.h"
+
+typedef enum BrotliEncoderStreamState {
+ /* Default state. */
+ BROTLI_STREAM_PROCESSING = 0,
+ /* Intermediate state; after next block is emitted, byte-padding should be
+ performed before getting back to default state. */
+ BROTLI_STREAM_FLUSH_REQUESTED = 1,
+ /* Last metablock was produced; no more input is acceptable. */
+ BROTLI_STREAM_FINISHED = 2,
+ /* Flushing compressed block and writing meta-data block header. */
+ BROTLI_STREAM_METADATA_HEAD = 3,
+ /* Writing metadata block body. */
+ BROTLI_STREAM_METADATA_BODY = 4
+} BrotliEncoderStreamState;
+
+typedef enum BrotliEncoderFlintState {
+ BROTLI_FLINT_NEEDS_2_BYTES = 2,
+ BROTLI_FLINT_NEEDS_1_BYTE = 1,
+ BROTLI_FLINT_WAITING_FOR_PROCESSING = 0,
+ BROTLI_FLINT_WAITING_FOR_FLUSHING = -1,
+ BROTLI_FLINT_DONE = -2
+} BrotliEncoderFlintState;
+
+typedef struct BrotliEncoderStateStruct {
+ BrotliEncoderParams params;
+
+ MemoryManager memory_manager_;
+
+ uint64_t input_pos_;
+ RingBuffer ringbuffer_;
+ size_t cmd_alloc_size_;
+ Command* commands_;
+ size_t num_commands_;
+ size_t num_literals_;
+ size_t last_insert_len_;
+ uint64_t last_flush_pos_;
+ uint64_t last_processed_pos_;
+ int dist_cache_[BROTLI_NUM_DISTANCE_SHORT_CODES];
+ int saved_dist_cache_[4];
+ uint16_t last_bytes_;
+ uint8_t last_bytes_bits_;
+ /* "Flint" is a tiny uncompressed block emitted before the continuation
+ block to unwire literal context from previous data. Despite being int8_t,
+ field is actually BrotliEncoderFlintState enum. */
+ int8_t flint_;
+ uint8_t prev_byte_;
+ uint8_t prev_byte2_;
+ size_t storage_size_;
+ uint8_t* storage_;
+
+ Hasher hasher_;
+
+ /* Hash table for FAST_ONE_PASS_COMPRESSION_QUALITY mode. */
+ int small_table_[1 << 10]; /* 4KiB */
+ int* large_table_; /* Allocated only when needed */
+ size_t large_table_size_;
+
+ BrotliOnePassArena* one_pass_arena_;
+ BrotliTwoPassArena* two_pass_arena_;
+
+ /* Command and literal buffers for FAST_TWO_PASS_COMPRESSION_QUALITY. */
+ uint32_t* command_buf_;
+ uint8_t* literal_buf_;
+
+ uint64_t total_in_;
+ uint8_t* next_out_;
+ size_t available_out_;
+ uint64_t total_out_;
+ /* Temporary buffer for padding flush bits or metadata block header / body. */
+ union {
+ uint64_t u64[2];
+ uint8_t u8[16];
+ } tiny_buf_;
+ uint32_t remaining_metadata_bytes_;
+ BrotliEncoderStreamState stream_state_;
+
+ BROTLI_BOOL is_last_block_emitted_;
+ BROTLI_BOOL is_initialized_;
+} BrotliEncoderStateStruct;
+
+typedef struct BrotliEncoderStateStruct BrotliEncoderStateInternal;
+#define BrotliEncoderState BrotliEncoderStateInternal
+
+#endif // BROTLI_ENC_STATE_H_
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.c
index 7299ab7203b..291d2833546 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.c
@@ -4,13 +4,13 @@
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
-#include "./static_dict.h"
+#include "static_dict.h"
#include "../common/dictionary.h"
#include "../common/platform.h"
#include "../common/transform.h"
-#include "./encoder_dict.h"
-#include "./find_match_length.h"
+#include "encoder_dict.h"
+#include "find_match_length.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -74,10 +74,27 @@ static BROTLI_INLINE BROTLI_BOOL IsMatch(const BrotliDictionary* dictionary,
}
}
-BROTLI_BOOL BrotliFindAllStaticDictionaryMatches(
+/* Finds matches for a single static dictionary */
+static BROTLI_BOOL BrotliFindAllStaticDictionaryMatchesFor(
const BrotliEncoderDictionary* dictionary, const uint8_t* data,
size_t min_length, size_t max_length, uint32_t* matches) {
BROTLI_BOOL has_found_match = BROTLI_FALSE;
+#if defined(BROTLI_EXPERIMENTAL)
+ if (dictionary->has_words_heavy) {
+ const BrotliTrieNode* node = &dictionary->trie.root;
+ size_t l = 0;
+ while (node && l < max_length) {
+ uint8_t c;
+ if (l >= min_length && node->len_) {
+ AddMatch(node->idx_, l, node->len_, matches);
+ has_found_match = BROTLI_TRUE;
+ }
+ c = data[l++];
+ node = BrotliTrieSub(&dictionary->trie, node, c);
+ }
+ return has_found_match;
+ }
+#endif /* BROTLI_EXPERIMENTAL */
{
size_t offset = dictionary->buckets[Hash(data)];
BROTLI_BOOL end = !offset;
@@ -481,6 +498,45 @@ BROTLI_BOOL BrotliFindAllStaticDictionaryMatches(
return has_found_match;
}
+/* Finds matches for one or more dictionaries, if multiple are present
+ in the contextual dictionary */
+BROTLI_BOOL BrotliFindAllStaticDictionaryMatches(
+ const BrotliEncoderDictionary* dictionary, const uint8_t* data,
+ size_t min_length, size_t max_length, uint32_t* matches) {
+ BROTLI_BOOL has_found_match =
+ BrotliFindAllStaticDictionaryMatchesFor(
+ dictionary, data, min_length, max_length, matches);
+
+ if (!!dictionary->parent && dictionary->parent->num_dictionaries > 1) {
+ uint32_t matches2[BROTLI_MAX_STATIC_DICTIONARY_MATCH_LEN + 1];
+ int l;
+ const BrotliEncoderDictionary* dictionary2 = dictionary->parent->dict[0];
+ if (dictionary2 == dictionary) {
+ dictionary2 = dictionary->parent->dict[1];
+ }
+
+ for (l = 0; l < BROTLI_MAX_STATIC_DICTIONARY_MATCH_LEN + 1; l++) {
+ matches2[l] = kInvalidMatch;
+ }
+
+ has_found_match |= BrotliFindAllStaticDictionaryMatchesFor(
+ dictionary2, data, min_length, max_length, matches2);
+
+ for (l = 0; l < BROTLI_MAX_STATIC_DICTIONARY_MATCH_LEN + 1; l++) {
+ if (matches2[l] != kInvalidMatch) {
+ uint32_t dist = (uint32_t)(matches2[l] >> 5);
+ uint32_t len_code = matches2[l] & 31;
+ uint32_t skipdist = (uint32_t)((uint32_t)(1 << dictionary->words->
+ size_bits_by_length[len_code]) & ~1u) *
+ (uint32_t)dictionary->num_transforms;
+ /* TODO(lode): check for dist overflow */
+ dist += skipdist;
+ AddMatch(dist, (size_t)l, len_code, matches);
+ }
+ }
+ }
+ return has_found_match;
+}
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.h
index 6b5d4eb0c98..ab832207d10 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict.h
@@ -9,10 +9,11 @@
#ifndef BROTLI_ENC_STATIC_DICT_H_
#define BROTLI_ENC_STATIC_DICT_H_
+#include <brotli/types.h>
+
#include "../common/dictionary.h"
#include "../common/platform.h"
-#include <brotli/types.h>
-#include "./encoder_dict.h"
+#include "encoder_dict.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict_lut.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict_lut.h
index e299cda6d82..a465ffde743 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict_lut.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/static_dict_lut.h
@@ -22,6 +22,7 @@ typedef struct DictWord {
uint16_t idx;
} DictWord;
+/* GENERATED CODE START */
static const int kDictNumBits = 15;
static const uint32_t kDictHashMul32 = 0x1E35A7BD;
@@ -5856,6 +5857,7 @@ static const DictWord kStaticDictionaryWords[31705] = {
,0,1735},{5,0,598},{7,0,791},{8,0,108},{9,0,123},{7,10,1570},{140,10,542},{142,
11,410},{9,11,660},{138,11,347}
};
+/* GENERATED CODE END */
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/utf8_util.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/utf8_util.c
index e802b6a7517..65ec3f5c8d5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/utf8_util.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/utf8_util.c
@@ -6,7 +6,7 @@
/* Heuristics for deciding about the UTF8-ness of strings. */
-#include "./utf8_util.h"
+#include "utf8_util.h"
#include <brotli/types.h>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/utf8_util.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/utf8_util.h
index 8fda80c2203..a38a95383cc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/utf8_util.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/utf8_util.h
@@ -9,9 +9,10 @@
#ifndef BROTLI_ENC_UTF8_UTIL_H_
#define BROTLI_ENC_UTF8_UTIL_H_
-#include "../common/platform.h"
#include <brotli/types.h>
+#include "../common/platform.h"
+
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/write_bits.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/write_bits.h
index f6f88b45be0..242754b0ee5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/write_bits.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/enc/write_bits.h
@@ -9,9 +9,10 @@
#ifndef BROTLI_ENC_WRITE_BITS_H_
#define BROTLI_ENC_WRITE_BITS_H_
-#include "../common/platform.h"
#include <brotli/types.h>
+#include "../common/platform.h"
+
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/decode.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/decode.h
index 0f5c8f9d111..af1aa23f60d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/decode.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/decode.h
@@ -13,6 +13,7 @@
#define BROTLI_DEC_DECODE_H_
#include <brotli/port.h>
+#include <brotli/shared_dictionary.h>
#include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus)
@@ -85,8 +86,9 @@ typedef enum {
BROTLI_ERROR_CODE(_ERROR_FORMAT_, PADDING_2, -15) SEPARATOR \
BROTLI_ERROR_CODE(_ERROR_FORMAT_, DISTANCE, -16) SEPARATOR \
\
- /* -17..-18 codes are reserved */ \
+ /* -17 code is reserved */ \
\
+ BROTLI_ERROR_CODE(_ERROR_, COMPOUND_DICTIONARY, -18) SEPARATOR \
BROTLI_ERROR_CODE(_ERROR_, DICTIONARY_NOT_SET, -19) SEPARATOR \
BROTLI_ERROR_CODE(_ERROR_, INVALID_ARGUMENTS, -20) SEPARATOR \
\
@@ -155,6 +157,28 @@ BROTLI_DEC_API BROTLI_BOOL BrotliDecoderSetParameter(
BrotliDecoderState* state, BrotliDecoderParameter param, uint32_t value);
/**
+ * Adds LZ77 prefix dictionary, adds or replaces built-in static dictionary and
+ * transforms.
+ *
+ * Attached dictionary ownership is not transferred.
+ * Data provided to this method should be kept accessible until
+ * decoding is finished and decoder instance is destroyed.
+ *
+ * @note Dictionaries can NOT be attached after actual decoding is started.
+ *
+ * @param state decoder instance
+ * @param type dictionary data format
+ * @param data_size length of memory region pointed by @p data
+ * @param data dictionary data in format corresponding to @p type
+ * @returns ::BROTLI_FALSE if dictionary is corrupted,
+ * or dictionary count limit is reached
+ * @returns ::BROTLI_TRUE if dictionary is accepted / attached
+ */
+BROTLI_DEC_API BROTLI_BOOL BrotliDecoderAttachDictionary(
+ BrotliDecoderState* state, BrotliSharedDictionaryType type,
+ size_t data_size, const uint8_t data[BROTLI_ARRAY_PARAM(data_size)]);
+
+/**
* Creates an instance of ::BrotliDecoderState and initializes it.
*
* The instance can be used once for decoding and should then be destroyed with
@@ -333,10 +357,51 @@ BROTLI_DEC_API const char* BrotliDecoderErrorString(BrotliDecoderErrorCode c);
/**
* Gets a decoder library version.
*
- * Look at BROTLI_VERSION for more information.
+ * Look at BROTLI_MAKE_HEX_VERSION for more information.
*/
BROTLI_DEC_API uint32_t BrotliDecoderVersion(void);
+/**
+ * Callback to fire on metadata block start.
+ *
+ * After this callback is fired, if @p size is not @c 0, it is followed by
+ * ::brotli_decoder_metadata_chunk_func as more metadata block contents become
+ * accessible.
+ *
+ * @param opaque callback handle
+ * @param size size of metadata block
+ */
+typedef void (*brotli_decoder_metadata_start_func)(void* opaque, size_t size);
+
+/**
+ * Callback to fire on metadata block chunk becomes available.
+ *
+ * This function can be invoked multiple times per metadata block; block should
+ * be considered finished when sum of @p size matches the announced metadata
+ * block size. Chunks contents pointed by @p data are transient and shouln not
+ * be accessed after leaving the callback.
+ *
+ * @param opaque callback handle
+ * @param data pointer to metadata contents
+ * @param size size of metadata block chunk, at least @c 1
+ */
+typedef void (*brotli_decoder_metadata_chunk_func)(void* opaque,
+ const uint8_t* data,
+ size_t size);
+
+/**
+ * Sets callback for receiving metadata blocks.
+ *
+ * @param state decoder instance
+ * @param start_func callback on metadata block start
+ * @param chunk_func callback on metadata block chunk
+ * @param opaque callback handle
+ */
+BROTLI_DEC_API void BrotliDecoderSetMetadataCallbacks(
+ BrotliDecoderState* state,
+ brotli_decoder_metadata_start_func start_func,
+ brotli_decoder_metadata_chunk_func chunk_func, void* opaque);
+
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/encode.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/encode.h
index b2774cb6316..dea9931ebb3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/encode.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/encode.h
@@ -13,6 +13,7 @@
#define BROTLI_ENC_ENCODE_H_
#include <brotli/port.h>
+#include <brotli/shared_dictionary.h>
#include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus)
@@ -269,6 +270,51 @@ BROTLI_ENC_API BrotliEncoderState* BrotliEncoderCreateInstance(
*/
BROTLI_ENC_API void BrotliEncoderDestroyInstance(BrotliEncoderState* state);
+/* Opaque type for pointer to different possible internal structures containing
+ dictionary prepared for the encoder */
+typedef struct BrotliEncoderPreparedDictionaryStruct
+ BrotliEncoderPreparedDictionary;
+
+/**
+ * Prepares a shared dictionary from the given file format for the encoder.
+ *
+ * @p alloc_func and @p free_func @b MUST be both zero or both non-zero. In the
+ * case they are both zero, default memory allocators are used. @p opaque is
+ * passed to @p alloc_func and @p free_func when they are called. @p free_func
+ * has to return without doing anything when asked to free a NULL pointer.
+ *
+ * @param type type of dictionary stored in data
+ * @param data_size size of @p data buffer
+ * @param data pointer to the dictionary data
+ * @param quality the maximum Brotli quality to prepare the dictionary for,
+ * use BROTLI_MAX_QUALITY by default
+ * @param alloc_func custom memory allocation function
+ * @param free_func custom memory free function
+ * @param opaque custom memory manager handle
+ */
+BROTLI_ENC_API BrotliEncoderPreparedDictionary*
+BrotliEncoderPrepareDictionary(BrotliSharedDictionaryType type,
+ size_t data_size, const uint8_t data[BROTLI_ARRAY_PARAM(data_size)],
+ int quality,
+ brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque);
+
+BROTLI_ENC_API void BrotliEncoderDestroyPreparedDictionary(
+ BrotliEncoderPreparedDictionary* dictionary);
+
+/**
+ * Attaches a prepared dictionary of any type to the encoder. Can be used
+ * multiple times to attach multiple dictionaries. The dictionary type was
+ * determined by BrotliEncoderPrepareDictionary. Multiple raw prefix
+ * dictionaries and/or max 1 serialized dictionary with custom words can be
+ * attached.
+ *
+ * @returns ::BROTLI_FALSE in case of error
+ * @returns ::BROTLI_TRUE otherwise
+ */
+BROTLI_ENC_API BROTLI_BOOL BrotliEncoderAttachPreparedDictionary(
+ BrotliEncoderState* state,
+ const BrotliEncoderPreparedDictionary* dictionary);
+
/**
* Calculates the output size bound for the given @p input_size.
*
@@ -407,7 +453,7 @@ BROTLI_ENC_API BROTLI_BOOL BrotliEncoderHasMoreOutput(
*
* This method is used to make language bindings easier and more efficient:
* -# push data to ::BrotliEncoderCompressStream,
- * until ::BrotliEncoderHasMoreOutput returns BROTL_TRUE
+ * until ::BrotliEncoderHasMoreOutput returns BROTLI_TRUE
* -# use ::BrotliEncoderTakeOutput to peek bytes and copy to language-specific
* entity
*
@@ -433,11 +479,18 @@ BROTLI_ENC_API BROTLI_BOOL BrotliEncoderHasMoreOutput(
BROTLI_ENC_API const uint8_t* BrotliEncoderTakeOutput(
BrotliEncoderState* state, size_t* size);
+/* Returns the estimated peak memory usage (in bytes) of the BrotliCompress()
+ function, not counting the memory needed for the input and output. */
+BROTLI_ENC_EXTRA_API size_t BrotliEncoderEstimatePeakMemoryUsage(
+ int quality, int lgwin, size_t input_size);
+/* Returns 0 if dictionary is not valid; otherwise returns allocation size. */
+BROTLI_ENC_EXTRA_API size_t BrotliEncoderGetPreparedDictionarySize(
+ const BrotliEncoderPreparedDictionary* dictionary);
/**
* Gets an encoder library version.
*
- * Look at BROTLI_VERSION for more information.
+ * Look at BROTLI_MAKE_HEX_VERSION for more information.
*/
BROTLI_ENC_API uint32_t BrotliEncoderVersion(void);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/port.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/port.h
index 825237a3357..0d50019042d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/port.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/port.h
@@ -224,14 +224,6 @@
#define BROTLI_HAS_FEATURE(feature) (0)
#endif
-#if defined(ADDRESS_SANITIZER) || BROTLI_HAS_FEATURE(address_sanitizer) || \
- defined(THREAD_SANITIZER) || BROTLI_HAS_FEATURE(thread_sanitizer) || \
- defined(MEMORY_SANITIZER) || BROTLI_HAS_FEATURE(memory_sanitizer)
-#define BROTLI_SANITIZED 1
-#else
-#define BROTLI_SANITIZED 0
-#endif
-
#if defined(_WIN32) || defined(__CYGWIN__)
#define BROTLI_PUBLIC
#elif BROTLI_GNUC_VERSION_CHECK(3, 3, 0) || \
@@ -247,9 +239,28 @@
#define BROTLI_PUBLIC
#endif
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
- !defined(__STDC_NO_VLA__) && !defined(__cplusplus) && \
- !defined(__PGI) && !defined(__PGIC__) && !defined(__TINYC__)
+/* BROTLI_INTERNAL could be defined to override visibility, e.g. for tests. */
+#if !defined(BROTLI_INTERNAL)
+#if defined(_WIN32) || defined(__CYGWIN__)
+#define BROTLI_INTERNAL
+#elif BROTLI_GNUC_VERSION_CHECK(3, 3, 0) || \
+ BROTLI_TI_VERSION_CHECK(8, 0, 0) || \
+ BROTLI_INTEL_VERSION_CHECK(16, 0, 0) || \
+ BROTLI_ARM_VERSION_CHECK(4, 1, 0) || \
+ BROTLI_IBM_VERSION_CHECK(13, 1, 0) || \
+ BROTLI_SUNPRO_VERSION_CHECK(5, 11, 0) || \
+ (BROTLI_TI_VERSION_CHECK(7, 3, 0) && \
+ defined(__TI_GNU_ATTRIBUTE_SUPPORT__) && defined(__TI_EABI__))
+#define BROTLI_INTERNAL __attribute__ ((visibility ("hidden")))
+#else
+#define BROTLI_INTERNAL
+#endif
+#endif
+
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
+ !defined(__STDC_NO_VLA__) && !defined(__cplusplus) && \
+ !defined(__PGI) && !defined(__PGIC__) && !defined(__TINYC__) && \
+ !defined(__clang__)
#define BROTLI_ARRAY_PARAM(name) (name)
#else
#define BROTLI_ARRAY_PARAM(name)
@@ -285,4 +296,10 @@
#define BROTLI_ENC_API
#endif
+#if defined(BROTLI_BUILD_ENC_EXTRA_API)
+#define BROTLI_ENC_EXTRA_API BROTLI_ENC_API
+#else
+#define BROTLI_ENC_EXTRA_API BROTLI_INTERNAL
+#endif
+
#endif /* BROTLI_COMMON_PORT_H_ */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/shared_dictionary.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/shared_dictionary.h
new file mode 100644
index 00000000000..2970c2dcc9b
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/brotli/include/brotli/shared_dictionary.h
@@ -0,0 +1,100 @@
+/* Copyright 2017 Google Inc. All Rights Reserved.
+
+ Distributed under MIT license.
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
+*/
+
+/* (Opaque) Shared Dictionary definition and utilities. */
+
+#ifndef BROTLI_COMMON_SHARED_DICTIONARY_H_
+#define BROTLI_COMMON_SHARED_DICTIONARY_H_
+
+#include <brotli/port.h>
+#include <brotli/types.h>
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+#define SHARED_BROTLI_MIN_DICTIONARY_WORD_LENGTH 4
+#define SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH 31
+#define SHARED_BROTLI_NUM_DICTIONARY_CONTEXTS 64
+#define SHARED_BROTLI_MAX_COMPOUND_DICTS 15
+
+/**
+ * Opaque structure that holds shared dictionary data.
+ *
+ * Allocated and initialized with ::BrotliSharedDictionaryCreateInstance.
+ * Cleaned up and deallocated with ::BrotliSharedDictionaryDestroyInstance.
+ */
+typedef struct BrotliSharedDictionaryStruct BrotliSharedDictionary;
+
+/**
+ * Input data type for ::BrotliSharedDictionaryAttach.
+ */
+typedef enum BrotliSharedDictionaryType {
+ /** Raw LZ77 prefix dictionary. */
+ BROTLI_SHARED_DICTIONARY_RAW = 0,
+ /** Serialized shared dictionary.
+ *
+ * DO NOT USE: methods accepting this value will fail.
+ */
+ BROTLI_SHARED_DICTIONARY_SERIALIZED = 1
+} BrotliSharedDictionaryType;
+
+/**
+ * Creates an instance of ::BrotliSharedDictionary.
+ *
+ * Fresh instance has default word dictionary and transforms
+ * and no LZ77 prefix dictionary.
+ *
+ * @p alloc_func and @p free_func @b MUST be both zero or both non-zero. In the
+ * case they are both zero, default memory allocators are used. @p opaque is
+ * passed to @p alloc_func and @p free_func when they are called. @p free_func
+ * has to return without doing anything when asked to free a NULL pointer.
+ *
+ * @param alloc_func custom memory allocation function
+ * @param free_func custom memory free function
+ * @param opaque custom memory manager handle
+ * @returns @c 0 if instance can not be allocated or initialized
+ * @returns pointer to initialized ::BrotliSharedDictionary otherwise
+ */
+BROTLI_COMMON_API BrotliSharedDictionary* BrotliSharedDictionaryCreateInstance(
+ brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque);
+
+/**
+ * Deinitializes and frees ::BrotliSharedDictionary instance.
+ *
+ * @param dict shared dictionary instance to be cleaned up and deallocated
+ */
+BROTLI_COMMON_API void BrotliSharedDictionaryDestroyInstance(
+ BrotliSharedDictionary* dict);
+
+/**
+ * Attaches dictionary to a given instance of ::BrotliSharedDictionary.
+ *
+ * Dictionary to be attached is represented in a serialized format as a region
+ * of memory.
+ *
+ * Provided data it partially referenced by a resulting (compound) dictionary,
+ * and should be kept untouched, while at least one compound dictionary uses it.
+ * This way memory overhead is kept minimal by the cost of additional resource
+ * management.
+ *
+ * @param dict dictionary to extend
+ * @param type type of dictionary to attach
+ * @param data_size size of @p data
+ * @param data serialized dictionary of type @p type, with at least @p data_size
+ * addressable bytes
+ * @returns ::BROTLI_TRUE if provided dictionary is successfully attached
+ * @returns ::BROTLI_FALSE otherwise
+ */
+BROTLI_COMMON_API BROTLI_BOOL BrotliSharedDictionaryAttach(
+ BrotliSharedDictionary* dict, BrotliSharedDictionaryType type,
+ size_t data_size, const uint8_t data[BROTLI_ARRAY_PARAM(data_size)]);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+} /* extern "C" */
+#endif
+
+#endif /* BROTLI_COMMON_SHARED_DICTIONARY_H_ */
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/defs.am b/Build/source/texk/dvisvgm/dvisvgm-src/libs/defs.am
index cd6501c938d..2731452011b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/defs.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/defs.am
@@ -1,19 +1,17 @@
+## This file is part of dvisvgm
+## Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de>
+
if !HAVE_BROTLI
BROTLI_CFLAGS += -I$(dvisvgm_srcdir)/libs/brotli/include
BROTLI_LIBS += ../libs/brotli/libbrotli.a
endif
if !HAVE_POTRACE
-# Gets automake warnings:
-# dvisvgm-src/src/../libs/defs.am:9: warning: POTRACE_LIBS was already defined in condition TRUE, which includes condition !HAVE_POTRACE and !TEXLIVE_BUILD ...
-# dvisvgm-src/src/Makefile.am:14: 'dvisvgm-src/src/../libs/defs.am' included from here
-# configure.ac:51: ... 'POTRACE_LIBS' previously defined here
-#if !TEXLIVE_BUILD
-#POTRACE_CFLAGS = -I$(dvisvgm_srcdir)/libs/potrace
-#POTRACE_LIBS = ../libs/potrace/libpotrace.a
-#else
POTRACE_CFLAGS = $(POTRACE_INCLUDES)
-#endif TEXLIVE_BUILD
+endif
+#
+if TEXLIVE_BUILD
+POTRACE_CFLAGS = $(POTRACE_INCLUDES)
endif
if !HAVE_WOFF2
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/md5/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-src/libs/md5/Makefile.am
index ce1e71eb5f1..55d34b70c46 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/md5/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/md5/Makefile.am
@@ -1,4 +1,3 @@
-if USE_BUNDLED_MD5
noinst_LIBRARIES = libmd5.a
libmd5_a_SOURCES = md5.c md5.h
@@ -6,7 +5,5 @@ AM_CXXFLAGS = -Wall
md5.c: md5.h
-endif
-
CLEANFILES = *.gcda *.gcno
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/md5/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/libs/md5/Makefile.in
index a9502861664..c548af39152 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/md5/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/md5/Makefile.in
@@ -121,8 +121,7 @@ am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
libmd5_a_AR = $(AR) $(ARFLAGS)
libmd5_a_LIBADD =
-am__libmd5_a_SOURCES_DIST = md5.c md5.h
-@USE_BUNDLED_MD5_TRUE@am_libmd5_a_OBJECTS = md5.$(OBJEXT)
+am_libmd5_a_OBJECTS = md5.$(OBJEXT)
libmd5_a_OBJECTS = $(am_libmd5_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -164,7 +163,7 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libmd5_a_SOURCES)
-DIST_SOURCES = $(am__libmd5_a_SOURCES_DIST)
+DIST_SOURCES = $(libmd5_a_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -346,9 +345,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-@USE_BUNDLED_MD5_TRUE@noinst_LIBRARIES = libmd5.a
-@USE_BUNDLED_MD5_TRUE@libmd5_a_SOURCES = md5.c md5.h
-@USE_BUNDLED_MD5_TRUE@AM_CXXFLAGS = -Wall
+noinst_LIBRARIES = libmd5.a
+libmd5_a_SOURCES = md5.c md5.h
+AM_CXXFLAGS = -Wall
CLEANFILES = *.gcda *.gcno
all: all-am
@@ -645,7 +644,7 @@ uninstall-am:
.PRECIOUS: Makefile
-@USE_BUNDLED_MD5_TRUE@md5.c: md5.h
+md5.c: md5.h
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/potrace/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/libs/potrace/Makefile.in
index 4e69e7b9218..34390191390 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/potrace/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/potrace/Makefile.in
@@ -250,8 +250,6 @@ KPSE_LIBS = @KPSE_LIBS@
LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCRYPTO_CFLAGS = @LIBCRYPTO_CFLAGS@
-LIBCRYPTO_LIBS = @LIBCRYPTO_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/store_bytes.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/store_bytes.h
index fff3c62f846..099c0f217aa 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/store_bytes.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/store_bytes.h
@@ -27,15 +27,8 @@ inline size_t StoreU32(uint8_t* dst, size_t offset, uint32_t x) {
}
inline size_t Store16(uint8_t* dst, size_t offset, int x) {
-#if defined(WOFF_LITTLE_ENDIAN)
- *reinterpret_cast<uint16_t*>(dst + offset) =
- ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8);
-#elif defined(WOFF_BIG_ENDIAN)
- *reinterpret_cast<uint16_t*>(dst + offset) = static_cast<uint16_t>(x);
-#else
dst[offset] = x >> 8;
dst[offset + 1] = x;
-#endif
return offset + 2;
}
@@ -47,17 +40,8 @@ inline void StoreU32(uint32_t val, size_t* offset, uint8_t* dst) {
}
inline void Store16(int val, size_t* offset, uint8_t* dst) {
-#if defined(WOFF_LITTLE_ENDIAN)
- *reinterpret_cast<uint16_t*>(dst + *offset) =
- ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
- *offset += 2;
-#elif defined(WOFF_BIG_ENDIAN)
- *reinterpret_cast<uint16_t*>(dst + *offset) = static_cast<uint16_t>(val);
- *offset += 2;
-#else
dst[(*offset)++] = val >> 8;
dst[(*offset)++] = val;
-#endif
}
inline void StoreBytes(const uint8_t* data, size_t len,
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/woff2_common.cc b/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/woff2_common.cc
index fe0a3beda71..a24d2131b7d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/woff2_common.cc
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/woff2/src/woff2_common.cc
@@ -19,16 +19,8 @@ uint32_t ComputeULongSum(const uint8_t* buf, size_t size) {
uint32_t checksum = 0;
size_t aligned_size = size & ~3;
for (size_t i = 0; i < aligned_size; i += 4) {
-#if defined(WOFF_LITTLE_ENDIAN)
- uint32_t v = *reinterpret_cast<const uint32_t*>(buf + i);
- checksum += (((v & 0xFF) << 24) | ((v & 0xFF00) << 8) |
- ((v & 0xFF0000) >> 8) | ((v & 0xFF000000) >> 24));
-#elif defined(WOFF_BIG_ENDIAN)
- checksum += *reinterpret_cast<const uint32_t*>(buf + i);
-#else
- checksum += (buf[i] << 24) | (buf[i + 1] << 16) |
- (buf[i + 2] << 8) | buf[i + 3];
-#endif
+ checksum +=
+ (buf[i] << 24) | (buf[i + 1] << 16) | (buf[i + 2] << 8) | buf[i + 3];
}
// treat size not aligned on 4 as if it were padded to 4 with 0's
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxh3.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxh3.h
index f7dc1959b57..7e3ce68e0cc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxh3.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxh3.h
@@ -1,7 +1,7 @@
/*
* xxHash - Extremely Fast Hash algorithm
* Development source file for `xxh3`
- * Copyright (C) 2019-2020 Yann Collet
+ * Copyright (C) 2019-2021 Yann Collet
*
* BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
*
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxhash.c b/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxhash.c
index 0fae88c5d67..083b039d70d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxhash.c
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxhash.c
@@ -1,6 +1,6 @@
/*
* xxHash - Extremely Fast Hash algorithm
- * Copyright (C) 2012-2020 Yann Collet
+ * Copyright (C) 2012-2021 Yann Collet
*
* BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
*
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxhash.h b/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxhash.h
index 511c4d12bf6..a18e8c762da 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxhash.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/libs/xxHash/xxhash.h
@@ -1,7 +1,7 @@
/*
* xxHash - Extremely Fast Hash algorithm
* Header File
- * Copyright (C) 2012-2020 Yann Collet
+ * Copyright (C) 2012-2021 Yann Collet
*
* BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
*
@@ -32,49 +32,142 @@
* - xxHash homepage: https://www.xxhash.com
* - xxHash source repository: https://github.com/Cyan4973/xxHash
*/
+
/*!
* @mainpage xxHash
*
+ * xxHash is an extremely fast non-cryptographic hash algorithm, working at RAM speed
+ * limits.
+ *
+ * It is proposed in four flavors, in three families:
+ * 1. @ref XXH32_family
+ * - Classic 32-bit hash function. Simple, compact, and runs on almost all
+ * 32-bit and 64-bit systems.
+ * 2. @ref XXH64_family
+ * - Classic 64-bit adaptation of XXH32. Just as simple, and runs well on most
+ * 64-bit systems (but _not_ 32-bit systems).
+ * 3. @ref XXH3_family
+ * - Modern 64-bit and 128-bit hash function family which features improved
+ * strength and performance across the board, especially on smaller data.
+ * It benefits greatly from SIMD and 64-bit without requiring it.
+ *
+ * Benchmarks
+ * ---
+ * The reference system uses an Intel i7-9700K CPU, and runs Ubuntu x64 20.04.
+ * The open source benchmark program is compiled with clang v10.0 using -O3 flag.
+ *
+ * | Hash Name | ISA ext | Width | Large Data Speed | Small Data Velocity |
+ * | -------------------- | ------- | ----: | ---------------: | ------------------: |
+ * | XXH3_64bits() | @b AVX2 | 64 | 59.4 GB/s | 133.1 |
+ * | MeowHash | AES-NI | 128 | 58.2 GB/s | 52.5 |
+ * | XXH3_128bits() | @b AVX2 | 128 | 57.9 GB/s | 118.1 |
+ * | CLHash | PCLMUL | 64 | 37.1 GB/s | 58.1 |
+ * | XXH3_64bits() | @b SSE2 | 64 | 31.5 GB/s | 133.1 |
+ * | XXH3_128bits() | @b SSE2 | 128 | 29.6 GB/s | 118.1 |
+ * | RAM sequential read | | N/A | 28.0 GB/s | N/A |
+ * | ahash | AES-NI | 64 | 22.5 GB/s | 107.2 |
+ * | City64 | | 64 | 22.0 GB/s | 76.6 |
+ * | T1ha2 | | 64 | 22.0 GB/s | 99.0 |
+ * | City128 | | 128 | 21.7 GB/s | 57.7 |
+ * | FarmHash | AES-NI | 64 | 21.3 GB/s | 71.9 |
+ * | XXH64() | | 64 | 19.4 GB/s | 71.0 |
+ * | SpookyHash | | 64 | 19.3 GB/s | 53.2 |
+ * | Mum | | 64 | 18.0 GB/s | 67.0 |
+ * | CRC32C | SSE4.2 | 32 | 13.0 GB/s | 57.9 |
+ * | XXH32() | | 32 | 9.7 GB/s | 71.9 |
+ * | City32 | | 32 | 9.1 GB/s | 66.0 |
+ * | Blake3* | @b AVX2 | 256 | 4.4 GB/s | 8.1 |
+ * | Murmur3 | | 32 | 3.9 GB/s | 56.1 |
+ * | SipHash* | | 64 | 3.0 GB/s | 43.2 |
+ * | Blake3* | @b SSE2 | 256 | 2.4 GB/s | 8.1 |
+ * | HighwayHash | | 64 | 1.4 GB/s | 6.0 |
+ * | FNV64 | | 64 | 1.2 GB/s | 62.7 |
+ * | Blake2* | | 256 | 1.1 GB/s | 5.1 |
+ * | SHA1* | | 160 | 0.8 GB/s | 5.6 |
+ * | MD5* | | 128 | 0.6 GB/s | 7.8 |
+ * @note
+ * - Hashes which require a specific ISA extension are noted. SSE2 is also noted,
+ * even though it is mandatory on x64.
+ * - Hashes with an asterisk are cryptographic. Note that MD5 is non-cryptographic
+ * by modern standards.
+ * - Small data velocity is a rough average of algorithm's efficiency for small
+ * data. For more accurate information, see the wiki.
+ * - More benchmarks and strength tests are found on the wiki:
+ * https://github.com/Cyan4973/xxHash/wiki
+ *
+ * Usage
+ * ------
+ * All xxHash variants use a similar API. Changing the algorithm is a trivial
+ * substitution.
+ *
+ * @pre
+ * For functions which take an input and length parameter, the following
+ * requirements are assumed:
+ * - The range from [`input`, `input + length`) is valid, readable memory.
+ * - The only exception is if the `length` is `0`, `input` may be `NULL`.
+ * - For C++, the objects must have the *TriviallyCopyable* property, as the
+ * functions access bytes directly as if it was an array of `unsigned char`.
+ *
+ * @anchor single_shot_example
+ * **Single Shot**
+ *
+ * These functions are stateless functions which hash a contiguous block of memory,
+ * immediately returning the result. They are the easiest and usually the fastest
+ * option.
+ *
+ * XXH32(), XXH64(), XXH3_64bits(), XXH3_128bits()
+ *
+ * @code{.c}
+ * #include <string.h>
+ * #include "xxhash.h"
+ *
+ * // Example for a function which hashes a null terminated string with XXH32().
+ * XXH32_hash_t hash_string(const char* string, XXH32_hash_t seed)
+ * {
+ * // NULL pointers are only valid if the length is zero
+ * size_t length = (string == NULL) ? 0 : strlen(string);
+ * return XXH32(string, length, seed);
+ * }
+ * @endcode
+ *
+ * @anchor streaming_example
+ * **Streaming**
+ *
+ * These groups of functions allow incremental hashing of unknown size, even
+ * more than what would fit in a size_t.
+ *
+ * XXH32_reset(), XXH64_reset(), XXH3_64bits_reset(), XXH3_128bits_reset()
+ *
+ * @code{.c}
+ * #include <stdio.h>
+ * #include <assert.h>
+ * #include "xxhash.h"
+ * // Example for a function which hashes a FILE incrementally with XXH3_64bits().
+ * XXH64_hash_t hashFile(FILE* f)
+ * {
+ * // Allocate a state struct. Do not just use malloc() or new.
+ * XXH3_state_t* state = XXH3_createState();
+ * assert(state != NULL && "Out of memory!");
+ * // Reset the state to start a new hashing session.
+ * XXH3_64bits_reset(state);
+ * char buffer[4096];
+ * size_t count;
+ * // Read the file in chunks
+ * while ((count = fread(buffer, 1, sizeof(buffer), f)) != 0) {
+ * // Run update() as many times as necessary to process the data
+ * XXH3_64bits_update(state, buffer, count);
+ * }
+ * // Retrieve the finalized hash. This will not change the state.
+ * XXH64_hash_t result = XXH3_64bits_digest(state);
+ * // Free the state. Do not use free().
+ * XXH3_freeState(state);
+ * return result;
+ * }
+ * @endcode
+ *
* @file xxhash.h
* xxHash prototypes and implementation
*/
-/* TODO: update */
-/* Notice extracted from xxHash homepage:
-
-xxHash is an extremely fast hash algorithm, running at RAM speed limits.
-It also successfully passes all tests from the SMHasher suite.
-
-Comparison (single thread, Windows Seven 32 bits, using SMHasher on a Core 2 Duo @3GHz)
-
-Name Speed Q.Score Author
-xxHash 5.4 GB/s 10
-CrapWow 3.2 GB/s 2 Andrew
-MurmurHash 3a 2.7 GB/s 10 Austin Appleby
-SpookyHash 2.0 GB/s 10 Bob Jenkins
-SBox 1.4 GB/s 9 Bret Mulvey
-Lookup3 1.2 GB/s 9 Bob Jenkins
-SuperFastHash 1.2 GB/s 1 Paul Hsieh
-CityHash64 1.05 GB/s 10 Pike & Alakuijala
-FNV 0.55 GB/s 5 Fowler, Noll, Vo
-CRC32 0.43 GB/s 9
-MD5-32 0.33 GB/s 10 Ronald L. Rivest
-SHA1-32 0.28 GB/s 10
-
-Q.Score is a measure of quality of the hash function.
-It depends on successfully passing SMHasher test set.
-10 is a perfect score.
-
-Note: SMHasher's CRC32 implementation is not the fastest one.
-Other speed-oriented implementations can be faster,
-especially in combination with PCLMUL instruction:
-https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html?showComment=1552696407071#c3490092340461170735
-
-A 64-bit version, named XXH64, is available since r35.
-It offers much better speed, but for 64-bit applications only.
-Name Speed on 64 bits Speed on 32 bits
-XXH64 13.8 GB/s 1.9 GB/s
-XXH32 6.8 GB/s 6.0 GB/s
-*/
#if defined (__cplusplus)
extern "C" {
@@ -84,21 +177,80 @@ extern "C" {
* INLINE mode
******************************/
/*!
- * XXH_INLINE_ALL (and XXH_PRIVATE_API)
+ * @defgroup public Public API
+ * Contains details on the public xxHash functions.
+ * @{
+ */
+#ifdef XXH_DOXYGEN
+/*!
+ * @brief Gives access to internal state declaration, required for static allocation.
+ *
+ * Incompatible with dynamic linking, due to risks of ABI changes.
+ *
+ * Usage:
+ * @code{.c}
+ * #define XXH_STATIC_LINKING_ONLY
+ * #include "xxhash.h"
+ * @endcode
+ */
+# define XXH_STATIC_LINKING_ONLY
+/* Do not undef XXH_STATIC_LINKING_ONLY for Doxygen */
+
+/*!
+ * @brief Gives access to internal definitions.
+ *
+ * Usage:
+ * @code{.c}
+ * #define XXH_STATIC_LINKING_ONLY
+ * #define XXH_IMPLEMENTATION
+ * #include "xxhash.h"
+ * @endcode
+ */
+# define XXH_IMPLEMENTATION
+/* Do not undef XXH_IMPLEMENTATION for Doxygen */
+
+/*!
+ * @brief Exposes the implementation and marks all functions as `inline`.
+ *
* Use these build macros to inline xxhash into the target unit.
* Inlining improves performance on small inputs, especially when the length is
* expressed as a compile-time constant:
*
- * https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html
+ * https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html
*
* It also keeps xxHash symbols private to the unit, so they are not exported.
*
* Usage:
+ * @code{.c}
* #define XXH_INLINE_ALL
* #include "xxhash.h"
- *
+ * @endcode
* Do not compile and link xxhash.o as a separate object, as it is not useful.
*/
+# define XXH_INLINE_ALL
+# undef XXH_INLINE_ALL
+/*!
+ * @brief Exposes the implementation without marking functions as inline.
+ */
+# define XXH_PRIVATE_API
+# undef XXH_PRIVATE_API
+/*!
+ * @brief Emulate a namespace by transparently prefixing all symbols.
+ *
+ * If you want to include _and expose_ xxHash functions from within your own
+ * library, but also want to avoid symbol collisions with other libraries which
+ * may also include xxHash, you can use @ref XXH_NAMESPACE to automatically prefix
+ * any public symbol from xxhash library with the value of @ref XXH_NAMESPACE
+ * (therefore, avoid empty or numeric values).
+ *
+ * Note that no change is required within the calling program as long as it
+ * includes `xxhash.h`: Regular symbol names will be automatically translated
+ * by this header.
+ */
+# define XXH_NAMESPACE /* YOUR NAME HERE */
+# undef XXH_NAMESPACE
+#endif
+
#if (defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)) \
&& !defined(XXH_INLINE_ALL_31684351384)
/* this section should be traversed only once */
@@ -213,21 +365,13 @@ extern "C" {
# undef XXHASH_H_STATIC_13879238742
#endif /* XXH_INLINE_ALL || XXH_PRIVATE_API */
-
-
/* ****************************************************************
* Stable API
*****************************************************************/
#ifndef XXHASH_H_5627135585666179
#define XXHASH_H_5627135585666179 1
-
-/*!
- * @defgroup public Public API
- * Contains details on the public xxHash functions.
- * @{
- */
-/* specific declaration modes for Windows */
+/*! @brief Marks a global symbol. */
#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
# ifdef XXH_EXPORT
@@ -240,24 +384,6 @@ extern "C" {
# endif
#endif
-#ifdef XXH_DOXYGEN
-/*!
- * @brief Emulate a namespace by transparently prefixing all symbols.
- *
- * If you want to include _and expose_ xxHash functions from within your own
- * library, but also want to avoid symbol collisions with other libraries which
- * may also include xxHash, you can use XXH_NAMESPACE to automatically prefix
- * any public symbol from xxhash library with the value of XXH_NAMESPACE
- * (therefore, avoid empty or numeric values).
- *
- * Note that no change is required within the calling program as long as it
- * includes `xxhash.h`: Regular symbol names will be automatically translated
- * by this header.
- */
-# define XXH_NAMESPACE /* YOUR NAME HERE */
-# undef XXH_NAMESPACE
-#endif
-
#ifdef XXH_NAMESPACE
# define XXH_CAT(A,B) A##B
# define XXH_NAME2(A,B) XXH_CAT(A,B)
@@ -318,11 +444,39 @@ extern "C" {
/* *************************************
+* Compiler specifics
+***************************************/
+
+/* specific declaration modes for Windows */
+#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
+# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
+# ifdef XXH_EXPORT
+# define XXH_PUBLIC_API __declspec(dllexport)
+# elif XXH_IMPORT
+# define XXH_PUBLIC_API __declspec(dllimport)
+# endif
+# else
+# define XXH_PUBLIC_API /* do nothing */
+# endif
+#endif
+
+#if defined (__GNUC__)
+# define XXH_CONSTF __attribute__((const))
+# define XXH_PUREF __attribute__((pure))
+# define XXH_MALLOCF __attribute__((malloc))
+#else
+# define XXH_CONSTF /* disable */
+# define XXH_PUREF
+# define XXH_MALLOCF
+#endif
+
+/* *************************************
* Version
***************************************/
#define XXH_VERSION_MAJOR 0
#define XXH_VERSION_MINOR 8
-#define XXH_VERSION_RELEASE 1
+#define XXH_VERSION_RELEASE 2
+/*! @brief Version number, encoded as two digits each */
#define XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE)
/*!
@@ -331,16 +485,22 @@ extern "C" {
* This is mostly useful when xxHash is compiled as a shared library,
* since the returned value comes from the library, as opposed to header file.
*
- * @return `XXH_VERSION_NUMBER` of the invoked library.
+ * @return @ref XXH_VERSION_NUMBER of the invoked library.
*/
-XXH_PUBLIC_API unsigned XXH_versionNumber (void);
+XXH_PUBLIC_API XXH_CONSTF unsigned XXH_versionNumber (void);
/* ****************************
* Common basic types
******************************/
#include <stddef.h> /* size_t */
-typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode;
+/*!
+ * @brief Exit code for the streaming API.
+ */
+typedef enum {
+ XXH_OK = 0, /*!< OK */
+ XXH_ERROR /*!< Error */
+} XXH_errorcode;
/*-**********************************************************************
@@ -364,29 +524,27 @@ typedef uint32_t XXH32_hash_t;
# include <limits.h>
# if UINT_MAX == 0xFFFFFFFFUL
typedef unsigned int XXH32_hash_t;
+# elif ULONG_MAX == 0xFFFFFFFFUL
+ typedef unsigned long XXH32_hash_t;
# else
-# if ULONG_MAX == 0xFFFFFFFFUL
- typedef unsigned long XXH32_hash_t;
-# else
-# error "unsupported platform: need a 32-bit type"
-# endif
+# error "unsupported platform: need a 32-bit type"
# endif
#endif
/*!
* @}
*
- * @defgroup xxh32_family XXH32 family
+ * @defgroup XXH32_family XXH32 family
* @ingroup public
* Contains functions used in the classic 32-bit xxHash algorithm.
*
* @note
* XXH32 is useful for older platforms, with no or poor 64-bit performance.
- * Note that @ref xxh3_family provides competitive speed
- * for both 32-bit and 64-bit systems, and offers true 64/128 bit hash results.
+ * Note that the @ref XXH3_family provides competitive speed for both 32-bit
+ * and 64-bit systems, and offers true 64/128 bit hash results.
*
- * @see @ref xxh64_family, @ref xxh3_family : Other xxHash families
- * @see @ref xxh32_impl for implementation details
+ * @see @ref XXH64_family, @ref XXH3_family : Other xxHash families
+ * @see @ref XXH32_impl for implementation details
* @{
*/
@@ -395,6 +553,8 @@ typedef uint32_t XXH32_hash_t;
*
* Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark): 5.4 GB/s
*
+ * See @ref single_shot_example "Single Shot Example" for an example.
+ *
* @param input The block of data to be hashed, at least @p length bytes in size.
* @param length The length of @p input, in bytes.
* @param seed The 32-bit seed to alter the hash's output predictably.
@@ -412,8 +572,9 @@ typedef uint32_t XXH32_hash_t;
* @see
* XXH32_createState(), XXH32_update(), XXH32_digest(): Streaming version.
*/
-XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_t seed);
+XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_t seed);
+#ifndef XXH_NO_STREAM
/*!
* Streaming functions generate the xxHash value from an incremental input.
* This method is slower than single-call functions, due to state management.
@@ -436,32 +597,7 @@ XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_
*
* When done, release the state using `XXH*_freeState()`.
*
- * Example code for incrementally hashing a file:
- * @code{.c}
- * #include <stdio.h>
- * #include <xxhash.h>
- * #define BUFFER_SIZE 256
- *
- * // Note: XXH64 and XXH3 use the same interface.
- * XXH32_hash_t
- * hashFile(FILE* stream)
- * {
- * XXH32_state_t* state;
- * unsigned char buf[BUFFER_SIZE];
- * size_t amt;
- * XXH32_hash_t hash;
- *
- * state = XXH32_createState(); // Create a state
- * assert(state != NULL); // Error check here
- * XXH32_reset(state, 0xbaad5eed); // Reset state with our seed
- * while ((amt = fread(buf, 1, sizeof(buf), stream)) != 0) {
- * XXH32_update(state, buf, amt); // Hash the file in chunks
- * }
- * hash = XXH32_digest(state); // Finalize the hash
- * XXH32_freeState(state); // Clean up
- * return hash;
- * }
- * @endcode
+ * @see streaming_example at the top of @ref xxhash.h for an example.
*/
/*!
@@ -478,7 +614,7 @@ typedef struct XXH32_state_s XXH32_state_t;
* Must be freed with XXH32_freeState().
* @return An allocated XXH32_state_t on success, `NULL` on failure.
*/
-XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void);
+XXH_PUBLIC_API XXH_MALLOCF XXH32_state_t* XXH32_createState(void);
/*!
* @brief Frees an @ref XXH32_state_t.
*
@@ -546,7 +682,8 @@ XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void*
*
* @return The calculated xxHash32 value from that state.
*/
-XXH_PUBLIC_API XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr);
+XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr);
+#endif /* !XXH_NO_STREAM */
/******* Canonical representation *******/
@@ -597,43 +734,72 @@ XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t
*
* @return The converted hash.
*/
-XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src);
+XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src);
+/*! @cond Doxygen ignores this part */
#ifdef __has_attribute
# define XXH_HAS_ATTRIBUTE(x) __has_attribute(x)
#else
# define XXH_HAS_ATTRIBUTE(x) 0
#endif
+/*! @endcond */
+/*! @cond Doxygen ignores this part */
+/*
+ * C23 __STDC_VERSION__ number hasn't been specified yet. For now
+ * leave as `201711L` (C17 + 1).
+ * TODO: Update to correct value when its been specified.
+ */
+#define XXH_C23_VN 201711L
+/*! @endcond */
+
+/*! @cond Doxygen ignores this part */
/* C-language Attributes are added in C23. */
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201710L) && defined(__has_c_attribute)
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN) && defined(__has_c_attribute)
# define XXH_HAS_C_ATTRIBUTE(x) __has_c_attribute(x)
#else
# define XXH_HAS_C_ATTRIBUTE(x) 0
#endif
+/*! @endcond */
+/*! @cond Doxygen ignores this part */
#if defined(__cplusplus) && defined(__has_cpp_attribute)
# define XXH_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
#else
# define XXH_HAS_CPP_ATTRIBUTE(x) 0
#endif
+/*! @endcond */
+/*! @cond Doxygen ignores this part */
/*
-Define XXH_FALLTHROUGH macro for annotating switch case with the 'fallthrough' attribute
-introduced in CPP17 and C23.
-CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough
-C23 : https://en.cppreference.com/w/c/language/attributes/fallthrough
-*/
-#if XXH_HAS_C_ATTRIBUTE(x)
-# define XXH_FALLTHROUGH [[fallthrough]]
-#elif XXH_HAS_CPP_ATTRIBUTE(x)
+ * Define XXH_FALLTHROUGH macro for annotating switch case with the 'fallthrough' attribute
+ * introduced in CPP17 and C23.
+ * CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough
+ * C23 : https://en.cppreference.com/w/c/language/attributes/fallthrough
+ */
+#if XXH_HAS_C_ATTRIBUTE(fallthrough) || XXH_HAS_CPP_ATTRIBUTE(fallthrough)
# define XXH_FALLTHROUGH [[fallthrough]]
#elif XXH_HAS_ATTRIBUTE(__fallthrough__)
-# define XXH_FALLTHROUGH __attribute__ ((fallthrough))
+# define XXH_FALLTHROUGH __attribute__ ((__fallthrough__))
#else
-# define XXH_FALLTHROUGH
+# define XXH_FALLTHROUGH /* fallthrough */
#endif
+/*! @endcond */
+
+/*! @cond Doxygen ignores this part */
+/*
+ * Define XXH_NOESCAPE for annotated pointers in public API.
+ * https://clang.llvm.org/docs/AttributeReference.html#noescape
+ * As of writing this, only supported by clang.
+ */
+#if XXH_HAS_ATTRIBUTE(noescape)
+# define XXH_NOESCAPE __attribute__((noescape))
+#else
+# define XXH_NOESCAPE
+#endif
+/*! @endcond */
+
/*!
* @}
@@ -671,7 +837,7 @@ typedef uint64_t XXH64_hash_t;
/*!
* @}
*
- * @defgroup xxh64_family XXH64 family
+ * @defgroup XXH64_family XXH64 family
* @ingroup public
* @{
* Contains functions used in the classic 64-bit xxHash algorithm.
@@ -682,7 +848,6 @@ typedef uint64_t XXH64_hash_t;
* It provides better speed for systems with vector processing capabilities.
*/
-
/*!
* @brief Calculates the 64-bit hash of @p input using xxHash64.
*
@@ -706,32 +871,131 @@ typedef uint64_t XXH64_hash_t;
* @see
* XXH64_createState(), XXH64_update(), XXH64_digest(): Streaming version.
*/
-XXH_PUBLIC_API XXH64_hash_t XXH64(const void* input, size_t length, XXH64_hash_t seed);
+XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed);
/******* Streaming *******/
+#ifndef XXH_NO_STREAM
/*!
* @brief The opaque state struct for the XXH64 streaming API.
*
* @see XXH64_state_s for details.
*/
typedef struct XXH64_state_s XXH64_state_t; /* incomplete type */
-XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void);
+
+/*!
+ * @brief Allocates an @ref XXH64_state_t.
+ *
+ * Must be freed with XXH64_freeState().
+ * @return An allocated XXH64_state_t on success, `NULL` on failure.
+ */
+XXH_PUBLIC_API XXH_MALLOCF XXH64_state_t* XXH64_createState(void);
+
+/*!
+ * @brief Frees an @ref XXH64_state_t.
+ *
+ * Must be allocated with XXH64_createState().
+ * @param statePtr A pointer to an @ref XXH64_state_t allocated with @ref XXH64_createState().
+ * @return XXH_OK.
+ */
XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr);
-XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t* dst_state, const XXH64_state_t* src_state);
-XXH_PUBLIC_API XXH_errorcode XXH64_reset (XXH64_state_t* statePtr, XXH64_hash_t seed);
-XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t* statePtr, const void* input, size_t length);
-XXH_PUBLIC_API XXH64_hash_t XXH64_digest (const XXH64_state_t* statePtr);
+/*!
+ * @brief Copies one @ref XXH64_state_t to another.
+ *
+ * @param dst_state The state to copy to.
+ * @param src_state The state to copy from.
+ * @pre
+ * @p dst_state and @p src_state must not be `NULL` and must not overlap.
+ */
+XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dst_state, const XXH64_state_t* src_state);
+/*!
+ * @brief Resets an @ref XXH64_state_t to begin a new hash.
+ *
+ * This function resets and seeds a state. Call it before @ref XXH64_update().
+ *
+ * @param statePtr The state struct to reset.
+ * @param seed The 64-bit seed to alter the hash result predictably.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ *
+ * @return @ref XXH_OK on success, @ref XXH_ERROR on failure.
+ */
+XXH_PUBLIC_API XXH_errorcode XXH64_reset (XXH_NOESCAPE XXH64_state_t* statePtr, XXH64_hash_t seed);
+
+/*!
+ * @brief Consumes a block of @p input to an @ref XXH64_state_t.
+ *
+ * Call this to incrementally consume blocks of data.
+ *
+ * @param statePtr The state struct to update.
+ * @param input The block of data to be hashed, at least @p length bytes in size.
+ * @param length The length of @p input, in bytes.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ * @pre
+ * The memory between @p input and @p input + @p length must be valid,
+ * readable, contiguous memory. However, if @p length is `0`, @p input may be
+ * `NULL`. In C++, this also must be *TriviallyCopyable*.
+ *
+ * @return @ref XXH_OK on success, @ref XXH_ERROR on failure.
+ */
+XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH_NOESCAPE XXH64_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);
+
+/*!
+ * @brief Returns the calculated hash value from an @ref XXH64_state_t.
+ *
+ * @note
+ * Calling XXH64_digest() will not affect @p statePtr, so you can update,
+ * digest, and update again.
+ *
+ * @param statePtr The state struct to calculate the hash from.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ *
+ * @return The calculated xxHash64 value from that state.
+ */
+XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_digest (XXH_NOESCAPE const XXH64_state_t* statePtr);
+#endif /* !XXH_NO_STREAM */
/******* Canonical representation *******/
+
+/*!
+ * @brief Canonical (big endian) representation of @ref XXH64_hash_t.
+ */
typedef struct { unsigned char digest[sizeof(XXH64_hash_t)]; } XXH64_canonical_t;
-XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash);
-XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src);
+
+/*!
+ * @brief Converts an @ref XXH64_hash_t to a big endian @ref XXH64_canonical_t.
+ *
+ * @param dst The @ref XXH64_canonical_t pointer to be stored to.
+ * @param hash The @ref XXH64_hash_t to be converted.
+ *
+ * @pre
+ * @p dst must not be `NULL`.
+ */
+XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash);
+
+/*!
+ * @brief Converts an @ref XXH64_canonical_t to a native @ref XXH64_hash_t.
+ *
+ * @param src The @ref XXH64_canonical_t to convert.
+ *
+ * @pre
+ * @p src must not be `NULL`.
+ *
+ * @return The converted hash.
+ */
+XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src);
+
+#ifndef XXH_NO_XXH3
/*!
* @}
* ************************************************************************
- * @defgroup xxh3_family XXH3 family
+ * @defgroup XXH3_family XXH3 family
* @ingroup public
* @{
*
@@ -751,16 +1015,26 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src
*
* XXH3's speed benefits greatly from SIMD and 64-bit arithmetic,
* but does not require it.
- * Any 32-bit and 64-bit targets that can run XXH32 smoothly
- * can run XXH3 at competitive speeds, even without vector support.
- * Further details are explained in the implementation.
- *
- * Optimized implementations are provided for AVX512, AVX2, SSE2, NEON, POWER8,
- * ZVector and scalar targets. This can be controlled via the XXH_VECTOR macro.
+ * Most 32-bit and 64-bit targets that can run XXH32 smoothly can run XXH3
+ * at competitive speeds, even without vector support. Further details are
+ * explained in the implementation.
+ *
+ * XXH3 has a fast scalar implementation, but it also includes accelerated SIMD
+ * implementations for many common platforms:
+ * - AVX512
+ * - AVX2
+ * - SSE2
+ * - ARM NEON
+ * - WebAssembly SIMD128
+ * - POWER8 VSX
+ * - s390x ZVector
+ * This can be controlled via the @ref XXH_VECTOR macro, but it automatically
+ * selects the best version according to predefined macros. For the x86 family, an
+ * automatic runtime dispatcher is included separately in @ref xxh_x86dispatch.c.
*
* XXH3 implementation is portable:
* it has a generic C90 formulation that can be compiled on any platform,
- * all implementations generage exactly the same hash value on all platforms.
+ * all implementations generate exactly the same hash value on all platforms.
* Starting from v0.8.0, it's also labelled "stable", meaning that
* any future version will also generate the same hash value.
*
@@ -772,24 +1046,42 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src
*
* The API supports one-shot hashing, streaming mode, and custom secrets.
*/
-
/*-**********************************************************************
* XXH3 64-bit variant
************************************************************************/
-/* XXH3_64bits():
- * default 64-bit variant, using default secret and default seed of 0.
- * It's the fastest variant. */
-XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(const void* data, size_t len);
+/*!
+ * @brief 64-bit unseeded variant of XXH3.
+ *
+ * This is equivalent to @ref XXH3_64bits_withSeed() with a seed of 0, however
+ * it may have slightly better performance due to constant propagation of the
+ * defaults.
+ *
+ * @see
+ * XXH32(), XXH64(), XXH3_128bits(): equivalent for the other xxHash algorithms
+ * @see
+ * XXH3_64bits_withSeed(), XXH3_64bits_withSecret(): other seeding variants
+ * @see
+ * XXH3_64bits_reset(), XXH3_64bits_update(), XXH3_64bits_digest(): Streaming version.
+ */
+XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length);
-/*
- * XXH3_64bits_withSeed():
- * This variant generates a custom secret on the fly
- * based on default secret altered using the `seed` value.
+/*!
+ * @brief 64-bit seeded variant of XXH3
+ *
+ * This variant generates a custom secret on the fly based on default secret
+ * altered using the `seed` value.
+ *
* While this operation is decently fast, note that it's not completely free.
- * Note: seed==0 produces the same results as XXH3_64bits().
+ *
+ * @note
+ * seed == 0 produces the same results as @ref XXH3_64bits().
+ *
+ * @param input The data to hash
+ * @param length The length
+ * @param seed The 64-bit seed to alter the state.
*/
-XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSeed(const void* data, size_t len, XXH64_hash_t seed);
+XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed);
/*!
* The bare minimum size for a custom secret.
@@ -800,8 +1092,9 @@ XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSeed(const void* data, size_t len, X
*/
#define XXH3_SECRET_SIZE_MIN 136
-/*
- * XXH3_64bits_withSecret():
+/*!
+ * @brief 64-bit variant of XXH3 with a custom "secret".
+ *
* It's possible to provide any blob of bytes as a "secret" to generate the hash.
* This makes it more difficult for an external actor to prepare an intentional collision.
* The main condition is that secretSize *must* be large enough (>= XXH3_SECRET_SIZE_MIN).
@@ -817,10 +1110,11 @@ XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSeed(const void* data, size_t len, X
* This is not necessarily the case when using the blob of bytes directly
* because, when hashing _small_ inputs, only a portion of the secret is employed.
*/
-XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSecret(const void* data, size_t len, const void* secret, size_t secretSize);
+XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize);
/******* Streaming *******/
+#ifndef XXH_NO_STREAM
/*
* Streaming requires state maintenance.
* This operation costs memory and CPU.
@@ -834,23 +1128,53 @@ XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_withSecret(const void* data, size_t len,
* @see XXH3_state_s for details.
*/
typedef struct XXH3_state_s XXH3_state_t;
-XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void);
+XXH_PUBLIC_API XXH_MALLOCF XXH3_state_t* XXH3_createState(void);
XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr);
-XXH_PUBLIC_API void XXH3_copyState(XXH3_state_t* dst_state, const XXH3_state_t* src_state);
-/*
- * XXH3_64bits_reset():
- * Initialize with default parameters.
- * digest will be equivalent to `XXH3_64bits()`.
+/*!
+ * @brief Copies one @ref XXH3_state_t to another.
+ *
+ * @param dst_state The state to copy to.
+ * @param src_state The state to copy from.
+ * @pre
+ * @p dst_state and @p src_state must not be `NULL` and must not overlap.
*/
-XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset(XXH3_state_t* statePtr);
-/*
- * XXH3_64bits_reset_withSeed():
- * Generate a custom secret from `seed`, and store it into `statePtr`.
- * digest will be equivalent to `XXH3_64bits_withSeed()`.
+XXH_PUBLIC_API void XXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, XXH_NOESCAPE const XXH3_state_t* src_state);
+
+/*!
+ * @brief Resets an @ref XXH3_state_t to begin a new hash.
+ *
+ * This function resets `statePtr` and generate a secret with default parameters. Call it before @ref XXH3_64bits_update().
+ * Digest will be equivalent to `XXH3_64bits()`.
+ *
+ * @param statePtr The state struct to reset.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ *
+ * @return @ref XXH_OK on success, @ref XXH_ERROR on failure.
+ *
*/
-XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed);
-/*
+XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr);
+
+/*!
+ * @brief Resets an @ref XXH3_state_t with 64-bit seed to begin a new hash.
+ *
+ * This function resets `statePtr` and generate a secret from `seed`. Call it before @ref XXH3_64bits_update().
+ * Digest will be equivalent to `XXH3_64bits_withSeed()`.
+ *
+ * @param statePtr The state struct to reset.
+ * @param seed The 64-bit seed to alter the state.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ *
+ * @return @ref XXH_OK on success, @ref XXH_ERROR on failure.
+ *
+ */
+XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed);
+
+/*!
* XXH3_64bits_reset_withSecret():
* `secret` is referenced, it _must outlive_ the hash streaming session.
* Similar to one-shot API, `secretSize` must be >= `XXH3_SECRET_SIZE_MIN`,
@@ -859,10 +1183,44 @@ XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSeed(XXH3_state_t* statePtr,
* When in doubt about the randomness of a candidate `secret`,
* consider employing `XXH3_generateSecret()` instead (see below).
*/
-XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize);
+XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize);
-XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update (XXH3_state_t* statePtr, const void* input, size_t length);
-XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t* statePtr);
+/*!
+ * @brief Consumes a block of @p input to an @ref XXH3_state_t.
+ *
+ * Call this to incrementally consume blocks of data.
+ *
+ * @param statePtr The state struct to update.
+ * @param input The block of data to be hashed, at least @p length bytes in size.
+ * @param length The length of @p input, in bytes.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ * @pre
+ * The memory between @p input and @p input + @p length must be valid,
+ * readable, contiguous memory. However, if @p length is `0`, @p input may be
+ * `NULL`. In C++, this also must be *TriviallyCopyable*.
+ *
+ * @return @ref XXH_OK on success, @ref XXH_ERROR on failure.
+ */
+XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);
+
+/*!
+ * @brief Returns the calculated XXH3 64-bit hash value from an @ref XXH3_state_t.
+ *
+ * @note
+ * Calling XXH3_64bits_digest() will not affect @p statePtr, so you can update,
+ * digest, and update again.
+ *
+ * @param statePtr The state struct to calculate the hash from.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ *
+ * @return The calculated XXH3 64-bit hash value from that state.
+ */
+XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr);
+#endif /* !XXH_NO_STREAM */
/* note : canonical representation of XXH3 is the same as XXH64
* since they both produce XXH64_hash_t values */
@@ -883,11 +1241,31 @@ typedef struct {
XXH64_hash_t high64; /*!< `value >> 64` */
} XXH128_hash_t;
-XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(const void* data, size_t len);
-XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSeed(const void* data, size_t len, XXH64_hash_t seed);
-XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSecret(const void* data, size_t len, const void* secret, size_t secretSize);
+/*!
+ * @brief Unseeded 128-bit variant of XXH3
+ *
+ * The 128-bit variant of XXH3 has more strength, but it has a bit of overhead
+ * for shorter inputs.
+ *
+ * This is equivalent to @ref XXH3_128bits_withSeed() with a seed of 0, however
+ * it may have slightly better performance due to constant propagation of the
+ * defaults.
+ *
+ * @see
+ * XXH32(), XXH64(), XXH3_64bits(): equivalent for the other xxHash algorithms
+ * @see
+ * XXH3_128bits_withSeed(), XXH3_128bits_withSecret(): other seeding variants
+ * @see
+ * XXH3_128bits_reset(), XXH3_128bits_update(), XXH3_128bits_digest(): Streaming version.
+ */
+XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* data, size_t len);
+/*! @brief Seeded 128-bit variant of XXH3. @see XXH3_64bits_withSeed(). */
+XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSeed(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed);
+/*! @brief Custom secret 128-bit variant of XXH3. @see XXH3_64bits_withSecret(). */
+XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize);
/******* Streaming *******/
+#ifndef XXH_NO_STREAM
/*
* Streaming requires state maintenance.
* This operation costs memory and CPU.
@@ -900,12 +1278,77 @@ XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_withSecret(const void* data, size_t le
* All reset and streaming functions have same meaning as their 64-bit counterpart.
*/
-XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset(XXH3_state_t* statePtr);
-XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed);
-XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize);
+/*!
+ * @brief Resets an @ref XXH3_state_t to begin a new hash.
+ *
+ * This function resets `statePtr` and generate a secret with default parameters. Call it before @ref XXH3_128bits_update().
+ * Digest will be equivalent to `XXH3_128bits()`.
+ *
+ * @param statePtr The state struct to reset.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ *
+ * @return @ref XXH_OK on success, @ref XXH_ERROR on failure.
+ *
+ */
+XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr);
-XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update (XXH3_state_t* statePtr, const void* input, size_t length);
-XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t* statePtr);
+/*!
+ * @brief Resets an @ref XXH3_state_t with 64-bit seed to begin a new hash.
+ *
+ * This function resets `statePtr` and generate a secret from `seed`. Call it before @ref XXH3_128bits_update().
+ * Digest will be equivalent to `XXH3_128bits_withSeed()`.
+ *
+ * @param statePtr The state struct to reset.
+ * @param seed The 64-bit seed to alter the state.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ *
+ * @return @ref XXH_OK on success, @ref XXH_ERROR on failure.
+ *
+ */
+XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed);
+/*! @brief Custom secret 128-bit variant of XXH3. @see XXH_64bits_reset_withSecret(). */
+XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize);
+
+/*!
+ * @brief Consumes a block of @p input to an @ref XXH3_state_t.
+ *
+ * Call this to incrementally consume blocks of data.
+ *
+ * @param statePtr The state struct to update.
+ * @param input The block of data to be hashed, at least @p length bytes in size.
+ * @param length The length of @p input, in bytes.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ * @pre
+ * The memory between @p input and @p input + @p length must be valid,
+ * readable, contiguous memory. However, if @p length is `0`, @p input may be
+ * `NULL`. In C++, this also must be *TriviallyCopyable*.
+ *
+ * @return @ref XXH_OK on success, @ref XXH_ERROR on failure.
+ */
+XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);
+
+/*!
+ * @brief Returns the calculated XXH3 128-bit hash value from an @ref XXH3_state_t.
+ *
+ * @note
+ * Calling XXH3_128bits_digest() will not affect @p statePtr, so you can update,
+ * digest, and update again.
+ *
+ * @param statePtr The state struct to calculate the hash from.
+ *
+ * @pre
+ * @p statePtr must not be `NULL`.
+ *
+ * @return The calculated XXH3 128-bit hash value from that state.
+ */
+XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr);
+#endif /* !XXH_NO_STREAM */
/* Following helper functions make it possible to compare XXH128_hast_t values.
* Since XXH128_hash_t is a structure, this capability is not offered by the language.
@@ -915,26 +1358,48 @@ XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t* statePtr);
* XXH128_isEqual():
* Return: 1 if `h1` and `h2` are equal, 0 if they are not.
*/
-XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2);
+XXH_PUBLIC_API XXH_PUREF int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2);
/*!
- * XXH128_cmp():
- *
+ * @brief Compares two @ref XXH128_hash_t
* This comparator is compatible with stdlib's `qsort()`/`bsearch()`.
*
- * return: >0 if *h128_1 > *h128_2
- * =0 if *h128_1 == *h128_2
- * <0 if *h128_1 < *h128_2
+ * @return: >0 if *h128_1 > *h128_2
+ * =0 if *h128_1 == *h128_2
+ * <0 if *h128_1 < *h128_2
*/
-XXH_PUBLIC_API int XXH128_cmp(const void* h128_1, const void* h128_2);
+XXH_PUBLIC_API XXH_PUREF int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2);
/******* Canonical representation *******/
typedef struct { unsigned char digest[sizeof(XXH128_hash_t)]; } XXH128_canonical_t;
-XXH_PUBLIC_API void XXH128_canonicalFromHash(XXH128_canonical_t* dst, XXH128_hash_t hash);
-XXH_PUBLIC_API XXH128_hash_t XXH128_hashFromCanonical(const XXH128_canonical_t* src);
+/*!
+ * @brief Converts an @ref XXH128_hash_t to a big endian @ref XXH128_canonical_t.
+ *
+ * @param dst The @ref XXH128_canonical_t pointer to be stored to.
+ * @param hash The @ref XXH128_hash_t to be converted.
+ *
+ * @pre
+ * @p dst must not be `NULL`.
+ */
+XXH_PUBLIC_API void XXH128_canonicalFromHash(XXH_NOESCAPE XXH128_canonical_t* dst, XXH128_hash_t hash);
+
+/*!
+ * @brief Converts an @ref XXH128_canonical_t to a native @ref XXH128_hash_t.
+ *
+ * @param src The @ref XXH128_canonical_t to convert.
+ *
+ * @pre
+ * @p src must not be `NULL`.
+ *
+ * @return The converted hash.
+ */
+XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128_hashFromCanonical(XXH_NOESCAPE const XXH128_canonical_t* src);
+
+
+#endif /* !XXH_NO_XXH3 */
#endif /* XXH_NO_LONG_LONG */
/*!
@@ -978,7 +1443,7 @@ struct XXH32_state_s {
XXH32_hash_t v[4]; /*!< Accumulator lanes */
XXH32_hash_t mem32[4]; /*!< Internal buffer for partial reads. Treated as unsigned char[16]. */
XXH32_hash_t memsize; /*!< Amount of data in @ref mem32 */
- XXH32_hash_t reserved; /*!< Reserved field. Do not read or write to it, it may be removed. */
+ XXH32_hash_t reserved; /*!< Reserved field. Do not read nor write to it. */
}; /* typedef'd to XXH32_state_t */
@@ -1002,9 +1467,11 @@ struct XXH64_state_s {
XXH64_hash_t mem64[4]; /*!< Internal buffer for partial reads. Treated as unsigned char[32]. */
XXH32_hash_t memsize; /*!< Amount of data in @ref mem64 */
XXH32_hash_t reserved32; /*!< Reserved field, needed for padding anyways*/
- XXH64_hash_t reserved64; /*!< Reserved field. Do not read or write to it, it may be removed. */
+ XXH64_hash_t reserved64; /*!< Reserved field. Do not read or write to it. */
}; /* typedef'd to XXH64_state_t */
+#ifndef XXH_NO_XXH3
+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* >= C11 */
# include <stdalign.h>
# define XXH_ALIGN(n) alignas(n)
@@ -1038,6 +1505,7 @@ struct XXH64_state_s {
#define XXH3_INTERNALBUFFER_SIZE 256
/*!
+ * @internal
* @brief Default size of the secret buffer (and @ref XXH3_kSecret).
*
* This is the size used in @ref XXH3_kSecret and the seeded functions.
@@ -1070,7 +1538,7 @@ struct XXH64_state_s {
*/
struct XXH3_state_s {
XXH_ALIGN_MEMBER(64, XXH64_hash_t acc[8]);
- /*!< The 8 accumulators. Similar to `vN` in @ref XXH32_state_s::v1 and @ref XXH64_state_s */
+ /*!< The 8 accumulators. See @ref XXH32_state_s::v and @ref XXH64_state_s::v */
XXH_ALIGN_MEMBER(64, unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE]);
/*!< Used to store a custom secret generated from a seed. */
XXH_ALIGN_MEMBER(64, unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]);
@@ -1110,69 +1578,119 @@ struct XXH3_state_s {
* Note that this doesn't prepare the state for a streaming operation,
* it's still necessary to use XXH3_NNbits_reset*() afterwards.
*/
-#define XXH3_INITSTATE(XXH3_state_ptr) { (XXH3_state_ptr)->seed = 0; }
+#define XXH3_INITSTATE(XXH3_state_ptr) \
+ do { \
+ XXH3_state_t* tmp_xxh3_state_ptr = (XXH3_state_ptr); \
+ tmp_xxh3_state_ptr->seed = 0; \
+ tmp_xxh3_state_ptr->extSecret = NULL; \
+ } while(0)
-/* XXH128() :
+/*!
* simple alias to pre-selected XXH3_128bits variant
*/
-XXH_PUBLIC_API XXH128_hash_t XXH128(const void* data, size_t len, XXH64_hash_t seed);
+XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed);
/* === Experimental API === */
/* Symbols defined below must be considered tied to a specific library version. */
-/*
+/*!
* XXH3_generateSecret():
*
* Derive a high-entropy secret from any user-defined content, named customSeed.
* The generated secret can be used in combination with `*_withSecret()` functions.
- * The `_withSecret()` variants are useful to provide a higher level of protection than 64-bit seed,
- * as it becomes much more difficult for an external actor to guess how to impact the calculation logic.
+ * The `_withSecret()` variants are useful to provide a higher level of protection
+ * than 64-bit seed, as it becomes much more difficult for an external actor to
+ * guess how to impact the calculation logic.
*
* The function accepts as input a custom seed of any length and any content,
- * and derives from it a high-entropy secret of length @secretSize
- * into an already allocated buffer @secretBuffer.
- * @secretSize must be >= XXH3_SECRET_SIZE_MIN
+ * and derives from it a high-entropy secret of length @p secretSize into an
+ * already allocated buffer @p secretBuffer.
*
* The generated secret can then be used with any `*_withSecret()` variant.
- * Functions `XXH3_128bits_withSecret()`, `XXH3_64bits_withSecret()`,
- * `XXH3_128bits_reset_withSecret()` and `XXH3_64bits_reset_withSecret()`
+ * The functions @ref XXH3_128bits_withSecret(), @ref XXH3_64bits_withSecret(),
+ * @ref XXH3_128bits_reset_withSecret() and @ref XXH3_64bits_reset_withSecret()
* are part of this list. They all accept a `secret` parameter
- * which must be large enough for implementation reasons (>= XXH3_SECRET_SIZE_MIN)
+ * which must be large enough for implementation reasons (>= @ref XXH3_SECRET_SIZE_MIN)
* _and_ feature very high entropy (consist of random-looking bytes).
- * These conditions can be a high bar to meet, so
- * XXH3_generateSecret() can be employed to ensure proper quality.
+ * These conditions can be a high bar to meet, so @ref XXH3_generateSecret() can
+ * be employed to ensure proper quality.
+ *
+ * @p customSeed can be anything. It can have any size, even small ones,
+ * and its content can be anything, even "poor entropy" sources such as a bunch
+ * of zeroes. The resulting `secret` will nonetheless provide all required qualities.
*
- * customSeed can be anything. It can have any size, even small ones,
- * and its content can be anything, even "poor entropy" sources such as a bunch of zeroes.
- * The resulting `secret` will nonetheless provide all required qualities.
+ * @pre
+ * - @p secretSize must be >= @ref XXH3_SECRET_SIZE_MIN
+ * - When @p customSeedSize > 0, supplying NULL as customSeed is undefined behavior.
*
- * When customSeedSize > 0, supplying NULL as customSeed is undefined behavior.
+ * Example code:
+ * @code{.c}
+ * #include <stdio.h>
+ * #include <stdlib.h>
+ * #include <string.h>
+ * #define XXH_STATIC_LINKING_ONLY // expose unstable API
+ * #include "xxhash.h"
+ * // Hashes argv[2] using the entropy from argv[1].
+ * int main(int argc, char* argv[])
+ * {
+ * char secret[XXH3_SECRET_SIZE_MIN];
+ * if (argv != 3) { return 1; }
+ * XXH3_generateSecret(secret, sizeof(secret), argv[1], strlen(argv[1]));
+ * XXH64_hash_t h = XXH3_64bits_withSecret(
+ * argv[2], strlen(argv[2]),
+ * secret, sizeof(secret)
+ * );
+ * printf("%016llx\n", (unsigned long long) h);
+ * }
+ * @endcode
*/
-XXH_PUBLIC_API XXH_errorcode XXH3_generateSecret(void* secretBuffer, size_t secretSize, const void* customSeed, size_t customSeedSize);
-
+XXH_PUBLIC_API XXH_errorcode XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize);
-/*
- * XXH3_generateSecret_fromSeed():
- *
- * Generate the same secret as the _withSeed() variants.
- *
- * The resulting secret has a length of XXH3_SECRET_DEFAULT_SIZE (necessarily).
- * @secretBuffer must be already allocated, of size at least XXH3_SECRET_DEFAULT_SIZE bytes.
+/*!
+ * @brief Generate the same secret as the _withSeed() variants.
*
* The generated secret can be used in combination with
*`*_withSecret()` and `_withSecretandSeed()` variants.
- * This generator is notably useful in combination with `_withSecretandSeed()`,
- * as a way to emulate a faster `_withSeed()` variant.
+ *
+ * Example C++ `std::string` hash class:
+ * @code{.cpp}
+ * #include <string>
+ * #define XXH_STATIC_LINKING_ONLY // expose unstable API
+ * #include "xxhash.h"
+ * // Slow, seeds each time
+ * class HashSlow {
+ * XXH64_hash_t seed;
+ * public:
+ * HashSlow(XXH64_hash_t s) : seed{s} {}
+ * size_t operator()(const std::string& x) const {
+ * return size_t{XXH3_64bits_withSeed(x.c_str(), x.length(), seed)};
+ * }
+ * };
+ * // Fast, caches the seeded secret for future uses.
+ * class HashFast {
+ * unsigned char secret[XXH3_SECRET_SIZE_MIN];
+ * public:
+ * HashFast(XXH64_hash_t s) {
+ * XXH3_generateSecret_fromSeed(secret, seed);
+ * }
+ * size_t operator()(const std::string& x) const {
+ * return size_t{
+ * XXH3_64bits_withSecret(x.c_str(), x.length(), secret, sizeof(secret))
+ * };
+ * }
+ * };
+ * @endcode
+ * @param secretBuffer A writable buffer of @ref XXH3_SECRET_SIZE_MIN bytes
+ * @param seed The seed to seed the state.
*/
-XXH_PUBLIC_API void XXH3_generateSecret_fromSeed(void* secretBuffer, XXH64_hash_t seed);
+XXH_PUBLIC_API void XXH3_generateSecret_fromSeed(XXH_NOESCAPE void* secretBuffer, XXH64_hash_t seed);
-/*
- * *_withSecretandSeed() :
+/*!
* These variants generate hash values using either
- * @seed for "short" keys (< XXH3_MIDSIZE_MAX = 240 bytes)
- * or @secret for "large" keys (>= XXH3_MIDSIZE_MAX).
+ * @p seed for "short" keys (< XXH3_MIDSIZE_MAX = 240 bytes)
+ * or @p secret for "large" keys (>= XXH3_MIDSIZE_MAX).
*
* This generally benefits speed, compared to `_withSeed()` or `_withSecret()`.
* `_withSeed()` has to generate the secret on the fly for "large" keys.
@@ -1181,7 +1699,7 @@ XXH_PUBLIC_API void XXH3_generateSecret_fromSeed(void* secretBuffer, XXH64_hash_
* which requires more instructions than _withSeed() variants.
* Therefore, _withSecretandSeed variant combines the best of both worlds.
*
- * When @secret has been generated by XXH3_generateSecret_fromSeed(),
+ * When @p secret has been generated by XXH3_generateSecret_fromSeed(),
* this variant produces *exactly* the same results as `_withSeed()` variant,
* hence offering only a pure speed benefit on "large" input,
* by skipping the need to regenerate the secret for every large input.
@@ -1190,32 +1708,34 @@ XXH_PUBLIC_API void XXH3_generateSecret_fromSeed(void* secretBuffer, XXH64_hash_
* for example with XXH3_64bits(), which then becomes the seed,
* and then employ both the seed and the secret in _withSecretandSeed().
* On top of speed, an added benefit is that each bit in the secret
- * has a 50% chance to swap each bit in the output,
- * via its impact to the seed.
+ * has a 50% chance to swap each bit in the output, via its impact to the seed.
+ *
* This is not guaranteed when using the secret directly in "small data" scenarios,
* because only portions of the secret are employed for small data.
*/
-XXH_PUBLIC_API XXH64_hash_t
-XXH3_64bits_withSecretandSeed(const void* data, size_t len,
- const void* secret, size_t secretSize,
+XXH_PUBLIC_API XXH_PUREF XXH64_hash_t
+XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* data, size_t len,
+ XXH_NOESCAPE const void* secret, size_t secretSize,
XXH64_hash_t seed);
-
-XXH_PUBLIC_API XXH128_hash_t
-XXH3_128bits_withSecretandSeed(const void* data, size_t len,
- const void* secret, size_t secretSize,
+/*! @copydoc XXH3_64bits_withSecretandSeed() */
+XXH_PUBLIC_API XXH_PUREF XXH128_hash_t
+XXH3_128bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length,
+ XXH_NOESCAPE const void* secret, size_t secretSize,
XXH64_hash_t seed64);
-
+#ifndef XXH_NO_STREAM
+/*! @copydoc XXH3_64bits_withSecretandSeed() */
XXH_PUBLIC_API XXH_errorcode
-XXH3_64bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
- const void* secret, size_t secretSize,
+XXH3_64bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr,
+ XXH_NOESCAPE const void* secret, size_t secretSize,
XXH64_hash_t seed64);
-
+/*! @copydoc XXH3_64bits_withSecretandSeed() */
XXH_PUBLIC_API XXH_errorcode
-XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
- const void* secret, size_t secretSize,
+XXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr,
+ XXH_NOESCAPE const void* secret, size_t secretSize,
XXH64_hash_t seed64);
+#endif /* !XXH_NO_STREAM */
-
+#endif /* !XXH_NO_XXH3 */
#endif /* XXH_NO_LONG_LONG */
#if defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)
# define XXH_IMPLEMENTATION
@@ -1269,7 +1789,7 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
/*!
* @brief Define this to disable 64-bit code.
*
- * Useful if only using the @ref xxh32_family and you have a strict C90 compiler.
+ * Useful if only using the @ref XXH32_family and you have a strict C90 compiler.
*/
# define XXH_NO_LONG_LONG
# undef XXH_NO_LONG_LONG /* don't actually */
@@ -1292,7 +1812,7 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
* Use `memcpy()`. Safe and portable. Note that most modern compilers will
* eliminate the function call and treat it as an unaligned access.
*
- * - `XXH_FORCE_MEMORY_ACCESS=1`: `__attribute__((packed))`
+ * - `XXH_FORCE_MEMORY_ACCESS=1`: `__attribute__((aligned(1)))`
* @par
* Depends on compiler extensions and is therefore not portable.
* This method is safe _if_ your compiler supports it,
@@ -1312,20 +1832,48 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
* inline small `memcpy()` calls, and it might also be faster on big-endian
* systems which lack a native byteswap instruction. However, some compilers
* will emit literal byteshifts even if the target supports unaligned access.
- * .
+ *
*
* @warning
* Methods 1 and 2 rely on implementation-defined behavior. Use these with
* care, as what works on one compiler/platform/optimization level may cause
* another to read garbage data or even crash.
*
- * See http://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html for details.
+ * See https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html for details.
*
* Prefer these methods in priority order (0 > 3 > 1 > 2)
*/
# define XXH_FORCE_MEMORY_ACCESS 0
/*!
+ * @def XXH_SIZE_OPT
+ * @brief Controls how much xxHash optimizes for size.
+ *
+ * xxHash, when compiled, tends to result in a rather large binary size. This
+ * is mostly due to heavy usage to forced inlining and constant folding of the
+ * @ref XXH3_family to increase performance.
+ *
+ * However, some developers prefer size over speed. This option can
+ * significantly reduce the size of the generated code. When using the `-Os`
+ * or `-Oz` options on GCC or Clang, this is defined to 1 by default,
+ * otherwise it is defined to 0.
+ *
+ * Most of these size optimizations can be controlled manually.
+ *
+ * This is a number from 0-2.
+ * - `XXH_SIZE_OPT` == 0: Default. xxHash makes no size optimizations. Speed
+ * comes first.
+ * - `XXH_SIZE_OPT` == 1: Default for `-Os` and `-Oz`. xxHash is more
+ * conservative and disables hacks that increase code size. It implies the
+ * options @ref XXH_NO_INLINE_HINTS == 1, @ref XXH_FORCE_ALIGN_CHECK == 0,
+ * and @ref XXH3_NEON_LANES == 8 if they are not already defined.
+ * - `XXH_SIZE_OPT` == 2: xxHash tries to make itself as small as possible.
+ * Performance may cry. For example, the single shot functions just use the
+ * streaming API.
+ */
+# define XXH_SIZE_OPT 0
+
+/*!
* @def XXH_FORCE_ALIGN_CHECK
* @brief If defined to non-zero, adds a special path for aligned inputs (XXH32()
* and XXH64() only).
@@ -1346,9 +1894,11 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
*
* In these cases, the alignment check can be removed by setting this macro to 0.
* Then the code will always use unaligned memory access.
- * Align check is automatically disabled on x86, x64 & arm64,
+ * Align check is automatically disabled on x86, x64, ARM64, and some ARM chips
* which are platforms known to offer good unaligned memory accesses performance.
*
+ * It is also disabled by default when @ref XXH_SIZE_OPT >= 1.
+ *
* This option does not affect XXH3 (only XXH32 and XXH64).
*/
# define XXH_FORCE_ALIGN_CHECK 0
@@ -1370,12 +1920,29 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
* XXH_NO_INLINE_HINTS marks all internal functions as static, giving the
* compiler full control on whether to inline or not.
*
- * When not optimizing (-O0), optimizing for size (-Os, -Oz), or using
- * -fno-inline with GCC or Clang, this will automatically be defined.
+ * When not optimizing (-O0), using `-fno-inline` with GCC or Clang, or if
+ * @ref XXH_SIZE_OPT >= 1, this will automatically be defined.
*/
# define XXH_NO_INLINE_HINTS 0
/*!
+ * @def XXH3_INLINE_SECRET
+ * @brief Determines whether to inline the XXH3 withSecret code.
+ *
+ * When the secret size is known, the compiler can improve the performance
+ * of XXH3_64bits_withSecret() and XXH3_128bits_withSecret().
+ *
+ * However, if the secret size is not known, it doesn't have any benefit. This
+ * happens when xxHash is compiled into a global symbol. Therefore, if
+ * @ref XXH_INLINE_ALL is *not* defined, this will be defined to 0.
+ *
+ * Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers
+ * that are *sometimes* force inline on -Og, and it is impossible to automatically
+ * detect this optimization level.
+ */
+# define XXH3_INLINE_SECRET 0
+
+/*!
* @def XXH32_ENDJMP
* @brief Whether to use a jump for `XXH32_finalize`.
*
@@ -1396,34 +1963,45 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
*/
# define XXH_OLD_NAMES
# undef XXH_OLD_NAMES /* don't actually use, it is ugly. */
+
+/*!
+ * @def XXH_NO_STREAM
+ * @brief Disables the streaming API.
+ *
+ * When xxHash is not inlined and the streaming functions are not used, disabling
+ * the streaming functions can improve code size significantly, especially with
+ * the @ref XXH3_family which tends to make constant folded copies of itself.
+ */
+# define XXH_NO_STREAM
+# undef XXH_NO_STREAM /* don't actually */
#endif /* XXH_DOXYGEN */
/*!
* @}
*/
#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */
- /* prefer __packed__ structures (method 1) for gcc on armv7+ and mips */
-# if !defined(__clang__) && \
-( \
- (defined(__INTEL_COMPILER) && !defined(_WIN32)) || \
- ( \
- defined(__GNUC__) && ( \
- (defined(__ARM_ARCH) && __ARM_ARCH >= 7) || \
- ( \
- defined(__mips__) && \
- (__mips <= 5 || __mips_isa_rev < 6) && \
- (!defined(__mips16) || defined(__mips_mips16e2)) \
- ) \
- ) \
- ) \
-)
+ /* prefer __packed__ structures (method 1) for GCC
+ * < ARMv7 with unaligned access (e.g. Raspbian armhf) still uses byte shifting, so we use memcpy
+ * which for some reason does unaligned loads. */
+# if defined(__GNUC__) && !(defined(__ARM_ARCH) && __ARM_ARCH < 7 && defined(__ARM_FEATURE_UNALIGNED))
# define XXH_FORCE_MEMORY_ACCESS 1
# endif
#endif
+#ifndef XXH_SIZE_OPT
+ /* default to 1 for -Os or -Oz */
+# if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE_SIZE__)
+# define XXH_SIZE_OPT 1
+# else
+# define XXH_SIZE_OPT 0
+# endif
+#endif
+
#ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */
-# if defined(__i386) || defined(__x86_64__) || defined(__aarch64__) \
- || defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) /* visual */
+ /* don't check on sizeopt, x86, aarch64, or arm when unaligned access is available */
+# if XXH_SIZE_OPT >= 1 || \
+ defined(__i386) || defined(__x86_64__) || defined(__aarch64__) || defined(__ARM_FEATURE_UNALIGNED) \
+ || defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) || defined(_M_ARM) /* visual */
# define XXH_FORCE_ALIGN_CHECK 0
# else
# define XXH_FORCE_ALIGN_CHECK 1
@@ -1431,14 +2009,22 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
#endif
#ifndef XXH_NO_INLINE_HINTS
-# if defined(__OPTIMIZE_SIZE__) /* -Os, -Oz */ \
- || defined(__NO_INLINE__) /* -O0, -fno-inline */
+# if XXH_SIZE_OPT >= 1 || defined(__NO_INLINE__) /* -O0, -fno-inline */
# define XXH_NO_INLINE_HINTS 1
# else
# define XXH_NO_INLINE_HINTS 0
# endif
#endif
+#ifndef XXH3_INLINE_SECRET
+# if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \
+ || !defined(XXH_INLINE_ALL)
+# define XXH3_INLINE_SECRET 0
+# else
+# define XXH3_INLINE_SECRET 1
+# endif
+#endif
+
#ifndef XXH32_ENDJMP
/* generally preferable for performance */
# define XXH32_ENDJMP 0
@@ -1453,6 +2039,24 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
/* *************************************
* Includes & Memory related functions
***************************************/
+#if defined(XXH_NO_STREAM)
+/* nothing */
+#elif defined(XXH_NO_STDLIB)
+
+/* When requesting to disable any mention of stdlib,
+ * the library loses the ability to invoked malloc / free.
+ * In practice, it means that functions like `XXH*_createState()`
+ * will always fail, and return NULL.
+ * This flag is useful in situations where
+ * xxhash.h is integrated into some kernel, embedded or limited environment
+ * without access to dynamic allocation.
+ */
+
+static XXH_CONSTF void* XXH_malloc(size_t s) { (void)s; return NULL; }
+static void XXH_free(void* p) { (void)p; }
+
+#else
+
/*
* Modify the local functions below should you wish to use
* different memory routines for malloc() and free()
@@ -1463,7 +2067,7 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
* @internal
* @brief Modify this function to use a different routine than malloc().
*/
-static void* XXH_malloc(size_t s) { return malloc(s); }
+static XXH_MALLOCF void* XXH_malloc(size_t s) { return malloc(s); }
/*!
* @internal
@@ -1471,6 +2075,8 @@ static void* XXH_malloc(size_t s) { return malloc(s); }
*/
static void XXH_free(void* p) { free(p); }
+#endif /* XXH_NO_STDLIB */
+
#include <string.h>
/*!
@@ -1515,6 +2121,11 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
# define XXH_NO_INLINE static
#endif
+#if XXH3_INLINE_SECRET
+# define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE
+#else
+# define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE
+#endif
/* *************************************
@@ -1540,7 +2151,11 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
# include <assert.h> /* note: can still be disabled with NDEBUG */
# define XXH_ASSERT(c) assert(c)
#else
-# define XXH_ASSERT(c) ((void)0)
+# if defined(__INTEL_COMPILER)
+# define XXH_ASSERT(c) XXH_ASSUME((unsigned char) (c))
+# else
+# define XXH_ASSERT(c) XXH_ASSUME(c)
+# endif
#endif
/* note: use after variable declarations */
@@ -1572,11 +2187,19 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
* XXH3_initCustomSecret_scalar().
*/
#if defined(__GNUC__) || defined(__clang__)
-# define XXH_COMPILER_GUARD(var) __asm__ __volatile__("" : "+r" (var))
+# define XXH_COMPILER_GUARD(var) __asm__("" : "+r" (var))
#else
# define XXH_COMPILER_GUARD(var) ((void)0)
#endif
+/* Specifically for NEON vectors which use the "w" constraint, on
+ * Clang. */
+#if defined(__clang__) && defined(__ARM_ARCH) && !defined(__wasm__)
+# define XXH_COMPILER_GUARD_CLANG_NEON(var) __asm__("" : "+w" (var))
+#else
+# define XXH_COMPILER_GUARD_CLANG_NEON(var) ((void)0)
+#endif
+
/* *************************************
* Basic Types
***************************************/
@@ -1591,6 +2214,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
typedef XXH32_hash_t xxh_u32;
#ifdef XXH_OLD_NAMES
+# warning "XXH_OLD_NAMES is planned to be removed starting v0.9. If the program depends on it, consider moving away from it by employing newer type names directly"
# define BYTE xxh_u8
# define U8 xxh_u8
# define U32 xxh_u32
@@ -1664,25 +2288,26 @@ static xxh_u32 XXH_read32(const void* memPtr) { return *(const xxh_u32*) memPtr;
#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))
/*
- * __pack instructions are safer but compiler specific, hence potentially
- * problematic for some compilers.
- *
- * Currently only defined for GCC and ICC.
+ * __attribute__((aligned(1))) is supported by gcc and clang. Originally the
+ * documentation claimed that it only increased the alignment, but actually it
+ * can decrease it on gcc, clang, and icc:
+ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502,
+ * https://gcc.godbolt.org/z/xYez1j67Y.
*/
#ifdef XXH_OLD_NAMES
typedef union { xxh_u32 u32; } __attribute__((packed)) unalign;
#endif
static xxh_u32 XXH_read32(const void* ptr)
{
- typedef union { xxh_u32 u32; } __attribute__((packed)) xxh_unalign;
- return ((const xxh_unalign*)ptr)->u32;
+ typedef __attribute__((aligned(1))) xxh_u32 xxh_unalign32;
+ return *((const xxh_unalign32*)ptr);
}
#else
/*
* Portable and safe solution. Generally efficient.
- * see: http://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html
+ * see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html
*/
static xxh_u32 XXH_read32(const void* memPtr)
{
@@ -1758,6 +2383,51 @@ static int XXH_isLittleEndian(void)
# define XXH_HAS_BUILTIN(x) 0
#endif
+
+
+/*
+ * C23 and future versions have standard "unreachable()".
+ * Once it has been implemented reliably we can add it as an
+ * additional case:
+ *
+ * ```
+ * #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN)
+ * # include <stddef.h>
+ * # ifdef unreachable
+ * # define XXH_UNREACHABLE() unreachable()
+ * # endif
+ * #endif
+ * ```
+ *
+ * Note C++23 also has std::unreachable() which can be detected
+ * as follows:
+ * ```
+ * #if defined(__cpp_lib_unreachable) && (__cpp_lib_unreachable >= 202202L)
+ * # include <utility>
+ * # define XXH_UNREACHABLE() std::unreachable()
+ * #endif
+ * ```
+ * NB: `__cpp_lib_unreachable` is defined in the `<version>` header.
+ * We don't use that as including `<utility>` in `extern "C"` blocks
+ * doesn't work on GCC12
+ */
+
+#if XXH_HAS_BUILTIN(__builtin_unreachable)
+# define XXH_UNREACHABLE() __builtin_unreachable()
+
+#elif defined(_MSC_VER)
+# define XXH_UNREACHABLE() __assume(0)
+
+#else
+# define XXH_UNREACHABLE()
+#endif
+
+#if XXH_HAS_BUILTIN(__builtin_assume)
+# define XXH_ASSUME(c) __builtin_assume(c)
+#else
+# define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
+#endif
+
/*!
* @internal
* @def XXH_rotl32(x,r)
@@ -1880,8 +2550,10 @@ XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; }
*********************************************************************/
/*!
* @}
- * @defgroup xxh32_impl XXH32 implementation
+ * @defgroup XXH32_impl XXH32 implementation
* @ingroup impl
+ *
+ * Details on the XXH32 implementation.
* @{
*/
/* #define instead of static const, to be used as initializers */
@@ -1915,7 +2587,7 @@ static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input)
acc += input * XXH_PRIME32_2;
acc = XXH_rotl32(acc, 13);
acc *= XXH_PRIME32_1;
-#if (defined(__SSE4_1__) || defined(__aarch64__)) && !defined(XXH_ENABLE_AUTOVECTORIZE)
+#if (defined(__SSE4_1__) || defined(__aarch64__) || defined(__wasm_simd128__)) && !defined(XXH_ENABLE_AUTOVECTORIZE)
/*
* UGLY HACK:
* A compiler fence is the only thing that prevents GCC and Clang from
@@ -1945,9 +2617,12 @@ static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input)
* can load data, while v3 can multiply. SSE forces them to operate
* together.
*
- * This is also enabled on AArch64, as Clang autovectorizes it incorrectly
- * and it is pointless writing a NEON implementation that is basically the
- * same speed as scalar for XXH32.
+ * This is also enabled on AArch64, as Clang is *very aggressive* in vectorizing
+ * the loop. NEON is only faster on the A53, and with the newer cores, it is less
+ * than half the speed.
+ *
+ * Additionally, this is used on WASM SIMD128 because it JITs to the same
+ * SIMD instructions and has the same issue.
*/
XXH_COMPILER_GUARD(acc);
#endif
@@ -1961,17 +2636,17 @@ static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input)
* The final mix ensures that all input bits have a chance to impact any bit in
* the output digest, resulting in an unbiased distribution.
*
- * @param h32 The hash to avalanche.
+ * @param hash The hash to avalanche.
* @return The avalanched hash.
*/
-static xxh_u32 XXH32_avalanche(xxh_u32 h32)
+static xxh_u32 XXH32_avalanche(xxh_u32 hash)
{
- h32 ^= h32 >> 15;
- h32 *= XXH_PRIME32_2;
- h32 ^= h32 >> 13;
- h32 *= XXH_PRIME32_3;
- h32 ^= h32 >> 16;
- return(h32);
+ hash ^= hash >> 15;
+ hash *= XXH_PRIME32_2;
+ hash ^= hash >> 13;
+ hash *= XXH_PRIME32_3;
+ hash ^= hash >> 16;
+ return hash;
}
#define XXH_get32bits(p) XXH_readLE32_align(p, align)
@@ -1984,24 +2659,25 @@ static xxh_u32 XXH32_avalanche(xxh_u32 h32)
* This final stage will digest them to ensure that all input bytes are present
* in the final mix.
*
- * @param h32 The hash to finalize.
+ * @param hash The hash to finalize.
* @param ptr The pointer to the remaining input.
* @param len The remaining length, modulo 16.
* @param align Whether @p ptr is aligned.
* @return The finalized hash.
+ * @see XXH64_finalize().
*/
-static xxh_u32
-XXH32_finalize(xxh_u32 h32, const xxh_u8* ptr, size_t len, XXH_alignment align)
+static XXH_PUREF xxh_u32
+XXH32_finalize(xxh_u32 hash, const xxh_u8* ptr, size_t len, XXH_alignment align)
{
-#define XXH_PROCESS1 do { \
- h32 += (*ptr++) * XXH_PRIME32_5; \
- h32 = XXH_rotl32(h32, 11) * XXH_PRIME32_1; \
+#define XXH_PROCESS1 do { \
+ hash += (*ptr++) * XXH_PRIME32_5; \
+ hash = XXH_rotl32(hash, 11) * XXH_PRIME32_1; \
} while (0)
-#define XXH_PROCESS4 do { \
- h32 += XXH_get32bits(ptr) * XXH_PRIME32_3; \
- ptr += 4; \
- h32 = XXH_rotl32(h32, 17) * XXH_PRIME32_4; \
+#define XXH_PROCESS4 do { \
+ hash += XXH_get32bits(ptr) * XXH_PRIME32_3; \
+ ptr += 4; \
+ hash = XXH_rotl32(hash, 17) * XXH_PRIME32_4; \
} while (0)
if (ptr==NULL) XXH_ASSERT(len == 0);
@@ -2017,49 +2693,49 @@ XXH32_finalize(xxh_u32 h32, const xxh_u8* ptr, size_t len, XXH_alignment align)
XXH_PROCESS1;
--len;
}
- return XXH32_avalanche(h32);
+ return XXH32_avalanche(hash);
} else {
switch(len&15) /* or switch(bEnd - p) */ {
case 12: XXH_PROCESS4;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 8: XXH_PROCESS4;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 4: XXH_PROCESS4;
- return XXH32_avalanche(h32);
+ return XXH32_avalanche(hash);
case 13: XXH_PROCESS4;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 9: XXH_PROCESS4;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 5: XXH_PROCESS4;
XXH_PROCESS1;
- return XXH32_avalanche(h32);
+ return XXH32_avalanche(hash);
case 14: XXH_PROCESS4;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 10: XXH_PROCESS4;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 6: XXH_PROCESS4;
XXH_PROCESS1;
XXH_PROCESS1;
- return XXH32_avalanche(h32);
+ return XXH32_avalanche(hash);
case 15: XXH_PROCESS4;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 11: XXH_PROCESS4;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 7: XXH_PROCESS4;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 3: XXH_PROCESS1;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 2: XXH_PROCESS1;
- XXH_FALLTHROUGH;
+ XXH_FALLTHROUGH; /* fallthrough */
case 1: XXH_PROCESS1;
- XXH_FALLTHROUGH;
- case 0: return XXH32_avalanche(h32);
+ XXH_FALLTHROUGH; /* fallthrough */
+ case 0: return XXH32_avalanche(hash);
}
XXH_ASSERT(0);
- return h32; /* reaching this point is deemed impossible */
+ return hash; /* reaching this point is deemed impossible */
}
}
@@ -2079,7 +2755,7 @@ XXH32_finalize(xxh_u32 h32, const xxh_u8* ptr, size_t len, XXH_alignment align)
* @param align Whether @p input is aligned.
* @return The calculated hash.
*/
-XXH_FORCE_INLINE xxh_u32
+XXH_FORCE_INLINE XXH_PUREF xxh_u32
XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment align)
{
xxh_u32 h32;
@@ -2112,10 +2788,10 @@ XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment
return XXH32_finalize(h32, input, len&15, align);
}
-/*! @ingroup xxh32_family */
+/*! @ingroup XXH32_family */
XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_hash_t seed)
{
-#if 0
+#if !defined(XXH_NO_STREAM) && XXH_SIZE_OPT >= 2
/* Simple version, good for code maintenance, but unfortunately slow for small inputs */
XXH32_state_t state;
XXH32_reset(&state, seed);
@@ -2134,42 +2810,39 @@ XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_hash_t s
/******* Hash streaming *******/
-/*!
- * @ingroup xxh32_family
- */
+#ifndef XXH_NO_STREAM
+/*! @ingroup XXH32_family */
XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void)
{
return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t));
}
-/*! @ingroup xxh32_family */
+/*! @ingroup XXH32_family */
XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr)
{
XXH_free(statePtr);
return XXH_OK;
}
-/*! @ingroup xxh32_family */
+/*! @ingroup XXH32_family */
XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32_state_t* srcState)
{
XXH_memcpy(dstState, srcState, sizeof(*dstState));
}
-/*! @ingroup xxh32_family */
+/*! @ingroup XXH32_family */
XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, XXH32_hash_t seed)
{
- XXH32_state_t state; /* using a local state to memcpy() in order to avoid strict-aliasing warnings */
- memset(&state, 0, sizeof(state));
- state.v[0] = seed + XXH_PRIME32_1 + XXH_PRIME32_2;
- state.v[1] = seed + XXH_PRIME32_2;
- state.v[2] = seed + 0;
- state.v[3] = seed - XXH_PRIME32_1;
- /* do not write into reserved, planned to be removed in a future version */
- XXH_memcpy(statePtr, &state, sizeof(state) - sizeof(state.reserved));
+ XXH_ASSERT(statePtr != NULL);
+ memset(statePtr, 0, sizeof(*statePtr));
+ statePtr->v[0] = seed + XXH_PRIME32_1 + XXH_PRIME32_2;
+ statePtr->v[1] = seed + XXH_PRIME32_2;
+ statePtr->v[2] = seed + 0;
+ statePtr->v[3] = seed - XXH_PRIME32_1;
return XXH_OK;
}
-/*! @ingroup xxh32_family */
+/*! @ingroup XXH32_family */
XXH_PUBLIC_API XXH_errorcode
XXH32_update(XXH32_state_t* state, const void* input, size_t len)
{
@@ -2224,7 +2897,7 @@ XXH32_update(XXH32_state_t* state, const void* input, size_t len)
}
-/*! @ingroup xxh32_family */
+/*! @ingroup XXH32_family */
XXH_PUBLIC_API XXH32_hash_t XXH32_digest(const XXH32_state_t* state)
{
xxh_u32 h32;
@@ -2242,12 +2915,12 @@ XXH_PUBLIC_API XXH32_hash_t XXH32_digest(const XXH32_state_t* state)
return XXH32_finalize(h32, (const xxh_u8*)state->mem32, state->memsize, XXH_aligned);
}
-
+#endif /* !XXH_NO_STREAM */
/******* Canonical representation *******/
/*!
- * @ingroup xxh32_family
+ * @ingroup XXH32_family
* The default return values from XXH functions are unsigned 32 and 64 bit
* integers.
*
@@ -2266,7 +2939,7 @@ XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t
if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap32(hash);
XXH_memcpy(dst, &hash, sizeof(*dst));
}
-/*! @ingroup xxh32_family */
+/*! @ingroup XXH32_family */
XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src)
{
return XXH_readBE32(src);
@@ -2307,25 +2980,26 @@ static xxh_u64 XXH_read64(const void* memPtr)
#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))
/*
- * __pack instructions are safer, but compiler specific, hence potentially
- * problematic for some compilers.
- *
- * Currently only defined for GCC and ICC.
+ * __attribute__((aligned(1))) is supported by gcc and clang. Originally the
+ * documentation claimed that it only increased the alignment, but actually it
+ * can decrease it on gcc, clang, and icc:
+ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502,
+ * https://gcc.godbolt.org/z/xYez1j67Y.
*/
#ifdef XXH_OLD_NAMES
typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((packed)) unalign64;
#endif
static xxh_u64 XXH_read64(const void* ptr)
{
- typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((packed)) xxh_unalign64;
- return ((const xxh_unalign64*)ptr)->u64;
+ typedef __attribute__((aligned(1))) xxh_u64 xxh_unalign64;
+ return *((const xxh_unalign64*)ptr);
}
#else
/*
* Portable and safe solution. Generally efficient.
- * see: http://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html
+ * see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html
*/
static xxh_u64 XXH_read64(const void* memPtr)
{
@@ -2409,8 +3083,10 @@ XXH_readLE64_align(const void* ptr, XXH_alignment align)
/******* xxh64 *******/
/*!
* @}
- * @defgroup xxh64_impl XXH64 implementation
+ * @defgroup XXH64_impl XXH64 implementation
* @ingroup impl
+ *
+ * Details on the XXH64 implementation.
* @{
*/
/* #define rather that static const, to be used as initializers */
@@ -2428,6 +3104,7 @@ XXH_readLE64_align(const void* ptr, XXH_alignment align)
# define PRIME64_5 XXH_PRIME64_5
#endif
+/*! @copydoc XXH32_round */
static xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input)
{
acc += input * XXH_PRIME64_2;
@@ -2444,43 +3121,59 @@ static xxh_u64 XXH64_mergeRound(xxh_u64 acc, xxh_u64 val)
return acc;
}
-static xxh_u64 XXH64_avalanche(xxh_u64 h64)
+/*! @copydoc XXH32_avalanche */
+static xxh_u64 XXH64_avalanche(xxh_u64 hash)
{
- h64 ^= h64 >> 33;
- h64 *= XXH_PRIME64_2;
- h64 ^= h64 >> 29;
- h64 *= XXH_PRIME64_3;
- h64 ^= h64 >> 32;
- return h64;
+ hash ^= hash >> 33;
+ hash *= XXH_PRIME64_2;
+ hash ^= hash >> 29;
+ hash *= XXH_PRIME64_3;
+ hash ^= hash >> 32;
+ return hash;
}
#define XXH_get64bits(p) XXH_readLE64_align(p, align)
-static xxh_u64
-XXH64_finalize(xxh_u64 h64, const xxh_u8* ptr, size_t len, XXH_alignment align)
+/*!
+ * @internal
+ * @brief Processes the last 0-31 bytes of @p ptr.
+ *
+ * There may be up to 31 bytes remaining to consume from the input.
+ * This final stage will digest them to ensure that all input bytes are present
+ * in the final mix.
+ *
+ * @param hash The hash to finalize.
+ * @param ptr The pointer to the remaining input.
+ * @param len The remaining length, modulo 32.
+ * @param align Whether @p ptr is aligned.
+ * @return The finalized hash
+ * @see XXH32_finalize().
+ */
+static XXH_PUREF xxh_u64
+XXH64_finalize(xxh_u64 hash, const xxh_u8* ptr, size_t len, XXH_alignment align)
{
if (ptr==NULL) XXH_ASSERT(len == 0);
len &= 31;
while (len >= 8) {
xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr));
ptr += 8;
- h64 ^= k1;
- h64 = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;
+ hash ^= k1;
+ hash = XXH_rotl64(hash,27) * XXH_PRIME64_1 + XXH_PRIME64_4;
len -= 8;
}
if (len >= 4) {
- h64 ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1;
+ hash ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1;
ptr += 4;
- h64 = XXH_rotl64(h64, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;
+ hash = XXH_rotl64(hash, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;
len -= 4;
}
while (len > 0) {
- h64 ^= (*ptr++) * XXH_PRIME64_5;
- h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;
+ hash ^= (*ptr++) * XXH_PRIME64_5;
+ hash = XXH_rotl64(hash, 11) * XXH_PRIME64_1;
--len;
}
- return XXH64_avalanche(h64);
+ return XXH64_avalanche(hash);
}
#ifdef XXH_OLD_NAMES
@@ -2493,7 +3186,15 @@ XXH64_finalize(xxh_u64 h64, const xxh_u8* ptr, size_t len, XXH_alignment align)
# undef XXH_PROCESS8_64
#endif
-XXH_FORCE_INLINE xxh_u64
+/*!
+ * @internal
+ * @brief The implementation for @ref XXH64().
+ *
+ * @param input , len , seed Directly passed from @ref XXH64().
+ * @param align Whether @p input is aligned.
+ * @return The calculated hash.
+ */
+XXH_FORCE_INLINE XXH_PUREF xxh_u64
XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align)
{
xxh_u64 h64;
@@ -2530,10 +3231,10 @@ XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment
}
-/*! @ingroup xxh64_family */
-XXH_PUBLIC_API XXH64_hash_t XXH64 (const void* input, size_t len, XXH64_hash_t seed)
+/*! @ingroup XXH64_family */
+XXH_PUBLIC_API XXH64_hash_t XXH64 (XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)
{
-#if 0
+#if !defined(XXH_NO_STREAM) && XXH_SIZE_OPT >= 2
/* Simple version, good for code maintenance, but unfortunately slow for small inputs */
XXH64_state_t state;
XXH64_reset(&state, seed);
@@ -2551,42 +3252,40 @@ XXH_PUBLIC_API XXH64_hash_t XXH64 (const void* input, size_t len, XXH64_hash_t s
}
/******* Hash Streaming *******/
-
-/*! @ingroup xxh64_family*/
+#ifndef XXH_NO_STREAM
+/*! @ingroup XXH64_family*/
XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void)
{
return (XXH64_state_t*)XXH_malloc(sizeof(XXH64_state_t));
}
-/*! @ingroup xxh64_family */
+/*! @ingroup XXH64_family */
XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr)
{
XXH_free(statePtr);
return XXH_OK;
}
-/*! @ingroup xxh64_family */
-XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t* dstState, const XXH64_state_t* srcState)
+/*! @ingroup XXH64_family */
+XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dstState, const XXH64_state_t* srcState)
{
XXH_memcpy(dstState, srcState, sizeof(*dstState));
}
-/*! @ingroup xxh64_family */
-XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH64_state_t* statePtr, XXH64_hash_t seed)
+/*! @ingroup XXH64_family */
+XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH_NOESCAPE XXH64_state_t* statePtr, XXH64_hash_t seed)
{
- XXH64_state_t state; /* use a local state to memcpy() in order to avoid strict-aliasing warnings */
- memset(&state, 0, sizeof(state));
- state.v[0] = seed + XXH_PRIME64_1 + XXH_PRIME64_2;
- state.v[1] = seed + XXH_PRIME64_2;
- state.v[2] = seed + 0;
- state.v[3] = seed - XXH_PRIME64_1;
- /* do not write into reserved64, might be removed in a future version */
- XXH_memcpy(statePtr, &state, sizeof(state) - sizeof(state.reserved64));
+ XXH_ASSERT(statePtr != NULL);
+ memset(statePtr, 0, sizeof(*statePtr));
+ statePtr->v[0] = seed + XXH_PRIME64_1 + XXH_PRIME64_2;
+ statePtr->v[1] = seed + XXH_PRIME64_2;
+ statePtr->v[2] = seed + 0;
+ statePtr->v[3] = seed - XXH_PRIME64_1;
return XXH_OK;
}
-/*! @ingroup xxh64_family */
+/*! @ingroup XXH64_family */
XXH_PUBLIC_API XXH_errorcode
-XXH64_update (XXH64_state_t* state, const void* input, size_t len)
+XXH64_update (XXH_NOESCAPE XXH64_state_t* state, XXH_NOESCAPE const void* input, size_t len)
{
if (input==NULL) {
XXH_ASSERT(len == 0);
@@ -2636,8 +3335,8 @@ XXH64_update (XXH64_state_t* state, const void* input, size_t len)
}
-/*! @ingroup xxh64_family */
-XXH_PUBLIC_API XXH64_hash_t XXH64_digest(const XXH64_state_t* state)
+/*! @ingroup XXH64_family */
+XXH_PUBLIC_API XXH64_hash_t XXH64_digest(XXH_NOESCAPE const XXH64_state_t* state)
{
xxh_u64 h64;
@@ -2655,20 +3354,20 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_digest(const XXH64_state_t* state)
return XXH64_finalize(h64, (const xxh_u8*)state->mem64, (size_t)state->total_len, XXH_aligned);
}
-
+#endif /* !XXH_NO_STREAM */
/******* Canonical representation *******/
-/*! @ingroup xxh64_family */
-XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash)
+/*! @ingroup XXH64_family */
+XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical_t* dst, XXH64_hash_t hash)
{
XXH_STATIC_ASSERT(sizeof(XXH64_canonical_t) == sizeof(XXH64_hash_t));
if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash);
XXH_memcpy(dst, &hash, sizeof(*dst));
}
-/*! @ingroup xxh64_family */
-XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src)
+/*! @ingroup XXH64_family */
+XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src)
{
return XXH_readBE64(src);
}
@@ -2681,7 +3380,7 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src
************************************************************************ */
/*!
* @}
- * @defgroup xxh3_impl XXH3 implementation
+ * @defgroup XXH3_impl XXH3 implementation
* @ingroup impl
* @{
*/
@@ -2689,11 +3388,19 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src
/* === Compiler specifics === */
#if ((defined(sun) || defined(__sun)) && __cplusplus) /* Solaris includes __STDC_VERSION__ with C++. Tested with GCC 5.5 */
-# define XXH_RESTRICT /* disable */
+# define XXH_RESTRICT /* disable */
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */
# define XXH_RESTRICT restrict
+#elif (defined (__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) \
+ || (defined (__clang__)) \
+ || (defined (_MSC_VER) && (_MSC_VER >= 1400)) \
+ || (defined (__INTEL_COMPILER) && (__INTEL_COMPILER >= 1300))
+/*
+ * There are a LOT more compilers that recognize __restrict but this
+ * covers the major ones.
+ */
+# define XXH_RESTRICT __restrict
#else
-/* Note: it might be useful to define __restrict or __restrict__ for some C++ compilers */
# define XXH_RESTRICT /* disable */
#endif
@@ -2707,17 +3414,33 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src
# define XXH_unlikely(x) (x)
#endif
-#if defined(__GNUC__)
-# if defined(__AVX2__)
-# include <immintrin.h>
-# elif defined(__SSE2__)
-# include <emmintrin.h>
-# elif defined(__ARM_NEON__) || defined(__ARM_NEON)
+#ifndef XXH_HAS_INCLUDE
+# ifdef __has_include
+# define XXH_HAS_INCLUDE(x) __has_include(x)
+# else
+# define XXH_HAS_INCLUDE(x) 0
+# endif
+#endif
+
+#if defined(__GNUC__) || defined(__clang__)
+# if defined(__ARM_FEATURE_SVE)
+# include <arm_sve.h>
+# endif
+# if defined(__ARM_NEON__) || defined(__ARM_NEON) \
+ || (defined(_M_ARM) && _M_ARM >= 7) \
+ || defined(_M_ARM64) || defined(_M_ARM64EC) \
+ || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE(<arm_neon.h>)) /* WASM SIMD128 via SIMDe */
# define inline __inline__ /* circumvent a clang bug */
# include <arm_neon.h>
# undef inline
+# elif defined(__AVX2__)
+# include <immintrin.h>
+# elif defined(__SSE2__)
+# include <emmintrin.h>
# endif
-#elif defined(_MSC_VER)
+#endif
+
+#if defined(_MSC_VER)
# include <intrin.h>
#endif
@@ -2817,7 +3540,7 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src
* Note that these are actually implemented as macros.
*
* If this is not defined, it is detected automatically.
- * @ref XXH_X86DISPATCH overrides this.
+ * internal macro XXH_X86DISPATCH overrides this.
*/
enum XXH_VECTOR_TYPE /* fake enum */ {
XXH_SCALAR = 0, /*!< Portable scalar version */
@@ -2829,14 +3552,19 @@ enum XXH_VECTOR_TYPE /* fake enum */ {
*/
XXH_AVX2 = 2, /*!< AVX2 for Haswell and Bulldozer */
XXH_AVX512 = 3, /*!< AVX512 for Skylake and Icelake */
- XXH_NEON = 4, /*!< NEON for most ARMv7-A and all AArch64 */
+ XXH_NEON = 4, /*!<
+ * NEON for most ARMv7-A, all AArch64, and WASM SIMD128
+ * via the SIMDeverywhere polyfill provided with the
+ * Emscripten SDK.
+ */
XXH_VSX = 5, /*!< VSX and ZVector for POWER8/z13 (64-bit) */
+ XXH_SVE = 6, /*!< SVE for some ARMv8-A and ARMv9-A */
};
/*!
* @ingroup tuning
* @brief Selects the minimum alignment for XXH3's accumulators.
*
- * When using SIMD, this should match the alignment reqired for said vector
+ * When using SIMD, this should match the alignment required for said vector
* type, so, for example, 32 for AVX2.
*
* Default: Auto detected.
@@ -2852,23 +3580,27 @@ enum XXH_VECTOR_TYPE /* fake enum */ {
# define XXH_AVX512 3
# define XXH_NEON 4
# define XXH_VSX 5
+# define XXH_SVE 6
#endif
#ifndef XXH_VECTOR /* can be defined on command line */
-# if defined(__AVX512F__)
-# define XXH_VECTOR XXH_AVX512
-# elif defined(__AVX2__)
-# define XXH_VECTOR XXH_AVX2
-# elif defined(__SSE2__) || defined(_M_AMD64) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2))
-# define XXH_VECTOR XXH_SSE2
+# if defined(__ARM_FEATURE_SVE)
+# define XXH_VECTOR XXH_SVE
# elif ( \
defined(__ARM_NEON__) || defined(__ARM_NEON) /* gcc */ \
- || defined(_M_ARM64) || defined(_M_ARM_ARMV7VE) /* msvc */ \
+ || defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) /* msvc */ \
+ || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE(<arm_neon.h>)) /* wasm simd128 via SIMDe */ \
) && ( \
defined(_WIN32) || defined(__LITTLE_ENDIAN__) /* little endian only */ \
|| (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \
)
# define XXH_VECTOR XXH_NEON
+# elif defined(__AVX512F__)
+# define XXH_VECTOR XXH_AVX512
+# elif defined(__AVX2__)
+# define XXH_VECTOR XXH_AVX2
+# elif defined(__SSE2__) || defined(_M_AMD64) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2))
+# define XXH_VECTOR XXH_SSE2
# elif (defined(__PPC64__) && defined(__POWER8_VECTOR__)) \
|| (defined(__s390x__) && defined(__VEC__)) \
&& defined(__GNUC__) /* TODO: IBM XL */
@@ -2878,6 +3610,17 @@ enum XXH_VECTOR_TYPE /* fake enum */ {
# endif
#endif
+/* __ARM_FEATURE_SVE is only supported by GCC & Clang. */
+#if (XXH_VECTOR == XXH_SVE) && !defined(__ARM_FEATURE_SVE)
+# ifdef _MSC_VER
+# pragma warning(once : 4606)
+# else
+# warning "__ARM_FEATURE_SVE isn't supported. Use SCALAR instead."
+# endif
+# undef XXH_VECTOR
+# define XXH_VECTOR XXH_SCALAR
+#endif
+
/*
* Controls the alignment of the accumulator,
* for compatibility with aligned vector loads, which are usually faster.
@@ -2897,16 +3640,26 @@ enum XXH_VECTOR_TYPE /* fake enum */ {
# define XXH_ACC_ALIGN 16
# elif XXH_VECTOR == XXH_AVX512 /* avx512 */
# define XXH_ACC_ALIGN 64
+# elif XXH_VECTOR == XXH_SVE /* sve */
+# define XXH_ACC_ALIGN 64
# endif
#endif
#if defined(XXH_X86DISPATCH) || XXH_VECTOR == XXH_SSE2 \
|| XXH_VECTOR == XXH_AVX2 || XXH_VECTOR == XXH_AVX512
# define XXH_SEC_ALIGN XXH_ACC_ALIGN
+#elif XXH_VECTOR == XXH_SVE
+# define XXH_SEC_ALIGN XXH_ACC_ALIGN
#else
# define XXH_SEC_ALIGN 8
#endif
+#if defined(__GNUC__) || defined(__clang__)
+# define XXH_ALIASING __attribute__((may_alias))
+#else
+# define XXH_ALIASING /* nothing */
+#endif
+
/*
* UGLY HACK:
* GCC usually generates the best code with -O3 for xxHash.
@@ -2930,111 +3683,130 @@ enum XXH_VECTOR_TYPE /* fake enum */ {
*/
#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \
&& defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \
- && defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__) /* respect -O0 and -Os */
+ && defined(__OPTIMIZE__) && XXH_SIZE_OPT <= 0 /* respect -O0 and -Os */
# pragma GCC push_options
# pragma GCC optimize("-O2")
#endif
-
#if XXH_VECTOR == XXH_NEON
+
/*
- * NEON's setup for vmlal_u32 is a little more complicated than it is on
- * SSE2, AVX2, and VSX.
- *
- * While PMULUDQ and VMULEUW both perform a mask, VMLAL.U32 performs an upcast.
+ * UGLY HACK: While AArch64 GCC on Linux does not seem to care, on macOS, GCC -O3
+ * optimizes out the entire hashLong loop because of the aliasing violation.
*
- * To do the same operation, the 128-bit 'Q' register needs to be split into
- * two 64-bit 'D' registers, performing this operation::
- *
- * [ a | b ]
- * | '---------. .--------' |
- * | x |
- * | .---------' '--------. |
- * [ a & 0xFFFFFFFF | b & 0xFFFFFFFF ],[ a >> 32 | b >> 32 ]
- *
- * Due to significant changes in aarch64, the fastest method for aarch64 is
- * completely different than the fastest method for ARMv7-A.
- *
- * ARMv7-A treats D registers as unions overlaying Q registers, so modifying
- * D11 will modify the high half of Q5. This is similar to how modifying AH
- * will only affect bits 8-15 of AX on x86.
- *
- * VZIP takes two registers, and puts even lanes in one register and odd lanes
- * in the other.
+ * However, GCC is also inefficient at load-store optimization with vld1q/vst1q,
+ * so the only option is to mark it as aliasing.
+ */
+typedef uint64x2_t xxh_aliasing_uint64x2_t XXH_ALIASING;
+
+/*!
+ * @internal
+ * @brief `vld1q_u64` but faster and alignment-safe.
*
- * On ARMv7-A, this strangely modifies both parameters in place instead of
- * taking the usual 3-operand form.
+ * On AArch64, unaligned access is always safe, but on ARMv7-a, it is only
+ * *conditionally* safe (`vld1` has an alignment bit like `movdq[ua]` in x86).
*
- * Therefore, if we want to do this, we can simply use a D-form VZIP.32 on the
- * lower and upper halves of the Q register to end up with the high and low
- * halves where we want - all in one instruction.
+ * GCC for AArch64 sees `vld1q_u8` as an intrinsic instead of a load, so it
+ * prohibits load-store optimizations. Therefore, a direct dereference is used.
*
- * vzip.32 d10, d11 @ d10 = { d10[0], d11[0] }; d11 = { d10[1], d11[1] }
+ * Otherwise, `vld1q_u8` is used with `vreinterpretq_u8_u64` to do a safe
+ * unaligned load.
+ */
+#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__)
+XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr) /* silence -Wcast-align */
+{
+ return *(xxh_aliasing_uint64x2_t const *)ptr;
+}
+#else
+XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr)
+{
+ return vreinterpretq_u64_u8(vld1q_u8((uint8_t const*)ptr));
+}
+#endif
+
+/*!
+ * @internal
+ * @brief `vmlal_u32` on low and high halves of a vector.
*
- * Unfortunately we need inline assembly for this: Instructions modifying two
- * registers at once is not possible in GCC or Clang's IR, and they have to
- * create a copy.
+ * This is a workaround for AArch64 GCC < 11 which implemented arm_neon.h with
+ * inline assembly and were therefore incapable of merging the `vget_{low, high}_u32`
+ * with `vmlal_u32`.
+ */
+#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 11
+XXH_FORCE_INLINE uint64x2_t
+XXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
+{
+ /* Inline assembly is the only way */
+ __asm__("umlal %0.2d, %1.2s, %2.2s" : "+w" (acc) : "w" (lhs), "w" (rhs));
+ return acc;
+}
+XXH_FORCE_INLINE uint64x2_t
+XXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
+{
+ /* This intrinsic works as expected */
+ return vmlal_high_u32(acc, lhs, rhs);
+}
+#else
+/* Portable intrinsic versions */
+XXH_FORCE_INLINE uint64x2_t
+XXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
+{
+ return vmlal_u32(acc, vget_low_u32(lhs), vget_low_u32(rhs));
+}
+/*! @copydoc XXH_vmlal_low_u32
+ * Assume the compiler converts this to vmlal_high_u32 on aarch64 */
+XXH_FORCE_INLINE uint64x2_t
+XXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
+{
+ return vmlal_u32(acc, vget_high_u32(lhs), vget_high_u32(rhs));
+}
+#endif
+
+/*!
+ * @ingroup tuning
+ * @brief Controls the NEON to scalar ratio for XXH3
*
- * aarch64 requires a different approach.
+ * This can be set to 2, 4, 6, or 8.
*
- * In order to make it easier to write a decent compiler for aarch64, many
- * quirks were removed, such as conditional execution.
+ * ARM Cortex CPUs are _very_ sensitive to how their pipelines are used.
*
- * NEON was also affected by this.
+ * For example, the Cortex-A73 can dispatch 3 micro-ops per cycle, but only 2 of those
+ * can be NEON. If you are only using NEON instructions, you are only using 2/3 of the CPU
+ * bandwidth.
*
- * aarch64 cannot access the high bits of a Q-form register, and writes to a
- * D-form register zero the high bits, similar to how writes to W-form scalar
- * registers (or DWORD registers on x86_64) work.
+ * This is even more noticeable on the more advanced cores like the Cortex-A76 which
+ * can dispatch 8 micro-ops per cycle, but still only 2 NEON micro-ops at once.
*
- * The formerly free vget_high intrinsics now require a vext (with a few
- * exceptions)
+ * Therefore, to make the most out of the pipeline, it is beneficial to run 6 NEON lanes
+ * and 2 scalar lanes, which is chosen by default.
*
- * Additionally, VZIP was replaced by ZIP1 and ZIP2, which are the equivalent
- * of PUNPCKL* and PUNPCKH* in SSE, respectively, in order to only modify one
- * operand.
+ * This does not apply to Apple processors or 32-bit processors, which run better with
+ * full NEON. These will default to 8. Additionally, size-optimized builds run 8 lanes.
*
- * The equivalent of the VZIP.32 on the lower and upper halves would be this
- * mess:
+ * This change benefits CPUs with large micro-op buffers without negatively affecting
+ * most other CPUs:
*
- * ext v2.4s, v0.4s, v0.4s, #2 // v2 = { v0[2], v0[3], v0[0], v0[1] }
- * zip1 v1.2s, v0.2s, v2.2s // v1 = { v0[0], v2[0] }
- * zip2 v0.2s, v0.2s, v1.2s // v0 = { v0[1], v2[1] }
+ * | Chipset | Dispatch type | NEON only | 6:2 hybrid | Diff. |
+ * |:----------------------|:--------------------|----------:|-----------:|------:|
+ * | Snapdragon 730 (A76) | 2 NEON/8 micro-ops | 8.8 GB/s | 10.1 GB/s | ~16% |
+ * | Snapdragon 835 (A73) | 2 NEON/3 micro-ops | 5.1 GB/s | 5.3 GB/s | ~5% |
+ * | Marvell PXA1928 (A53) | In-order dual-issue | 1.9 GB/s | 1.9 GB/s | 0% |
+ * | Apple M1 | 4 NEON/8 micro-ops | 37.3 GB/s | 36.1 GB/s | ~-3% |
*
- * Instead, we use a literal downcast, vmovn_u64 (XTN), and vshrn_n_u64 (SHRN):
+ * It also seems to fix some bad codegen on GCC, making it almost as fast as clang.
*
- * shrn v1.2s, v0.2d, #32 // v1 = (uint32x2_t)(v0 >> 32);
- * xtn v0.2s, v0.2d // v0 = (uint32x2_t)(v0 & 0xFFFFFFFF);
+ * When using WASM SIMD128, if this is 2 or 6, SIMDe will scalarize 2 of the lanes meaning
+ * it effectively becomes worse 4.
*
- * This is available on ARMv7-A, but is less efficient than a single VZIP.32.
+ * @see XXH3_accumulate_512_neon()
*/
-
-/*!
- * Function-like macro:
- * void XXH_SPLIT_IN_PLACE(uint64x2_t &in, uint32x2_t &outLo, uint32x2_t &outHi)
- * {
- * outLo = (uint32x2_t)(in & 0xFFFFFFFF);
- * outHi = (uint32x2_t)(in >> 32);
- * in = UNDEFINED;
- * }
- */
-# if !defined(XXH_NO_VZIP_HACK) /* define to disable */ \
- && defined(__GNUC__) \
- && !defined(__aarch64__) && !defined(__arm64__) && !defined(_M_ARM64)
-# define XXH_SPLIT_IN_PLACE(in, outLo, outHi) \
- do { \
- /* Undocumented GCC/Clang operand modifier: %e0 = lower D half, %f0 = upper D half */ \
- /* https://github.com/gcc-mirror/gcc/blob/38cf91e5/gcc/config/arm/arm.c#L22486 */ \
- /* https://github.com/llvm-mirror/llvm/blob/2c4ca683/lib/Target/ARM/ARMAsmPrinter.cpp#L399 */ \
- __asm__("vzip.32 %e0, %f0" : "+w" (in)); \
- (outLo) = vget_low_u32 (vreinterpretq_u32_u64(in)); \
- (outHi) = vget_high_u32(vreinterpretq_u32_u64(in)); \
- } while (0)
-# else
-# define XXH_SPLIT_IN_PLACE(in, outLo, outHi) \
- do { \
- (outLo) = vmovn_u64 (in); \
- (outHi) = vshrn_n_u64 ((in), 32); \
- } while (0)
+# ifndef XXH3_NEON_LANES
+# if (defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64) || defined(_M_ARM64EC)) \
+ && !defined(__APPLE__) && XXH_SIZE_OPT <= 0
+# define XXH3_NEON_LANES 6
+# else
+# define XXH3_NEON_LANES XXH_ACC_NB
+# endif
# endif
#endif /* XXH_VECTOR == XXH_NEON */
@@ -3047,27 +3819,42 @@ enum XXH_VECTOR_TYPE /* fake enum */ {
* inconsistent intrinsics, spotty coverage, and multiple endiannesses.
*/
#if XXH_VECTOR == XXH_VSX
+/* Annoyingly, these headers _may_ define three macros: `bool`, `vector`,
+ * and `pixel`. This is a problem for obvious reasons.
+ *
+ * These keywords are unnecessary; the spec literally says they are
+ * equivalent to `__bool`, `__vector`, and `__pixel` and may be undef'd
+ * after including the header.
+ *
+ * We use pragma push_macro/pop_macro to keep the namespace clean. */
+# pragma push_macro("bool")
+# pragma push_macro("vector")
+# pragma push_macro("pixel")
+/* silence potential macro redefined warnings */
+# undef bool
+# undef vector
+# undef pixel
+
# if defined(__s390x__)
# include <s390intrin.h>
# else
-/* gcc's altivec.h can have the unwanted consequence to unconditionally
- * #define bool, vector, and pixel keywords,
- * with bad consequences for programs already using these keywords for other purposes.
- * The paragraph defining these macros is skipped when __APPLE_ALTIVEC__ is defined.
- * __APPLE_ALTIVEC__ is _generally_ defined automatically by the compiler,
- * but it seems that, in some cases, it isn't.
- * Force the build macro to be defined, so that keywords are not altered.
- */
-# if defined(__GNUC__) && !defined(__APPLE_ALTIVEC__)
-# define __APPLE_ALTIVEC__
-# endif
# include <altivec.h>
# endif
+/* Restore the original macro values, if applicable. */
+# pragma pop_macro("pixel")
+# pragma pop_macro("vector")
+# pragma pop_macro("bool")
+
typedef __vector unsigned long long xxh_u64x2;
typedef __vector unsigned char xxh_u8x16;
typedef __vector unsigned xxh_u32x4;
+/*
+ * UGLY HACK: Similar to aarch64 macOS GCC, s390x GCC has the same aliasing issue.
+ */
+typedef xxh_u64x2 xxh_aliasing_u64x2 XXH_ALIASING;
+
# ifndef XXH_VSX_BE
# if defined(__BIG_ENDIAN__) \
|| (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
@@ -3119,8 +3906,9 @@ XXH_FORCE_INLINE xxh_u64x2 XXH_vec_loadu(const void *ptr)
/* s390x is always big endian, no issue on this platform */
# define XXH_vec_mulo vec_mulo
# define XXH_vec_mule vec_mule
-# elif defined(__clang__) && XXH_HAS_BUILTIN(__builtin_altivec_vmuleuw)
+# elif defined(__clang__) && XXH_HAS_BUILTIN(__builtin_altivec_vmuleuw) && !defined(__ibmxl__)
/* Clang has a better way to control this, we can just use the builtin which doesn't swap. */
+ /* The IBM XL Compiler (which defined __clang__) only implements the vec_* operations */
# define XXH_vec_mulo __builtin_altivec_vmulouw
# define XXH_vec_mule __builtin_altivec_vmuleuw
# else
@@ -3141,13 +3929,28 @@ XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mule(xxh_u32x4 a, xxh_u32x4 b)
# endif /* XXH_vec_mulo, XXH_vec_mule */
#endif /* XXH_VECTOR == XXH_VSX */
+#if XXH_VECTOR == XXH_SVE
+#define ACCRND(acc, offset) \
+do { \
+ svuint64_t input_vec = svld1_u64(mask, xinput + offset); \
+ svuint64_t secret_vec = svld1_u64(mask, xsecret + offset); \
+ svuint64_t mixed = sveor_u64_x(mask, secret_vec, input_vec); \
+ svuint64_t swapped = svtbl_u64(input_vec, kSwap); \
+ svuint64_t mixed_lo = svextw_u64_x(mask, mixed); \
+ svuint64_t mixed_hi = svlsr_n_u64_x(mask, mixed, 32); \
+ svuint64_t mul = svmad_u64_x(mask, mixed_lo, mixed_hi, swapped); \
+ acc = svadd_u64_x(mask, acc, mul); \
+} while (0)
+#endif /* XXH_VECTOR == XXH_SVE */
/* prefetch
* can be disabled, by declaring XXH_NO_PREFETCH build macro */
#if defined(XXH_NO_PREFETCH)
# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */
#else
-# if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) /* _mm_prefetch() not defined outside of x86/x64 */
+# if XXH_SIZE_OPT >= 1
+# define XXH_PREFETCH(ptr) (void)(ptr)
+# elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) /* _mm_prefetch() not defined outside of x86/x64 */
# include <mmintrin.h> /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */
# define XXH_PREFETCH(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0)
# elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) )
@@ -3184,6 +3987,8 @@ XXH_ALIGN(64) static const xxh_u8 XXH3_kSecret[XXH_SECRET_DEFAULT_SIZE] = {
0x45, 0xcb, 0x3a, 0x8f, 0x95, 0x16, 0x04, 0x28, 0xaf, 0xd7, 0xfb, 0xca, 0xbb, 0x4b, 0x40, 0x7e,
};
+static const xxh_u64 PRIME_MX1 = 0x165667919E3779F9ULL; /*!< 0b0001011001010110011001111001000110011110001101110111100111111001 */
+static const xxh_u64 PRIME_MX2 = 0x9FB21C651E98DF25ULL; /*!< 0b1001111110110010000111000110010100011110100110001101111100100101 */
#ifdef XXH_OLD_NAMES
# define kSecret XXH3_kSecret
@@ -3212,7 +4017,6 @@ XXH_mult32to64(xxh_u64 x, xxh_u64 y)
return (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF);
}
#elif defined(_MSC_VER) && defined(_M_IX86)
-# include <intrin.h>
# define XXH_mult32to64(x, y) __emulu((unsigned)(x), (unsigned)(y))
#else
/*
@@ -3252,7 +4056,7 @@ XXH_mult64to128(xxh_u64 lhs, xxh_u64 rhs)
* In that case it is best to use the portable one.
* https://github.com/Cyan4973/xxHash/issues/211#issuecomment-515575677
*/
-#if defined(__GNUC__) && !defined(__wasm__) \
+#if (defined(__GNUC__) || defined(__clang__)) && !defined(__wasm__) \
&& defined(__SIZEOF_INT128__) \
|| (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 128)
@@ -3269,7 +4073,7 @@ XXH_mult64to128(xxh_u64 lhs, xxh_u64 rhs)
*
* This compiles to single operand MUL on x64.
*/
-#elif defined(_M_X64) || defined(_M_IA64)
+#elif (defined(_M_X64) || defined(_M_IA64)) && !defined(_M_ARM64EC)
#ifndef _MSC_VER
# pragma intrinsic(_umul128)
@@ -3286,7 +4090,7 @@ XXH_mult64to128(xxh_u64 lhs, xxh_u64 rhs)
*
* This compiles to the same MUL + UMULH as GCC/Clang's __uint128_t method.
*/
-#elif defined(_M_ARM64)
+#elif defined(_M_ARM64) || defined(_M_ARM64EC)
#ifndef _MSC_VER
# pragma intrinsic(__umulh)
@@ -3376,7 +4180,7 @@ XXH3_mul128_fold64(xxh_u64 lhs, xxh_u64 rhs)
}
/*! Seems to produce slightly better code on GCC for some reason. */
-XXH_FORCE_INLINE xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift)
+XXH_FORCE_INLINE XXH_CONSTF xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift)
{
XXH_ASSERT(0 <= shift && shift < 64);
return v64 ^ (v64 >> shift);
@@ -3389,7 +4193,7 @@ XXH_FORCE_INLINE xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift)
static XXH64_hash_t XXH3_avalanche(xxh_u64 h64)
{
h64 = XXH_xorshift64(h64, 37);
- h64 *= 0x165667919E3779F9ULL;
+ h64 *= PRIME_MX1;
h64 = XXH_xorshift64(h64, 32);
return h64;
}
@@ -3403,9 +4207,9 @@ static XXH64_hash_t XXH3_rrmxmx(xxh_u64 h64, xxh_u64 len)
{
/* this mix is inspired by Pelle Evensen's rrmxmx */
h64 ^= XXH_rotl64(h64, 49) ^ XXH_rotl64(h64, 24);
- h64 *= 0x9FB21C651E98DF25ULL;
+ h64 *= PRIME_MX2;
h64 ^= (h64 >> 35) + len ;
- h64 *= 0x9FB21C651E98DF25ULL;
+ h64 *= PRIME_MX2;
return XXH_xorshift64(h64, 28);
}
@@ -3443,7 +4247,7 @@ static XXH64_hash_t XXH3_rrmxmx(xxh_u64 h64, xxh_u64 len)
*
* This adds an extra layer of strength for custom secrets.
*/
-XXH_FORCE_INLINE XXH64_hash_t
+XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t
XXH3_len_1to3_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
{
XXH_ASSERT(input != NULL);
@@ -3465,7 +4269,7 @@ XXH3_len_1to3_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_h
}
}
-XXH_FORCE_INLINE XXH64_hash_t
+XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t
XXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
{
XXH_ASSERT(input != NULL);
@@ -3481,7 +4285,7 @@ XXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_h
}
}
-XXH_FORCE_INLINE XXH64_hash_t
+XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t
XXH3_len_9to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
{
XXH_ASSERT(input != NULL);
@@ -3498,7 +4302,7 @@ XXH3_len_9to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_
}
}
-XXH_FORCE_INLINE XXH64_hash_t
+XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t
XXH3_len_0to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
{
XXH_ASSERT(len <= 16);
@@ -3568,7 +4372,7 @@ XXH_FORCE_INLINE xxh_u64 XXH3_mix16B(const xxh_u8* XXH_RESTRICT input,
}
/* For mid range keys, XXH3 uses a Mum-hash variant. */
-XXH_FORCE_INLINE XXH64_hash_t
+XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t
XXH3_len_17to128_64b(const xxh_u8* XXH_RESTRICT input, size_t len,
const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
XXH64_hash_t seed)
@@ -3577,6 +4381,14 @@ XXH3_len_17to128_64b(const xxh_u8* XXH_RESTRICT input, size_t len,
XXH_ASSERT(16 < len && len <= 128);
{ xxh_u64 acc = len * XXH_PRIME64_1;
+#if XXH_SIZE_OPT >= 1
+ /* Smaller and cleaner, but slightly slower. */
+ unsigned int i = (unsigned int)(len - 1) / 32;
+ do {
+ acc += XXH3_mix16B(input+16 * i, secret+32*i, seed);
+ acc += XXH3_mix16B(input+len-16*(i+1), secret+32*i+16, seed);
+ } while (i-- != 0);
+#else
if (len > 32) {
if (len > 64) {
if (len > 96) {
@@ -3591,14 +4403,14 @@ XXH3_len_17to128_64b(const xxh_u8* XXH_RESTRICT input, size_t len,
}
acc += XXH3_mix16B(input+0, secret+0, seed);
acc += XXH3_mix16B(input+len-16, secret+16, seed);
-
+#endif
return XXH3_avalanche(acc);
}
}
#define XXH3_MIDSIZE_MAX 240
-XXH_NO_INLINE XXH64_hash_t
+XXH_NO_INLINE XXH_PUREF XXH64_hash_t
XXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len,
const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
XXH64_hash_t seed)
@@ -3610,13 +4422,17 @@ XXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len,
#define XXH3_MIDSIZE_LASTOFFSET 17
{ xxh_u64 acc = len * XXH_PRIME64_1;
- int const nbRounds = (int)len / 16;
- int i;
+ xxh_u64 acc_end;
+ unsigned int const nbRounds = (unsigned int)len / 16;
+ unsigned int i;
+ XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX);
for (i=0; i<8; i++) {
acc += XXH3_mix16B(input+(16*i), secret+(16*i), seed);
}
- acc = XXH3_avalanche(acc);
+ /* last bytes */
+ acc_end = XXH3_mix16B(input + len - 16, secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET, seed);
XXH_ASSERT(nbRounds >= 8);
+ acc = XXH3_avalanche(acc);
#if defined(__clang__) /* Clang */ \
&& (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \
&& !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */
@@ -3643,11 +4459,13 @@ XXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len,
#pragma clang loop vectorize(disable)
#endif
for (i=8 ; i < nbRounds; i++) {
- acc += XXH3_mix16B(input+(16*i), secret+(16*(i-8)) + XXH3_MIDSIZE_STARTOFFSET, seed);
+ /*
+ * Prevents clang for unrolling the acc loop and interleaving with this one.
+ */
+ XXH_COMPILER_GUARD(acc);
+ acc_end += XXH3_mix16B(input+(16*i), secret+(16*(i-8)) + XXH3_MIDSIZE_STARTOFFSET, seed);
}
- /* last bytes */
- acc += XXH3_mix16B(input + len - 16, secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET, seed);
- return XXH3_avalanche(acc);
+ return XXH3_avalanche(acc + acc_end);
}
}
@@ -3663,6 +4481,47 @@ XXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len,
# define ACC_NB XXH_ACC_NB
#endif
+#ifndef XXH_PREFETCH_DIST
+# ifdef __clang__
+# define XXH_PREFETCH_DIST 320
+# else
+# if (XXH_VECTOR == XXH_AVX512)
+# define XXH_PREFETCH_DIST 512
+# else
+# define XXH_PREFETCH_DIST 384
+# endif
+# endif /* __clang__ */
+#endif /* XXH_PREFETCH_DIST */
+
+/*
+ * These macros are to generate an XXH3_accumulate() function.
+ * The two arguments select the name suffix and target attribute.
+ *
+ * The name of this symbol is XXH3_accumulate_<name>() and it calls
+ * XXH3_accumulate_512_<name>().
+ *
+ * It may be useful to hand implement this function if the compiler fails to
+ * optimize the inline function.
+ */
+#define XXH3_ACCUMULATE_TEMPLATE(name) \
+void \
+XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \
+ const xxh_u8* XXH_RESTRICT input, \
+ const xxh_u8* XXH_RESTRICT secret, \
+ size_t nbStripes) \
+{ \
+ size_t n; \
+ for (n = 0; n < nbStripes; n++ ) { \
+ const xxh_u8* const in = input + n*XXH_STRIPE_LEN; \
+ XXH_PREFETCH(in + XXH_PREFETCH_DIST); \
+ XXH3_accumulate_512_##name( \
+ acc, \
+ in, \
+ secret + n*XXH_SECRET_CONSUME_RATE); \
+ } \
+}
+
+
XXH_FORCE_INLINE void XXH_writeLE64(void* dst, xxh_u64 v64)
{
if (!XXH_CPU_LITTLE_ENDIAN) v64 = XXH_swap64(v64);
@@ -3683,6 +4542,7 @@ XXH_FORCE_INLINE void XXH_writeLE64(void* dst, xxh_u64 v64)
typedef long long xxh_i64;
#endif
+
/*
* XXH3_accumulate_512 is the tightest loop for long inputs, and it is the most optimized.
*
@@ -3730,7 +4590,7 @@ XXH3_accumulate_512_avx512(void* XXH_RESTRICT acc,
/* data_key = data_vec ^ key_vec; */
__m512i const data_key = _mm512_xor_si512 (data_vec, key_vec);
/* data_key_lo = data_key >> 32; */
- __m512i const data_key_lo = _mm512_shuffle_epi32 (data_key, (_MM_PERM_ENUM)_MM_SHUFFLE(0, 3, 0, 1));
+ __m512i const data_key_lo = _mm512_srli_epi64 (data_key, 32);
/* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */
__m512i const product = _mm512_mul_epu32 (data_key, data_key_lo);
/* xacc[0] += swap(data_vec); */
@@ -3740,6 +4600,7 @@ XXH3_accumulate_512_avx512(void* XXH_RESTRICT acc,
*xacc = _mm512_add_epi64(product, sum);
}
}
+XXH_FORCE_INLINE XXH_TARGET_AVX512 XXH3_ACCUMULATE_TEMPLATE(avx512)
/*
* XXH3_scrambleAcc: Scrambles the accumulators to improve mixing.
@@ -3773,13 +4634,12 @@ XXH3_scrambleAcc_avx512(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
/* xacc[0] ^= (xacc[0] >> 47) */
__m512i const acc_vec = *xacc;
__m512i const shifted = _mm512_srli_epi64 (acc_vec, 47);
- __m512i const data_vec = _mm512_xor_si512 (acc_vec, shifted);
/* xacc[0] ^= secret; */
__m512i const key_vec = _mm512_loadu_si512 (secret);
- __m512i const data_key = _mm512_xor_si512 (data_vec, key_vec);
+ __m512i const data_key = _mm512_ternarylogic_epi32(key_vec, acc_vec, shifted, 0x96 /* key_vec ^ acc_vec ^ shifted */);
/* xacc[0] *= XXH_PRIME32_1; */
- __m512i const data_key_hi = _mm512_shuffle_epi32 (data_key, (_MM_PERM_ENUM)_MM_SHUFFLE(0, 3, 0, 1));
+ __m512i const data_key_hi = _mm512_srli_epi64 (data_key, 32);
__m512i const prod_lo = _mm512_mul_epu32 (data_key, prime32);
__m512i const prod_hi = _mm512_mul_epu32 (data_key_hi, prime32);
*xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32));
@@ -3794,7 +4654,8 @@ XXH3_initCustomSecret_avx512(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
XXH_ASSERT(((size_t)customSecret & 63) == 0);
(void)(&XXH_writeLE64);
{ int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m512i);
- __m512i const seed = _mm512_mask_set1_epi64(_mm512_set1_epi64((xxh_i64)seed64), 0xAA, (xxh_i64)(0U - seed64));
+ __m512i const seed_pos = _mm512_set1_epi64((xxh_i64)seed64);
+ __m512i const seed = _mm512_mask_sub_epi64(seed_pos, 0xAA, _mm512_set1_epi8(0), seed_pos);
const __m512i* const src = (const __m512i*) ((const void*) XXH3_kSecret);
__m512i* const dest = ( __m512i*) customSecret;
@@ -3802,14 +4663,7 @@ XXH3_initCustomSecret_avx512(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
XXH_ASSERT(((size_t)src & 63) == 0); /* control alignment */
XXH_ASSERT(((size_t)dest & 63) == 0);
for (i=0; i < nbRounds; ++i) {
- /* GCC has a bug, _mm512_stream_load_si512 accepts 'void*', not 'void const*',
- * this will warn "discards 'const' qualifier". */
- union {
- const __m512i* cp;
- void* p;
- } remote_const_void;
- remote_const_void.cp = src + i;
- dest[i] = _mm512_add_epi64(_mm512_stream_load_si512(remote_const_void.p), seed);
+ dest[i] = _mm512_add_epi64(_mm512_load_si512(src + i), seed);
} }
}
@@ -3845,7 +4699,7 @@ XXH3_accumulate_512_avx2( void* XXH_RESTRICT acc,
/* data_key = data_vec ^ key_vec; */
__m256i const data_key = _mm256_xor_si256 (data_vec, key_vec);
/* data_key_lo = data_key >> 32; */
- __m256i const data_key_lo = _mm256_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1));
+ __m256i const data_key_lo = _mm256_srli_epi64 (data_key, 32);
/* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */
__m256i const product = _mm256_mul_epu32 (data_key, data_key_lo);
/* xacc[i] += swap(data_vec); */
@@ -3855,6 +4709,7 @@ XXH3_accumulate_512_avx2( void* XXH_RESTRICT acc,
xacc[i] = _mm256_add_epi64(product, sum);
} }
}
+XXH_FORCE_INLINE XXH_TARGET_AVX2 XXH3_ACCUMULATE_TEMPLATE(avx2)
XXH_FORCE_INLINE XXH_TARGET_AVX2 void
XXH3_scrambleAcc_avx2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
@@ -3877,7 +4732,7 @@ XXH3_scrambleAcc_avx2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
__m256i const data_key = _mm256_xor_si256 (data_vec, key_vec);
/* xacc[i] *= XXH_PRIME32_1; */
- __m256i const data_key_hi = _mm256_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1));
+ __m256i const data_key_hi = _mm256_srli_epi64 (data_key, 32);
__m256i const prod_lo = _mm256_mul_epu32 (data_key, prime32);
__m256i const prod_hi = _mm256_mul_epu32 (data_key_hi, prime32);
xacc[i] = _mm256_add_epi64(prod_lo, _mm256_slli_epi64(prod_hi, 32));
@@ -3909,12 +4764,12 @@ XXH_FORCE_INLINE XXH_TARGET_AVX2 void XXH3_initCustomSecret_avx2(void* XXH_RESTR
XXH_ASSERT(((size_t)dest & 31) == 0);
/* GCC -O2 need unroll loop manually */
- dest[0] = _mm256_add_epi64(_mm256_stream_load_si256(src+0), seed);
- dest[1] = _mm256_add_epi64(_mm256_stream_load_si256(src+1), seed);
- dest[2] = _mm256_add_epi64(_mm256_stream_load_si256(src+2), seed);
- dest[3] = _mm256_add_epi64(_mm256_stream_load_si256(src+3), seed);
- dest[4] = _mm256_add_epi64(_mm256_stream_load_si256(src+4), seed);
- dest[5] = _mm256_add_epi64(_mm256_stream_load_si256(src+5), seed);
+ dest[0] = _mm256_add_epi64(_mm256_load_si256(src+0), seed);
+ dest[1] = _mm256_add_epi64(_mm256_load_si256(src+1), seed);
+ dest[2] = _mm256_add_epi64(_mm256_load_si256(src+2), seed);
+ dest[3] = _mm256_add_epi64(_mm256_load_si256(src+3), seed);
+ dest[4] = _mm256_add_epi64(_mm256_load_si256(src+4), seed);
+ dest[5] = _mm256_add_epi64(_mm256_load_si256(src+5), seed);
}
}
@@ -3961,6 +4816,7 @@ XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc,
xacc[i] = _mm_add_epi64(product, sum);
} }
}
+XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
XXH_FORCE_INLINE XXH_TARGET_SSE2 void
XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
@@ -4028,96 +4884,222 @@ XXH_FORCE_INLINE XXH_TARGET_SSE2 void XXH3_initCustomSecret_sse2(void* XXH_RESTR
#if (XXH_VECTOR == XXH_NEON)
+/* forward declarations for the scalar routines */
+XXH_FORCE_INLINE void
+XXH3_scalarRound(void* XXH_RESTRICT acc, void const* XXH_RESTRICT input,
+ void const* XXH_RESTRICT secret, size_t lane);
+
+XXH_FORCE_INLINE void
+XXH3_scalarScrambleRound(void* XXH_RESTRICT acc,
+ void const* XXH_RESTRICT secret, size_t lane);
+
+/*!
+ * @internal
+ * @brief The bulk processing loop for NEON and WASM SIMD128.
+ *
+ * The NEON code path is actually partially scalar when running on AArch64. This
+ * is to optimize the pipelining and can have up to 15% speedup depending on the
+ * CPU, and it also mitigates some GCC codegen issues.
+ *
+ * @see XXH3_NEON_LANES for configuring this and details about this optimization.
+ *
+ * NEON's 32-bit to 64-bit long multiply takes a half vector of 32-bit
+ * integers instead of the other platforms which mask full 64-bit vectors,
+ * so the setup is more complicated than just shifting right.
+ *
+ * Additionally, there is an optimization for 4 lanes at once noted below.
+ *
+ * Since, as stated, the most optimal amount of lanes for Cortexes is 6,
+ * there needs to be *three* versions of the accumulate operation used
+ * for the remaining 2 lanes.
+ *
+ * WASM's SIMD128 uses SIMDe's arm_neon.h polyfill because the intrinsics overlap
+ * nearly perfectly.
+ */
+
XXH_FORCE_INLINE void
XXH3_accumulate_512_neon( void* XXH_RESTRICT acc,
const void* XXH_RESTRICT input,
const void* XXH_RESTRICT secret)
{
XXH_ASSERT((((size_t)acc) & 15) == 0);
- {
- uint64x2_t* const xacc = (uint64x2_t *) acc;
+ XXH_STATIC_ASSERT(XXH3_NEON_LANES > 0 && XXH3_NEON_LANES <= XXH_ACC_NB && XXH3_NEON_LANES % 2 == 0);
+ { /* GCC for darwin arm64 does not like aliasing here */
+ xxh_aliasing_uint64x2_t* const xacc = (xxh_aliasing_uint64x2_t*) acc;
/* We don't use a uint32x4_t pointer because it causes bus errors on ARMv7. */
- uint8_t const* const xinput = (const uint8_t *) input;
- uint8_t const* const xsecret = (const uint8_t *) secret;
+ uint8_t const* xinput = (const uint8_t *) input;
+ uint8_t const* xsecret = (const uint8_t *) secret;
size_t i;
- for (i=0; i < XXH_STRIPE_LEN / sizeof(uint64x2_t); i++) {
+#ifdef __wasm_simd128__
+ /*
+ * On WASM SIMD128, Clang emits direct address loads when XXH3_kSecret
+ * is constant propagated, which results in it converting it to this
+ * inside the loop:
+ *
+ * a = v128.load(XXH3_kSecret + 0 + $secret_offset, offset = 0)
+ * b = v128.load(XXH3_kSecret + 16 + $secret_offset, offset = 0)
+ * ...
+ *
+ * This requires a full 32-bit address immediate (and therefore a 6 byte
+ * instruction) as well as an add for each offset.
+ *
+ * Putting an asm guard prevents it from folding (at the cost of losing
+ * the alignment hint), and uses the free offset in `v128.load` instead
+ * of adding secret_offset each time which overall reduces code size by
+ * about a kilobyte and improves performance.
+ */
+ XXH_COMPILER_GUARD(xsecret);
+#endif
+ /* Scalar lanes use the normal scalarRound routine */
+ for (i = XXH3_NEON_LANES; i < XXH_ACC_NB; i++) {
+ XXH3_scalarRound(acc, input, secret, i);
+ }
+ i = 0;
+ /* 4 NEON lanes at a time. */
+ for (; i+1 < XXH3_NEON_LANES / 2; i+=2) {
/* data_vec = xinput[i]; */
- uint8x16_t data_vec = vld1q_u8(xinput + (i * 16));
+ uint64x2_t data_vec_1 = XXH_vld1q_u64(xinput + (i * 16));
+ uint64x2_t data_vec_2 = XXH_vld1q_u64(xinput + ((i+1) * 16));
/* key_vec = xsecret[i]; */
- uint8x16_t key_vec = vld1q_u8(xsecret + (i * 16));
- uint64x2_t data_key;
- uint32x2_t data_key_lo, data_key_hi;
- /* xacc[i] += swap(data_vec); */
- uint64x2_t const data64 = vreinterpretq_u64_u8(data_vec);
- uint64x2_t const swapped = vextq_u64(data64, data64, 1);
- xacc[i] = vaddq_u64 (xacc[i], swapped);
+ uint64x2_t key_vec_1 = XXH_vld1q_u64(xsecret + (i * 16));
+ uint64x2_t key_vec_2 = XXH_vld1q_u64(xsecret + ((i+1) * 16));
+ /* data_swap = swap(data_vec) */
+ uint64x2_t data_swap_1 = vextq_u64(data_vec_1, data_vec_1, 1);
+ uint64x2_t data_swap_2 = vextq_u64(data_vec_2, data_vec_2, 1);
/* data_key = data_vec ^ key_vec; */
- data_key = vreinterpretq_u64_u8(veorq_u8(data_vec, key_vec));
- /* data_key_lo = (uint32x2_t) (data_key & 0xFFFFFFFF);
- * data_key_hi = (uint32x2_t) (data_key >> 32);
- * data_key = UNDEFINED; */
- XXH_SPLIT_IN_PLACE(data_key, data_key_lo, data_key_hi);
- /* xacc[i] += (uint64x2_t) data_key_lo * (uint64x2_t) data_key_hi; */
- xacc[i] = vmlal_u32 (xacc[i], data_key_lo, data_key_hi);
+ uint64x2_t data_key_1 = veorq_u64(data_vec_1, key_vec_1);
+ uint64x2_t data_key_2 = veorq_u64(data_vec_2, key_vec_2);
+ /*
+ * If we reinterpret the 64x2 vectors as 32x4 vectors, we can use a
+ * de-interleave operation for 4 lanes in 1 step with `vuzpq_u32` to
+ * get one vector with the low 32 bits of each lane, and one vector
+ * with the high 32 bits of each lane.
+ *
+ * The intrinsic returns a double vector because the original ARMv7-a
+ * instruction modified both arguments in place. AArch64 and SIMD128 emit
+ * two instructions from this intrinsic.
+ *
+ * [ dk11L | dk11H | dk12L | dk12H ] -> [ dk11L | dk12L | dk21L | dk22L ]
+ * [ dk21L | dk21H | dk22L | dk22H ] -> [ dk11H | dk12H | dk21H | dk22H ]
+ */
+ uint32x4x2_t unzipped = vuzpq_u32(
+ vreinterpretq_u32_u64(data_key_1),
+ vreinterpretq_u32_u64(data_key_2)
+ );
+ /* data_key_lo = data_key & 0xFFFFFFFF */
+ uint32x4_t data_key_lo = unzipped.val[0];
+ /* data_key_hi = data_key >> 32 */
+ uint32x4_t data_key_hi = unzipped.val[1];
+ /*
+ * Then, we can split the vectors horizontally and multiply which, as for most
+ * widening intrinsics, have a variant that works on both high half vectors
+ * for free on AArch64. A similar instruction is available on SIMD128.
+ *
+ * sum = data_swap + (u64x2) data_key_lo * (u64x2) data_key_hi
+ */
+ uint64x2_t sum_1 = XXH_vmlal_low_u32(data_swap_1, data_key_lo, data_key_hi);
+ uint64x2_t sum_2 = XXH_vmlal_high_u32(data_swap_2, data_key_lo, data_key_hi);
+ /*
+ * Clang reorders
+ * a += b * c; // umlal swap.2d, dkl.2s, dkh.2s
+ * c += a; // add acc.2d, acc.2d, swap.2d
+ * to
+ * c += a; // add acc.2d, acc.2d, swap.2d
+ * c += b * c; // umlal acc.2d, dkl.2s, dkh.2s
+ *
+ * While it would make sense in theory since the addition is faster,
+ * for reasons likely related to umlal being limited to certain NEON
+ * pipelines, this is worse. A compiler guard fixes this.
+ */
+ XXH_COMPILER_GUARD_CLANG_NEON(sum_1);
+ XXH_COMPILER_GUARD_CLANG_NEON(sum_2);
+ /* xacc[i] = acc_vec + sum; */
+ xacc[i] = vaddq_u64(xacc[i], sum_1);
+ xacc[i+1] = vaddq_u64(xacc[i+1], sum_2);
+ }
+ /* Operate on the remaining NEON lanes 2 at a time. */
+ for (; i < XXH3_NEON_LANES / 2; i++) {
+ /* data_vec = xinput[i]; */
+ uint64x2_t data_vec = XXH_vld1q_u64(xinput + (i * 16));
+ /* key_vec = xsecret[i]; */
+ uint64x2_t key_vec = XXH_vld1q_u64(xsecret + (i * 16));
+ /* acc_vec_2 = swap(data_vec) */
+ uint64x2_t data_swap = vextq_u64(data_vec, data_vec, 1);
+ /* data_key = data_vec ^ key_vec; */
+ uint64x2_t data_key = veorq_u64(data_vec, key_vec);
+ /* For two lanes, just use VMOVN and VSHRN. */
+ /* data_key_lo = data_key & 0xFFFFFFFF; */
+ uint32x2_t data_key_lo = vmovn_u64(data_key);
+ /* data_key_hi = data_key >> 32; */
+ uint32x2_t data_key_hi = vshrn_n_u64(data_key, 32);
+ /* sum = data_swap + (u64x2) data_key_lo * (u64x2) data_key_hi; */
+ uint64x2_t sum = vmlal_u32(data_swap, data_key_lo, data_key_hi);
+ /* Same Clang workaround as before */
+ XXH_COMPILER_GUARD_CLANG_NEON(sum);
+ /* xacc[i] = acc_vec + sum; */
+ xacc[i] = vaddq_u64 (xacc[i], sum);
}
}
}
+XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(neon)
XXH_FORCE_INLINE void
XXH3_scrambleAcc_neon(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
{
XXH_ASSERT((((size_t)acc) & 15) == 0);
- { uint64x2_t* xacc = (uint64x2_t*) acc;
+ { xxh_aliasing_uint64x2_t* xacc = (xxh_aliasing_uint64x2_t*) acc;
uint8_t const* xsecret = (uint8_t const*) secret;
- uint32x2_t prime = vdup_n_u32 (XXH_PRIME32_1);
size_t i;
- for (i=0; i < XXH_STRIPE_LEN/sizeof(uint64x2_t); i++) {
+ /* WASM uses operator overloads and doesn't need these. */
+#ifndef __wasm_simd128__
+ /* { prime32_1, prime32_1 } */
+ uint32x2_t const kPrimeLo = vdup_n_u32(XXH_PRIME32_1);
+ /* { 0, prime32_1, 0, prime32_1 } */
+ uint32x4_t const kPrimeHi = vreinterpretq_u32_u64(vdupq_n_u64((xxh_u64)XXH_PRIME32_1 << 32));
+#endif
+
+ /* AArch64 uses both scalar and neon at the same time */
+ for (i = XXH3_NEON_LANES; i < XXH_ACC_NB; i++) {
+ XXH3_scalarScrambleRound(acc, secret, i);
+ }
+ for (i=0; i < XXH3_NEON_LANES / 2; i++) {
/* xacc[i] ^= (xacc[i] >> 47); */
uint64x2_t acc_vec = xacc[i];
- uint64x2_t shifted = vshrq_n_u64 (acc_vec, 47);
- uint64x2_t data_vec = veorq_u64 (acc_vec, shifted);
+ uint64x2_t shifted = vshrq_n_u64(acc_vec, 47);
+ uint64x2_t data_vec = veorq_u64(acc_vec, shifted);
/* xacc[i] ^= xsecret[i]; */
- uint8x16_t key_vec = vld1q_u8 (xsecret + (i * 16));
- uint64x2_t data_key = veorq_u64 (data_vec, vreinterpretq_u64_u8(key_vec));
-
+ uint64x2_t key_vec = XXH_vld1q_u64(xsecret + (i * 16));
+ uint64x2_t data_key = veorq_u64(data_vec, key_vec);
/* xacc[i] *= XXH_PRIME32_1 */
- uint32x2_t data_key_lo, data_key_hi;
- /* data_key_lo = (uint32x2_t) (xacc[i] & 0xFFFFFFFF);
- * data_key_hi = (uint32x2_t) (xacc[i] >> 32);
- * xacc[i] = UNDEFINED; */
- XXH_SPLIT_IN_PLACE(data_key, data_key_lo, data_key_hi);
- { /*
- * prod_hi = (data_key >> 32) * XXH_PRIME32_1;
- *
- * Avoid vmul_u32 + vshll_n_u32 since Clang 6 and 7 will
- * incorrectly "optimize" this:
- * tmp = vmul_u32(vmovn_u64(a), vmovn_u64(b));
- * shifted = vshll_n_u32(tmp, 32);
- * to this:
- * tmp = "vmulq_u64"(a, b); // no such thing!
- * shifted = vshlq_n_u64(tmp, 32);
- *
- * However, unlike SSE, Clang lacks a 64-bit multiply routine
- * for NEON, and it scalarizes two 64-bit multiplies instead.
- *
- * vmull_u32 has the same timing as vmul_u32, and it avoids
- * this bug completely.
- * See https://bugs.llvm.org/show_bug.cgi?id=39967
- */
- uint64x2_t prod_hi = vmull_u32 (data_key_hi, prime);
- /* xacc[i] = prod_hi << 32; */
- xacc[i] = vshlq_n_u64(prod_hi, 32);
- /* xacc[i] += (prod_hi & 0xFFFFFFFF) * XXH_PRIME32_1; */
- xacc[i] = vmlal_u32(xacc[i], data_key_lo, prime);
- }
- } }
+#ifdef __wasm_simd128__
+ /* SIMD128 has multiply by u64x2, use it instead of expanding and scalarizing */
+ xacc[i] = data_key * XXH_PRIME32_1;
+#else
+ /*
+ * Expanded version with portable NEON intrinsics
+ *
+ * lo(x) * lo(y) + (hi(x) * lo(y) << 32)
+ *
+ * prod_hi = hi(data_key) * lo(prime) << 32
+ *
+ * Since we only need 32 bits of this multiply a trick can be used, reinterpreting the vector
+ * as a uint32x4_t and multiplying by { 0, prime, 0, prime } to cancel out the unwanted bits
+ * and avoid the shift.
+ */
+ uint32x4_t prod_hi = vmulq_u32 (vreinterpretq_u32_u64(data_key), kPrimeHi);
+ /* Extract low bits for vmlal_u32 */
+ uint32x2_t data_key_lo = vmovn_u64(data_key);
+ /* xacc[i] = prod_hi + lo(data_key) * XXH_PRIME32_1; */
+ xacc[i] = vmlal_u32(vreinterpretq_u64_u32(prod_hi), data_key_lo, kPrimeLo);
+#endif
+ }
+ }
}
-
#endif
#if (XXH_VECTOR == XXH_VSX)
@@ -4128,23 +5110,23 @@ XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc,
const void* XXH_RESTRICT secret)
{
/* presumed aligned */
- unsigned long long* const xacc = (unsigned long long*) acc;
- xxh_u64x2 const* const xinput = (xxh_u64x2 const*) input; /* no alignment restriction */
- xxh_u64x2 const* const xsecret = (xxh_u64x2 const*) secret; /* no alignment restriction */
+ xxh_aliasing_u64x2* const xacc = (xxh_aliasing_u64x2*) acc;
+ xxh_u8 const* const xinput = (xxh_u8 const*) input; /* no alignment restriction */
+ xxh_u8 const* const xsecret = (xxh_u8 const*) secret; /* no alignment restriction */
xxh_u64x2 const v32 = { 32, 32 };
size_t i;
for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) {
/* data_vec = xinput[i]; */
- xxh_u64x2 const data_vec = XXH_vec_loadu(xinput + i);
+ xxh_u64x2 const data_vec = XXH_vec_loadu(xinput + 16*i);
/* key_vec = xsecret[i]; */
- xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + i);
+ xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + 16*i);
xxh_u64x2 const data_key = data_vec ^ key_vec;
/* shuffled = (data_key << 32) | (data_key >> 32); */
xxh_u32x4 const shuffled = (xxh_u32x4)vec_rl(data_key, v32);
/* product = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)shuffled & 0xFFFFFFFF); */
xxh_u64x2 const product = XXH_vec_mulo((xxh_u32x4)data_key, shuffled);
/* acc_vec = xacc[i]; */
- xxh_u64x2 acc_vec = vec_xl(0, xacc + 2 * i);
+ xxh_u64x2 acc_vec = xacc[i];
acc_vec += product;
/* swap high and low halves */
@@ -4153,18 +5135,18 @@ XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc,
#else
acc_vec += vec_xxpermdi(data_vec, data_vec, 2);
#endif
- /* xacc[i] = acc_vec; */
- vec_xst(acc_vec, 0, xacc + 2 * i);
+ xacc[i] = acc_vec;
}
}
+XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(vsx)
XXH_FORCE_INLINE void
XXH3_scrambleAcc_vsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
{
XXH_ASSERT((((size_t)acc) & 15) == 0);
- { xxh_u64x2* const xacc = (xxh_u64x2*) acc;
- const xxh_u64x2* const xsecret = (const xxh_u64x2*) secret;
+ { xxh_aliasing_u64x2* const xacc = (xxh_aliasing_u64x2*) acc;
+ const xxh_u8* const xsecret = (const xxh_u8*) secret;
/* constants */
xxh_u64x2 const v32 = { 32, 32 };
xxh_u64x2 const v47 = { 47, 47 };
@@ -4176,7 +5158,7 @@ XXH3_scrambleAcc_vsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
xxh_u64x2 const data_vec = acc_vec ^ (acc_vec >> v47);
/* xacc[i] ^= xsecret[i]; */
- xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + i);
+ xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + 16*i);
xxh_u64x2 const data_key = data_vec ^ key_vec;
/* xacc[i] *= XXH_PRIME32_1 */
@@ -4190,40 +5172,233 @@ XXH3_scrambleAcc_vsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
#endif
+#if (XXH_VECTOR == XXH_SVE)
+
+XXH_FORCE_INLINE void
+XXH3_accumulate_512_sve( void* XXH_RESTRICT acc,
+ const void* XXH_RESTRICT input,
+ const void* XXH_RESTRICT secret)
+{
+ uint64_t *xacc = (uint64_t *)acc;
+ const uint64_t *xinput = (const uint64_t *)(const void *)input;
+ const uint64_t *xsecret = (const uint64_t *)(const void *)secret;
+ svuint64_t kSwap = sveor_n_u64_z(svptrue_b64(), svindex_u64(0, 1), 1);
+ uint64_t element_count = svcntd();
+ if (element_count >= 8) {
+ svbool_t mask = svptrue_pat_b64(SV_VL8);
+ svuint64_t vacc = svld1_u64(mask, xacc);
+ ACCRND(vacc, 0);
+ svst1_u64(mask, xacc, vacc);
+ } else if (element_count == 2) { /* sve128 */
+ svbool_t mask = svptrue_pat_b64(SV_VL2);
+ svuint64_t acc0 = svld1_u64(mask, xacc + 0);
+ svuint64_t acc1 = svld1_u64(mask, xacc + 2);
+ svuint64_t acc2 = svld1_u64(mask, xacc + 4);
+ svuint64_t acc3 = svld1_u64(mask, xacc + 6);
+ ACCRND(acc0, 0);
+ ACCRND(acc1, 2);
+ ACCRND(acc2, 4);
+ ACCRND(acc3, 6);
+ svst1_u64(mask, xacc + 0, acc0);
+ svst1_u64(mask, xacc + 2, acc1);
+ svst1_u64(mask, xacc + 4, acc2);
+ svst1_u64(mask, xacc + 6, acc3);
+ } else {
+ svbool_t mask = svptrue_pat_b64(SV_VL4);
+ svuint64_t acc0 = svld1_u64(mask, xacc + 0);
+ svuint64_t acc1 = svld1_u64(mask, xacc + 4);
+ ACCRND(acc0, 0);
+ ACCRND(acc1, 4);
+ svst1_u64(mask, xacc + 0, acc0);
+ svst1_u64(mask, xacc + 4, acc1);
+ }
+}
+
+XXH_FORCE_INLINE void
+XXH3_accumulate_sve(xxh_u64* XXH_RESTRICT acc,
+ const xxh_u8* XXH_RESTRICT input,
+ const xxh_u8* XXH_RESTRICT secret,
+ size_t nbStripes)
+{
+ if (nbStripes != 0) {
+ uint64_t *xacc = (uint64_t *)acc;
+ const uint64_t *xinput = (const uint64_t *)(const void *)input;
+ const uint64_t *xsecret = (const uint64_t *)(const void *)secret;
+ svuint64_t kSwap = sveor_n_u64_z(svptrue_b64(), svindex_u64(0, 1), 1);
+ uint64_t element_count = svcntd();
+ if (element_count >= 8) {
+ svbool_t mask = svptrue_pat_b64(SV_VL8);
+ svuint64_t vacc = svld1_u64(mask, xacc + 0);
+ do {
+ /* svprfd(svbool_t, void *, enum svfprop); */
+ svprfd(mask, xinput + 128, SV_PLDL1STRM);
+ ACCRND(vacc, 0);
+ xinput += 8;
+ xsecret += 1;
+ nbStripes--;
+ } while (nbStripes != 0);
+
+ svst1_u64(mask, xacc + 0, vacc);
+ } else if (element_count == 2) { /* sve128 */
+ svbool_t mask = svptrue_pat_b64(SV_VL2);
+ svuint64_t acc0 = svld1_u64(mask, xacc + 0);
+ svuint64_t acc1 = svld1_u64(mask, xacc + 2);
+ svuint64_t acc2 = svld1_u64(mask, xacc + 4);
+ svuint64_t acc3 = svld1_u64(mask, xacc + 6);
+ do {
+ svprfd(mask, xinput + 128, SV_PLDL1STRM);
+ ACCRND(acc0, 0);
+ ACCRND(acc1, 2);
+ ACCRND(acc2, 4);
+ ACCRND(acc3, 6);
+ xinput += 8;
+ xsecret += 1;
+ nbStripes--;
+ } while (nbStripes != 0);
+
+ svst1_u64(mask, xacc + 0, acc0);
+ svst1_u64(mask, xacc + 2, acc1);
+ svst1_u64(mask, xacc + 4, acc2);
+ svst1_u64(mask, xacc + 6, acc3);
+ } else {
+ svbool_t mask = svptrue_pat_b64(SV_VL4);
+ svuint64_t acc0 = svld1_u64(mask, xacc + 0);
+ svuint64_t acc1 = svld1_u64(mask, xacc + 4);
+ do {
+ svprfd(mask, xinput + 128, SV_PLDL1STRM);
+ ACCRND(acc0, 0);
+ ACCRND(acc1, 4);
+ xinput += 8;
+ xsecret += 1;
+ nbStripes--;
+ } while (nbStripes != 0);
+
+ svst1_u64(mask, xacc + 0, acc0);
+ svst1_u64(mask, xacc + 4, acc1);
+ }
+ }
+}
+
+#endif
+
/* scalar variants - universal */
+#if defined(__aarch64__) && (defined(__GNUC__) || defined(__clang__))
+/*
+ * In XXH3_scalarRound(), GCC and Clang have a similar codegen issue, where they
+ * emit an excess mask and a full 64-bit multiply-add (MADD X-form).
+ *
+ * While this might not seem like much, as AArch64 is a 64-bit architecture, only
+ * big Cortex designs have a full 64-bit multiplier.
+ *
+ * On the little cores, the smaller 32-bit multiplier is used, and full 64-bit
+ * multiplies expand to 2-3 multiplies in microcode. This has a major penalty
+ * of up to 4 latency cycles and 2 stall cycles in the multiply pipeline.
+ *
+ * Thankfully, AArch64 still provides the 32-bit long multiply-add (UMADDL) which does
+ * not have this penalty and does the mask automatically.
+ */
+XXH_FORCE_INLINE xxh_u64
+XXH_mult32to64_add64(xxh_u64 lhs, xxh_u64 rhs, xxh_u64 acc)
+{
+ xxh_u64 ret;
+ /* note: %x = 64-bit register, %w = 32-bit register */
+ __asm__("umaddl %x0, %w1, %w2, %x3" : "=r" (ret) : "r" (lhs), "r" (rhs), "r" (acc));
+ return ret;
+}
+#else
+XXH_FORCE_INLINE xxh_u64
+XXH_mult32to64_add64(xxh_u64 lhs, xxh_u64 rhs, xxh_u64 acc)
+{
+ return XXH_mult32to64((xxh_u32)lhs, (xxh_u32)rhs) + acc;
+}
+#endif
+
+/*!
+ * @internal
+ * @brief Scalar round for @ref XXH3_accumulate_512_scalar().
+ *
+ * This is extracted to its own function because the NEON path uses a combination
+ * of NEON and scalar.
+ */
+XXH_FORCE_INLINE void
+XXH3_scalarRound(void* XXH_RESTRICT acc,
+ void const* XXH_RESTRICT input,
+ void const* XXH_RESTRICT secret,
+ size_t lane)
+{
+ xxh_u64* xacc = (xxh_u64*) acc;
+ xxh_u8 const* xinput = (xxh_u8 const*) input;
+ xxh_u8 const* xsecret = (xxh_u8 const*) secret;
+ XXH_ASSERT(lane < XXH_ACC_NB);
+ XXH_ASSERT(((size_t)acc & (XXH_ACC_ALIGN-1)) == 0);
+ {
+ xxh_u64 const data_val = XXH_readLE64(xinput + lane * 8);
+ xxh_u64 const data_key = data_val ^ XXH_readLE64(xsecret + lane * 8);
+ xacc[lane ^ 1] += data_val; /* swap adjacent lanes */
+ xacc[lane] = XXH_mult32to64_add64(data_key /* & 0xFFFFFFFF */, data_key >> 32, xacc[lane]);
+ }
+}
+
+/*!
+ * @internal
+ * @brief Processes a 64 byte block of data using the scalar path.
+ */
XXH_FORCE_INLINE void
XXH3_accumulate_512_scalar(void* XXH_RESTRICT acc,
const void* XXH_RESTRICT input,
const void* XXH_RESTRICT secret)
{
- xxh_u64* const xacc = (xxh_u64*) acc; /* presumed aligned */
- const xxh_u8* const xinput = (const xxh_u8*) input; /* no alignment restriction */
- const xxh_u8* const xsecret = (const xxh_u8*) secret; /* no alignment restriction */
size_t i;
- XXH_ASSERT(((size_t)acc & (XXH_ACC_ALIGN-1)) == 0);
+ /* ARM GCC refuses to unroll this loop, resulting in a 24% slowdown on ARMv6. */
+#if defined(__GNUC__) && !defined(__clang__) \
+ && (defined(__arm__) || defined(__thumb2__)) \
+ && defined(__ARM_FEATURE_UNALIGNED) /* no unaligned access just wastes bytes */ \
+ && XXH_SIZE_OPT <= 0
+# pragma GCC unroll 8
+#endif
for (i=0; i < XXH_ACC_NB; i++) {
- xxh_u64 const data_val = XXH_readLE64(xinput + 8*i);
- xxh_u64 const data_key = data_val ^ XXH_readLE64(xsecret + i*8);
- xacc[i ^ 1] += data_val; /* swap adjacent lanes */
- xacc[i] += XXH_mult32to64(data_key & 0xFFFFFFFF, data_key >> 32);
+ XXH3_scalarRound(acc, input, secret, i);
}
}
+XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(scalar)
+/*!
+ * @internal
+ * @brief Scalar scramble step for @ref XXH3_scrambleAcc_scalar().
+ *
+ * This is extracted to its own function because the NEON path uses a combination
+ * of NEON and scalar.
+ */
XXH_FORCE_INLINE void
-XXH3_scrambleAcc_scalar(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
+XXH3_scalarScrambleRound(void* XXH_RESTRICT acc,
+ void const* XXH_RESTRICT secret,
+ size_t lane)
{
xxh_u64* const xacc = (xxh_u64*) acc; /* presumed aligned */
const xxh_u8* const xsecret = (const xxh_u8*) secret; /* no alignment restriction */
- size_t i;
XXH_ASSERT((((size_t)acc) & (XXH_ACC_ALIGN-1)) == 0);
- for (i=0; i < XXH_ACC_NB; i++) {
- xxh_u64 const key64 = XXH_readLE64(xsecret + 8*i);
- xxh_u64 acc64 = xacc[i];
+ XXH_ASSERT(lane < XXH_ACC_NB);
+ {
+ xxh_u64 const key64 = XXH_readLE64(xsecret + lane * 8);
+ xxh_u64 acc64 = xacc[lane];
acc64 = XXH_xorshift64(acc64, 47);
acc64 ^= key64;
acc64 *= XXH_PRIME32_1;
- xacc[i] = acc64;
+ xacc[lane] = acc64;
+ }
+}
+
+/*!
+ * @internal
+ * @brief Scrambles the accumulators after a large chunk has been read
+ */
+XXH_FORCE_INLINE void
+XXH3_scrambleAcc_scalar(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
+{
+ size_t i;
+ for (i=0; i < XXH_ACC_NB; i++) {
+ XXH3_scalarScrambleRound(acc, secret, i);
}
}
@@ -4238,15 +5413,16 @@ XXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
const xxh_u8* kSecretPtr = XXH3_kSecret;
XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0);
-#if defined(__clang__) && defined(__aarch64__)
+#if defined(__GNUC__) && defined(__aarch64__)
/*
* UGLY HACK:
- * Clang generates a bunch of MOV/MOVK pairs for aarch64, and they are
+ * GCC and Clang generate a bunch of MOV/MOVK pairs for aarch64, and they are
* placed sequentially, in order, at the top of the unrolled loop.
*
* While MOVK is great for generating constants (2 cycles for a 64-bit
- * constant compared to 4 cycles for LDR), long MOVK chains stall the
- * integer pipelines:
+ * constant compared to 4 cycles for LDR), it fights for bandwidth with
+ * the arithmetic instructions.
+ *
* I L S
* MOVK
* MOVK
@@ -4255,7 +5431,7 @@ XXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
* ADD
* SUB STR
* STR
- * By forcing loads from memory (as the asm line causes Clang to assume
+ * By forcing loads from memory (as the asm line causes the compiler to assume
* that XXH3_kSecretPtr has been changed), the pipelines are used more
* efficiently:
* I L S
@@ -4263,23 +5439,20 @@ XXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
* ADD LDR
* SUB STR
* STR
+ *
+ * See XXH3_NEON_LANES for details on the pipsline.
+ *
* XXH3_64bits_withSeed, len == 256, Snapdragon 835
* without hack: 2654.4 MB/s
* with hack: 3202.9 MB/s
*/
XXH_COMPILER_GUARD(kSecretPtr);
#endif
- /*
- * Note: in debug mode, this overrides the asm optimization
- * and Clang will emit MOVK chains again.
- */
- XXH_ASSERT(kSecretPtr == XXH3_kSecret);
-
{ int const nbRounds = XXH_SECRET_DEFAULT_SIZE / 16;
int i;
for (i=0; i < nbRounds; i++) {
/*
- * The asm hack causes Clang to assume that kSecretPtr aliases with
+ * The asm hack causes the compiler to assume that kSecretPtr aliases with
* customSecret, and on aarch64, this prevented LDP from merging two
* loads together for free. Putting the loads together before the stores
* properly generates LDP.
@@ -4292,7 +5465,7 @@ XXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
}
-typedef void (*XXH3_f_accumulate_512)(void* XXH_RESTRICT, const void*, const void*);
+typedef void (*XXH3_f_accumulate)(xxh_u64* XXH_RESTRICT, const xxh_u8* XXH_RESTRICT, const xxh_u8* XXH_RESTRICT, size_t);
typedef void (*XXH3_f_scrambleAcc)(void* XXH_RESTRICT, const void*);
typedef void (*XXH3_f_initCustomSecret)(void* XXH_RESTRICT, xxh_u64);
@@ -4300,82 +5473,63 @@ typedef void (*XXH3_f_initCustomSecret)(void* XXH_RESTRICT, xxh_u64);
#if (XXH_VECTOR == XXH_AVX512)
#define XXH3_accumulate_512 XXH3_accumulate_512_avx512
+#define XXH3_accumulate XXH3_accumulate_avx512
#define XXH3_scrambleAcc XXH3_scrambleAcc_avx512
#define XXH3_initCustomSecret XXH3_initCustomSecret_avx512
#elif (XXH_VECTOR == XXH_AVX2)
#define XXH3_accumulate_512 XXH3_accumulate_512_avx2
+#define XXH3_accumulate XXH3_accumulate_avx2
#define XXH3_scrambleAcc XXH3_scrambleAcc_avx2
#define XXH3_initCustomSecret XXH3_initCustomSecret_avx2
#elif (XXH_VECTOR == XXH_SSE2)
#define XXH3_accumulate_512 XXH3_accumulate_512_sse2
+#define XXH3_accumulate XXH3_accumulate_sse2
#define XXH3_scrambleAcc XXH3_scrambleAcc_sse2
#define XXH3_initCustomSecret XXH3_initCustomSecret_sse2
#elif (XXH_VECTOR == XXH_NEON)
#define XXH3_accumulate_512 XXH3_accumulate_512_neon
+#define XXH3_accumulate XXH3_accumulate_neon
#define XXH3_scrambleAcc XXH3_scrambleAcc_neon
#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
#elif (XXH_VECTOR == XXH_VSX)
#define XXH3_accumulate_512 XXH3_accumulate_512_vsx
+#define XXH3_accumulate XXH3_accumulate_vsx
#define XXH3_scrambleAcc XXH3_scrambleAcc_vsx
#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
+#elif (XXH_VECTOR == XXH_SVE)
+#define XXH3_accumulate_512 XXH3_accumulate_512_sve
+#define XXH3_accumulate XXH3_accumulate_sve
+#define XXH3_scrambleAcc XXH3_scrambleAcc_scalar
+#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
+
#else /* scalar */
#define XXH3_accumulate_512 XXH3_accumulate_512_scalar
+#define XXH3_accumulate XXH3_accumulate_scalar
#define XXH3_scrambleAcc XXH3_scrambleAcc_scalar
#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
#endif
-
-
-#ifndef XXH_PREFETCH_DIST
-# ifdef __clang__
-# define XXH_PREFETCH_DIST 320
-# else
-# if (XXH_VECTOR == XXH_AVX512)
-# define XXH_PREFETCH_DIST 512
-# else
-# define XXH_PREFETCH_DIST 384
-# endif
-# endif /* __clang__ */
-#endif /* XXH_PREFETCH_DIST */
-
-/*
- * XXH3_accumulate()
- * Loops over XXH3_accumulate_512().
- * Assumption: nbStripes will not overflow the secret size
- */
-XXH_FORCE_INLINE void
-XXH3_accumulate( xxh_u64* XXH_RESTRICT acc,
- const xxh_u8* XXH_RESTRICT input,
- const xxh_u8* XXH_RESTRICT secret,
- size_t nbStripes,
- XXH3_f_accumulate_512 f_acc512)
-{
- size_t n;
- for (n = 0; n < nbStripes; n++ ) {
- const xxh_u8* const in = input + n*XXH_STRIPE_LEN;
- XXH_PREFETCH(in + XXH_PREFETCH_DIST);
- f_acc512(acc,
- in,
- secret + n*XXH_SECRET_CONSUME_RATE);
- }
-}
+#if XXH_SIZE_OPT >= 1 /* don't do SIMD for initialization */
+# undef XXH3_initCustomSecret
+# define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
+#endif
XXH_FORCE_INLINE void
XXH3_hashLong_internal_loop(xxh_u64* XXH_RESTRICT acc,
const xxh_u8* XXH_RESTRICT input, size_t len,
const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
- XXH3_f_accumulate_512 f_acc512,
+ XXH3_f_accumulate f_acc,
XXH3_f_scrambleAcc f_scramble)
{
size_t const nbStripesPerBlock = (secretSize - XXH_STRIPE_LEN) / XXH_SECRET_CONSUME_RATE;
@@ -4387,7 +5541,7 @@ XXH3_hashLong_internal_loop(xxh_u64* XXH_RESTRICT acc,
XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN);
for (n = 0; n < nb_blocks; n++) {
- XXH3_accumulate(acc, input + n*block_len, secret, nbStripesPerBlock, f_acc512);
+ f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
}
@@ -4395,12 +5549,12 @@ XXH3_hashLong_internal_loop(xxh_u64* XXH_RESTRICT acc,
XXH_ASSERT(len > XXH_STRIPE_LEN);
{ size_t const nbStripes = ((len - 1) - (block_len * nb_blocks)) / XXH_STRIPE_LEN;
XXH_ASSERT(nbStripes <= (secretSize / XXH_SECRET_CONSUME_RATE));
- XXH3_accumulate(acc, input + nb_blocks*block_len, secret, nbStripes, f_acc512);
+ f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
/* last stripe */
{ const xxh_u8* const p = input + len - XXH_STRIPE_LEN;
#define XXH_SECRET_LASTACC_START 7 /* not aligned on 8, last secret is different from acc & scrambler */
- f_acc512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START);
+ XXH3_accumulate_512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START);
} }
}
@@ -4445,12 +5599,12 @@ XXH3_mergeAccs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secre
XXH_FORCE_INLINE XXH64_hash_t
XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len,
const void* XXH_RESTRICT secret, size_t secretSize,
- XXH3_f_accumulate_512 f_acc512,
+ XXH3_f_accumulate f_acc,
XXH3_f_scrambleAcc f_scramble)
{
XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC;
- XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, (const xxh_u8*)secret, secretSize, f_acc512, f_scramble);
+ XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, (const xxh_u8*)secret, secretSize, f_acc, f_scramble);
/* converge into final hash */
XXH_STATIC_ASSERT(sizeof(acc) == 64);
@@ -4464,13 +5618,15 @@ XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len,
* It's important for performance to transmit secret's size (when it's static)
* so that the compiler can properly optimize the vectorized loop.
* This makes a big performance difference for "medium" keys (<1 KB) when using AVX instruction set.
+ * When the secret size is unknown, or on GCC 12 where the mix of NO_INLINE and FORCE_INLINE
+ * breaks -Og, this is XXH_NO_INLINE.
*/
-XXH_FORCE_INLINE XXH64_hash_t
+XXH3_WITH_SECRET_INLINE XXH64_hash_t
XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len,
XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)
{
(void)seed64;
- return XXH3_hashLong_64b_internal(input, len, secret, secretLen, XXH3_accumulate_512, XXH3_scrambleAcc);
+ return XXH3_hashLong_64b_internal(input, len, secret, secretLen, XXH3_accumulate, XXH3_scrambleAcc);
}
/*
@@ -4479,12 +5635,12 @@ XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len,
* Note that inside this no_inline function, we do inline the internal loop,
* and provide a statically defined secret size to allow optimization of vector loop.
*/
-XXH_NO_INLINE XXH64_hash_t
+XXH_NO_INLINE XXH_PUREF XXH64_hash_t
XXH3_hashLong_64b_default(const void* XXH_RESTRICT input, size_t len,
XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)
{
(void)seed64; (void)secret; (void)secretLen;
- return XXH3_hashLong_64b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate_512, XXH3_scrambleAcc);
+ return XXH3_hashLong_64b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate, XXH3_scrambleAcc);
}
/*
@@ -4501,18 +5657,20 @@ XXH3_hashLong_64b_default(const void* XXH_RESTRICT input, size_t len,
XXH_FORCE_INLINE XXH64_hash_t
XXH3_hashLong_64b_withSeed_internal(const void* input, size_t len,
XXH64_hash_t seed,
- XXH3_f_accumulate_512 f_acc512,
+ XXH3_f_accumulate f_acc,
XXH3_f_scrambleAcc f_scramble,
XXH3_f_initCustomSecret f_initSec)
{
+#if XXH_SIZE_OPT <= 0
if (seed == 0)
return XXH3_hashLong_64b_internal(input, len,
XXH3_kSecret, sizeof(XXH3_kSecret),
- f_acc512, f_scramble);
+ f_acc, f_scramble);
+#endif
{ XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE];
f_initSec(secret, seed);
return XXH3_hashLong_64b_internal(input, len, secret, sizeof(secret),
- f_acc512, f_scramble);
+ f_acc, f_scramble);
}
}
@@ -4520,12 +5678,12 @@ XXH3_hashLong_64b_withSeed_internal(const void* input, size_t len,
* It's important for performance that XXH3_hashLong is not inlined.
*/
XXH_NO_INLINE XXH64_hash_t
-XXH3_hashLong_64b_withSeed(const void* input, size_t len,
- XXH64_hash_t seed, const xxh_u8* secret, size_t secretLen)
+XXH3_hashLong_64b_withSeed(const void* XXH_RESTRICT input, size_t len,
+ XXH64_hash_t seed, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)
{
(void)secret; (void)secretLen;
return XXH3_hashLong_64b_withSeed_internal(input, len, seed,
- XXH3_accumulate_512, XXH3_scrambleAcc, XXH3_initCustomSecret);
+ XXH3_accumulate, XXH3_scrambleAcc, XXH3_initCustomSecret);
}
@@ -4557,37 +5715,37 @@ XXH3_64bits_internal(const void* XXH_RESTRICT input, size_t len,
/* === Public entry point === */
-/*! @ingroup xxh3_family */
-XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(const void* input, size_t len)
+/*! @ingroup XXH3_family */
+XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length)
{
- return XXH3_64bits_internal(input, len, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_default);
+ return XXH3_64bits_internal(input, length, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_default);
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH64_hash_t
-XXH3_64bits_withSecret(const void* input, size_t len, const void* secret, size_t secretSize)
+XXH3_64bits_withSecret(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize)
{
- return XXH3_64bits_internal(input, len, 0, secret, secretSize, XXH3_hashLong_64b_withSecret);
+ return XXH3_64bits_internal(input, length, 0, secret, secretSize, XXH3_hashLong_64b_withSecret);
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH64_hash_t
-XXH3_64bits_withSeed(const void* input, size_t len, XXH64_hash_t seed)
+XXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed)
{
- return XXH3_64bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_withSeed);
+ return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_withSeed);
}
XXH_PUBLIC_API XXH64_hash_t
-XXH3_64bits_withSecretandSeed(const void* input, size_t len, const void* secret, size_t secretSize, XXH64_hash_t seed)
+XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed)
{
- if (len <= XXH3_MIDSIZE_MAX)
- return XXH3_64bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL);
- return XXH3_hashLong_64b_withSecret(input, len, seed, (const xxh_u8*)secret, secretSize);
+ if (length <= XXH3_MIDSIZE_MAX)
+ return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL);
+ return XXH3_hashLong_64b_withSecret(input, length, seed, (const xxh_u8*)secret, secretSize);
}
/* === XXH3 streaming === */
-
+#ifndef XXH_NO_STREAM
/*
* Malloc's a pointer that is always aligned to align.
*
@@ -4611,7 +5769,7 @@ XXH3_64bits_withSecretandSeed(const void* input, size_t len, const void* secret,
*
* Align must be a power of 2 and 8 <= align <= 128.
*/
-static void* XXH_alignedMalloc(size_t s, size_t align)
+static XXH_MALLOCF void* XXH_alignedMalloc(size_t s, size_t align)
{
XXH_ASSERT(align <= 128 && align >= 8); /* range check */
XXH_ASSERT((align & (align-1)) == 0); /* power of 2 */
@@ -4653,7 +5811,13 @@ static void XXH_alignedFree(void* p)
XXH_free(base);
}
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
+/*!
+ * @brief Allocate an @ref XXH3_state_t.
+ *
+ * Must be freed with XXH3_freeState().
+ * @return An allocated XXH3_state_t on success, `NULL` on failure.
+ */
XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void)
{
XXH3_state_t* const state = (XXH3_state_t*)XXH_alignedMalloc(sizeof(XXH3_state_t), 64);
@@ -4662,16 +5826,23 @@ XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void)
return state;
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
+/*!
+ * @brief Frees an @ref XXH3_state_t.
+ *
+ * Must be allocated with XXH3_createState().
+ * @param statePtr A pointer to an @ref XXH3_state_t allocated with @ref XXH3_createState().
+ * @return XXH_OK.
+ */
XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr)
{
XXH_alignedFree(statePtr);
return XXH_OK;
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API void
-XXH3_copyState(XXH3_state_t* dst_state, const XXH3_state_t* src_state)
+XXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, XXH_NOESCAPE const XXH3_state_t* src_state)
{
XXH_memcpy(dst_state, src_state, sizeof(*dst_state));
}
@@ -4703,18 +5874,18 @@ XXH3_reset_internal(XXH3_state_t* statePtr,
statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE;
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_64bits_reset(XXH3_state_t* statePtr)
+XXH3_64bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr)
{
if (statePtr == NULL) return XXH_ERROR;
XXH3_reset_internal(statePtr, 0, XXH3_kSecret, XXH_SECRET_DEFAULT_SIZE);
return XXH_OK;
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_64bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize)
+XXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize)
{
if (statePtr == NULL) return XXH_ERROR;
XXH3_reset_internal(statePtr, 0, secret, secretSize);
@@ -4723,9 +5894,9 @@ XXH3_64bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t
return XXH_OK;
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_64bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed)
+XXH3_64bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed)
{
if (statePtr == NULL) return XXH_ERROR;
if (seed==0) return XXH3_64bits_reset(statePtr);
@@ -4735,9 +5906,9 @@ XXH3_64bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed)
return XXH_OK;
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_64bits_reset_withSecretandSeed(XXH3_state_t* statePtr, const void* secret, size_t secretSize, XXH64_hash_t seed64)
+XXH3_64bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed64)
{
if (statePtr == NULL) return XXH_ERROR;
if (secret == NULL) return XXH_ERROR;
@@ -4747,35 +5918,61 @@ XXH3_64bits_reset_withSecretandSeed(XXH3_state_t* statePtr, const void* secret,
return XXH_OK;
}
-/* Note : when XXH3_consumeStripes() is invoked,
- * there must be a guarantee that at least one more byte must be consumed from input
- * so that the function can blindly consume all stripes using the "normal" secret segment */
-XXH_FORCE_INLINE void
+/*!
+ * @internal
+ * @brief Processes a large input for XXH3_update() and XXH3_digest_long().
+ *
+ * Unlike XXH3_hashLong_internal_loop(), this can process data that overlaps a block.
+ *
+ * @param acc Pointer to the 8 accumulator lanes
+ * @param nbStripesSoFarPtr In/out pointer to the number of leftover stripes in the block*
+ * @param nbStripesPerBlock Number of stripes in a block
+ * @param input Input pointer
+ * @param nbStripes Number of stripes to process
+ * @param secret Secret pointer
+ * @param secretLimit Offset of the last block in @p secret
+ * @param f_acc Pointer to an XXH3_accumulate implementation
+ * @param f_scramble Pointer to an XXH3_scrambleAcc implementation
+ * @return Pointer past the end of @p input after processing
+ */
+XXH_FORCE_INLINE const xxh_u8 *
XXH3_consumeStripes(xxh_u64* XXH_RESTRICT acc,
size_t* XXH_RESTRICT nbStripesSoFarPtr, size_t nbStripesPerBlock,
const xxh_u8* XXH_RESTRICT input, size_t nbStripes,
const xxh_u8* XXH_RESTRICT secret, size_t secretLimit,
- XXH3_f_accumulate_512 f_acc512,
+ XXH3_f_accumulate f_acc,
XXH3_f_scrambleAcc f_scramble)
{
- XXH_ASSERT(nbStripes <= nbStripesPerBlock); /* can handle max 1 scramble per invocation */
- XXH_ASSERT(*nbStripesSoFarPtr < nbStripesPerBlock);
- if (nbStripesPerBlock - *nbStripesSoFarPtr <= nbStripes) {
- /* need a scrambling operation */
- size_t const nbStripesToEndofBlock = nbStripesPerBlock - *nbStripesSoFarPtr;
- size_t const nbStripesAfterBlock = nbStripes - nbStripesToEndofBlock;
- XXH3_accumulate(acc, input, secret + nbStripesSoFarPtr[0] * XXH_SECRET_CONSUME_RATE, nbStripesToEndofBlock, f_acc512);
- f_scramble(acc, secret + secretLimit);
- XXH3_accumulate(acc, input + nbStripesToEndofBlock * XXH_STRIPE_LEN, secret, nbStripesAfterBlock, f_acc512);
- *nbStripesSoFarPtr = nbStripesAfterBlock;
- } else {
- XXH3_accumulate(acc, input, secret + nbStripesSoFarPtr[0] * XXH_SECRET_CONSUME_RATE, nbStripes, f_acc512);
+ const xxh_u8* initialSecret = secret + *nbStripesSoFarPtr * XXH_SECRET_CONSUME_RATE;
+ /* Process full blocks */
+ if (nbStripes >= (nbStripesPerBlock - *nbStripesSoFarPtr)) {
+ /* Process the initial partial block... */
+ size_t nbStripesThisIter = nbStripesPerBlock - *nbStripesSoFarPtr;
+
+ do {
+ /* Accumulate and scramble */
+ f_acc(acc, input, initialSecret, nbStripesThisIter);
+ f_scramble(acc, secret + secretLimit);
+ input += nbStripesThisIter * XXH_STRIPE_LEN;
+ nbStripes -= nbStripesThisIter;
+ /* Then continue the loop with the full block size */
+ nbStripesThisIter = nbStripesPerBlock;
+ initialSecret = secret;
+ } while (nbStripes >= nbStripesPerBlock);
+ *nbStripesSoFarPtr = 0;
+ }
+ /* Process a partial block */
+ if (nbStripes > 0) {
+ f_acc(acc, input, initialSecret, nbStripes);
+ input += nbStripes * XXH_STRIPE_LEN;
*nbStripesSoFarPtr += nbStripes;
}
+ /* Return end pointer */
+ return input;
}
#ifndef XXH3_STREAM_USE_STACK
-# ifndef __clang__ /* clang doesn't need additional stack space */
+# if XXH_SIZE_OPT <= 0 && !defined(__clang__) /* clang doesn't need additional stack space */
# define XXH3_STREAM_USE_STACK 1
# endif
#endif
@@ -4785,7 +5982,7 @@ XXH3_consumeStripes(xxh_u64* XXH_RESTRICT acc,
XXH_FORCE_INLINE XXH_errorcode
XXH3_update(XXH3_state_t* XXH_RESTRICT const state,
const xxh_u8* XXH_RESTRICT input, size_t len,
- XXH3_f_accumulate_512 f_acc512,
+ XXH3_f_accumulate f_acc,
XXH3_f_scrambleAcc f_scramble)
{
if (input==NULL) {
@@ -4801,7 +5998,8 @@ XXH3_update(XXH3_state_t* XXH_RESTRICT const state,
* when operating accumulators directly into state.
* Operating into stack space seems to enable proper optimization.
* clang, on the other hand, doesn't seem to need this trick */
- XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[8]; memcpy(acc, state->acc, sizeof(acc));
+ XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[8];
+ XXH_memcpy(acc, state->acc, sizeof(acc));
#else
xxh_u64* XXH_RESTRICT const acc = state->acc;
#endif
@@ -4809,7 +6007,7 @@ XXH3_update(XXH3_state_t* XXH_RESTRICT const state,
XXH_ASSERT(state->bufferedSize <= XXH3_INTERNALBUFFER_SIZE);
/* small input : just fill in tmp buffer */
- if (state->bufferedSize + len <= XXH3_INTERNALBUFFER_SIZE) {
+ if (len <= XXH3_INTERNALBUFFER_SIZE - state->bufferedSize) {
XXH_memcpy(state->buffer + state->bufferedSize, input, len);
state->bufferedSize += (XXH32_hash_t)len;
return XXH_OK;
@@ -4831,57 +6029,20 @@ XXH3_update(XXH3_state_t* XXH_RESTRICT const state,
&state->nbStripesSoFar, state->nbStripesPerBlock,
state->buffer, XXH3_INTERNALBUFFER_STRIPES,
secret, state->secretLimit,
- f_acc512, f_scramble);
+ f_acc, f_scramble);
state->bufferedSize = 0;
}
XXH_ASSERT(input < bEnd);
-
- /* large input to consume : ingest per full block */
- if ((size_t)(bEnd - input) > state->nbStripesPerBlock * XXH_STRIPE_LEN) {
+ if (bEnd - input > XXH3_INTERNALBUFFER_SIZE) {
size_t nbStripes = (size_t)(bEnd - 1 - input) / XXH_STRIPE_LEN;
- XXH_ASSERT(state->nbStripesPerBlock >= state->nbStripesSoFar);
- /* join to current block's end */
- { size_t const nbStripesToEnd = state->nbStripesPerBlock - state->nbStripesSoFar;
- XXH_ASSERT(nbStripes <= nbStripes);
- XXH3_accumulate(acc, input, secret + state->nbStripesSoFar * XXH_SECRET_CONSUME_RATE, nbStripesToEnd, f_acc512);
- f_scramble(acc, secret + state->secretLimit);
- state->nbStripesSoFar = 0;
- input += nbStripesToEnd * XXH_STRIPE_LEN;
- nbStripes -= nbStripesToEnd;
- }
- /* consume per entire blocks */
- while(nbStripes >= state->nbStripesPerBlock) {
- XXH3_accumulate(acc, input, secret, state->nbStripesPerBlock, f_acc512);
- f_scramble(acc, secret + state->secretLimit);
- input += state->nbStripesPerBlock * XXH_STRIPE_LEN;
- nbStripes -= state->nbStripesPerBlock;
- }
- /* consume last partial block */
- XXH3_accumulate(acc, input, secret, nbStripes, f_acc512);
- input += nbStripes * XXH_STRIPE_LEN;
- XXH_ASSERT(input < bEnd); /* at least some bytes left */
- state->nbStripesSoFar = nbStripes;
- /* buffer predecessor of last partial stripe */
- XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);
- XXH_ASSERT(bEnd - input <= XXH_STRIPE_LEN);
- } else {
- /* content to consume <= block size */
- /* Consume input by a multiple of internal buffer size */
- if (bEnd - input > XXH3_INTERNALBUFFER_SIZE) {
- const xxh_u8* const limit = bEnd - XXH3_INTERNALBUFFER_SIZE;
- do {
- XXH3_consumeStripes(acc,
+ input = XXH3_consumeStripes(acc,
&state->nbStripesSoFar, state->nbStripesPerBlock,
- input, XXH3_INTERNALBUFFER_STRIPES,
- secret, state->secretLimit,
- f_acc512, f_scramble);
- input += XXH3_INTERNALBUFFER_SIZE;
- } while (input<limit);
- /* buffer predecessor of last partial stripe */
- XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);
- }
- }
+ input, nbStripes,
+ secret, state->secretLimit,
+ f_acc, f_scramble);
+ XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);
+ }
/* Some remaining input (always) : buffer it */
XXH_ASSERT(input < bEnd);
XXH_ASSERT(bEnd - input <= XXH3_INTERNALBUFFER_SIZE);
@@ -4890,19 +6051,19 @@ XXH3_update(XXH3_state_t* XXH_RESTRICT const state,
state->bufferedSize = (XXH32_hash_t)(bEnd-input);
#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1
/* save stack accumulators into state */
- memcpy(state->acc, acc, sizeof(acc));
+ XXH_memcpy(state->acc, acc, sizeof(acc));
#endif
}
return XXH_OK;
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_64bits_update(XXH3_state_t* state, const void* input, size_t len)
+XXH3_64bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len)
{
return XXH3_update(state, (const xxh_u8*)input, len,
- XXH3_accumulate_512, XXH3_scrambleAcc);
+ XXH3_accumulate, XXH3_scrambleAcc);
}
@@ -4911,37 +6072,40 @@ XXH3_digest_long (XXH64_hash_t* acc,
const XXH3_state_t* state,
const unsigned char* secret)
{
+ xxh_u8 lastStripe[XXH_STRIPE_LEN];
+ const xxh_u8* lastStripePtr;
+
/*
* Digest on a local copy. This way, the state remains unaltered, and it can
* continue ingesting more input afterwards.
*/
XXH_memcpy(acc, state->acc, sizeof(state->acc));
if (state->bufferedSize >= XXH_STRIPE_LEN) {
+ /* Consume remaining stripes then point to remaining data in buffer */
size_t const nbStripes = (state->bufferedSize - 1) / XXH_STRIPE_LEN;
size_t nbStripesSoFar = state->nbStripesSoFar;
XXH3_consumeStripes(acc,
&nbStripesSoFar, state->nbStripesPerBlock,
state->buffer, nbStripes,
secret, state->secretLimit,
- XXH3_accumulate_512, XXH3_scrambleAcc);
- /* last stripe */
- XXH3_accumulate_512(acc,
- state->buffer + state->bufferedSize - XXH_STRIPE_LEN,
- secret + state->secretLimit - XXH_SECRET_LASTACC_START);
+ XXH3_accumulate, XXH3_scrambleAcc);
+ lastStripePtr = state->buffer + state->bufferedSize - XXH_STRIPE_LEN;
} else { /* bufferedSize < XXH_STRIPE_LEN */
- xxh_u8 lastStripe[XXH_STRIPE_LEN];
+ /* Copy to temp buffer */
size_t const catchupSize = XXH_STRIPE_LEN - state->bufferedSize;
XXH_ASSERT(state->bufferedSize > 0); /* there is always some input buffered */
XXH_memcpy(lastStripe, state->buffer + sizeof(state->buffer) - catchupSize, catchupSize);
XXH_memcpy(lastStripe + catchupSize, state->buffer, state->bufferedSize);
- XXH3_accumulate_512(acc,
- lastStripe,
- secret + state->secretLimit - XXH_SECRET_LASTACC_START);
+ lastStripePtr = lastStripe;
}
+ /* Last stripe */
+ XXH3_accumulate_512(acc,
+ lastStripePtr,
+ secret + state->secretLimit - XXH_SECRET_LASTACC_START);
}
-/*! @ingroup xxh3_family */
-XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t* state)
+/*! @ingroup XXH3_family */
+XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* state)
{
const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret;
if (state->totalLen > XXH3_MIDSIZE_MAX) {
@@ -4957,7 +6121,7 @@ XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t* state)
return XXH3_64bits_withSecret(state->buffer, (size_t)(state->totalLen),
secret, state->secretLimit + XXH_STRIPE_LEN);
}
-
+#endif /* !XXH_NO_STREAM */
/* ==========================================
@@ -4977,7 +6141,7 @@ XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t* state)
* fast for a _128-bit_ hash on 32-bit (it usually clears XXH64).
*/
-XXH_FORCE_INLINE XXH128_hash_t
+XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
XXH3_len_1to3_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
{
/* A doubled version of 1to3_64b with different constants. */
@@ -5006,7 +6170,7 @@ XXH3_len_1to3_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_
}
}
-XXH_FORCE_INLINE XXH128_hash_t
+XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
XXH3_len_4to8_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
{
XXH_ASSERT(input != NULL);
@@ -5026,14 +6190,14 @@ XXH3_len_4to8_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_
m128.low64 ^= (m128.high64 >> 3);
m128.low64 = XXH_xorshift64(m128.low64, 35);
- m128.low64 *= 0x9FB21C651E98DF25ULL;
+ m128.low64 *= PRIME_MX2;
m128.low64 = XXH_xorshift64(m128.low64, 28);
m128.high64 = XXH3_avalanche(m128.high64);
return m128;
}
}
-XXH_FORCE_INLINE XXH128_hash_t
+XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
XXH3_len_9to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
{
XXH_ASSERT(input != NULL);
@@ -5108,7 +6272,7 @@ XXH3_len_9to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64
/*
* Assumption: `secret` size is >= XXH3_SECRET_SIZE_MIN
*/
-XXH_FORCE_INLINE XXH128_hash_t
+XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
XXH3_len_0to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
{
XXH_ASSERT(len <= 16);
@@ -5139,7 +6303,7 @@ XXH128_mix32B(XXH128_hash_t acc, const xxh_u8* input_1, const xxh_u8* input_2,
}
-XXH_FORCE_INLINE XXH128_hash_t
+XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
XXH3_len_17to128_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
XXH64_hash_t seed)
@@ -5150,6 +6314,16 @@ XXH3_len_17to128_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
{ XXH128_hash_t acc;
acc.low64 = len * XXH_PRIME64_1;
acc.high64 = 0;
+
+#if XXH_SIZE_OPT >= 1
+ {
+ /* Smaller, but slightly slower. */
+ unsigned int i = (unsigned int)(len - 1) / 32;
+ do {
+ acc = XXH128_mix32B(acc, input+16*i, input+len-16*(i+1), secret+32*i, seed);
+ } while (i-- != 0);
+ }
+#else
if (len > 32) {
if (len > 64) {
if (len > 96) {
@@ -5160,6 +6334,7 @@ XXH3_len_17to128_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
acc = XXH128_mix32B(acc, input+16, input+len-32, secret+32, seed);
}
acc = XXH128_mix32B(acc, input, input+len-16, secret, seed);
+#endif
{ XXH128_hash_t h128;
h128.low64 = acc.low64 + acc.high64;
h128.high64 = (acc.low64 * XXH_PRIME64_1)
@@ -5172,7 +6347,7 @@ XXH3_len_17to128_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
}
}
-XXH_NO_INLINE XXH128_hash_t
+XXH_NO_INLINE XXH_PUREF XXH128_hash_t
XXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
XXH64_hash_t seed)
@@ -5181,25 +6356,34 @@ XXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX);
{ XXH128_hash_t acc;
- int const nbRounds = (int)len / 32;
- int i;
+ unsigned i;
acc.low64 = len * XXH_PRIME64_1;
acc.high64 = 0;
- for (i=0; i<4; i++) {
+ /*
+ * We set as `i` as offset + 32. We do this so that unchanged
+ * `len` can be used as upper bound. This reaches a sweet spot
+ * where both x86 and aarch64 get simple agen and good codegen
+ * for the loop.
+ */
+ for (i = 32; i < 160; i += 32) {
acc = XXH128_mix32B(acc,
- input + (32 * i),
- input + (32 * i) + 16,
- secret + (32 * i),
+ input + i - 32,
+ input + i - 16,
+ secret + i - 32,
seed);
}
acc.low64 = XXH3_avalanche(acc.low64);
acc.high64 = XXH3_avalanche(acc.high64);
- XXH_ASSERT(nbRounds >= 4);
- for (i=4 ; i < nbRounds; i++) {
+ /*
+ * NB: `i <= len` will duplicate the last 32-bytes if
+ * len % 32 was zero. This is an unfortunate necessity to keep
+ * the hash result stable.
+ */
+ for (i=160; i <= len; i += 32) {
acc = XXH128_mix32B(acc,
- input + (32 * i),
- input + (32 * i) + 16,
- secret + XXH3_MIDSIZE_STARTOFFSET + (32 * (i - 4)),
+ input + i - 32,
+ input + i - 16,
+ secret + XXH3_MIDSIZE_STARTOFFSET + i - 160,
seed);
}
/* last bytes */
@@ -5207,7 +6391,7 @@ XXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
input + len - 16,
input + len - 32,
secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET - 16,
- 0ULL - seed);
+ (XXH64_hash_t)0 - seed);
{ XXH128_hash_t h128;
h128.low64 = acc.low64 + acc.high64;
@@ -5224,12 +6408,12 @@ XXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
XXH_FORCE_INLINE XXH128_hash_t
XXH3_hashLong_128b_internal(const void* XXH_RESTRICT input, size_t len,
const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
- XXH3_f_accumulate_512 f_acc512,
+ XXH3_f_accumulate f_acc,
XXH3_f_scrambleAcc f_scramble)
{
XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC;
- XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, secret, secretSize, f_acc512, f_scramble);
+ XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, secret, secretSize, f_acc, f_scramble);
/* converge into final hash */
XXH_STATIC_ASSERT(sizeof(acc) == 64);
@@ -5247,47 +6431,50 @@ XXH3_hashLong_128b_internal(const void* XXH_RESTRICT input, size_t len,
}
/*
- * It's important for performance that XXH3_hashLong is not inlined.
+ * It's important for performance that XXH3_hashLong() is not inlined.
*/
-XXH_NO_INLINE XXH128_hash_t
+XXH_NO_INLINE XXH_PUREF XXH128_hash_t
XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len,
XXH64_hash_t seed64,
const void* XXH_RESTRICT secret, size_t secretLen)
{
(void)seed64; (void)secret; (void)secretLen;
return XXH3_hashLong_128b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret),
- XXH3_accumulate_512, XXH3_scrambleAcc);
+ XXH3_accumulate, XXH3_scrambleAcc);
}
/*
- * It's important for performance to pass @secretLen (when it's static)
+ * It's important for performance to pass @p secretLen (when it's static)
* to the compiler, so that it can properly optimize the vectorized loop.
+ *
+ * When the secret size is unknown, or on GCC 12 where the mix of NO_INLINE and FORCE_INLINE
+ * breaks -Og, this is XXH_NO_INLINE.
*/
-XXH_FORCE_INLINE XXH128_hash_t
+XXH3_WITH_SECRET_INLINE XXH128_hash_t
XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len,
XXH64_hash_t seed64,
const void* XXH_RESTRICT secret, size_t secretLen)
{
(void)seed64;
return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, secretLen,
- XXH3_accumulate_512, XXH3_scrambleAcc);
+ XXH3_accumulate, XXH3_scrambleAcc);
}
XXH_FORCE_INLINE XXH128_hash_t
XXH3_hashLong_128b_withSeed_internal(const void* XXH_RESTRICT input, size_t len,
XXH64_hash_t seed64,
- XXH3_f_accumulate_512 f_acc512,
+ XXH3_f_accumulate f_acc,
XXH3_f_scrambleAcc f_scramble,
XXH3_f_initCustomSecret f_initSec)
{
if (seed64 == 0)
return XXH3_hashLong_128b_internal(input, len,
XXH3_kSecret, sizeof(XXH3_kSecret),
- f_acc512, f_scramble);
+ f_acc, f_scramble);
{ XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE];
f_initSec(secret, seed64);
return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, sizeof(secret),
- f_acc512, f_scramble);
+ f_acc, f_scramble);
}
}
@@ -5300,7 +6487,7 @@ XXH3_hashLong_128b_withSeed(const void* input, size_t len,
{
(void)secret; (void)secretLen;
return XXH3_hashLong_128b_withSeed_internal(input, len, seed64,
- XXH3_accumulate_512, XXH3_scrambleAcc, XXH3_initCustomSecret);
+ XXH3_accumulate, XXH3_scrambleAcc, XXH3_initCustomSecret);
}
typedef XXH128_hash_t (*XXH3_hashLong128_f)(const void* XXH_RESTRICT, size_t,
@@ -5330,94 +6517,93 @@ XXH3_128bits_internal(const void* input, size_t len,
/* === Public XXH128 API === */
-/*! @ingroup xxh3_family */
-XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(const void* input, size_t len)
+/*! @ingroup XXH3_family */
+XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* input, size_t len)
{
return XXH3_128bits_internal(input, len, 0,
XXH3_kSecret, sizeof(XXH3_kSecret),
XXH3_hashLong_128b_default);
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH128_hash_t
-XXH3_128bits_withSecret(const void* input, size_t len, const void* secret, size_t secretSize)
+XXH3_128bits_withSecret(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize)
{
return XXH3_128bits_internal(input, len, 0,
(const xxh_u8*)secret, secretSize,
XXH3_hashLong_128b_withSecret);
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH128_hash_t
-XXH3_128bits_withSeed(const void* input, size_t len, XXH64_hash_t seed)
+XXH3_128bits_withSeed(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)
{
return XXH3_128bits_internal(input, len, seed,
XXH3_kSecret, sizeof(XXH3_kSecret),
XXH3_hashLong_128b_withSeed);
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH128_hash_t
-XXH3_128bits_withSecretandSeed(const void* input, size_t len, const void* secret, size_t secretSize, XXH64_hash_t seed)
+XXH3_128bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed)
{
if (len <= XXH3_MIDSIZE_MAX)
return XXH3_128bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL);
return XXH3_hashLong_128b_withSecret(input, len, seed, secret, secretSize);
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH128_hash_t
-XXH128(const void* input, size_t len, XXH64_hash_t seed)
+XXH128(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)
{
return XXH3_128bits_withSeed(input, len, seed);
}
/* === XXH3 128-bit streaming === */
-
+#ifndef XXH_NO_STREAM
/*
* All initialization and update functions are identical to 64-bit streaming variant.
* The only difference is the finalization routine.
*/
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_128bits_reset(XXH3_state_t* statePtr)
+XXH3_128bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr)
{
return XXH3_64bits_reset(statePtr);
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_128bits_reset_withSecret(XXH3_state_t* statePtr, const void* secret, size_t secretSize)
+XXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize)
{
return XXH3_64bits_reset_withSecret(statePtr, secret, secretSize);
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_128bits_reset_withSeed(XXH3_state_t* statePtr, XXH64_hash_t seed)
+XXH3_128bits_reset_withSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH64_hash_t seed)
{
return XXH3_64bits_reset_withSeed(statePtr, seed);
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr, const void* secret, size_t secretSize, XXH64_hash_t seed)
+XXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed)
{
return XXH3_64bits_reset_withSecretandSeed(statePtr, secret, secretSize, seed);
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_128bits_update(XXH3_state_t* state, const void* input, size_t len)
+XXH3_128bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len)
{
- return XXH3_update(state, (const xxh_u8*)input, len,
- XXH3_accumulate_512, XXH3_scrambleAcc);
+ return XXH3_64bits_update(state, input, len);
}
-/*! @ingroup xxh3_family */
-XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t* state)
+/*! @ingroup XXH3_family */
+XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_t* state)
{
const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret;
if (state->totalLen > XXH3_MIDSIZE_MAX) {
@@ -5441,13 +6627,13 @@ XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t* state)
return XXH3_128bits_withSecret(state->buffer, (size_t)(state->totalLen),
secret, state->secretLimit + XXH_STRIPE_LEN);
}
-
+#endif /* !XXH_NO_STREAM */
/* 128-bit utility functions */
#include <string.h> /* memcmp, memcpy */
/* return : 1 is equal, 0 if different */
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2)
{
/* note : XXH128_hash_t is compact, it has no padding byte */
@@ -5455,11 +6641,11 @@ XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2)
}
/* This prototype is compatible with stdlib's qsort().
- * return : >0 if *h128_1 > *h128_2
- * <0 if *h128_1 < *h128_2
- * =0 if *h128_1 == *h128_2 */
-/*! @ingroup xxh3_family */
-XXH_PUBLIC_API int XXH128_cmp(const void* h128_1, const void* h128_2)
+ * @return : >0 if *h128_1 > *h128_2
+ * <0 if *h128_1 < *h128_2
+ * =0 if *h128_1 == *h128_2 */
+/*! @ingroup XXH3_family */
+XXH_PUBLIC_API int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2)
{
XXH128_hash_t const h1 = *(const XXH128_hash_t*)h128_1;
XXH128_hash_t const h2 = *(const XXH128_hash_t*)h128_2;
@@ -5471,9 +6657,9 @@ XXH_PUBLIC_API int XXH128_cmp(const void* h128_1, const void* h128_2)
/*====== Canonical representation ======*/
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API void
-XXH128_canonicalFromHash(XXH128_canonical_t* dst, XXH128_hash_t hash)
+XXH128_canonicalFromHash(XXH_NOESCAPE XXH128_canonical_t* dst, XXH128_hash_t hash)
{
XXH_STATIC_ASSERT(sizeof(XXH128_canonical_t) == sizeof(XXH128_hash_t));
if (XXH_CPU_LITTLE_ENDIAN) {
@@ -5484,9 +6670,9 @@ XXH128_canonicalFromHash(XXH128_canonical_t* dst, XXH128_hash_t hash)
XXH_memcpy((char*)dst + sizeof(hash.high64), &hash.low64, sizeof(hash.low64));
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH128_hash_t
-XXH128_hashFromCanonical(const XXH128_canonical_t* src)
+XXH128_hashFromCanonical(XXH_NOESCAPE const XXH128_canonical_t* src)
{
XXH128_hash_t h;
h.high64 = XXH_readBE64(src);
@@ -5502,26 +6688,34 @@ XXH128_hashFromCanonical(const XXH128_canonical_t* src)
*/
#define XXH_MIN(x, y) (((x) > (y)) ? (y) : (x))
-static void XXH3_combine16(void* dst, XXH128_hash_t h128)
+XXH_FORCE_INLINE void XXH3_combine16(void* dst, XXH128_hash_t h128)
{
XXH_writeLE64( dst, XXH_readLE64(dst) ^ h128.low64 );
XXH_writeLE64( (char*)dst+8, XXH_readLE64((char*)dst+8) ^ h128.high64 );
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API XXH_errorcode
-XXH3_generateSecret(void* secretBuffer, size_t secretSize, const void* customSeed, size_t customSeedSize)
+XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize)
{
+#if (XXH_DEBUGLEVEL >= 1)
XXH_ASSERT(secretBuffer != NULL);
- if (secretBuffer == NULL) return XXH_ERROR;
XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN);
+#else
+ /* production mode, assert() are disabled */
+ if (secretBuffer == NULL) return XXH_ERROR;
if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR;
+#endif
+
if (customSeedSize == 0) {
customSeed = XXH3_kSecret;
customSeedSize = XXH_SECRET_DEFAULT_SIZE;
}
+#if (XXH_DEBUGLEVEL >= 1)
XXH_ASSERT(customSeed != NULL);
+#else
if (customSeed == NULL) return XXH_ERROR;
+#endif
/* Fill secretBuffer with a copy of customSeed - repeat as needed */
{ size_t pos = 0;
@@ -5545,9 +6739,9 @@ XXH3_generateSecret(void* secretBuffer, size_t secretSize, const void* customSee
return XXH_OK;
}
-/*! @ingroup xxh3_family */
+/*! @ingroup XXH3_family */
XXH_PUBLIC_API void
-XXH3_generateSecret_fromSeed(void* secretBuffer, XXH64_hash_t seed)
+XXH3_generateSecret_fromSeed(XXH_NOESCAPE void* secretBuffer, XXH64_hash_t seed)
{
XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE];
XXH3_initCustomSecret(secret, seed);
@@ -5560,7 +6754,7 @@ XXH3_generateSecret_fromSeed(void* secretBuffer, XXH64_hash_t seed)
/* Pop our optimization override from above */
#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \
&& defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \
- && defined(__OPTIMIZE__) && !defined(__OPTIMIZE_SIZE__) /* respect -O0 and -Os */
+ && defined(__OPTIMIZE__) && XXH_SIZE_OPT <= 0 /* respect -O0 and -Os */
# pragma GCC pop_options
#endif
@@ -5575,5 +6769,5 @@ XXH3_generateSecret_fromSeed(void* secretBuffer, XXH64_hash_t seed)
#if defined (__cplusplus)
-}
+} /* extern "C" */
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/AGLTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/AGLTable.hpp
index 17ba2335051..c6a5abb2b76 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/AGLTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/AGLTable.hpp
@@ -2,7 +2,7 @@
** AGLTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp
index 0b322765c7e..f87cbcbf3f3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp
@@ -2,7 +2,7 @@
** BasicDVIReader.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.hpp
index 1c2c4147256..c3135cb5d51 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.hpp
@@ -2,7 +2,7 @@
** BasicDVIReader.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Bezier.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Bezier.cpp
index 2d901225312..c5342241398 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Bezier.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Bezier.cpp
@@ -2,7 +2,7 @@
** Bezier.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -270,7 +270,7 @@ vector<QuadBezier> CubicBezier::toQuadBeziers (double precision, vector<double>
QuadBezier CubicBezier::midpointApproximation () const {
DPair p0 = (_points[1]*3.0 - _points[0])/2.0;
DPair p1 = (_points[2]*3.0 - _points[3])/2.0;
- return QuadBezier(_points[0], (p0+p1)/2.0, _points[3]);
+ return {_points[0], (p0+p1)/2.0, _points[3]};
}
@@ -305,7 +305,7 @@ void CubicBezier::toQuadBeziers (double t0, double t1, double precision, vector<
double tmax3 = 18.0/sqrt(3.0)*precision/dist; // the cube of tmax
if (tmax3 >= 1.0) {
// curve is already quadratic, no subdivision necessary, return MPA
- qbeziers.emplace_back(QuadBezier(_points[0], (q1+q2)/2.0, _points[3]));
+ qbeziers.emplace_back(_points[0], (q1+q2)/2.0, _points[3]);
if (startParams)
startParams->push_back(t0);
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Bezier.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Bezier.hpp
index f79180ccb12..7f384a006ab 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Bezier.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Bezier.hpp
@@ -2,7 +2,7 @@
** Bezier.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/BgColorSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/BgColorSpecialHandler.cpp
index 86e5fb72d7f..84f2e4e1fdc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/BgColorSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/BgColorSpecialHandler.cpp
@@ -2,7 +2,7 @@
** BgColorSpecialHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -62,7 +62,7 @@ void BgColorSpecialHandler::dviBeginPage (unsigned pageno, SpecialActions &actio
}
-vector<const char*> BgColorSpecialHandler::prefixes() const {
+vector<const char*> BgColorSpecialHandler::prefixes () const {
vector<const char*> pfx {"background"};
return pfx;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/BgColorSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/BgColorSpecialHandler.hpp
index 7a0290b05f5..00fce303808 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/BgColorSpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/BgColorSpecialHandler.hpp
@@ -2,7 +2,7 @@
** BgColorSpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -31,8 +31,9 @@ class BgColorSpecialHandler : public SpecialHandler {
void preprocess (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
const char* info () const override {return "background color special";}
- const char* name () const override {return "bgcolor";}
- std::vector<const char*> prefixes() const override;
+ const char* name () const override {return handlerName();}
+ static const char* handlerName () {return "bgcolor";}
+ std::vector<const char*> prefixes () const override;
protected:
void dviBeginPage (unsigned pageno, SpecialActions &actions) override;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Bitmap.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Bitmap.cpp
index 517355ba436..d8b9f74da35 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Bitmap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Bitmap.cpp
@@ -2,7 +2,7 @@
** Bitmap.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Bitmap.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Bitmap.hpp
index c12c98c8eb1..3d621586b20 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Bitmap.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Bitmap.hpp
@@ -2,7 +2,7 @@
** Bitmap.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.cpp
index a57da059dc2..a2a0198e7ae 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.cpp
@@ -2,7 +2,7 @@
** BoundingBox.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.hpp
index 673243eb9b4..026bd11b572 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/BoundingBox.hpp
@@ -2,7 +2,7 @@
** BoundingBox.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CLCommandLine.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CLCommandLine.cpp
index 8eb3d549842..d13cdfc3f21 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CLCommandLine.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CLCommandLine.cpp
@@ -2,7 +2,7 @@
** CLCommandLine.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CLCommandLine.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CLCommandLine.hpp
index 72d0bc17a76..ba3089f2c61 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CLCommandLine.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CLCommandLine.hpp
@@ -2,7 +2,7 @@
** CLCommandLine.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CLOption.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CLOption.hpp
index a6dbe55131e..1bdd1780e69 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CLOption.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CLOption.hpp
@@ -2,7 +2,7 @@
** CLOption.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMap.cpp
index 46ca0ba574b..a690085c6f1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMap.cpp
@@ -2,7 +2,7 @@
** CMap.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMap.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMap.hpp
index 0b8ef89a115..1af1901bfe5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMap.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMap.hpp
@@ -2,7 +2,7 @@
** CMap.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapManager.cpp
index 17da0a063a1..e7d5e87e729 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapManager.cpp
@@ -2,7 +2,7 @@
** CMapManager.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapManager.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapManager.hpp
index 56ad32d44d0..1e674ba375d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapManager.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapManager.hpp
@@ -2,7 +2,7 @@
** CMapManager.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapReader.cpp
index 4b8f3297ac4..59729edbb1d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapReader.cpp
@@ -2,7 +2,7 @@
** CMapReader.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapReader.hpp
index 9ef573f5dd9..716b2faec75 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CMapReader.hpp
@@ -2,7 +2,7 @@
** CMapReader.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Calculator.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Calculator.cpp
index db7241245df..00226761fc6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Calculator.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Calculator.cpp
@@ -2,7 +2,7 @@
** Calculator.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Calculator.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Calculator.hpp
index 150c2ee7453..355cbbae0db 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Calculator.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Calculator.hpp
@@ -2,7 +2,7 @@
** Calculator.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CharMapID.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CharMapID.cpp
index b5a85766677..b68c50fe324 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CharMapID.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CharMapID.cpp
@@ -2,7 +2,7 @@
** CharMapID.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CharMapID.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CharMapID.hpp
index 400185dc2b8..87c4294035c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CharMapID.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CharMapID.hpp
@@ -2,7 +2,7 @@
** CharMapID.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Character.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Character.hpp
index 5811481dcc8..0569205ae3d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Character.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Character.hpp
@@ -2,7 +2,7 @@
** Character.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Color.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Color.cpp
index d5b64130818..cffdb41531e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Color.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Color.cpp
@@ -2,7 +2,7 @@
** Color.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -55,6 +55,35 @@ void Color::setRGB (double r, double g, double b) {
}
+/** Sets the color value according to a given hex RGB string of the
+ * form "#123456" or "#123" where the latter is expanded to "#112233".
+ * The leading '#' character is optional.
+ * @param[in] hexString the RGB hex string
+ * @return true if the color value was assigned successfully */
+bool Color::setRGBHexString (string hexString) {
+ if (!hexString.empty()) {
+ if (hexString[0] == '#')
+ hexString = hexString.substr(1);
+ if (hexString.length() == 3) {
+ // expand short form "123" to "112233"
+ hexString.resize(6);
+ hexString[5] = hexString[4] = hexString[2];
+ hexString[3] = hexString[2] = hexString[1];
+ hexString[1] = hexString[0];
+ }
+ if (hexString.length() == 6) {
+ try {
+ _rgb = stoi(hexString, nullptr, 16);
+ return true;
+ }
+ catch (...) {
+ }
+ }
+ }
+ return false;
+}
+
+
/** Expects a PostScript color name and sets the color accordingly.
* @param[in] name PS color name
* @param[in] case_sensitive if true, upper/lower case spelling is significant
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Color.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Color.hpp
index e133db7436b..25d20b755ce 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Color.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Color.hpp
@@ -2,7 +2,7 @@
** Color.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -56,6 +56,7 @@ class Color {
void setRGB (uint8_t r, uint8_t g, uint8_t b) {_rgb = (r << 16) | (g << 8) | b;}
void setRGB (double r, double g, double b);
void setRGB (const std::valarray<double> &rgb) {setRGB(rgb[0], rgb[1], rgb[2]);}
+ bool setRGBHexString (std::string hexString);
bool setPSName (std::string name, bool case_sensitive=true);
void setGray (uint8_t g) {setRGB(g,g,g);}
void setGray (double g) {setRGB(g,g,g);}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ColorSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ColorSpecialHandler.cpp
index 35bc111ee35..c35f6b0ebaa 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ColorSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ColorSpecialHandler.cpp
@@ -2,7 +2,7 @@
** ColorSpecialHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -113,7 +113,7 @@ bool ColorSpecialHandler::process (const string&, istream &is, SpecialActions &a
}
-vector<const char*> ColorSpecialHandler::prefixes() const {
+vector<const char*> ColorSpecialHandler::prefixes () const {
vector<const char*> pfx {"color"};
return pfx;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ColorSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ColorSpecialHandler.hpp
index ea542e1f06c..20a589bfa12 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ColorSpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ColorSpecialHandler.hpp
@@ -2,7 +2,7 @@
** ColorSpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -33,9 +33,10 @@ class ColorSpecialHandler : public SpecialHandler {
bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
static Color readColor (std::istream &is);
static Color readColor (const std::string &model, std::istream &is);
- const char* name () const override {return "color";}
+ const char* name () const override {return handlerName();}
+ static const char* handlerName () {return "color";}
const char* info () const override {return "complete support of color specials";}
- std::vector<const char*> prefixes() const override;
+ std::vector<const char*> prefixes () const override;
private:
std::stack<Color> _colorStack;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/CommandLine.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/CommandLine.hpp
index 72edde3ee10..76f8208d07a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/CommandLine.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/CommandLine.hpp
@@ -2,7 +2,7 @@
// It is part of the dvisvgm package and published under the terms
// of the GNU General Public License version 3, or (at your option) any later version.
// See file COPYING for further details.
-// Copyright (C) 2016-2023 Martin Gieseking <martin.gieseking@uos.de>
+// Copyright (C) 2016-2024 Martin Gieseking <martin.gieseking@uos.de>
#ifndef COMMANDLINE_HPP
#define COMMANDLINE_HPP
@@ -20,7 +20,7 @@ class CommandLine : public CL::CommandLine {
CommandLine () : CL::CommandLine(
"This program converts DVI files, as created by TeX/LaTeX, as well as\nEPS and PDF files to the XML-based scalable vector graphics format SVG.",
"[options] dvifile\n--eps [options] epsfile\n--pdf [options] pdffile",
- "Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de>"
+ "Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de>"
) {}
CommandLine (int argc, char **argv) : CommandLine() {
@@ -35,6 +35,7 @@ class CommandLine : public CL::CommandLine {
Option colorOpt {"color", '\0', "colorize messages"};
Option colornamesOpt {"colornames", '\0', "prefer color names to RGB values if possible"};
Option commentsOpt {"comments", '\0', "add comments with additional information"};
+ TypedOption<std::string, Option::ArgMode::OPTIONAL> currentcolorOpt {"currentcolor", '\0', "color", "#000", "replace given color with 'currentColor'"};
Option debugGlyphsOpt {"debug-glyphs", '\0', "create PS files for all glyphs converted to TTF"};
Option embedBitmapsOpt {"embed-bitmaps", '\0', "prevent references to external bitmap files"};
Option epsOpt {"eps", 'E', "convert EPS file to SVG"};
@@ -50,6 +51,7 @@ class CommandLine : public CL::CommandLine {
TypedOption<std::string, Option::ArgMode::REQUIRED> linkmarkOpt {"linkmark", 'L', "style", "box", "select how to mark hyperlinked areas"};
Option listSpecialsOpt {"list-specials", 'l', "print supported special sets and exit"};
TypedOption<double, Option::ArgMode::REQUIRED> magOpt {"mag", 'M', "factor", 4, "magnification of Metafont output"};
+ TypedOption<std::string, Option::ArgMode::REQUIRED> messageOpt {"message", '\0', "text", "print message text after writing an SVG file"};
TypedOption<int, Option::ArgMode::OPTIONAL> noFontsOpt {"no-fonts", 'n', "variant", 0, "draw glyphs by using path elements"};
Option noMergeOpt {"no-merge", '\0', "don't merge adjacent text elements"};
Option noMktexmfOpt {"no-mktexmf", '\0', "don't try to create missing fonts"};
@@ -71,7 +73,7 @@ class CommandLine : public CL::CommandLine {
TypedOption<bool, Option::ArgMode::OPTIONAL> traceAllOpt {"trace-all", 'a', "retrace", false, "trace all glyphs of bitmap fonts"};
TypedOption<std::string, Option::ArgMode::REQUIRED> transformOpt {"transform", 'T', "commands", "transform page content"};
TypedOption<std::string, Option::ArgMode::REQUIRED> translateOpt {"translate", 't', "tx[,ty]", "shift page content"};
- TypedOption<unsigned, Option::ArgMode::REQUIRED> verbosityOpt {"verbosity", 'v', "level", 7, "set verbosity level (0-7)"};
+ TypedOption<unsigned, Option::ArgMode::REQUIRED> verbosityOpt {"verbosity", 'v', "level", 15, "set verbosity level (0-15)"};
TypedOption<bool, Option::ArgMode::OPTIONAL> versionOpt {"version", 'V', "extended", false, "print version and exit"};
TypedOption<int, Option::ArgMode::OPTIONAL> zipOpt {"zip", 'z', "level", 9, "create compressed .svgz file"};
TypedOption<double, Option::ArgMode::REQUIRED> zoomOpt {"zoom", 'Z', "factor", 1.0, "zoom page content"};
@@ -108,6 +110,7 @@ class CommandLine : public CL::CommandLine {
#endif
{&colornamesOpt, 1},
{&commentsOpt, 1},
+ {&currentcolorOpt, 1},
{&embedBitmapsOpt, 1},
#if !defined(DISABLE_WOFF)
{&fontFormatOpt, 1},
@@ -154,6 +157,7 @@ class CommandLine : public CL::CommandLine {
{&colorOpt, 4},
{&helpOpt, 4},
{&listSpecialsOpt, 4},
+ {&messageOpt, 4},
{&progressOpt, 4},
{&verbosityOpt, 4},
{&versionOpt, 4},
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DLLoader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DLLoader.cpp
index 3ac13ff430b..583573d19bb 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DLLoader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DLLoader.cpp
@@ -2,7 +2,7 @@
** DLLoader.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DLLoader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DLLoader.hpp
index 48c774200b3..67b7c73a959 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DLLoader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DLLoader.hpp
@@ -2,7 +2,7 @@
** DLLoader.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIActions.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIActions.hpp
index 8e2e2a08294..04cdec2cdbe 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIActions.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIActions.hpp
@@ -2,7 +2,7 @@
** DVIActions.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -21,6 +21,7 @@
#ifndef DVIACTIONS_HPP
#define DVIACTIONS_HPP
+#include <cstdint>
#include <string>
#include <vector>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.cpp
index 6dd7bebb69b..b7c08bc1395 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.cpp
@@ -2,7 +2,7 @@
** DVIReader.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -206,8 +206,11 @@ void DVIReader::putVFChar (Font *font, uint32_t c) {
FontManager &fm = FontManager::instance();
const vector<uint8_t> *dvi = vf->getDVI(c); // try to get DVI snippet that represents character c
Font *firstFont = fm.vfFirstFont(vf);
- if (!dvi && (!firstFont || !firstFont->getMetrics()->isJFM()))
- return;
+ if (!dvi) {
+ const FontMetrics *ffm = firstFont ? firstFont->getMetrics() : nullptr;
+ if (!ffm || (!ffm->isJFM() && !ffm->isOFM()))
+ return;
+ }
fm.enterVF(vf); // enter VF font number context
int savedFontNum = _currFontNum; // save current font number
setFont(fm.vfFirstFontNum(vf), SetFontMode::VF_ENTER);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.hpp
index d8da02f0c24..ffab16c5a81 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIReader.hpp
@@ -2,7 +2,7 @@
** DVIReader.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.cpp
index f5501f33f6c..b4340a89fec 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.cpp
@@ -2,7 +2,7 @@
** DVIToSVG.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -124,10 +124,17 @@ void DVIToSVG::convert (unsigned first, unsigned last, HashFunction *hashFunc) {
string fname = path.shorterAbsoluteOrRelative();
if (fname.empty())
fname = "<stdout>";
- if (success)
- Message::mstream(false, Message::MC_PAGE_WRITTEN) << "\noutput written to " << fname << '\n';
- else
+ if (!success)
Message::wstream(true) << "failed to write output to " << fname << '\n';
+ else {
+ Message::mstream(false, Message::MC_PAGE_WRITTEN) << "\noutput written to " << fname << '\n';
+ if (!_userMessage.empty()) {
+ if (auto specialActions = dynamic_cast<SpecialActions*>(_actions.get())) {
+ string msg = specialActions->expandText(_userMessage);
+ Message::ustream(true) << msg << "\n";
+ }
+ }
+ }
_svg.reset();
_actions->reset();
}
@@ -377,48 +384,67 @@ void DVIToSVG::embedFonts (XMLElement *svgElement) {
}
+static vector<string> extract_prefixes (const char *ignorelist) {
+ vector<string> prefixes;
+ if (ignorelist) {
+ const char *left = ignorelist;
+ while (*left) {
+ while (*left && !isalnum(*left))
+ left++;
+ const char *right = left;
+ while (*right && isalnum(*right))
+ right++;
+ if (*left)
+ prefixes.emplace_back(left, right-left);
+ left = right;
+ }
+ }
+ return prefixes;
+}
+
+
/** Enables or disables processing of specials. If ignorelist == 0, all
* supported special handlers are loaded. To disable selected sets of specials,
* the corresponding prefixes can be given separated by non alpha-numeric characters,
* e.g. "color, ps, em" or "color: ps em" etc.
* A single "*" in the ignore list disables all specials.
- * @param[in] ignorelist list of special prefixes to ignore
+ * @param[in] ignorelist list of hanlder names to ignore
* @param[in] pswarning if true, shows warning about disabled PS support
* @return the SpecialManager that handles special statements */
void DVIToSVG::setProcessSpecials (const char *ignorelist, bool pswarning) {
if (ignorelist && strcmp(ignorelist, "*") == 0) // ignore all specials?
SpecialManager::instance().unregisterHandlers();
else {
+ auto ignoredHandlerName = extract_prefixes(ignorelist);
// add special handlers
- vector<unique_ptr<SpecialHandler>> handlers;
- handlers.emplace_back(util::make_unique<BgColorSpecialHandler>()); // handles background color special
- handlers.emplace_back(util::make_unique<ColorSpecialHandler>()); // handles color specials
- handlers.emplace_back(util::make_unique<DvisvgmSpecialHandler>()); // handles raw SVG embeddings
- handlers.emplace_back(util::make_unique<EmSpecialHandler>()); // handles emTeX specials
- handlers.emplace_back(util::make_unique<HtmlSpecialHandler>()); // handles hyperref specials
- handlers.emplace_back(util::make_unique<PapersizeSpecialHandler>()); // handles papersize special
- handlers.emplace_back(util::make_unique<PdfSpecialHandler>()); // handles pdf specials
- handlers.emplace_back(util::make_unique<TpicSpecialHandler>()); // handles tpic specials
+ SpecialManager::registerHandler<BgColorSpecialHandler>(ignoredHandlerName); // handles background color special
+ SpecialManager::registerHandler<ColorSpecialHandler>(ignoredHandlerName); // handles color specials
+ SpecialManager::registerHandler<DvisvgmSpecialHandler>(ignoredHandlerName); // handles raw SVG embeddings
+ SpecialManager::registerHandler<EmSpecialHandler>(ignoredHandlerName); // handles emTeX specials
+ SpecialManager::registerHandler<HtmlSpecialHandler>(ignoredHandlerName); // handles hyperref specials
+ SpecialManager::registerHandler<PapersizeSpecialHandler>(ignoredHandlerName); // handles papersize special
+ SpecialManager::registerHandler<PdfSpecialHandler>(ignoredHandlerName); // handles pdf specials
+ SpecialManager::registerHandler<TpicSpecialHandler>(ignoredHandlerName); // handles tpic specials
+ if (find(ignoredHandlerName.begin(), ignoredHandlerName.end(), PsSpecialHandler::handlerName()) == ignoredHandlerName.end()) {
#ifndef DISABLE_GS
- if (Ghostscript().available())
- handlers.emplace_back(util::make_unique<PsSpecialHandler>()); // handles PostScript specials
- else
+ if (Ghostscript().available())
+ SpecialManager::registerHandler<PsSpecialHandler>(ignoredHandlerName); // handles PostScript specials
+ else
#endif
- {
+ {
#ifndef HAVE_LIBGS
- // dummy PS special handler that only prints warning messages
- handlers.emplace_back(util::make_unique<NoPsSpecialHandler>());
- if (pswarning) {
+ // dummy PS special handler that only prints warning messages
+ SpecialManager::registerHandler<NoPsSpecialHandler>(ignoredHandlerName);
+ if (pswarning) {
#ifdef DISABLE_GS
- Message::wstream() << "processing of PostScript specials has been disabled permanently\n";
+ Message::wstream() << "processing of PostScript specials has been disabled permanently\n";
#else
- Message::wstream() << "processing of PostScript specials is disabled (Ghostscript not found)\n";
+ Message::wstream() << "processing of PostScript specials is disabled (Ghostscript not found)\n";
#endif
- }
+ }
#endif
+ }
}
- SpecialManager::instance().unregisterHandlers();
- SpecialManager::instance().registerHandlers(handlers, ignorelist);
}
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.hpp
index ada151cca07..1f749bf729a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVG.hpp
@@ -2,7 +2,7 @@
** DVIToSVG.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -55,6 +55,7 @@ class DVIToSVG : public DVIReader {
void convert (const std::string &range, std::pair<int,int> *pageinfo=nullptr);
void setPageSize (const std::string &format) {_bboxFormatString = format;}
void setPageTransformation (const std::string &cmds) {_transCmds = cmds;}
+ void setUserMessage (const std::string &msg) {_userMessage = msg;}
Matrix getPageTransformation () const override;
void translateToX (double x) override {_tx = x-dviState().h-_tx;}
void translateToY (double y) override {_ty = y-dviState().v-_ty;}
@@ -103,6 +104,7 @@ class DVIToSVG : public DVIReader {
std::unique_ptr<DVIActions> _actions;
std::string _bboxFormatString; ///< bounding box size/format set by the user
std::string _transCmds; ///< page transformation commands set by the user
+ std::string _userMessage; ///< message printed after conversion of a page
double _pageHeight=0, _pageWidth=0; ///< global page height and width stored in the postamble
double _tx=0, _ty=0; ///< translation of cursor position
double _prevXPos, _prevYPos; ///< previous cursor position
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp
index 1d173dfa8f1..6970be756e6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp
@@ -2,7 +2,7 @@
** DVIToSVGActions.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.hpp
index 138670ddbcc..7dc55536ccf 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.hpp
@@ -2,7 +2,7 @@
** DVIToSVGActions.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Directory.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Directory.cpp
index 4f89c1c3718..35c8c49b34f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Directory.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Directory.cpp
@@ -2,7 +2,7 @@
** Directory.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Directory.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Directory.hpp
index 257a7c4ea27..6c55e032807 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Directory.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Directory.hpp
@@ -2,7 +2,7 @@
** Directory.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.cpp
index abeb52be36c..ca1f4a7fc19 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.cpp
@@ -2,7 +2,7 @@
** DvisvgmSpecialHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -18,7 +18,6 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#include <array>
#include <cstring>
#include <utility>
#include "Calculator.hpp"
@@ -27,6 +26,7 @@
#include "InputBuffer.hpp"
#include "InputReader.hpp"
#include "Length.hpp"
+#include "Message.hpp"
#include "SpecialActions.hpp"
#include "SVGTree.hpp"
#include "utility.hpp"
@@ -95,24 +95,23 @@ DvisvgmSpecialHandler::DvisvgmSpecialHandler () : _currentMacro(_macros.end())
void DvisvgmSpecialHandler::preprocess (const string&, istream &is, SpecialActions&) {
- struct Command {
+ constexpr struct Command {
const char *name;
void (DvisvgmSpecialHandler::*handler)(InputReader&);
- };
- constexpr array<Command, 5> commands {{
+ } commands[] = {
{"raw", &DvisvgmSpecialHandler::preprocessRaw},
{"rawdef", &DvisvgmSpecialHandler::preprocessRawDef},
{"rawset", &DvisvgmSpecialHandler::preprocessRawSet},
{"endrawset", &DvisvgmSpecialHandler::preprocessEndRawSet},
{"rawput", &DvisvgmSpecialHandler::preprocessRawPut}
- }};
+ };
StreamInputReader ir(is);
const string cmdstr = ir.getWord();
- auto it = find_if(commands.begin(), commands.end(), [&](const Command &cmd) {
+ auto it = find_if(begin(commands), end(commands), [&](const Command &cmd) {
return cmd.name == cmdstr;
});
- if (it != commands.end()) {
+ if (it != end(commands)) {
ir.skipSpace();
(this->*it->handler)(ir);
}
@@ -172,25 +171,26 @@ void DvisvgmSpecialHandler::preprocessRawPut (InputReader &ir) {
* @param[in] is the special statement is read from this stream
* @param[in] actions object providing the actions that can be performed by the SpecialHandler */
bool DvisvgmSpecialHandler::process (const string &prefix, istream &is, SpecialActions &actions) {
- struct Command {
+ constexpr struct Command {
const char *name;
void (DvisvgmSpecialHandler::*handler)(InputReader&, SpecialActions&);
+ } commands[] = {
+ {"raw", &DvisvgmSpecialHandler::processRaw},
+ {"rawdef", &DvisvgmSpecialHandler::processRawDef},
+ {"rawset", &DvisvgmSpecialHandler::processRawSet},
+ {"endrawset", &DvisvgmSpecialHandler::processEndRawSet},
+ {"rawput", &DvisvgmSpecialHandler::processRawPut},
+ {"bbox", &DvisvgmSpecialHandler::processBBox},
+ {"img", &DvisvgmSpecialHandler::processImg},
+ {"currentcolor", &DvisvgmSpecialHandler::processCurrentColor},
+ {"message", &DvisvgmSpecialHandler::processMessage}
};
- constexpr array<Command, 7> commands {{
- {"raw", &DvisvgmSpecialHandler::processRaw},
- {"rawdef", &DvisvgmSpecialHandler::processRawDef},
- {"rawset", &DvisvgmSpecialHandler::processRawSet},
- {"endrawset", &DvisvgmSpecialHandler::processEndRawSet},
- {"rawput", &DvisvgmSpecialHandler::processRawPut},
- {"bbox", &DvisvgmSpecialHandler::processBBox},
- {"img", &DvisvgmSpecialHandler::processImg}
- }};
StreamInputReader ir(is);
const string cmdstr = ir.getWord();
- auto it = find_if(commands.begin(), commands.end(), [&](const Command &cmd) {
+ auto it = find_if(begin(commands), end(commands), [&](const Command &cmd) {
return cmd.name == cmdstr;
});
- if (it != commands.end()) {
+ if (it != end(commands)) {
ir.skipSpace();
(this->*it->handler)(ir, actions);
}
@@ -198,80 +198,6 @@ bool DvisvgmSpecialHandler::process (const string &prefix, istream &is, SpecialA
}
-/** Replaces constants of the form {?name} by their corresponding value.
- * @param[in,out] str text to expand
- * @param[in] actions interfcae to the world outside the special handler */
-static void expand_constants (string &str, SpecialActions &actions) {
- bool repl_bbox = true;
- while (repl_bbox) {
- const auto pos = str.find("{?bbox ");
- if (pos == string::npos)
- repl_bbox = false;
- else {
- auto endpos = pos+7;
- while (endpos < str.length() && isalnum(str[endpos]))
- ++endpos;
- if (str[endpos] != '}')
- repl_bbox = false;
- else {
- BoundingBox &box = actions.bbox(str.substr(pos+7, endpos-pos-7));
- str.replace(pos, endpos-pos+1, box.svgViewBoxString());
- }
- }
- }
- struct Constant {
- const char *name;
- string val;
- };
- const array<Constant, 5> constants {{
- {"x", XMLString(actions.getX())},
- {"y", XMLString(actions.getY())},
- {"color", actions.getColor().svgColorString()},
- {"matrix", actions.getMatrix().toSVG()},
- {"nl", "\n"},
- }};
- for (const Constant &constant : constants) {
- const string pattern = string("{?")+constant.name+"}";
- auto pos = str.find(pattern);
- while (pos != string::npos) {
- str.replace(pos, strlen(constant.name)+3, constant.val);
- pos = str.find(pattern, pos+constant.val.length()); // look for further matches
- }
- }
-}
-
-
-/** Evaluates substrings of the form {?(expr)} where 'expr' is a math expression,
- * and replaces the substring by the computed value.
- * @param[in,out] str string to scan for expressions */
-static void evaluate_expressions (string &str, const SpecialActions &actions) {
- auto left = str.find("{?("); // start position of expression macro
- while (left != string::npos) {
- auto right = str.find(")}", left+2); // end position of expression macro
- if (right == string::npos)
- break;
- Calculator calc;
- calc.setVariable("x", actions.getX());
- calc.setVariable("y", actions.getY());
- string expr = str.substr(left+3, right-left-3); // math expression to evaluate
- if (util::normalize_space(expr).empty()) // no expression given, e.g. {?( )}
- str.erase(left, right-left+2); // => replace with empty string
- else {
- try {
- double val = calc.eval(expr);
- XMLString valstr(val);
- str.replace(left, right-left+2, valstr);
- right = left+valstr.length()-1;
- }
- catch (CalculatorException &e) {
- throw SpecialException(string(e.what())+" in '{?("+expr+")}'");
- }
- }
- left = str.find("{?(", right+1); // find next expression macro
- }
-}
-
-
/** Processes raw SVG fragments from the input stream. The SVG data must represent
* a single or multiple syntactically complete XML parts, like opening/closing tags,
* comments, or CDATA blocks. These must not be split and distributed over several
@@ -281,8 +207,7 @@ void DvisvgmSpecialHandler::processRaw (InputReader &ir, SpecialActions &actions
if (_nestingLevel == 0) {
string xml = ir.getLine();
if (!xml.empty()) {
- evaluate_expressions(xml, actions);
- expand_constants(xml, actions);
+ xml = actions.expandText(xml);
_pageParser.parse(std::move(xml));
}
}
@@ -293,8 +218,7 @@ void DvisvgmSpecialHandler::processRawDef (InputReader &ir, SpecialActions &acti
if (_nestingLevel == 0) {
string xml = ir.getLine();
if (!xml.empty()) {
- evaluate_expressions(xml, actions);
- expand_constants(xml, actions);
+ xml = actions.expandText(xml);
_defsParser.parse(std::move(xml));
}
}
@@ -325,7 +249,7 @@ void DvisvgmSpecialHandler::processRawPut (InputReader &ir, SpecialActions &acti
char &type = defstr[0];
string def = defstr.substr(1);
if ((type == 'P' || type == 'D') && !def.empty()) {
- expand_constants(def, actions);
+ def = actions.expandText(def);
if (type == 'P')
_pageParser.parse(std::move(def));
else { // type == 'D'
@@ -452,6 +376,32 @@ void DvisvgmSpecialHandler::processImg (InputReader &ir, SpecialActions &actions
}
+void DvisvgmSpecialHandler::processCurrentColor (InputReader &ir, SpecialActions &actions) {
+ string param = ir.getString();
+ Color color = actions.getColor();
+ if (param.empty() || param == "on") {
+ SVGElement::CURRENTCOLOR = color;
+ SVGElement::USE_CURRENTCOLOR = true;
+ }
+ else if (param == "off") {
+ if (SVGElement::USE_CURRENTCOLOR) {
+ // force a color change to get the new currentColor setting recognized
+ actions.setColor(Color{uint32_t(color)+1});
+ actions.setColor(color);
+ SVGElement::USE_CURRENTCOLOR = false;
+ }
+ }
+ else
+ throw SpecialException("currentcolor: unknown parameter '"+param+"'");
+}
+
+
+void DvisvgmSpecialHandler::processMessage (InputReader &ir, SpecialActions &actions) {
+ string message = actions.expandText(ir.getLine());
+ Message::ustream() << message << "\n";
+}
+
+
void DvisvgmSpecialHandler::dviPreprocessingFinished () {
string id;
if (_currentMacro != _macros.end())
@@ -486,7 +436,7 @@ void DvisvgmSpecialHandler::dviEndPage (unsigned, SpecialActions &actions) {
}
-vector<const char*> DvisvgmSpecialHandler::prefixes() const {
+vector<const char*> DvisvgmSpecialHandler::prefixes () const {
vector<const char*> pfx {"dvisvgm:"};
return pfx;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.hpp
index 4c9c84b078a..5d04b289522 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DvisvgmSpecialHandler.hpp
@@ -2,7 +2,7 @@
** DvisvgmSpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -73,11 +73,12 @@ class DvisvgmSpecialHandler : public SpecialHandler {
public:
DvisvgmSpecialHandler ();
- const char* name () const override {return "dvisvgm";}
- const char* info () const override {return "special set for embedding raw SVG snippets";}
- std::vector<const char*> prefixes() const override;
void preprocess (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
+ const char* info () const override {return "special set for embedding raw SVG snippets";}
+ const char* name () const override {return handlerName();}
+ static const char* handlerName () {return "dvisvgm";}
+ std::vector<const char*> prefixes () const override;
protected:
void preprocessRaw (InputReader &ir);
@@ -92,6 +93,8 @@ class DvisvgmSpecialHandler : public SpecialHandler {
void processRawPut (InputReader &ir, SpecialActions &actions);
void processBBox (InputReader &ir, SpecialActions &actions);
void processImg (InputReader &ir, SpecialActions &actions);
+ void processCurrentColor (InputReader &ir, SpecialActions &actions);
+ void processMessage (InputReader &ir, SpecialActions &actions);
void dviPreprocessingFinished () override;
void dviBeginPage (unsigned pageno, SpecialActions &actions) override;
void dviEndPage (unsigned pageno, SpecialActions &actions) override;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp
index 982c72facaa..abd6fcea8ae 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp
@@ -2,7 +2,7 @@
** EPSFile.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.hpp
index 2aa74cb6ba2..8ded7f39633 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.hpp
@@ -2,7 +2,7 @@
** EPSFile.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSToSVG.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSToSVG.hpp
index f1e550b1354..73bec354222 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSToSVG.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSToSVG.hpp
@@ -2,7 +2,7 @@
** EPSToSVG.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/EllipticalArc.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/EllipticalArc.cpp
index 13b6b2d596b..299530ef7df 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/EllipticalArc.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/EllipticalArc.cpp
@@ -2,7 +2,7 @@
** EllipticalArc.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/EllipticalArc.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/EllipticalArc.hpp
index 841e4903edb..e5a0954f720 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/EllipticalArc.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/EllipticalArc.hpp
@@ -2,7 +2,7 @@
** EllipticalArc.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/EmSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/EmSpecialHandler.cpp
index e116227ba9b..e939343a136 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/EmSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/EmSpecialHandler.cpp
@@ -2,7 +2,7 @@
** EmSpecialHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -258,7 +258,7 @@ void EmSpecialHandler::dviEndPage (unsigned pageno, SpecialActions &actions) {
}
-vector<const char*> EmSpecialHandler::prefixes() const {
+vector<const char*> EmSpecialHandler::prefixes () const {
vector<const char*> pfx {"em:"};
return pfx;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/EmSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/EmSpecialHandler.hpp
index aee0219c123..1c195a2b57e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/EmSpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/EmSpecialHandler.hpp
@@ -2,7 +2,7 @@
** EmSpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -38,10 +38,11 @@ class EmSpecialHandler : public SpecialHandler {
};
public:
- const char* name () const override {return "em";}
- const char* info () const override {return "line drawing statements of the emTeX special set";}
- std::vector<const char*> prefixes() const override;
bool process (const std::string &prefix, std::istream &in, SpecialActions &actions) override;
+ const char* info () const override {return "line drawing statements of the emTeX special set";}
+ const char* name () const override {return handlerName();}
+ static const char* handlerName () {return "em";}
+ std::vector<const char*> prefixes () const override;
protected:
void dviEndPage (unsigned pageno, SpecialActions &actions) override;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/EncFile.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/EncFile.cpp
index af47ead6eaa..d8ad95bca41 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/EncFile.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/EncFile.cpp
@@ -2,7 +2,7 @@
** EncFile.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/EncFile.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/EncFile.hpp
index 7aceb65b05a..4a991f59d22 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/EncFile.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/EncFile.hpp
@@ -2,7 +2,7 @@
** EncFile.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FileFinder.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FileFinder.cpp
index 369ef33f49c..9ba1443de10 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FileFinder.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FileFinder.cpp
@@ -2,7 +2,7 @@
** FileFinder.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -161,6 +161,7 @@ const char* FileFinder::findFile (const std::string &fname, const char *ftype) c
#ifndef MIKTEX
static std::map<std::string, kpse_file_format_type> types = {
{"tfm", kpse_tfm_format},
+ {"ofm", kpse_ofm_format},
{"pfb", kpse_type1_format},
{"vf", kpse_vf_format},
{"mf", kpse_mf_format},
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FileFinder.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FileFinder.hpp
index d0d291e9ba4..c379c1fde1b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FileFinder.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FileFinder.hpp
@@ -2,7 +2,7 @@
** FileFinder.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp
index 477c9d08ee3..441f2cf85bc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.cpp
@@ -2,7 +2,7 @@
** FilePath.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.hpp
index 8d705f60fea..8833d6beb3b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FilePath.hpp
@@ -2,7 +2,7 @@
** FilePath.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.cpp
index e4aefddc057..940d77364fc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.cpp
@@ -2,7 +2,7 @@
** FileSystem.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.hpp
index 1a9565ee7fc..ca437e8e972 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FileSystem.hpp
@@ -2,7 +2,7 @@
** FileSystem.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FixWord.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FixWord.hpp
index 6e1214ce208..e8ad8a3155b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FixWord.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FixWord.hpp
@@ -2,7 +2,7 @@
** FixWord.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.cpp
index c60b1628288..42737d364ae 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.cpp
@@ -2,7 +2,7 @@
** Font.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -112,13 +112,14 @@ const FontMetrics* TFMFont::getMetrics () const {
try {
_metrics = FontMetrics::read(_fontname);
if (!_metrics) {
- _metrics = util::make_unique<NullFontMetric>();
+ _metrics = util::make_unique<NullFontMetrics>();
Message::wstream(true) << "can't find "+_fontname+".tfm\n";
}
}
catch (FontMetricException &e) {
- _metrics = util::make_unique<NullFontMetric>();
- Message::wstream(true) << e.what() << " in " << _fontname << ".tfm\n";
+ const char *ext = (_metrics && _metrics->isOFM()) ? ".ofm" : ".tfm";
+ _metrics = util::make_unique<NullFontMetrics>();
+ Message::wstream(true) << e.what() << " in " << _fontname << ext << "\n";
}
}
return _metrics.get();
@@ -453,14 +454,17 @@ bool PhysicalFont::getExactGlyphBox (int c, GlyphMetrics &metrics, bool vertical
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;
+ metrics.wl = -charbox.minX();
+ metrics.wr = charbox.maxX();
+ metrics.h = charbox.maxY();
+ metrics.d = -charbox.minY();
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;
+ double wl = max(0.0, metrics.wl);
+ double wr = max(0.0, metrics.wr);
+ double h = max(0.0, metrics.h);
+ metrics.wl = metrics.wr = (wl+wr)/2;
+ metrics.d += h;
metrics.h = 0;
}
else {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.hpp
index 74f1b510cbe..84c19e512e3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Font.hpp
@@ -2,7 +2,7 @@
** Font.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -291,6 +291,8 @@ class NativeFont : public PhysicalFont {
protected:
NativeFont (double ptsize, const FontStyle &style, Color color) : _ptsize(ptsize), _style(style), _color(color) {}
+ using PhysicalFont::hAdvance;
+ using PhysicalFont::vAdvance;
private:
double _ptsize; ///< font size in PS point units
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.cpp
index 95155dc366a..d3917d67c15 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.cpp
@@ -2,7 +2,7 @@
** FontCache.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -281,7 +281,7 @@ bool FontCache::fontinfo (const string &dirname, vector<FontInfo> &infos, vector
string path = dirname+"/"+(fname.substr(1));
ifstream ifs(path, ios::binary);
if (fontinfo(ifs, info))
- infos.push_back(move(info));
+ infos.push_back(std::move(info));
else
invalid.push_back(fname.substr(1));
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.hpp
index f823106ce24..e603a93ff8a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontCache.hpp
@@ -2,7 +2,7 @@
** FontCache.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEncoding.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEncoding.cpp
index d5df7cc33fb..b898327e6ff 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEncoding.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEncoding.cpp
@@ -2,7 +2,7 @@
** FontEncoding.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEncoding.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEncoding.hpp
index 7fe441ed37b..f9712293145 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEncoding.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEncoding.hpp
@@ -2,7 +2,7 @@
** FontEncoding.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEngine.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEngine.cpp
index ca942a0fb9d..18ab319517a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEngine.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEngine.cpp
@@ -2,7 +2,7 @@
** FontEngine.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEngine.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEngine.hpp
index cf68930c65a..9b08994a295 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEngine.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontEngine.hpp
@@ -2,7 +2,7 @@
** FontEngine.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.cpp
index bc6f88d322b..1020617178b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.cpp
@@ -2,7 +2,7 @@
** FontManager.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -233,12 +233,13 @@ int FontManager::registerFont (uint32_t fontnum, const string &name, uint32_t ch
else {
// create dummy font as a placeholder if the proper font is not available
newfont = util::make_unique<EmptyFont>(name);
- if (filename.rfind('.') == string::npos)
- filename += ".mf";
// 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";
+ if (filename.rfind('.') == string::npos)
+ Message::wstream(true) << "no font file found for '" << filename << "'\n";
+ else
+ Message::wstream(true) << "font file '" << filename << "' not found\n";
missing_fonts.insert(filename);
}
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.hpp
index 503813a86d5..3b051a38356 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontManager.hpp
@@ -2,7 +2,7 @@
** FontManager.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.cpp
index c441526144e..5991c4779e1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.cpp
@@ -2,7 +2,7 @@
** FontMap.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.hpp
index b0cc9901d5e..cd691660b1a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMap.hpp
@@ -2,7 +2,7 @@
** FontMap.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.cpp
index 6147f36ab11..eeed98a2d8b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.cpp
@@ -2,7 +2,7 @@
** FontMetrics.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -23,19 +23,42 @@
#include "FileFinder.hpp"
#include "FontMetrics.hpp"
#include "JFM.hpp"
+#include "OFM.hpp"
#include "utility.hpp"
using namespace std;
+static inline uint16_t read_uint16 (istream &is) {
+ uint16_t val = 256*is.get();
+ return val + is.get();
+}
+
+/** Reads the font metrics for a given font name from a TFM, JFM, or OFM file.
+ * @param[in] fontname name of font to get the metrics for.
+ * @return pointer to object that holds the font metrics, or nullptr if no matching file was found */
unique_ptr<FontMetrics> FontMetrics::read (const string &fontname) {
- const char *path = FileFinder::instance().lookup(fontname + ".tfm");
+ unique_ptr<FontMetrics> metrics;
+ const char *path = FileFinder::instance().lookup(fontname + ".ofm", false);
+ if (!path)
+ path = FileFinder::instance().lookup(fontname + ".tfm");
ifstream ifs(path, ios::binary);
- if (!ifs)
- return unique_ptr<FontMetrics>();
- uint16_t id = 256*ifs.get();
- id += ifs.get();
- if (id == 9 || id == 11) // Japanese font metric file?
- return util::make_unique<JFM>(ifs);
- return util::make_unique<TFM>(ifs);
+ if (ifs) {
+ auto id = read_uint16(ifs);
+ if (id == 0) { // OFM?
+ auto ofmLevel = read_uint16(ifs);
+ if (ofmLevel == 0)
+ metrics = util::make_unique<OFM0>();
+ else if (ofmLevel == 1)
+ metrics = util::make_unique<OFM1>();
+ else
+ throw FontMetricException("OFM level "+to_string(ofmLevel)+" not supported");
+ }
+ else if (id == 9 || id == 11) // Japanese font metric file?
+ metrics = util::make_unique<JFM>();
+ else
+ metrics = util::make_unique<TFM>();
+ metrics->read(ifs);
+ }
+ return metrics;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.hpp
index 79cb579b2e6..eb8796c9c0d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontMetrics.hpp
@@ -2,7 +2,7 @@
** FontMetrics.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -21,6 +21,7 @@
#ifndef FONTMETRICS_HPP
#define FONTMETRICS_HPP
+#include <cstdint>
#include <istream>
#include <memory>
#include <string>
@@ -28,6 +29,7 @@
struct FontMetrics {
virtual ~FontMetrics () =default;
+ virtual void read (std::istream &is) {}
virtual double getDesignSize () const =0;
virtual double getCharWidth (int c) const =0;
virtual double getCharHeight (int c) const =0;
@@ -41,14 +43,15 @@ struct FontMetrics {
virtual double getDescent () const =0;
virtual bool verticalLayout () const =0;
virtual uint32_t getChecksum () const =0;
- virtual uint16_t firstChar () const =0;
- virtual uint16_t lastChar () const =0;
+ virtual uint32_t firstChar () const =0;
+ virtual uint32_t lastChar () const =0;
virtual bool isJFM () const {return false;}
+ virtual bool isOFM () const {return false;}
static std::unique_ptr<FontMetrics> read (const std::string &fontname);
};
-struct NullFontMetric : public FontMetrics {
+struct NullFontMetrics : public FontMetrics {
double getDesignSize () const override {return 1;}
double getCharWidth (int c) const override {return 0;}
double getCharHeight (int c) const override {return 0;}
@@ -62,8 +65,8 @@ struct NullFontMetric : public FontMetrics {
double getDescent () const override {return 0;}
bool verticalLayout () const override {return false;}
uint32_t getChecksum () const override {return 0;}
- uint16_t firstChar () const override {return 0;}
- uint16_t lastChar () const override {return 0;}
+ uint32_t firstChar () const override {return 0;}
+ uint32_t lastChar () const override {return 0;}
};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontStyle.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontStyle.hpp
index 3c79e4cc68e..149cf5fc8e0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontStyle.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontStyle.hpp
@@ -2,7 +2,7 @@
** FontStyle.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontWriter.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontWriter.cpp
index 9eed1784d11..4253562782a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontWriter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontWriter.cpp
@@ -2,7 +2,7 @@
** FontWriter.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontWriter.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontWriter.hpp
index 611d2ac8098..a218694732c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/FontWriter.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/FontWriter.hpp
@@ -2,7 +2,7 @@
** FontWriter.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.cpp
index ee487751d62..8f134654c03 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.cpp
@@ -2,7 +2,7 @@
** GFGlyphTracer.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.hpp
index 5493aea3870..3a78801ce55 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFGlyphTracer.hpp
@@ -2,7 +2,7 @@
** GFGlyphTracer.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.cpp
index 41920634cb8..6b2c6aa388d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.cpp
@@ -2,7 +2,7 @@
** GFReader.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.hpp
index f5a6a17609b..639d3cfce90 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFReader.hpp
@@ -2,7 +2,7 @@
** GFReader.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFTracer.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFTracer.cpp
index b6cb2e76c7a..185d8079fe9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFTracer.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFTracer.cpp
@@ -2,7 +2,7 @@
** GFTracer.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFTracer.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFTracer.hpp
index 63c6d205463..7bcd8022734 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/GFTracer.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/GFTracer.hpp
@@ -2,7 +2,7 @@
** GFTracer.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Ghostscript.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Ghostscript.cpp
index fa6f1eb0eb8..a228aa28b62 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Ghostscript.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Ghostscript.cpp
@@ -2,7 +2,7 @@
** Ghostscript.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -256,7 +256,10 @@ string Ghostscript::revisionstr () {
int major = rev / 1000;
int minor = (rev - major*1000)/10;
int patch = rev % 10;
- revstr = to_string(major) + "." + to_string(minor) + "." + to_string(patch);
+ revstr = to_string(major) + ".";
+ if (minor > 0 && minor < 10)
+ revstr += '0';
+ revstr += to_string(minor) + "." + to_string(patch);
}
}
return revstr;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Ghostscript.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Ghostscript.hpp
index 91b558fd3ca..1e9f189a9bc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Ghostscript.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Ghostscript.hpp
@@ -2,7 +2,7 @@
** Ghostscript.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Glyph.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Glyph.hpp
index 56f9c14ba31..a53021211ab 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Glyph.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Glyph.hpp
@@ -2,7 +2,7 @@
** Glyph.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/GlyphTracerMessages.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/GlyphTracerMessages.hpp
index cc7722a49b1..0b1228f38aa 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/GlyphTracerMessages.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/GlyphTracerMessages.hpp
@@ -2,7 +2,7 @@
** GlyphTracerMessages.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/GraphicsPath.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/GraphicsPath.hpp
index 9b60370ff10..be9013e086b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/GraphicsPath.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/GraphicsPath.hpp
@@ -2,7 +2,7 @@
** GraphicsPath.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/GraphicsPathParser.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/GraphicsPathParser.hpp
index 41a850db276..e8d41cd33f6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/GraphicsPathParser.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/GraphicsPathParser.hpp
@@ -2,7 +2,7 @@
** GraphicsPathParser.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -27,6 +27,22 @@
#include "GraphicsPath.hpp"
#include "MessageException.hpp"
+namespace internal {
+ template <typename NumType>
+ bool parse_number (std::istream &is, NumType &value) {
+ is >> value;
+ return !is.fail();
+ }
+
+ template <>
+ bool parse_number (std::istream &is, double &value) {
+ // don't use operator >> for parsing floating point values because it's implemented
+ // differently in libstdc++ and libc++. Instead, use our own function to read the
+ // value from the input stream.
+ return util::read_double(is, value);
+ }
+}
+
struct GraphicsPathParserException : public MessageException {
explicit GraphicsPathParserException (const std::string &msg) : MessageException(msg) {}
@@ -48,8 +64,7 @@ class GraphicsPathParser {
NumType parseNumberOfType (std::istream &is) const {
is >> std::ws;
NumType number;
- is >> number;
- if (is.fail())
+ if (!internal::parse_number(is, number))
error("number expected", is);
is >> std::ws;
return number;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.cpp
index e882ad5179b..449d40285da 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.cpp
@@ -2,7 +2,7 @@
** HashFunction.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.hpp
index 690aee29048..703a0bc0855 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/HashFunction.hpp
@@ -2,7 +2,7 @@
** HashFunction.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/HtmlSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/HtmlSpecialHandler.cpp
index e86de7fb96d..15e3c409ad2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/HtmlSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/HtmlSpecialHandler.cpp
@@ -2,7 +2,7 @@
** HtmlSpecialHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -80,7 +80,7 @@ void HtmlSpecialHandler::dviEndPage (unsigned pageno, SpecialActions &actions) {
}
-vector<const char*> HtmlSpecialHandler::prefixes() const {
+vector<const char*> HtmlSpecialHandler::prefixes () const {
vector<const char*> pfx {"html:"};
return pfx;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/HtmlSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/HtmlSpecialHandler.hpp
index f7220605388..bb0146fbcc7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/HtmlSpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/HtmlSpecialHandler.hpp
@@ -2,7 +2,7 @@
** HtmlSpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -31,9 +31,10 @@ class HtmlSpecialHandler : public SpecialHandler {
public:
void preprocess (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
- const char* name () const override {return "html";}
const char* info () const override {return "hyperref specials";}
- std::vector<const char*> prefixes() const override;
+ const char* name () const override {return handlerName();}
+ static const char* handlerName () {return "html";}
+ std::vector<const char*> prefixes () const override;
protected:
void dviEndPage (unsigned pageno, SpecialActions &actions) override;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/HyperlinkManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/HyperlinkManager.cpp
index b595055864c..14c00035726 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/HyperlinkManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/HyperlinkManager.cpp
@@ -2,7 +2,7 @@
** HyperlinkManager.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/HyperlinkManager.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/HyperlinkManager.hpp
index 3d0e93ca32f..2df68dd59cf 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/HyperlinkManager.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/HyperlinkManager.hpp
@@ -2,7 +2,7 @@
** HyperlinkManager.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.cpp
index 990647a0085..5b105ee200d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.cpp
@@ -2,7 +2,7 @@
** ImageToSVG.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -22,6 +22,7 @@
#include <fstream>
#include <sstream>
#include "Calculator.hpp"
+#include "DvisvgmSpecialHandler.hpp"
#include "ImageToSVG.hpp"
#include "Message.hpp"
#include "MessageException.hpp"
@@ -105,6 +106,10 @@ void ImageToSVG::writeSVG (int pageno) {
<< " (" << XMLString(_bbox.width()*bp2mm) << "mm"
<< " x " << XMLString(_bbox.height()*bp2mm) << "mm)\n";
Message::mstream(false, Message::MC_PAGE_WRITTEN) << "output written to " << svgfname << '\n';
+ if (!_userMessage.empty()) {
+ string msg = expandText(_userMessage);
+ Message::ustream(true) << msg << "\n";
+ }
}
_bbox.invalidate();
_svg.reset();
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.hpp
index eccb48e5f78..943600dbbb5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ImageToSVG.hpp
@@ -2,7 +2,7 @@
** ImageToSVG.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -37,6 +37,7 @@ class ImageToSVG : protected SpecialActions {
void convert (int firstPage, int lastPage, std::pair<int,int> *pageinfo);
void convert (const std::string &rangestr, std::pair<int,int> *pageinfo);
void setPageTransformation (const std::string &transCmds) {_transCmds = transCmds;}
+ void setUserMessage (const std::string &msg) {_userMessage = msg;}
std::string filename () const {return _fname;}
PSInterpreter& psInterpreter () const {return _psHandler.psInterpreter();}
virtual bool isSinglePageFormat () const =0;
@@ -84,8 +85,9 @@ class ImageToSVG : protected SpecialActions {
unsigned _currentPageNumber=0;
BoundingBox _bbox;
mutable PsSpecialHandler _psHandler;
- int _gsVersion=0; ///< Ghostscript version found
- std::string _transCmds; ///< transformation commands
+ int _gsVersion=0; ///< Ghostscript version found
+ std::string _transCmds; ///< transformation commands
+ std::string _userMessage; ///< message printed after conversion
};
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/InputBuffer.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/InputBuffer.cpp
index 095b7e22cc1..03687d181dc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/InputBuffer.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/InputBuffer.cpp
@@ -2,7 +2,7 @@
** InputBuffer.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -26,60 +26,53 @@ using namespace std;
StreamInputBuffer::StreamInputBuffer (istream &is, size_t bufsize)
- : _is(is), _bufsize(bufsize), _buf1(new uint8_t[_bufsize]), _buf2(new uint8_t[_bufsize]), _bufptr(_buf1)
+ : _is(is), _buf1(bufsize), _buf2(bufsize)
{
_size1 = fillBuffer(_buf1);
_size2 = fillBuffer(_buf2);
}
-StreamInputBuffer::~StreamInputBuffer () {
- delete [] _buf1;
- delete [] _buf2;
-}
-
-
+/** Returns the next character from the input buffer (or -1 if there's none). */
int StreamInputBuffer::get () {
- if (pos() == _size1) {
+ if (_pos == _size1) {
if (_size2 == 0)
return -1;
- swap(_buf1, _buf2);
+ swap(_buf1, _buf2); // O(1) swap of memory buffers
_size1 = _size2;
- _bufptr = _buf1;
+ _pos = 0;
_size2 = fillBuffer(_buf2);
}
- uint8_t c = *_bufptr++;
- return c;
+ return _buf1[_pos++];
}
/** Returns the next character to be read without skipping it.
* Same as peek(0). */
int StreamInputBuffer::peek () const {
- if (pos() < _size1)
- return *_bufptr;
- return _size2 > 0 ? *_buf2 : -1;
+ if (_pos < _size1)
+ return _buf1[_pos];
+ return _size2 > 0 ? _buf2[0] : -1;
}
/** Returns the n-th next character without skipping it. */
int StreamInputBuffer::peek (size_t n) const {
- if (pos()+n < _size1)
- return *(_bufptr+n);
- if (pos()+n < _size1+_size2)
- return *(_buf2 + pos()+n-_size1);
+ if (_pos+n < _size1)
+ return _buf1[_pos+n];
+ if (_pos+n < _size1+_size2)
+ return _buf2[_pos+n-_size1];
return -1;
}
-/** Fills the buffer by reading a sequence of characters from the assigned
- * input stream.
- * @param[in] buf pointer to character buffer to be filled
+/** Fills the buffer by reading a sequence of characters from the assigned input stream.
+ * @param[in] buf buffer to be filled
* @return number of characters read */
-int StreamInputBuffer::fillBuffer (uint8_t *buf) {
+size_t StreamInputBuffer::fillBuffer (vector<uint8_t> &buf) {
if (_is && !_is.eof()) {
- _is.read((char*)buf, _bufsize);
- return _is.gcount();
+ _is.read(reinterpret_cast<char*>(buf.data()), streamsize(buf.size()));
+ return _is.gcount();
}
return 0;
}
@@ -133,5 +126,3 @@ int TextStreamInputBuffer::get () {
_col++;
return c;
}
-
-
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/InputBuffer.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/InputBuffer.hpp
index ea6ce17a709..17a383fb3b6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/InputBuffer.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/InputBuffer.hpp
@@ -2,7 +2,7 @@
** InputBuffer.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -25,8 +25,9 @@
#include <cstdint>
#include <cstring>
#include <istream>
-#include <string>
#include <ostream>
+#include <string>
+#include <vector>
struct InputBuffer {
virtual ~InputBuffer () =default;
@@ -42,26 +43,23 @@ class StreamInputBuffer : public InputBuffer {
public:
explicit StreamInputBuffer (std::istream &is, size_t bufsize=1024);
StreamInputBuffer (const StreamInputBuffer &ib) =delete;
- ~StreamInputBuffer () override;
int get () override;
int peek () const override;
int peek (size_t n) const override;
- bool eof () const override {return pos() == _size1 && _size2 == 0;}
- void invalidate () override {_bufptr = _buf1+_size1; _size2 = 0;}
+ bool eof () const override {return _pos == _size1 && _size2 == 0;}
+ void invalidate () override {_pos = _size1; _size2 = 0;}
void operator = (const StreamInputBuffer &ib) =delete;
protected:
- int fillBuffer (uint8_t *buf);
- size_t pos () const {return _bufptr-_buf1;}
+ size_t fillBuffer (std::vector<uint8_t> &buf);
private:
std::istream &_is;
- const size_t _bufsize; ///< maximal number of bytes each buffer can hold
- uint8_t *_buf1; ///< pointer to first buffer
- uint8_t *_buf2; ///< pointer to second buffer
- size_t _size1; ///< number of bytes in buffer 1
- size_t _size2; ///< number of bytes in buffer 2
- uint8_t *_bufptr; ///< pointer to next byte to read
+ std::vector<uint8_t> _buf1; ///< first buffer
+ std::vector<uint8_t> _buf2; ///< second buffer
+ size_t _size1; ///< number of bytes in buffer 1
+ size_t _size2; ///< number of bytes in buffer 2
+ size_t _pos=0; ///< position of next character to be read from first buffer
};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp
index 9c5cc504cd8..8b9c3e80e96 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.cpp
@@ -2,7 +2,7 @@
** InputReader.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -394,7 +394,7 @@ int InputReader::parseAttributes (map<string,string> &attr, bool requireValues,
else if (!requireValues)
attr.emplace(std::move(key), "");
}
- return attr.size();
+ return int(attr.size());
}
//////////////////////////////////////////
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.hpp
index fefd450bac7..90f16587321 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/InputReader.hpp
@@ -2,7 +2,7 @@
** InputReader.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -100,7 +100,7 @@ class StringMatcher {
private:
std::string _pattern;
- std::vector<size_t> _borders;
+ std::vector<int> _borders;
size_t _charsRead;
};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/JFM.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/JFM.cpp
index c8016181781..4d624f1795d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/JFM.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/JFM.cpp
@@ -2,7 +2,7 @@
** JFM.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -19,7 +19,6 @@
*************************************************************************/
#include <algorithm>
-#include <cstring>
#include <fstream>
#include <sstream>
#include "JFM.hpp"
@@ -28,27 +27,27 @@
using namespace std;
-JFM::JFM (istream &is) {
+void JFM::read (istream &is) {
is.seekg(0);
StreamReader reader(is);
- uint16_t id = uint16_t(reader.readUnsigned(2)); // JFM ID (9 or 11)
+ auto id = uint16_t(reader.readUnsigned(2)); // JFM ID (9 or 11)
if (id != 9 && id != 11)
throw FontMetricException("invalid JFM identifier " + std::to_string(id) + " (9 or 11 expected)");
_vertical = (id == 9);
- uint16_t nt = uint16_t(reader.readUnsigned(2)); // length of character type table
- uint16_t lf = uint16_t(reader.readUnsigned(2)); // length of entire file in 4 byte words
- uint16_t lh = uint16_t(reader.readUnsigned(2)); // length of header in 4 byte words
- uint16_t bc = uint16_t(reader.readUnsigned(2)); // smallest character code in font
- uint16_t ec = uint16_t(reader.readUnsigned(2)); // largest character code in font
- uint16_t nw = uint16_t(reader.readUnsigned(2)); // number of words in width table
- uint16_t nh = uint16_t(reader.readUnsigned(2)); // number of words in height table
- uint16_t nd = uint16_t(reader.readUnsigned(2)); // number of words in depth table
- uint16_t ni = uint16_t(reader.readUnsigned(2)); // number of words in italic corr. table
- uint16_t nl = uint16_t(reader.readUnsigned(2)); // number of words in glue/kern table
- uint16_t nk = uint16_t(reader.readUnsigned(2)); // number of words in kern table
- uint16_t ng = uint16_t(reader.readUnsigned(2)); // number of words in glue table
- uint16_t np = uint16_t(reader.readUnsigned(2)); // number of font parameter words
+ auto nt = uint16_t(reader.readUnsigned(2)); // length of character type table
+ auto lf = uint16_t(reader.readUnsigned(2)); // length of entire file in 4 byte words
+ auto lh = uint16_t(reader.readUnsigned(2)); // length of header in 4 byte words
+ auto bc = uint16_t(reader.readUnsigned(2)); // smallest character code in font
+ auto ec = uint16_t(reader.readUnsigned(2)); // largest character code in font
+ auto nw = uint16_t(reader.readUnsigned(2)); // number of words in width table
+ auto nh = uint16_t(reader.readUnsigned(2)); // number of words in height table
+ auto nd = uint16_t(reader.readUnsigned(2)); // number of words in depth table
+ auto ni = uint16_t(reader.readUnsigned(2)); // number of words in italic corr. table
+ auto nl = uint16_t(reader.readUnsigned(2)); // number of words in glue/kern table
+ auto nk = uint16_t(reader.readUnsigned(2)); // number of words in kern table
+ auto ng = uint16_t(reader.readUnsigned(2)); // number of words in glue table
+ auto np = uint16_t(reader.readUnsigned(2)); // number of font parameter words
if (7+nt+lh+(ec-bc+1)+nw+nh+nd+ni+nl+nk+ng+np != lf)
throw FontMetricException("inconsistent length values");
@@ -57,7 +56,7 @@ JFM::JFM (istream &is) {
readHeader(reader);
is.seekg(28+lh*4);
readTables(reader, nt, nw, nh, nd, ni);
- is.seekg(4*(lf-np), ios::beg);
+ is.seekg(4*(lf-np));
readParameters(reader, np); // JFM files provide 9 parameters but we don't need all of them
}
@@ -69,7 +68,7 @@ void JFM::readTables (StreamReader &reader, int nt, int nw, int nh, int nd, int
// support new JFM spec by texjporg
uint32_t c = reader.readUnsigned(2);
c += 0x10000 * reader.readUnsigned(1);
- uint8_t t = uint8_t(reader.readUnsigned(1));
+ auto t = uint8_t(reader.readUnsigned(1));
if (t > 0) {
minchar = min(minchar, c);
maxchar = max(maxchar, c);
@@ -84,7 +83,7 @@ void JFM::readTables (StreamReader &reader, int nt, int nw, int nh, int nd, int
// support new JFM spec by texjporg
uint32_t c = reader.readUnsigned(2);
c += 0x10000 * reader.readUnsigned(1);
- uint8_t t = uint8_t(reader.readUnsigned(1));
+ auto t = uint8_t(reader.readUnsigned(1));
if (c >= minchar)
_charTypeTable[c-minchar] = t;
}
@@ -93,7 +92,7 @@ void JFM::readTables (StreamReader &reader, int nt, int nw, int nh, int nd, int
}
-int JFM::charIndex (int c) const {
+size_t JFM::charIndex (int c) const {
uint8_t chartype = 0;
if (!_charTypeTable.empty() && uint32_t(c) >= _minchar && uint32_t(c) < _minchar+_charTypeTable.size())
chartype = _charTypeTable[c-_minchar];
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/JFM.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/JFM.hpp
index 110f0f3e1a6..46f412fb728 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/JFM.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/JFM.hpp
@@ -2,7 +2,7 @@
** JFM.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -27,7 +27,8 @@
class JFM : public TFM {
public:
- explicit JFM (std::istream &is);
+ JFM () =default;
+ void read (std::istream &is) override;
bool verticalLayout () const override {return _vertical;}
bool isJFM () const override {return true;}
uint32_t minChar () const {return _minchar;}
@@ -35,11 +36,11 @@ class JFM : public TFM {
protected:
void readTables (StreamReader &reader, int nt, int nw, int nh, int nd, int ni);
- int charIndex (int c) const override;
+ size_t charIndex (int c) const override;
private:
- uint32_t _minchar; ///< character code of first entry in character type table
- bool _vertical; ///< true if metrics refer to vertical text layout
+ uint32_t _minchar=0; ///< character code of first entry in character type table
+ bool _vertical=false; ///< true if metrics refer to vertical text layout
std::vector<uint8_t> _charTypeTable;
};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp
index 059933a3634..e660ab7283d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.cpp
@@ -2,7 +2,7 @@
** Length.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.hpp
index 9c1f353c462..dc1ce9ae673 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Length.hpp
@@ -2,7 +2,7 @@
** Length.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/MD5HashFunction.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/MD5HashFunction.hpp
index d5cfdf2bfa8..f8ef99f64d8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/MD5HashFunction.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/MD5HashFunction.hpp
@@ -2,7 +2,7 @@
** MD5HashFunction.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -21,13 +21,7 @@
#ifndef MD5HASHFUNCTION_HPP
#define MD5HASHFUNCTION_HPP
-#include <config.h>
-#ifdef HAVE_OPENSSL_MD5_H
-# include <openssl/md5.h>
-#else
-# include <md5.h>
-#endif
-
+#include <md5.h>
#include "HashFunction.hpp"
class MD5HashFunction : public HashFunction {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.am
index f899f883ec0..b8fec8de785 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.am
@@ -1,5 +1,5 @@
## This file is part of dvisvgm
-## Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de>
+## Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de>
##
## Process this file with automake.
@@ -16,6 +16,7 @@ include ../libs/defs.am
dvisvgm_LDADD = \
$(noinst_LTLIBRARIES) \
../libs/clipper/libclipper.a \
+ ../libs/md5/libmd5.a \
$(POTRACE_LIBS) \
$(XXHASH_LIBS)
@@ -25,24 +26,23 @@ SUBDIRS += ttf
dvisvgm_LDADD += \
$(WOFF2_LIBS) \
$(BROTLI_LIBS)
-endif
-
-if USE_BUNDLED_MD5
-dvisvgm_LDADD += ../libs/md5/libmd5.a
-else
-dvisvgm_LDADD += $(LIBCRYPTO_LIBS)
-endif
+endif ENABLE_WOFF
+if TEXLIVE_BUILD
dvisvgm_LDADD += \
$(KPATHSEA_LIBS) \
$(FREETYPE2_LIBS) \
- $(ZLIB_LIBS) \
- $(LIBGS_LIBS)
+ $(ZLIB_LIBS)
+else
+dvisvgm_LDADD += \
+ $(FREETYPE_LIBS) \
+ $(ZLIB_LIBS)
+endif !TEXLIVE_BUILD
dvisvgm_DEPENDENCIES = $(noinst_LTLIBRARIES)
-dvisvgm_DEPENDENCIES += $(KPATHSEA_DEPEND) $(ZLIB_DEPEND) $(FREETYPE2_DEPEND)
if TEXLIVE_BUILD
+dvisvgm_DEPENDENCIES += $(KPATHSEA_DEPEND) $(ZLIB_DEPEND) $(FREETYPE2_DEPEND)
dvisvgm_DEPENDENCIES += $(POTRACE_DEPEND)
endif
@@ -114,6 +114,7 @@ libdvisvgm_la_SOURCES = \
MetafontWrapper.hpp MetafontWrapper.cpp \
NoPsSpecialHandler.hpp NoPsSpecialHandler.cpp \
NumericRanges.hpp \
+ OFM.hpp OFM.cpp \
Opacity.hpp Opacity.cpp \
PageRanges.hpp PageRanges.cpp \
PageSize.hpp PageSize.cpp \
@@ -127,16 +128,15 @@ libdvisvgm_la_SOURCES = \
PreScanDVIReader.hpp PreScanDVIReader.cpp \
Process.hpp Process.cpp \
psdefs.cpp \
- PSFilter.hpp \
PSInterpreter.hpp PSInterpreter.cpp \
PSPattern.hpp PSPattern.cpp \
- PSPreviewFilter.hpp PSPreviewFilter.cpp \
+ PSPreviewHandler.hpp PSPreviewHandler.cpp \
PsSpecialHandler.hpp PsSpecialHandler.cpp \
RangeMap.hpp RangeMap.cpp \
ShadingPatch.hpp ShadingPatch.cpp \
SignalHandler.hpp SignalHandler.cpp \
SourceInput.hpp SourceInput.cpp \
- SpecialActions.hpp \
+ SpecialActions.hpp SpecialActions.cpp \
SpecialHandler.hpp \
SpecialManager.hpp SpecialManager.cpp \
StreamReader.hpp StreamReader.cpp \
@@ -180,22 +180,31 @@ endif
EXTRA_DIST = options.xml options.dtd iapi.h ierrors.h MiKTeXCom.hpp MiKTeXCom.cpp
AM_CFLAGS = $(WARNING_CFLAGS) \
- $(ZLIB_INCLUDES) \
+ $(ZLIB_CFLAGS) \
$(CODE_COVERAGE_CFLAGS)
-AM_CXXFLAGS = $(WARNING_CXXFLAGS) -Wnon-virtual-dtor \
+AM_CXXFLAGS = $(WARNING_CXXFLAGS) \
-I$(dvisvgm_srcdir)/libs/clipper \
-I$(dvisvgm_srcdir)/libs/variant/include
AM_CXXFLAGS += \
$(POTRACE_CFLAGS) \
- $(XXHASH_CFLAGS) \
+ $(XXHASH_CFLAGS)
+
+if TEXLIVE_BUILD
+AM_CXXFLAGS += \
$(KPATHSEA_INCLUDES) \
$(POTRACE_INCLUDES) \
$(FREETYPE2_INCLUDES) \
$(ZLIB_INCLUDES) \
- $(LIBGS_INCLUDES) \
$(CODE_COVERAGE_CFLAGS)
+else
+AM_CXXFLAGS += \
+ $(KPSE_CFLAGS) \
+ $(FREETYPE_CFLAGS) \
+ $(ZLIB_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS)
+endif !TEXLIVE_BUILD
if WIN32
AM_CXXFLAGS += -DTEXLIVEWIN32
@@ -212,18 +221,15 @@ AM_CXXFLAGS += \
$(BROTLI_CFLAGS) \
$(WOFF2_CFLAGS)
+# TL: do not try to rebuild these source files.
+if !TEXLIVE_BUILD
AM_LDFLAGS += $(TTFAUTOHINT_LIBS)
-endif
+endif !TEXLIVE_BUILD
+endif ENABLE_WOFF
-if USE_BUNDLED_MD5
AM_CXXFLAGS += -I$(dvisvgm_srcdir)/libs/md5
-else
-AM_CXXFLAGS += $(LIBCRYPTO_CFLAGS)
-endif
-# TL: do not try to rebuild these source files.
if !TEXLIVE_BUILD
-
# the command-line parser class is generated from options.xml by opt2cpp
$(srcdir)/CommandLine.hpp: options.xml
rm -f $@
@@ -250,3 +256,14 @@ if TEXLIVE_BUILD
# Rebuild potrace:
@POTRACE_RULE@
endif TEXLIVE_BUILD
+
+if TEXLIVE_BUILD
+# Rebuild libkpathsea:
+@KPATHSEA_RULE@
+# Rebuild libfreetype:
+@FREETYPE2_RULE@
+# Rebuild libz:
+@ZLIB_RULE@
+# Rebuild potrace:
+@POTRACE_RULE@
+endif TEXLIVE_BUILD
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.in
index ab4628150b0..ce4cb14d4b0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Makefile.in
@@ -92,7 +92,6 @@ host_triplet = @host@
bin_PROGRAMS = dvisvgm$(EXEEXT)
@HAVE_BROTLI_FALSE@am__append_1 = -I$(dvisvgm_srcdir)/libs/brotli/include
@HAVE_BROTLI_FALSE@am__append_2 = ../libs/brotli/libbrotli.a
-#endif TEXLIVE_BUILD
@HAVE_WOFF2_FALSE@am__append_3 = -I$(dvisvgm_srcdir)/libs/woff2/include
@HAVE_WOFF2_FALSE@am__append_4 = ../libs/woff2/libwoff2.a
@ENABLE_WOFF_TRUE@am__append_5 = ttf
@@ -100,16 +99,37 @@ bin_PROGRAMS = dvisvgm$(EXEEXT)
@ENABLE_WOFF_TRUE@ $(WOFF2_LIBS) \
@ENABLE_WOFF_TRUE@ $(BROTLI_LIBS)
-@USE_BUNDLED_MD5_TRUE@am__append_7 = ../libs/md5/libmd5.a
-@USE_BUNDLED_MD5_FALSE@am__append_8 = $(LIBCRYPTO_LIBS)
-@TEXLIVE_BUILD_TRUE@am__append_9 = $(POTRACE_DEPEND)
+@TEXLIVE_BUILD_TRUE@am__append_7 = \
+@TEXLIVE_BUILD_TRUE@ $(KPATHSEA_LIBS) \
+@TEXLIVE_BUILD_TRUE@ $(FREETYPE2_LIBS) \
+@TEXLIVE_BUILD_TRUE@ $(ZLIB_LIBS)
+
+@TEXLIVE_BUILD_FALSE@am__append_8 = \
+@TEXLIVE_BUILD_FALSE@ $(FREETYPE_LIBS) \
+@TEXLIVE_BUILD_FALSE@ $(ZLIB_LIBS)
+
+@TEXLIVE_BUILD_TRUE@am__append_9 = $(KPATHSEA_DEPEND) $(ZLIB_DEPEND) \
+@TEXLIVE_BUILD_TRUE@ $(FREETYPE2_DEPEND) $(POTRACE_DEPEND)
@ENABLE_WOFF_TRUE@am__append_10 = ttf/libttf.la
-@WIN32_TRUE@am__append_11 = -DTEXLIVEWIN32
-@ENABLE_WOFF_TRUE@am__append_12 = $(TTFAUTOHINT_CFLAGS) \
+@TEXLIVE_BUILD_TRUE@am__append_11 = \
+@TEXLIVE_BUILD_TRUE@ $(KPATHSEA_INCLUDES) \
+@TEXLIVE_BUILD_TRUE@ $(POTRACE_INCLUDES) \
+@TEXLIVE_BUILD_TRUE@ $(FREETYPE2_INCLUDES) \
+@TEXLIVE_BUILD_TRUE@ $(ZLIB_INCLUDES) \
+@TEXLIVE_BUILD_TRUE@ $(CODE_COVERAGE_CFLAGS)
+
+@TEXLIVE_BUILD_FALSE@am__append_12 = \
+@TEXLIVE_BUILD_FALSE@ $(KPSE_CFLAGS) \
+@TEXLIVE_BUILD_FALSE@ $(FREETYPE_CFLAGS) \
+@TEXLIVE_BUILD_FALSE@ $(ZLIB_CFLAGS) \
+@TEXLIVE_BUILD_FALSE@ $(CODE_COVERAGE_CFLAGS)
+
+@WIN32_TRUE@am__append_13 = -DTEXLIVEWIN32
+@ENABLE_WOFF_TRUE@am__append_14 = $(TTFAUTOHINT_CFLAGS) \
@ENABLE_WOFF_TRUE@ $(BROTLI_CFLAGS) $(WOFF2_CFLAGS)
-@ENABLE_WOFF_TRUE@am__append_13 = $(TTFAUTOHINT_LIBS)
-@USE_BUNDLED_MD5_TRUE@am__append_14 = -I$(dvisvgm_srcdir)/libs/md5
-@USE_BUNDLED_MD5_FALSE@am__append_15 = $(LIBCRYPTO_CFLAGS)
+
+# TL: do not try to rebuild these source files.
+@ENABLE_WOFF_TRUE@@TEXLIVE_BUILD_FALSE@am__append_15 = $(TTFAUTOHINT_LIBS)
subdir = dvisvgm-src/src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/dvisvgm-src/m4/ax_gcc_builtin.m4 \
@@ -153,14 +173,15 @@ am_libdvisvgm_la_OBJECTS = BasicDVIReader.lo Bezier.lo \
Ghostscript.lo HashFunction.lo HtmlSpecialHandler.lo \
HyperlinkManager.lo ImageToSVG.lo InputBuffer.lo \
InputReader.lo JFM.lo Length.lo MapLine.lo Matrix.lo \
- Message.lo MetafontWrapper.lo NoPsSpecialHandler.lo Opacity.lo \
- PageRanges.lo PageSize.lo PapersizeSpecialHandler.lo \
- PathClipper.lo PDFHandler.lo PDFParser.lo PdfSpecialHandler.lo \
- PDFToSVG.lo PreScanDVIReader.lo Process.lo psdefs.lo \
- PSInterpreter.lo PSPattern.lo PSPreviewFilter.lo \
- PsSpecialHandler.lo RangeMap.lo ShadingPatch.lo \
- SignalHandler.lo SourceInput.lo SpecialManager.lo \
- StreamReader.lo StreamWriter.lo Subfont.lo SVGCharHandler.lo \
+ Message.lo MetafontWrapper.lo NoPsSpecialHandler.lo OFM.lo \
+ Opacity.lo PageRanges.lo PageSize.lo \
+ PapersizeSpecialHandler.lo PathClipper.lo PDFHandler.lo \
+ PDFParser.lo PdfSpecialHandler.lo PDFToSVG.lo \
+ PreScanDVIReader.lo Process.lo psdefs.lo PSInterpreter.lo \
+ PSPattern.lo PSPreviewHandler.lo PsSpecialHandler.lo \
+ RangeMap.lo ShadingPatch.lo SignalHandler.lo SourceInput.lo \
+ SpecialActions.lo SpecialManager.lo StreamReader.lo \
+ StreamWriter.lo Subfont.lo SVGCharHandler.lo \
SVGCharHandlerFactory.lo SVGCharPathHandler.lo \
SVGCharTspanTextHandler.lo SVGElement.lo SVGOutput.lo \
SVGSingleCharTextHandler.lo SVGTree.lo System.lo \
@@ -180,6 +201,10 @@ am__DEPENDENCIES_2 = $(am__append_4)
am__DEPENDENCIES_3 = $(am__append_2)
@ENABLE_WOFF_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_2) \
@ENABLE_WOFF_TRUE@ $(am__DEPENDENCIES_3)
+@TEXLIVE_BUILD_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1) \
+@TEXLIVE_BUILD_TRUE@ $(am__DEPENDENCIES_1) \
+@TEXLIVE_BUILD_TRUE@ $(am__DEPENDENCIES_1)
+@TEXLIVE_BUILD_FALSE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -222,11 +247,12 @@ am__depfiles_remade = ./$(DEPDIR)/BasicDVIReader.Plo \
./$(DEPDIR)/JFM.Plo ./$(DEPDIR)/Length.Plo \
./$(DEPDIR)/MapLine.Plo ./$(DEPDIR)/Matrix.Plo \
./$(DEPDIR)/Message.Plo ./$(DEPDIR)/MetafontWrapper.Plo \
- ./$(DEPDIR)/NoPsSpecialHandler.Plo ./$(DEPDIR)/Opacity.Plo \
- ./$(DEPDIR)/PDFHandler.Plo ./$(DEPDIR)/PDFParser.Plo \
- ./$(DEPDIR)/PDFToSVG.Plo ./$(DEPDIR)/PSInterpreter.Plo \
- ./$(DEPDIR)/PSPattern.Plo ./$(DEPDIR)/PSPreviewFilter.Plo \
- ./$(DEPDIR)/PageRanges.Plo ./$(DEPDIR)/PageSize.Plo \
+ ./$(DEPDIR)/NoPsSpecialHandler.Plo ./$(DEPDIR)/OFM.Plo \
+ ./$(DEPDIR)/Opacity.Plo ./$(DEPDIR)/PDFHandler.Plo \
+ ./$(DEPDIR)/PDFParser.Plo ./$(DEPDIR)/PDFToSVG.Plo \
+ ./$(DEPDIR)/PSInterpreter.Plo ./$(DEPDIR)/PSPattern.Plo \
+ ./$(DEPDIR)/PSPreviewHandler.Plo ./$(DEPDIR)/PageRanges.Plo \
+ ./$(DEPDIR)/PageSize.Plo \
./$(DEPDIR)/PapersizeSpecialHandler.Plo \
./$(DEPDIR)/PathClipper.Plo ./$(DEPDIR)/PdfSpecialHandler.Plo \
./$(DEPDIR)/PreScanDVIReader.Plo ./$(DEPDIR)/Process.Plo \
@@ -239,11 +265,11 @@ am__depfiles_remade = ./$(DEPDIR)/BasicDVIReader.Plo \
./$(DEPDIR)/SVGSingleCharTextHandler.Plo \
./$(DEPDIR)/SVGTree.Plo ./$(DEPDIR)/ShadingPatch.Plo \
./$(DEPDIR)/SignalHandler.Plo ./$(DEPDIR)/SourceInput.Plo \
- ./$(DEPDIR)/SpecialManager.Plo ./$(DEPDIR)/StreamReader.Plo \
- ./$(DEPDIR)/StreamWriter.Plo ./$(DEPDIR)/Subfont.Plo \
- ./$(DEPDIR)/System.Plo ./$(DEPDIR)/TFM.Plo \
- ./$(DEPDIR)/TensorProductPatch.Plo ./$(DEPDIR)/Terminal.Plo \
- ./$(DEPDIR)/ToUnicodeMap.Plo \
+ ./$(DEPDIR)/SpecialActions.Plo ./$(DEPDIR)/SpecialManager.Plo \
+ ./$(DEPDIR)/StreamReader.Plo ./$(DEPDIR)/StreamWriter.Plo \
+ ./$(DEPDIR)/Subfont.Plo ./$(DEPDIR)/System.Plo \
+ ./$(DEPDIR)/TFM.Plo ./$(DEPDIR)/TensorProductPatch.Plo \
+ ./$(DEPDIR)/Terminal.Plo ./$(DEPDIR)/ToUnicodeMap.Plo \
./$(DEPDIR)/TpicSpecialHandler.Plo \
./$(DEPDIR)/TriangularPatch.Plo ./$(DEPDIR)/Unicode.Plo \
./$(DEPDIR)/VFReader.Plo ./$(DEPDIR)/XMLDocument.Plo \
@@ -359,7 +385,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CPPFLAGS = @AM_CPPFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AM_LDFLAGS = $(KPSE_LIBS) $(CODE_COVERAGE_LDFLAGS) $(am__append_13)
+AM_LDFLAGS = $(KPSE_LIBS) $(CODE_COVERAGE_LDFLAGS) $(am__append_15)
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
@@ -517,24 +543,15 @@ dvisvgm_SOURCES = \
CommandLine.hpp \
dvisvgm.cpp
-
-# Gets automake warnings:
-# dvisvgm-src/src/../libs/defs.am:9: warning: POTRACE_LIBS was already defined in condition TRUE, which includes condition !HAVE_POTRACE and !TEXLIVE_BUILD ...
-# dvisvgm-src/src/Makefile.am:14: 'dvisvgm-src/src/../libs/defs.am' included from here
-# configure.ac:51: ... 'POTRACE_LIBS' previously defined here
-#if !TEXLIVE_BUILD
-#POTRACE_CFLAGS = -I$(dvisvgm_srcdir)/libs/potrace
-#POTRACE_LIBS = ../libs/potrace/libpotrace.a
-#else
@HAVE_POTRACE_FALSE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
+#
+@TEXLIVE_BUILD_TRUE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
@HAVE_XXHASH_FALSE@XXHASH_CFLAGS = -I$(dvisvgm_srcdir)/libs/xxHash
@HAVE_XXHASH_FALSE@XXHASH_LIBS = ../libs/xxHash/libxxhash.a
dvisvgm_LDADD = $(noinst_LTLIBRARIES) ../libs/clipper/libclipper.a \
- $(POTRACE_LIBS) $(XXHASH_LIBS) $(am__append_6) $(am__append_7) \
- $(am__append_8) $(KPATHSEA_LIBS) $(FREETYPE2_LIBS) \
- $(ZLIB_LIBS) $(LIBGS_LIBS)
-dvisvgm_DEPENDENCIES = $(noinst_LTLIBRARIES) $(KPATHSEA_DEPEND) \
- $(ZLIB_DEPEND) $(FREETYPE2_DEPEND) $(am__append_9)
+ ../libs/md5/libmd5.a $(POTRACE_LIBS) $(XXHASH_LIBS) \
+ $(am__append_6) $(am__append_7) $(am__append_8)
+dvisvgm_DEPENDENCIES = $(noinst_LTLIBRARIES) $(am__append_9)
libdvisvgm_la_SOURCES = \
AGLTable.hpp \
BasicDVIReader.hpp BasicDVIReader.cpp \
@@ -603,6 +620,7 @@ libdvisvgm_la_SOURCES = \
MetafontWrapper.hpp MetafontWrapper.cpp \
NoPsSpecialHandler.hpp NoPsSpecialHandler.cpp \
NumericRanges.hpp \
+ OFM.hpp OFM.cpp \
Opacity.hpp Opacity.cpp \
PageRanges.hpp PageRanges.cpp \
PageSize.hpp PageSize.cpp \
@@ -616,16 +634,15 @@ libdvisvgm_la_SOURCES = \
PreScanDVIReader.hpp PreScanDVIReader.cpp \
Process.hpp Process.cpp \
psdefs.cpp \
- PSFilter.hpp \
PSInterpreter.hpp PSInterpreter.cpp \
PSPattern.hpp PSPattern.cpp \
- PSPreviewFilter.hpp PSPreviewFilter.cpp \
+ PSPreviewHandler.hpp PSPreviewHandler.cpp \
PsSpecialHandler.hpp PsSpecialHandler.cpp \
RangeMap.hpp RangeMap.cpp \
ShadingPatch.hpp ShadingPatch.cpp \
SignalHandler.hpp SignalHandler.cpp \
SourceInput.hpp SourceInput.cpp \
- SpecialActions.hpp \
+ SpecialActions.hpp SpecialActions.cpp \
SpecialHandler.hpp \
SpecialManager.hpp SpecialManager.cpp \
StreamReader.hpp StreamReader.cpp \
@@ -664,16 +681,13 @@ libdvisvgm_la_LIBADD = fonts/libbase14fonts.la \
optimizer/liboptimizer.la $(am__append_10)
EXTRA_DIST = options.xml options.dtd iapi.h ierrors.h MiKTeXCom.hpp MiKTeXCom.cpp
AM_CFLAGS = $(WARNING_CFLAGS) \
- $(ZLIB_INCLUDES) \
+ $(ZLIB_CFLAGS) \
$(CODE_COVERAGE_CFLAGS)
-AM_CXXFLAGS = $(WARNING_CXXFLAGS) -Wnon-virtual-dtor \
- -I$(dvisvgm_srcdir)/libs/clipper \
+AM_CXXFLAGS = $(WARNING_CXXFLAGS) -I$(dvisvgm_srcdir)/libs/clipper \
-I$(dvisvgm_srcdir)/libs/variant/include $(POTRACE_CFLAGS) \
- $(XXHASH_CFLAGS) $(KPATHSEA_INCLUDES) $(POTRACE_INCLUDES) \
- $(FREETYPE2_INCLUDES) $(ZLIB_INCLUDES) $(LIBGS_INCLUDES) \
- $(CODE_COVERAGE_CFLAGS) $(am__append_11) $(am__append_12) \
- $(am__append_14) $(am__append_15)
+ $(XXHASH_CFLAGS) $(am__append_11) $(am__append_12) \
+ $(am__append_13) $(am__append_14) -I$(dvisvgm_srcdir)/libs/md5
CLEANFILES = *.gcda *.gcno
all: all-recursive
@@ -836,13 +850,14 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Message.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MetafontWrapper.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NoPsSpecialHandler.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OFM.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Opacity.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PDFHandler.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PDFParser.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PDFToSVG.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PSInterpreter.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PSPattern.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PSPreviewFilter.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PSPreviewHandler.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PageRanges.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PageSize.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PapersizeSpecialHandler.Plo@am__quote@ # am--include-marker
@@ -863,6 +878,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ShadingPatch.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SignalHandler.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SourceInput.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SpecialActions.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SpecialManager.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StreamReader.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StreamWriter.Plo@am__quote@ # am--include-marker
@@ -1172,13 +1188,14 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/Message.Plo
-rm -f ./$(DEPDIR)/MetafontWrapper.Plo
-rm -f ./$(DEPDIR)/NoPsSpecialHandler.Plo
+ -rm -f ./$(DEPDIR)/OFM.Plo
-rm -f ./$(DEPDIR)/Opacity.Plo
-rm -f ./$(DEPDIR)/PDFHandler.Plo
-rm -f ./$(DEPDIR)/PDFParser.Plo
-rm -f ./$(DEPDIR)/PDFToSVG.Plo
-rm -f ./$(DEPDIR)/PSInterpreter.Plo
-rm -f ./$(DEPDIR)/PSPattern.Plo
- -rm -f ./$(DEPDIR)/PSPreviewFilter.Plo
+ -rm -f ./$(DEPDIR)/PSPreviewHandler.Plo
-rm -f ./$(DEPDIR)/PageRanges.Plo
-rm -f ./$(DEPDIR)/PageSize.Plo
-rm -f ./$(DEPDIR)/PapersizeSpecialHandler.Plo
@@ -1199,6 +1216,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/ShadingPatch.Plo
-rm -f ./$(DEPDIR)/SignalHandler.Plo
-rm -f ./$(DEPDIR)/SourceInput.Plo
+ -rm -f ./$(DEPDIR)/SpecialActions.Plo
-rm -f ./$(DEPDIR)/SpecialManager.Plo
-rm -f ./$(DEPDIR)/StreamReader.Plo
-rm -f ./$(DEPDIR)/StreamWriter.Plo
@@ -1315,13 +1333,14 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/Message.Plo
-rm -f ./$(DEPDIR)/MetafontWrapper.Plo
-rm -f ./$(DEPDIR)/NoPsSpecialHandler.Plo
+ -rm -f ./$(DEPDIR)/OFM.Plo
-rm -f ./$(DEPDIR)/Opacity.Plo
-rm -f ./$(DEPDIR)/PDFHandler.Plo
-rm -f ./$(DEPDIR)/PDFParser.Plo
-rm -f ./$(DEPDIR)/PDFToSVG.Plo
-rm -f ./$(DEPDIR)/PSInterpreter.Plo
-rm -f ./$(DEPDIR)/PSPattern.Plo
- -rm -f ./$(DEPDIR)/PSPreviewFilter.Plo
+ -rm -f ./$(DEPDIR)/PSPreviewHandler.Plo
-rm -f ./$(DEPDIR)/PageRanges.Plo
-rm -f ./$(DEPDIR)/PageSize.Plo
-rm -f ./$(DEPDIR)/PapersizeSpecialHandler.Plo
@@ -1342,6 +1361,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/ShadingPatch.Plo
-rm -f ./$(DEPDIR)/SignalHandler.Plo
-rm -f ./$(DEPDIR)/SourceInput.Plo
+ -rm -f ./$(DEPDIR)/SpecialActions.Plo
-rm -f ./$(DEPDIR)/SpecialManager.Plo
-rm -f ./$(DEPDIR)/StreamReader.Plo
-rm -f ./$(DEPDIR)/StreamWriter.Plo
@@ -1401,8 +1421,6 @@ uninstall-am: uninstall-binPROGRAMS
.PRECIOUS: Makefile
-# TL: do not try to rebuild these source files.
-
# the command-line parser class is generated from options.xml by opt2cpp
@TEXLIVE_BUILD_FALSE@$(srcdir)/CommandLine.hpp: options.xml
@TEXLIVE_BUILD_FALSE@ rm -f $@
@@ -1425,6 +1443,15 @@ uninstall-am: uninstall-binPROGRAMS
# Rebuild potrace:
@TEXLIVE_BUILD_TRUE@@POTRACE_RULE@
+# Rebuild libkpathsea:
+@TEXLIVE_BUILD_TRUE@@KPATHSEA_RULE@
+# Rebuild libfreetype:
+@TEXLIVE_BUILD_TRUE@@FREETYPE2_RULE@
+# Rebuild libz:
+@TEXLIVE_BUILD_TRUE@@ZLIB_RULE@
+# Rebuild potrace:
+@TEXLIVE_BUILD_TRUE@@POTRACE_RULE@
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/MapLine.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/MapLine.cpp
index 3455e1f2435..3ff1405b8c2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/MapLine.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/MapLine.cpp
@@ -2,7 +2,7 @@
** MapLine.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/MapLine.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/MapLine.hpp
index ddde94f9b03..a1d921c954f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/MapLine.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/MapLine.hpp
@@ -2,7 +2,7 @@
** MapLine.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp
index 2be2ebb0edf..f971e68c049 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp
@@ -2,7 +2,7 @@
** Matrix.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.hpp
index 140d0f0e0e1..9e1cb170473 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.hpp
@@ -2,7 +2,7 @@
** Matrix.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Message.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Message.cpp
index 8ff45639748..52fee877ca9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Message.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Message.cpp
@@ -2,7 +2,7 @@
** Message.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -189,6 +189,15 @@ MessageStream& Message::estream (bool prefix) {
}
+/** Returns the output stream for user messages
+ * @param[in] always ignore verbosity settings if true */
+MessageStream& Message::ustream (bool always) {
+ init();
+ MessageStream *ms = (always || (LEVEL & USERMESSAGES)) ? &messageStream : &nullStream;
+ return *ms;
+}
+
+
static bool colorchar2int (char colorchar, int *val) {
colorchar = tolower(colorchar);
if (colorchar >= '0' && colorchar <= '9')
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Message.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Message.hpp
index a2b8a3e4128..d9ab11f8303 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Message.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Message.hpp
@@ -2,7 +2,7 @@
** Message.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -95,8 +95,9 @@ class Message {
static MessageStream& mstream (bool prefix=false, MessageClass mclass=MC_MESSAGE);
static MessageStream& estream (bool prefix=false);
static MessageStream& wstream (bool prefix=false);
+ static MessageStream& ustream (bool always=false);
- enum {ERRORS=1, WARNINGS=2, MESSAGES=4};
+ enum {ERRORS=1, WARNINGS=2, MESSAGES=4, USERMESSAGES=8};
static int LEVEL;
static bool COLORIZE;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/MessageException.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/MessageException.hpp
index 18721badcd6..d893e7b4065 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/MessageException.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/MessageException.hpp
@@ -2,7 +2,7 @@
** MessageException.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.cpp
index d20a61fff0d..0dcafe83663 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.cpp
@@ -2,7 +2,7 @@
** MetafontWrapper.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.hpp
index e6fd81acdd7..255b04d34b9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/MetafontWrapper.hpp
@@ -2,7 +2,7 @@
** MetafontWrapper.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/MiKTeXCom.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/MiKTeXCom.cpp
index c44b4c688d6..18bfb19837c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/MiKTeXCom.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/MiKTeXCom.cpp
@@ -2,7 +2,7 @@
** MiKTeXCom.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/MiKTeXCom.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/MiKTeXCom.hpp
index 48b7334d2c0..f2530c7d8d4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/MiKTeXCom.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/MiKTeXCom.hpp
@@ -2,7 +2,7 @@
** MiKTeXCom.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.cpp
index 2c17e306906..65f098eb35a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.cpp
@@ -2,7 +2,7 @@
** NoPsSpecialHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -39,7 +39,7 @@ void NoPsSpecialHandler::dviEndPage (unsigned pageno, SpecialActions &actions) {
}
-vector<const char*> NoPsSpecialHandler::prefixes() const {
+vector<const char*> NoPsSpecialHandler::prefixes () const {
vector<const char*> pfx {"header=", "psfile=", "PSfile=", "ps:", "ps::", "!", "\""};
return pfx;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.hpp
index f7132d2c75c..d6de4519eae 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/NoPsSpecialHandler.hpp
@@ -2,7 +2,7 @@
** NoPsSpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -26,9 +26,10 @@
class NoPsSpecialHandler : public SpecialHandler {
public:
bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
- const char* name () const override {return nullptr;}
const char* info () const override {return nullptr;}
- std::vector<const char*> prefixes() const override;
+ const char* name () const override {return nullptr;}
+ static const char* handlerName () {return nullptr;}
+ std::vector<const char*> prefixes () const override;
protected:
void dviEndPage (unsigned pageno, SpecialActions &actions) override;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/NumericRanges.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/NumericRanges.hpp
index 8e837664116..5ddd3f27111 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/NumericRanges.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/NumericRanges.hpp
@@ -2,7 +2,7 @@
** NumericRanges.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/OFM.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/OFM.cpp
new file mode 100644
index 00000000000..606635d06aa
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/OFM.cpp
@@ -0,0 +1,270 @@
+/*************************************************************************
+** OFM.cpp **
+** **
+** This file is part of dvisvgm -- a fast DVI to SVG converter **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
+** **
+** This program is free software; you can redistribute it and/or **
+** modify it under the terms of the GNU General Public License as **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#include <cstdint>
+#include <string>
+#include "Length.hpp"
+#include "OFM.hpp"
+
+using namespace std;
+
+
+static uint32_t read_uint32 (StreamReader &reader, const string &name) {
+ uint32_t quad = reader.readUnsigned(4);
+ if (quad & 0x80000000)
+ throw FontMetricException("negative '"+name+"' value not permitted");
+ return quad;
+}
+
+void OFM::FileDimensions::read (StreamReader &reader) {
+ lf = read_uint32(reader, "lf");
+ lh = read_uint32(reader, "lh");
+ bc = read_uint32(reader, "bc");
+ ec = read_uint32(reader, "ec");
+ nw = read_uint32(reader, "nw");
+ nh = read_uint32(reader, "nh");
+ nd = read_uint32(reader, "nd");
+ ni = read_uint32(reader, "ni");
+ nl = read_uint32(reader, "nl");
+ nk = read_uint32(reader, "nk");
+ ne = read_uint32(reader, "ne");
+ np = read_uint32(reader, "np");
+ dir = read_uint32(reader, "font-dir");
+}
+
+
+/** Reads the common beginning of OFM level 0 and 1 files, and initializes
+ * the corresponding members.
+ * @param[in] is reads from this stream
+ * @param[in] maxNumWidths maximum number of width entries
+ * @return the collected data (file offsets, table sizes, writing direction) */
+OFM::FileDimensions OFM::read (istream &is, uint32_t maxNumWidths) {
+ OFM::FileDimensions dim;
+ if (is) {
+ is.seekg(0);
+ StreamReader sr(is);
+ uint32_t ofmLevel = sr.readUnsigned(4);
+ if (ofmLevel > 1)
+ throw FontMetricException("OFM level "+to_string(ofmLevel)+" not supported");
+ if (int(ofmLevel) != level())
+ throw FontMetricException("OFM level "+to_string(level())+" expected but found level "+to_string(ofmLevel));
+ dim.read(sr);
+ if (dim.nw > maxNumWidths)
+ throw FontMetricException("invalid size of width table");
+ _firstChar = dim.bc; // smallest character code in font
+ _lastChar = dim.ec; // largest character code in font
+ _vertical = (dim.dir > 0);
+ }
+ return dim;
+}
+
+
+/** Reads and stores the required data from the OFM header. */
+void OFM::readHeader (StreamReader &reader) {
+ _checksum = reader.readUnsigned(4);
+ _designSize = double(FixWord(reader.readSigned(4)))*Length::pt2bp;
+}
+
+
+/** Reads a sequence of values and stores them in a vector.
+ * @param[in] reader the TFM data is read from this object
+ * @param[out] words vector taking the read words
+ * @param[in] n number of entries to read */
+static void read_words (StreamReader &reader, vector<FixWord> &words, size_t n) {
+ words.resize(n);
+ for (size_t i=0; i < n; i++)
+ words[i] = reader.readSigned(4);
+}
+
+
+/** Reads and stores the required OFM tables (characters widths, heights, depths, ...). */
+void OFM::readTables (StreamReader &reader, const FileDimensions &dim) {
+ read_words(reader, _widthTable, dim.nw);
+ read_words(reader, _heightTable, dim.nh);
+ read_words(reader, _depthTable, dim.nd);
+ read_words(reader, _italicTable, dim.ni);
+ reader.skip(8*dim.nl + 4*dim.nk + 8*dim.ne);
+ read_words(reader, _params, min(dim.np, 7u)); // we only need params 0-6
+ _params.resize(7, 0); // ensure 7 parameters
+ for (FixWord h : _heightTable)
+ _ascent = max(_ascent, h);
+ for (FixWord d : _depthTable)
+ _descent = max(_descent, d);
+}
+
+
+/** Returns the character index for a given character or -1 if
+ * the OFM file doesn't contain information on the character. */
+size_t OFM::charIndex (int c) const {
+ uint32_t chr=c;
+ if (chr < _firstChar || chr > _lastChar || size_t(chr-_firstChar) >= numCharInfos())
+ return -1;
+ return chr-_firstChar;
+}
+
+
+/** Returns the width of a character in bp units. */
+double OFM::getCharWidth (int c) const {
+ auto cindex = charIndex(c);
+ if (cindex == size_t(-1))
+ return 0;
+ return double(_widthTable[widthIndex(cindex)])*_designSize;
+}
+
+
+/** Returns the height of a character in bp units. */
+double OFM::getCharHeight (int c) const {
+ auto cindex = charIndex(c);
+ if (cindex == size_t(-1))
+ return 0;
+ return double(_heightTable[heightIndex(cindex)])*_designSize;
+}
+
+
+/** Returns the depth of a character in bp units. */
+double OFM::getCharDepth (int c) const {
+ auto cindex = charIndex(c);
+ if (cindex == size_t(-1))
+ return 0;
+ return double(_depthTable[depthIndex(cindex)])*_designSize;
+}
+
+
+/** Returns the italic correction width of a character in bp units. */
+double OFM::getItalicCorr (int c) const {
+ auto cindex = charIndex(c);
+ if (cindex == size_t(-1))
+ return 0;
+ return double(_italicTable[italicIndex(cindex)])*_designSize;
+}
+
+/** Returns the optimal space width between words in bp units. */
+double OFM::getSpace () const {
+ return _params.empty() ? 0 : double(_params[1])*_designSize;
+}
+
+
+/** Returns the amount of glue stretching between words in bp units. */
+double OFM::getSpaceStretch () const {
+ return _params.empty() ? 0 : double(_params[2])*_designSize;
+}
+
+
+/** Returns the amount of glue shrinking between words in bp units. */
+double OFM::getSpaceShrink () const {
+ return _params.empty() ? 0 : double(_params[3])*_designSize;
+}
+
+
+/** Returns the size of one EM unit in bp units. */
+double OFM::getQuad () const {
+ if (_params.empty() || _params[5] == 0)
+ return _designSize;
+ return double(_params[5])*_designSize;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+/** Reads and stores the required data from an OFM level 0 data stream. */
+void OFM0::read (std::istream &is) {
+ auto dim = OFM::read(is, 0xFFFF);
+ if (_firstChar >= _lastChar || _lastChar > 0xFFFF)
+ throw FontMetricException("character codes out of range");
+ if (14 + dim.lh + 2*(dim.ec-dim.bc+1) + dim.nw + dim.nh + dim.nd + dim.ni +2*dim.nl + dim.nk + 2*dim.ne + dim.np != dim.lf)
+ throw FontMetricException("inconsistent table size values");
+ StreamReader sr(is);
+ readHeader(sr);
+ sr.seek(56 + dim.lh*4); // move to char info table
+ readCharInfos(sr);
+ readTables(sr, dim);
+}
+
+
+/** Reads and stores the required data from the char-info section.
+ * Expects the stream pointer to be located on the first byte of the first char-info entry. */
+void OFM0::readCharInfos (StreamReader &reader) {
+ auto numChars = _lastChar-_firstChar+1;
+ _charInfos.resize(numChars);
+ for (size_t i=0; i < numChars; i++) {
+ _charInfos[i] = uint64_t(reader.readUnsigned(4)) << 32;
+ _charInfos[i] |= reader.readUnsigned(4);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+/** Reads and stores the required data from an OFM level 1 data stream. */
+void OFM1::read (std::istream &is) {
+ auto dim = OFM::read(is, 0x110000);
+ if (_firstChar >= _lastChar || _lastChar > 0x10FFFF)
+ throw FontMetricException("character codes out of range");
+ StreamReader sr(is);
+ uint32_t nco = sr.readUnsigned(4); // OFM1: offset of char-info table (in 4-byte words)
+ _ncw = sr.readUnsigned(4); // total number of character info words in OFM file
+ _npc = sr.readUnsigned(4); // number of parameters per character
+ // check validity of number entries for new (OFM level 1) table types
+ size_t sum=0, numTables=0;
+ for (int i=0; i < 12; i++) {
+ uint32_t num = sr.readUnsigned(4);
+ sum += num;
+ if (i%2 == 0)
+ numTables += num;
+ }
+ if (numTables > 32)
+ throw FontMetricException("too many OFM level 1 tables");
+ if (29 + dim.lh + _ncw + dim.nw + dim.nh + dim.nd + dim.ni +2*dim.nl + dim.nk + 2*dim.ne + dim.np + sum != dim.lf)
+ throw FontMetricException("inconsistent table size values");
+ readHeader(sr);
+ sr.seek(4*nco); // move to char info table
+ readCharInfos(sr);
+ readTables(sr, dim);
+}
+
+
+/** Reads and stores the required data from the char-info section.
+ * Expects the stream pointer to be located on the first byte of the first char-info entry. */
+void OFM1::readCharInfos (StreamReader &reader) {
+ auto numCharInfos = _ncw/(3 + _npc/2); // number of char info entries in file
+ auto numChars = _lastChar-_firstChar+1;
+ size_t numCharsRead=0;
+ _charInfos.reserve(numChars);
+ while (numCharsRead <= numChars && numCharInfos > 0) {
+ CharInfo info;
+ info.widthIndex = uint16_t(reader.readUnsigned(2));
+ info.heightIndex = uint8_t(reader.readUnsigned(1));
+ info.depthIndex = uint8_t(reader.readUnsigned(1));
+ info.italicIndex = uint8_t(reader.readUnsigned(1));
+ reader.skip(3); // skip RFU, ext-tag, tag, and remainder
+ auto repeats = uint16_t(reader.readUnsigned(2));
+ if (numCharsRead + repeats > numChars)
+ throw FontMetricException("number of characters exceeded due to too many char-info repeats");
+ reader.skip(_npc*2); // skip parameters
+ if (_npc%2 == 0)
+ reader.skip(2); // skip padding bytes
+ for (int j=0; j <= repeats; j++)
+ _charInfos.push_back(info);
+ numCharsRead += repeats+1;
+ numCharInfos--;
+ }
+ if (numCharInfos > 0)
+ throw FontMetricException("more char-info entries present than characters");
+ if (numCharsRead < numChars)
+ throw FontMetricException("not all characters covered by char-info entries");
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/OFM.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/OFM.hpp
new file mode 100644
index 00000000000..993edbc95ef
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/OFM.hpp
@@ -0,0 +1,135 @@
+/*************************************************************************
+** OFM.hpp **
+** **
+** This file is part of dvisvgm -- a fast DVI to SVG converter **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
+** **
+** This program is free software; you can redistribute it and/or **
+** modify it under the terms of the GNU General Public License as **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#ifndef OFM_HPP
+#define OFM_HPP
+
+#include <vector>
+#include "FixWord.hpp"
+#include "FontMetrics.hpp"
+#include "StreamReader.hpp"
+
+class OFM : public FontMetrics {
+ public:
+ virtual int level () const =0;
+ bool isOFM () const override {return true;}
+ uint32_t getChecksum () const override {return _checksum;}
+ uint32_t firstChar () const override {return _firstChar;}
+ uint32_t lastChar () const override {return _lastChar;}
+ bool verticalLayout () const override {return _vertical;}
+ double getDesignSize () const override {return _designSize;}
+ double getAscent () const override {return double(_ascent)*_designSize;}
+ double getDescent () const override {return double(_descent)*_designSize;}
+ double getCharWidth (int c) const override;
+ double getCharHeight (int c) const override;
+ double getCharDepth (int c) const override;
+ double getItalicCorr (int c) const override;
+ double getSpace () const override;
+ double getSpaceStretch () const override;
+ double getSpaceShrink () const override;
+ double getQuad () const override;
+ using FontMetrics::read;
+
+ protected:
+ struct FileDimensions {
+ uint32_t lf=0; // length of file in 4-byte words
+ uint32_t lh=0; // length of header data in 4-byte words
+ uint32_t bc=0; // smallest character code
+ uint32_t ec=0; // largest character code
+ uint32_t nw=0; // number of width entries
+ uint32_t nh=0; // number of height entries
+ uint32_t nd=0; // number of depth entries
+ uint32_t ni=0; // number of italic correction entries
+ uint32_t nl=0; // number of lig-kern entries
+ uint32_t nk=0; // number of kern entries
+ uint32_t ne=0; // number of extensible character entries
+ uint32_t np=0; // number of font parameter words
+ uint32_t dir=0; // writing direction of font
+ void read (StreamReader &reader);
+ };
+
+ FileDimensions read (std::istream &is, uint32_t maxNumWidths);
+ void readHeader (StreamReader &reader);
+ void readTables (StreamReader &reader, const FileDimensions &dim);
+ size_t charIndex (int c) const;
+ virtual size_t numCharInfos () const =0;
+ virtual size_t widthIndex (size_t n) const =0;
+ virtual size_t heightIndex (size_t n) const =0;
+ virtual size_t depthIndex (size_t n) const =0;
+ virtual size_t italicIndex (size_t n) const =0;
+
+ protected:
+ uint32_t _checksum=0;
+ uint32_t _firstChar=0, _lastChar=0;
+ double _designSize=0; ///< design size of the font in PS points (72bp = 1in)
+ std::vector<FixWord> _widthTable; ///< character widths in design size units
+ std::vector<FixWord> _heightTable; ///< character height in design size units
+ std::vector<FixWord> _depthTable; ///< character depth in design size units
+ std::vector<FixWord> _italicTable; ///< italic corrections in design size units
+ std::vector<FixWord> _params; ///< values of the OFM's param section
+ FixWord _ascent=0, _descent=0; ///< max. height and depth
+ bool _vertical=false; ///< true if metrics refer to vertical text layout
+};
+
+
+class OFM0 : public OFM {
+ public:
+ void read (std::istream &is) override;
+ int level () const override {return 0;}
+
+ protected:
+ void readCharInfos (StreamReader &reader);
+ size_t numCharInfos () const override {return _charInfos.size();}
+ size_t widthIndex (size_t n) const override {return (_charInfos[n] >> 48) & 0xFFFF;}
+ size_t heightIndex (size_t n) const override {return (_charInfos[n] >> 40) & 0xFF;}
+ size_t depthIndex (size_t n) const override {return (_charInfos[n] >> 32) & 0xFF;}
+ size_t italicIndex (size_t n) const override {return (_charInfos[n] >> 24) & 0xFF;}
+
+ private:
+ std::vector<uint64_t> _charInfos;
+};
+
+
+class OFM1 : public OFM {
+ struct CharInfo {
+ uint16_t widthIndex=0;
+ uint8_t heightIndex=0;
+ uint8_t depthIndex=0;
+ uint8_t italicIndex=0;
+ };
+ public:
+ void read (std::istream &is) override;
+ int level () const override {return 1;}
+
+ protected:
+ void readCharInfos (StreamReader &reader);
+ size_t numCharInfos () const override {return _charInfos.size();}
+ size_t widthIndex (size_t n) const override {return _charInfos[n].widthIndex;}
+ size_t heightIndex (size_t n) const override {return _charInfos[n].heightIndex;}
+ size_t depthIndex (size_t n) const override {return _charInfos[n].depthIndex;}
+ size_t italicIndex (size_t n) const override {return _charInfos[n].italicIndex;}
+
+ private:
+ uint32_t _ncw=0;
+ uint32_t _npc=0;
+ std::vector<CharInfo> _charInfos;
+};
+
+#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Opacity.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Opacity.cpp
index 027992028ba..ad3edb70758 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Opacity.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Opacity.cpp
@@ -2,7 +2,7 @@
** Opacity.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Opacity.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Opacity.hpp
index 867e69993a1..974cb842e10 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Opacity.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Opacity.hpp
@@ -2,7 +2,7 @@
** Opacity.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFHandler.cpp
index ba88e698525..f401c344091 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFHandler.cpp
@@ -2,7 +2,7 @@
** PDFHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -139,6 +139,12 @@ string PDFHandler::mutoolVersion () {
}
+/** Returns the total number of pages of a PDF file. */
+int PDFHandler::numberOfPages (const string &fname) {
+ return parse_value<int>(mtShow("\""+fname+"\"", "trailer/Root/Pages/Count"));
+}
+
+
/** Converts a single page of a PDF file to SVG. If no context element is given,
* the SVG page contents are added to a page group element of the SVG tree.
* Otherwise, they are added to the context element which is not inserted into
@@ -175,6 +181,7 @@ unique_ptr<SVGElement> PDFHandler::convert (const string &fname, int pageno, uni
void PDFHandler::initFile (const string &fname) {
finishFile();
_fname = FilePath(fname, true).absolute();
+ _fname = "\"" + _fname + "\"";
_numPages = parse_value<int>(mtShow("trailer/Root/Pages/Count"));
// extract image and font files from the PDF
string cwd = FileSystem::getcwd();
@@ -472,7 +479,7 @@ void PDFHandler::doClipPath (XMLElement *trcClipPathElement) {
auto clipPathElement = util::make_unique<SVGElement>("clipPath");
clipPathElement->addAttribute("id", id);
auto groupElement = util::make_unique<SVGElement>("g");
- _clipPathStack.emplace(ClipPathData{std::move(id), groupElement.get()});
+ _clipPathStack.emplace(std::move(id), groupElement.get());
groupElement->setClipPathUrl(_clipPathStack.top().id);
clipPathElement->append(std::move(pathElement));
_svg->appendToDefs(std::move(clipPathElement));
@@ -496,7 +503,7 @@ void PDFHandler::doClipStrokePath (XMLElement *trcClipStrokePathElement) {
maskElement->append(std::move(pathElement));
auto groupElement = util::make_unique<SVGElement>("g");
groupElement->setMaskUrl(id);
- _clipPathStack.emplace(ClipPathData{std::move(id), groupElement.get()});
+ _clipPathStack.emplace(std::move(id), groupElement.get());
_svg->appendToDefs(std::move(maskElement));
_svg->pushPageContext(std::move(groupElement));
}
@@ -508,7 +515,7 @@ void PDFHandler::doClipText (XMLElement *trcClipTextElement) {
auto clipPathElement = util::make_unique<SVGElement>("clipPath");
clipPathElement->addAttribute("id", id);
auto groupElement = util::make_unique<SVGElement>("g");
- _clipPathStack.emplace(ClipPathData{std::move(id), groupElement.get()});
+ _clipPathStack.emplace(std::move(id), groupElement.get());
groupElement->setClipPathUrl(_clipPathStack.top().id);
SVGElement *cpElementPtr = clipPathElement.get();
_svg->pushPageContext(std::move(clipPathElement));
@@ -630,15 +637,20 @@ void PDFHandler::doFillText (XMLElement *trcFillTextElement) {
auto trm = parse_attr_value<vector<double>>(spanElement, "trm");
if (trm.size() < 4 || trm[0] == 0)
continue;
- auto fontname = strip_subset_prefix(parse_attr_value<string>(spanElement, "font"));
- string filename;
+ auto fontname = parse_attr_value<string>(spanElement, "font");
auto it = _objDict.find(fontname);
+ if (it == _objDict.end()) {
+ // try to lookup font without subfont prefix
+ fontname = strip_subset_prefix(fontname);
+ it = _objDict.find(fontname);
+ }
+ string filename;
if (it != _objDict.end())
filename = it->second.fname;
if (filename.empty())
filename = "sys://"+fontname;
double ptsize = matrix_extent({trm[0], trm[1], 0, trm[2], trm[3]});
- ptsize = round(10*ptsize)/10;
+ ptsize = round(100*ptsize)/100;
int fontID = FontManager::instance().registerFont(filename, fontname, ptsize);
if (fontID >= 0) {
auto font = font_cast<NativeFont*>(FontManager::instance().getFontById(fontID));
@@ -789,11 +801,10 @@ void PDFHandler::collectObjects () {
for (auto &entry : _extractedFiles) {
if (entry.second.substr(0, 5) == "font-") {
string filepath = tmpdir+entry.second; // path to font file
- string fontname = strip_subset_prefix(FontEngine::instance().getPSName(filepath));
- // If the extracted font file doesn't contain a font name,
- // try to get it from the corresponding PDF object.
- if (fontname.empty())
- fontname = mtShow(to_string(entry.first)+"/FontName", SearchPattern(R"(/(\w+))", "$1"));
+ string psFontname = FontEngine::instance().getPSName(filepath);
+ string fontname = mtShow(to_string(entry.first) + "/FontName", SearchPattern(R"(/((\w|[+-])+))", "$1"));
+ if (!psFontname.empty() && fontname.find('+') == string::npos)
+ fontname = std::move(psFontname);
_objDict.emplace(fontname, ObjID(entry.first, 0, filepath));
}
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFHandler.hpp
index 3400a1d69d7..abc71a681bc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFHandler.hpp
@@ -2,7 +2,7 @@
** PDFHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -58,6 +58,7 @@ class PDFHandler {
std::unique_ptr<SVGElement> convert (const std::string &fname, int pageno, std::unique_ptr<SVGElement> context=nullptr);
static std::string mutoolVersion ();
static bool available () {return !mutoolVersion().empty();}
+ static int numberOfPages (const std::string &fname);
protected:
static std::string mutool (const std::string &cmd, bool readFromStderr=false);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFParser.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFParser.cpp
index b92ce54e7f4..7d604a49aba 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFParser.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFParser.cpp
@@ -2,7 +2,7 @@
** PDFParser.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -275,7 +275,7 @@ static PDFStream parse_stream (InputReader &ir, const char *delim) {
do
ir.skipUntil("endstream");
while (ir.peek() >= 0 && !strchr(delim, ir.peek())); // ensure delimiter after "endstream"
- return PDFStream();
+ return {};
}
@@ -289,7 +289,7 @@ static PDFIndirectObject parse_indirect_object (InputReader &ir, const char *del
const int *objno = objects.back().get<int>();
objects.pop_back();
if (objno && genno)
- return PDFIndirectObject(*objno, *genno);
+ return {*objno, *genno};
}
throw PDFException("object and generation number expected before 'obj'");
}
@@ -302,7 +302,7 @@ static PDFObjectRef parse_object_ref (vector<PDFObject> &objects) {
const int *objno = objects.back().get<int>();
objects.pop_back();
if (objno && genno)
- return PDFObjectRef(*objno, *genno);
+ return {*objno, *genno};
}
throw PDFException("object and generation number expected before 'R'");
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFParser.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFParser.hpp
index bf76a946163..750984d72de 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFParser.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFParser.hpp
@@ -2,7 +2,7 @@
** PDFParser.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp
index b0e3df58ba8..b1a751915d4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.cpp
@@ -2,7 +2,7 @@
** PDFToSVG.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -45,7 +45,7 @@ void PDFToSVG::checkGSAndFileFormat () {
if (!PDFHandler::available()) {
ostringstream oss;
if (gsVersion() > 0) {
- oss << "To process PDF files, either Ghostscript < 10.1 or mutool is required.\n";
+ oss << "To process PDF files, either Ghostscript < 10.01.0 or mutool is required.\n";
oss << "The installed Ghostscript version " << Ghostscript().revisionstr() << " isn't supported.\n";
throw MessageException(oss.str());
}
@@ -59,7 +59,10 @@ void PDFToSVG::checkGSAndFileFormat () {
/** Returns the total number of pages in the PDF file. */
int PDFToSVG::totalPageCount () const {
if (_totalPageCount < 0) {
- _totalPageCount = psInterpreter().pdfPageCount(filename());
+ if (_useGS)
+ _totalPageCount = psInterpreter().pdfPageCount(filename());
+ else
+ _totalPageCount = PDFHandler::numberOfPages(filename());
if (_totalPageCount < 1)
throw MessageException("can't retrieve number of pages from file " + filename());
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.hpp
index 4319c59c51b..598d6c3a3df 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PDFToSVG.hpp
@@ -2,7 +2,7 @@
** PDFToSVG.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSFilter.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSFilter.hpp
deleted file mode 100644
index 17dcf0d93e2..00000000000
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSFilter.hpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/*************************************************************************
-** PSFilter.hpp **
-** **
-** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 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 PSFILTER_HPP
-#define PSFILTER_HPP
-
-class PSInterpreter;
-
-class PSFilter
-{
- public:
- explicit PSFilter (PSInterpreter &psi) : _psi(psi) {}
- virtual ~PSFilter () =default;
- virtual void execute (const char *code, size_t len) =0;
- virtual bool active () const =0;
-
- protected:
- PSInterpreter& psInterpreter () {return _psi;}
-
- private:
- PSInterpreter &_psi;
-};
-
-#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSInterpreter.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSInterpreter.cpp
index 1c20bb6bb40..7b9656be7ef 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSInterpreter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSInterpreter.cpp
@@ -2,7 +2,7 @@
** PSInterpreter.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -27,7 +27,6 @@
#include "FileSystem.hpp"
#include "InputReader.hpp"
#include "Message.hpp"
-#include "PSFilter.hpp"
#include "PSInterpreter.hpp"
#include "SignalHandler.hpp"
#include "utility.hpp"
@@ -67,7 +66,8 @@ void PSInterpreter::init () {
// as of GS 9.56.0. Since dvisvgm relies on the old PS-based interpreter for its
// PDF support, we try to disable the new one.
// https://www.ghostscript.com/doc/9.56.0/Use.htm#PDF_switches
- if (gsrev >= 9560)
+ // As of GS 10.02.0, option NEWPDF has been deprecated and has no effect any longer.
+ if (gsrev >= 9560 && gsrev < 10020)
gsargs.emplace_back("-dNEWPDF=false");
}
_gs.init(gsargs.size(), gsargs.data(), this);
@@ -81,16 +81,6 @@ void PSInterpreter::init () {
}
-/** Sets or replaces the filter applied to the PS code.
- * @param[in] filter the new filter being used
- * @return the previous, replaced filter (nullptr if there was none) */
-PSFilter* PSInterpreter::setFilter (PSFilter *filter) {
- PSFilter *prevFilter = _filter;
- _filter = filter;
- return prevFilter;
-}
-
-
PSActions* PSInterpreter::setActions (PSActions *actions) {
PSActions *old_actions = _actions;
_actions = actions;
@@ -136,15 +126,6 @@ bool PSInterpreter::execute (const char *str, size_t len, bool flush) {
complete = true;
}
- if (_filter && _filter->active()) {
- PSFilter *filter = _filter;
- _filter = nullptr; // prevent recursion when filter calls execute()
- filter->execute(str, len);
- if (filter->active()) // filter still active after execution?
- _filter = filter;
- return complete;
- }
-
// feed Ghostscript with code chunks that are not larger than 64KB
// => see documentation of gsapi_run_string_foo()
const char *p=str;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSInterpreter.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSInterpreter.hpp
index 6562e3bf988..d77d8bfa97d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSInterpreter.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSInterpreter.hpp
@@ -2,7 +2,7 @@
** PSInterpreter.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -108,7 +108,6 @@ class PSInterpreter {
bool executeRaw (const std::string &str, int n);
bool active () const {return _mode != PS_QUIT;}
void limit (size_t max_bytes) {_bytesToRead = max_bytes;}
- PSFilter* setFilter (PSFilter *filter);
PSActions* setActions (PSActions *actions);
int pdfPageCount (const std::string &fname);
BoundingBox pdfPageBox (const std::string &fname, int pageno);
@@ -134,7 +133,6 @@ class PSInterpreter {
Ghostscript _gs;
Mode _mode; ///< current execution mode
PSActions *_actions=nullptr; ///< actions to be performed
- PSFilter *_filter=nullptr; ///< active filter used to process PS code
size_t _bytesToRead=0; ///< if > 0, maximal number of bytes to be processed by following calls of execute()
std::vector<char> _linebuf;
std::string _errorMessage; ///< text of error message
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.cpp
index a2c935d579e..8271d7277dd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.cpp
@@ -2,7 +2,7 @@
** PSPattern.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.hpp
index 33d5762f56c..44622856231 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPattern.hpp
@@ -2,7 +2,7 @@
** PSPattern.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewFilter.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewHandler.cpp
index 960812a4e09..33fedbff22e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewFilter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewHandler.cpp
@@ -1,8 +1,8 @@
/*************************************************************************
-** PSPreviewFilter.cpp **
+** PSPreviewHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -18,66 +18,53 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#include <vector>
-#include "InputBuffer.hpp"
-#include "InputReader.hpp"
#include "PSInterpreter.hpp"
-#include "PSPreviewFilter.hpp"
-#include "SpecialActions.hpp"
-
+#include "PSPreviewHandler.hpp"
using namespace std;
+PSPreviewHandler::PSPreviewHandler (PSInterpreter &psi) : _psi(psi) {
+}
+
+
/** Activates this filter so that the PS code will be redirected through it if
* it's hooked into the PSInterpreter. */
-void PSPreviewFilter::activate () {
- if (_tightpage) // reactivate filter?
- _active = true;
- else { // first activation?
- _tightpage = _active = false;
- // try to retrieve version string of preview package set in the PS header section
- if (psInterpreter().executeRaw("SDict begin currentdict/preview@version known{preview@version}{0}ifelse end", 1))
- _version = psInterpreter().rawData()[0];
- // check if tightpage option was set
- if (_version != "0" && psInterpreter().executeRaw("SDict begin preview@tightpage end", 1)) {
- _tightpage = (psInterpreter().rawData()[0] == "true");
- _active = true;
- }
- }
+void PSPreviewHandler::init () {
+ // try to retrieve version string of preview package set in the PS header section
+ if (_psi.executeRaw("SDict begin currentdict/preview@version known{preview@version}{0}ifelse end", 1))
+ _version = _psi.rawData()[0];
+ // check if tightpage option was set
+ if (_version != "0" && _psi.executeRaw("SDict begin preview@tightpage end", 1))
+ _tightpage = (_psi.rawData()[0] == "true");
_boxExtents.clear();
}
-/** Tries to extract the bounding box information from a chunk of PostScript code.
- * @param[in] code pointer to buffer with PS code to filter
- * @param[in] len number of bytes in buffer */
-void PSPreviewFilter::execute (const char *code, size_t len) {
- // If the "tightpage" option was set in the TeX file, 7 integers representing the
- // extent of the bounding box are present at the begin of each page.
+/** Tries to extract the bounding box information from the PS operand stack.
+ @return true on success. */
+bool PSPreviewHandler::readDataFromStack () {
if (!_tightpage)
- psInterpreter().execute(code, len);
- else {
- // Read bounding box information pushed on the operand stack by the preview package.
- // It consists of 7 values in DVI units:
- // adj_left, adj_bottom, adj_right, adj_top, height, depth, width,
- // where the first 4 values are set by \PreviewBorder or \PreviewBbAdjust. They denote
- // the border adjustments to create additional space around the graphics.
- // The baseline of the tight box extends from (0,0) to (tight_width, 0).
- CharInputBuffer ib(code, len);
- BufferInputReader ir(ib);
- ir.skipSpace();
- int val;
- while (ir.parseInt(val) && _boxExtents.size() <= 7) {
- _boxExtents.push_back(val);
- ir.skipSpace();
- }
- }
- _active = false; // no further processing required
+ return false;
+
+ // Read bounding box information pushed on the operand stack by the preview package.
+ // It consists of 7 values in DVI units:
+ // adj_left, adj_bottom, adj_right, adj_top, height, depth, width,
+ // where the first 4 values are set by \PreviewBorder or \PreviewBbAdjust. They denote
+ // the border adjustments to create additional space around the graphics.
+ // The baseline of the tight box extends from (0,0) to (tight_width, 0).
+ const char *getOperands =
+ "count 7 sub neg dup 0 lt{pop 0}if{0}repeat\n" // ensure 7 operands on the stack
+ "7{dup type dup /integertype eq exch /realtype eq or not{pop 0}if cvi 7 1 roll} repeat"; // ensure integer operands
+ _psi.executeRaw(getOperands, 7);
+ _boxExtents.clear();
+ for (const string &str: _psi.rawData())
+ _boxExtents.push_back(stoi(str));
+ return true;
}
/** Returns the bounding box defined by the preview package. */
-bool PSPreviewFilter::getBoundingBox (BoundingBox &bbox) const {
+bool PSPreviewHandler::getBoundingBox (BoundingBox &bbox) const {
if (_boxExtents.size() < 7)
return false;
const double leftX = _boxExtents[0]*_dvi2bp;
@@ -87,18 +74,18 @@ bool PSPreviewFilter::getBoundingBox (BoundingBox &bbox) const {
/** Returns the box height in PS points, or -1 if no data was found or read yet. */
-double PSPreviewFilter::height () const {
+double PSPreviewHandler::height () const {
return _boxExtents.size() > 4 ? (_boxExtents[4]+_boxExtents[3])*_dvi2bp : -1;
}
/** Returns the box depth in PS points, or -1 if no data was found or read yet. */
-double PSPreviewFilter::depth () const {
+double PSPreviewHandler::depth () const {
return _boxExtents.size() > 5 ? (_boxExtents[5]-_boxExtents[1])*_dvi2bp : -1;
}
/** Returns the box width in PS points, or -1 if no data was found or read yet. */
-double PSPreviewFilter::width () const {
+double PSPreviewHandler::width () const {
return _boxExtents.size() > 6 ? (_boxExtents[6]+_boxExtents[2]-_boxExtents[0])*_dvi2bp : -1;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewFilter.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewHandler.hpp
index 24426529bf5..911f3c01839 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewFilter.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PSPreviewHandler.hpp
@@ -1,8 +1,8 @@
/*************************************************************************
-** PSPreviewFilter.hpp **
+** PSPreviewHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -18,26 +18,23 @@
** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
-#ifndef PSPREVIEWFILTER_HPP
-#define PSPREVIEWFILTER_HPP
+#ifndef PSPREVIEWHANDLER_HPP
+#define PSPREVIEWHANDLER_HPP
#include <string>
#include <vector>
#include "BoundingBox.hpp"
-#include "PSFilter.hpp"
-class SpecialActions;
+class PSInterpreter;
-class PSPreviewFilter : public PSFilter {
+class PSPreviewHandler {
public:
- explicit PSPreviewFilter (PSInterpreter &psi) : PSFilter(psi) {}
- void activate ();
- void execute (const char *code, size_t len) override;
- bool active () const override {return _active;}
- std::string version () const {return _version;}
- bool tightpage () const {return _tightpage;}
+ explicit PSPreviewHandler (PSInterpreter &psi);
+ void init ();
+ std::string version () const {return _version;}
+ bool tightpage () const {return _tightpage;}
+ bool readDataFromStack ();
void setDviScaleFactor (double dvi2bp) {_dvi2bp = dvi2bp;}
- void assignBorders (BoundingBox &bbox) const;
bool getBoundingBox (BoundingBox &bbox) const;
double height () const;
double depth () const;
@@ -45,10 +42,10 @@ class PSPreviewFilter : public PSFilter {
private:
std::string _version; ///< version string of preview package
- bool _active=false; ///< true if filter is active
bool _tightpage=false; ///< true if tightpage option was given
double _dvi2bp=1.0/65536.0; ///< factor to convert dvi units to PS points
std::vector<int> _boxExtents; ///< bounding box data set by the preview package (in DVI units)
+ PSInterpreter &_psi;
};
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PageRanges.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PageRanges.cpp
index e80aa4839be..587e1e61019 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PageRanges.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PageRanges.cpp
@@ -2,7 +2,7 @@
** PageRanges.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PageRanges.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PageRanges.hpp
index d998d28c9f4..ccf188f4124 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PageRanges.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PageRanges.hpp
@@ -2,7 +2,7 @@
** PageRanges.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PageSize.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PageSize.cpp
index 1af696fe58a..85401baccf1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PageSize.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PageSize.cpp
@@ -2,7 +2,7 @@
** PageSize.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PageSize.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PageSize.hpp
index 8670f718c1d..3a97fe2c5f5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PageSize.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PageSize.hpp
@@ -2,7 +2,7 @@
** PageSize.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Pair.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Pair.hpp
index c1fdd5b6d58..21afb20f76b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Pair.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Pair.hpp
@@ -2,7 +2,7 @@
** Pair.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -22,6 +22,7 @@
#define PAIR_HPP
#include <cmath>
+#include <cstdint>
#include <ostream>
#include "macros.hpp"
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PapersizeSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PapersizeSpecialHandler.cpp
index b070643f6d9..34245270766 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PapersizeSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PapersizeSpecialHandler.cpp
@@ -2,7 +2,7 @@
** PapersizeSpecialHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -92,7 +92,7 @@ void PapersizeSpecialHandler::dviEndPage (unsigned pageno, SpecialActions &actio
}
-vector<const char*> PapersizeSpecialHandler::prefixes() const {
+vector<const char*> PapersizeSpecialHandler::prefixes () const {
vector<const char*> pfx {"papersize="};
return pfx;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PapersizeSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PapersizeSpecialHandler.hpp
index 621de709db6..d92c563b06f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PapersizeSpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PapersizeSpecialHandler.hpp
@@ -2,7 +2,7 @@
** PapersizeSpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -34,8 +34,9 @@ class PapersizeSpecialHandler : public SpecialHandler {
void preprocess (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
const char* info () const override {return "special to set the page size";}
- const char* name () const override {return "papersize";}
- std::vector<const char*> prefixes() const override;
+ const char* name () const override {return handlerName();}
+ static const char* handlerName () {return "papersize";}
+ std::vector<const char*> prefixes () const override;
void storePaperSize (unsigned pageno, Length width, Length height);
void reset () {_pageSizes.clear();}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PathClipper.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PathClipper.cpp
index 50030f96578..346400d687f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PathClipper.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PathClipper.cpp
@@ -2,7 +2,7 @@
** PathClipper.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -58,7 +58,7 @@ class FlattenActions : public CurvedPath::IterationActions {
if (p == _currentPoint && !_currentPoly.empty())
return;
closepath();
- _currentPoly.emplace_back(IntPoint(to_cInt(p.x()), to_cInt(p.y()), 0));
+ _currentPoly.emplace_back(to_cInt(p.x()), to_cInt(p.y()), 0);
_currentPoint = _startPoint = p;
}
@@ -66,10 +66,10 @@ class FlattenActions : public CurvedPath::IterationActions {
if (p == _currentPoint && !_currentPoly.empty())
return;
if (_currentPoly.empty()) // this shouldn't happen but in case it does...
- _currentPoly.emplace_back(IntPoint(0, 0, 0)); // ...add a start point first
+ _currentPoly.emplace_back(0, 0, 0); // ...add a start point first
_numLines--;
_currentPoly.back().Z.label2 = _numLines;
- _currentPoly.emplace_back(IntPoint(to_cInt(p.x()), to_cInt(p.y()), ZType(_numLines, 0)));
+ _currentPoly.emplace_back(to_cInt(p.x()), to_cInt(p.y()), ZType(_numLines, 0));
_currentPoint = p;
}
@@ -100,7 +100,7 @@ class FlattenActions : public CurvedPath::IterationActions {
protected:
void addCurvePoints (const CubicBezier &bezier) {
if (_currentPoly.empty()) // this shouldn't happen but in case it does, ...
- _currentPoly.emplace_back(IntPoint(0, 0, 0)); // ...add a start point first
+ _currentPoly.emplace_back(0, 0, 0); // ...add a start point first
vector<DPair> points; // points of flattened curve
vector<double> t; // corresponding 'time' parameters
bezier.approximate(0.01, points, &t);
@@ -113,7 +113,7 @@ class FlattenActions : public CurvedPath::IterationActions {
continue;
_currentPoly.back().Z.label2 = ZLabel(_curves.size(), t[i-1]);
ZLabel label(_curves.size(), t[i]);
- _currentPoly.emplace_back(IntPoint(to_cInt(p.x()), to_cInt(p.y()), ZType(label, label)));
+ _currentPoly.emplace_back(to_cInt(p.x()), to_cInt(p.y()), ZType(label, label));
_currentPoint = p;
}
}
@@ -211,7 +211,7 @@ inline ZLabel division_label (const IntPoint &p1, const IntPoint &p2, const IntP
int32_t id = segment_id(p1, p2, t1, t2);
if (id > 0)
s = t1+(t2-t1)*division_ratio(p1, p2, q);
- return ZLabel(id, s);
+ return {id, s};
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PathClipper.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PathClipper.hpp
index c398c38db83..64d62739917 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PathClipper.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PathClipper.hpp
@@ -2,7 +2,7 @@
** PathClipper.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PdfSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PdfSpecialHandler.cpp
index 0af7303e8d0..dee88b27da7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PdfSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PdfSpecialHandler.cpp
@@ -2,7 +2,7 @@
** PdfSpecialHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -283,7 +283,7 @@ void PdfSpecialHandler::dviEndPage (unsigned pageno, SpecialActions &actions) {
}
-vector<const char*> PdfSpecialHandler::prefixes() const {
+vector<const char*> PdfSpecialHandler::prefixes () const {
vector<const char*> pfx {"pdf:"};
return pfx;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PdfSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PdfSpecialHandler.hpp
index b5267939d74..68071d2c325 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PdfSpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PdfSpecialHandler.hpp
@@ -2,7 +2,7 @@
** PdfSpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -27,11 +27,12 @@ class StreamInputReader;
class PdfSpecialHandler : public SpecialHandler {
public:
- const char* info () const override {return "PDF hyperlink, font map, and pagesize specials";}
- const char* name () const override {return "pdf";}
- std::vector<const char*> prefixes() const override;
void preprocess (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
+ const char* info () const override {return "PDF hyperlink, font map, and pagesize specials";}
+ const char* name () const override {return handlerName();}
+ static const char* handlerName () {return "pdf";}
+ std::vector<const char*> prefixes () const override;
protected:
// handlers for corresponding PDF specials
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PreScanDVIReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PreScanDVIReader.cpp
index dfcb4b1ddb5..898f4114667 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PreScanDVIReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PreScanDVIReader.cpp
@@ -2,7 +2,7 @@
** PreScanDVIReader.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PreScanDVIReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PreScanDVIReader.hpp
index 2668815a488..a6905b35ec8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PreScanDVIReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PreScanDVIReader.hpp
@@ -2,7 +2,7 @@
** PreScanDVIReader.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Process.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Process.cpp
index c79f6e95267..3281396f3a8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Process.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Process.cpp
@@ -2,7 +2,7 @@
** Process.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -74,13 +74,13 @@ string Subprocess::read (const SearchPattern &pattern, bool *error) {
const size_t bytesRead = readFromPipe(&_rdbuf[_bufstartpos], _rdbuf.size()-_bufstartpos, error);
const size_t bufendpos = _bufstartpos + bytesRead;
smatch matches;
- size_t matchendpos= bufendpos; // buffer position after last match
+ size_t matchendpos = bufendpos; // buffer position after last match
if (pattern.search.empty())
result.assign(_rdbuf.data(), matchendpos);
else {
bool matched=false;
regex re(pattern.search);
- for (auto it = cregex_iterator(&_rdbuf[0], &_rdbuf[bufendpos], re); it != cregex_iterator(); ++it) {
+ for (auto it = cregex_iterator(&_rdbuf[0], &_rdbuf[0]+bufendpos, re); it != cregex_iterator(); ++it) {
result += it->format(pattern.replace, regex_constants::format_no_copy);
matchendpos = it->position() + it->length();
matched = true;
@@ -121,11 +121,8 @@ bool Process::run (string *out, const SearchPattern &pattern, PipeFlags flags) {
if (out)
out->clear();
for (;;) {
- if (out) {
- string chunk;
- subprocess.readFromPipe(chunk, pattern);
- *out += chunk;
- }
+ if (out)
+ subprocess.readFromPipe(*out, pattern);
Subprocess::State state = subprocess.state();
if (state != Subprocess::State::RUNNING)
return state == Subprocess::State::FINISHED;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Process.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Process.hpp
index 5fa5e9765bb..e0cbf7ce081 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Process.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Process.hpp
@@ -2,7 +2,7 @@
** Process.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp
index 7645adea02a..bc563627229 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.cpp
@@ -2,7 +2,7 @@
** PsSpecialHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -28,7 +28,7 @@
#include "Message.hpp"
#include "PathClipper.hpp"
#include "PSPattern.hpp"
-#include "PSPreviewFilter.hpp"
+#include "PSPreviewHandler.hpp"
#include "PsSpecialHandler.hpp"
#include "SpecialActions.hpp"
#include "SVGElement.hpp"
@@ -47,7 +47,7 @@ string PsSpecialHandler::BITMAP_FORMAT;
bool PsSpecialHandler::EMBED_BITMAP_DATA = false;
-PsSpecialHandler::PsSpecialHandler () : _psi(this), _previewFilter(_psi)
+PsSpecialHandler::PsSpecialHandler () : _psi(this), _previewHandler(_psi)
{
_psi.setImageDevice(BITMAP_FORMAT);
}
@@ -123,9 +123,8 @@ void PsSpecialHandler::enterBodySection () {
// Check for information generated by preview.sty. If the tightpage options
// was set, don't execute the bop-hook but allow the PS filter to read
// the bbox data present at the beginning of the page.
- _psi.setFilter(&_previewFilter);
- _previewFilter.activate();
- if (!_previewFilter.tightpage())
+ _previewHandler.init();
+ if (!_previewHandler.tightpage())
_psi.execute("userdict/bop-hook known{bop-hook}if\n", false);
}
}
@@ -155,9 +154,7 @@ void PsSpecialHandler::executeAndSync (istream &is, bool updatePos) {
_actions->getColor().getRGB(r, g, b);
ostringstream oss;
oss << '\n' << r << ' ' << g << ' ' << b << " setrgbcolor ";
- PSFilter *filter = _psi.setFilter(nullptr); // don't apply any filters here
_psi.execute(oss.str(), false);
- _psi.setFilter(filter);
}
_psi.execute(is);
if (updatePos) {
@@ -422,17 +419,17 @@ PsSpecialHandler::ImageNode PsSpecialHandler::createBitmapNode (const string &fn
imgnode.element->addAttribute("y", 0);
imgnode.element->addAttribute("width", bbox.width());
imgnode.element->addAttribute("height", bbox.height());
-
- // Only reference the image with an absolute path if either an absolute path was given by the user
- // or a given plain filename is not present in the current working directory but was found through
- // the FileFinder, i.e. it's usually located somewhere in the texmf tree.
- string href = path;
- if (!FilePath::isAbsolute(fname) && (fname.find('/') != string::npos || FilePath(fname).exists()))
- href = FilePath(path).relative(FilePath(_actions->getSVGFilePath(pageno)));
if (EMBED_BITMAP_DATA)
imgnode.element->addAttribute("@@xlink:href", "data:" + util::mimetype(fname) + ";base64," + fname);
- else
+ else {
+ string href = path;
+ // Only reference the image with an absolute path if either an absolute path was given by the user
+ // or a given plain filename is not present in the current working directory but was found through
+ // the FileFinder, i.e. it's usually located somewhere in the texmf tree.
+ if (!FilePath::isAbsolute(fname) && (fname.find('/') != string::npos || FilePath(fname).exists()))
+ href = FilePath(path).relative(FilePath(_actions->getSVGFilePath(pageno)));
imgnode.element->addAttribute("xlink:href", href);
+ }
return imgnode;
}
@@ -540,14 +537,15 @@ void PsSpecialHandler::dviBeginPage (unsigned int pageno, SpecialActions &action
void PsSpecialHandler::dviEndPage (unsigned, SpecialActions &actions) {
+ _previewHandler.readDataFromStack();
BoundingBox bbox;
- if (_previewFilter.getBoundingBox(bbox)) { // is there any data written by preview package?
+ if (_previewHandler.getBoundingBox(bbox)) { // is there any data written by preview package?
double w=0, h=0, d=0;
if (actions.getBBoxFormatString() == "preview" || actions.getBBoxFormatString() == "min") {
if (actions.getBBoxFormatString() == "preview") {
- w = max(0.0, _previewFilter.width());
- h = max(0.0, _previewFilter.height());
- d = max(0.0, _previewFilter.depth());
+ w = max(0.0, _previewHandler.width());
+ h = max(0.0, _previewHandler.height());
+ d = max(0.0, _previewHandler.depth());
actions.bbox() = bbox;
Message::mstream() << "\napplying bounding box set by";
}
@@ -557,7 +555,7 @@ void PsSpecialHandler::dviEndPage (unsigned, SpecialActions &actions) {
d = max(0.0, actions.bbox().maxY());
Message::mstream() << "\ncomputing extents based on data set by";
}
- Message::mstream() << " preview package (version " << _previewFilter.version() << ")\n";
+ Message::mstream() << " preview package (version " << _previewHandler.version() << ")\n";
// apply page transformations to box extents
Matrix pagetrans = actions.getPageTransformation();
@@ -1378,9 +1376,9 @@ void PsSpecialHandler::ClippingStack::push (const Path &path, int saveID) {
if (!_stack.empty())
prependedPath = _stack.top().prependedPath;
if (path.empty())
- _stack.emplace(Entry(saveID));
+ _stack.emplace(saveID);
else
- _stack.emplace(Entry(path, ++_maxID, saveID));
+ _stack.emplace(path, ++_maxID, saveID);
_stack.top().prependedPath = prependedPath;
}
@@ -1470,7 +1468,7 @@ void PsSpecialHandler::ClippingStack::setPrependedPath () {
}
-vector<const char*> PsSpecialHandler::prefixes() const {
+vector<const char*> PsSpecialHandler::prefixes () const {
vector<const char*> pfx {
"header=", // read and execute PS header file prior to the following PS statements
"pdffile=", // process PDF file
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp
index 695eb78d034..67d62197520 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/PsSpecialHandler.hpp
@@ -2,7 +2,7 @@
** PsSpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -31,7 +31,7 @@
#include "PSInterpreter.hpp"
#include "Opacity.hpp"
#include "PSPattern.hpp"
-#include "PSPreviewFilter.hpp"
+#include "PSPreviewHandler.hpp"
#include "SpecialHandler.hpp"
class PSPattern;
@@ -91,12 +91,13 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions {
public:
PsSpecialHandler ();
~PsSpecialHandler () override;
- const char* name () const override {return "ps";}
- const char* info () const override {return "dvips PostScript specials";}
- std::vector<const char*> prefixes() const override;
void preprocess (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
- void setDviScaleFactor (double dvi2bp) override {_previewFilter.setDviScaleFactor(dvi2bp);}
+ const char* info () const override {return "dvips PostScript specials";}
+ const char* name () const override {return handlerName();}
+ static const char* handlerName () {return "ps";}
+ std::vector<const char*> prefixes () const override;
+ void setDviScaleFactor (double dvi2bp) override {_previewHandler.setDviScaleFactor(dvi2bp);}
void enterBodySection ();
PSInterpreter& psInterpreter () {return _psi;}
@@ -179,7 +180,7 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions {
PSInterpreter _psi;
PDFHandler _pdfHandler;
SpecialActions *_actions=nullptr;
- PSPreviewFilter _previewFilter; ///< filter to extract information generated by the preview package
+ PSPreviewHandler _previewHandler; ///< extracts information generated by the preview package
PsSection _psSection=PS_NONE; ///< current section processed (nothing yet, headers, or body specials)
XMLElement *_xmlnode=nullptr; ///< if != 0, created SVG elements are appended to this node
XMLElement *_savenode=nullptr; ///< pointer to temporaryly store _xmlnode
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/RangeMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/RangeMap.cpp
index 11489113f3c..7eca6ee6591 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/RangeMap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/RangeMap.cpp
@@ -2,7 +2,7 @@
** RangeMap.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/RangeMap.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/RangeMap.hpp
index be708b7180e..ff6db0270eb 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/RangeMap.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/RangeMap.hpp
@@ -2,7 +2,7 @@
** RangeMap.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp
index b7a1b425a50..812b215fe84 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.cpp
@@ -2,7 +2,7 @@
** SVGCharHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.hpp
index 2df8957d68e..f50ec46652d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandler.hpp
@@ -2,7 +2,7 @@
** SVGCharHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp
index 3f83f18e299..4e91d290f0c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.cpp
@@ -2,7 +2,7 @@
** SVGCharHandlerFactory.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.hpp
index 7c195e63a4f..5ff8d9b4c29 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharHandlerFactory.hpp
@@ -2,7 +2,7 @@
** SVGCharHandlerFactory.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharPathHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharPathHandler.cpp
index fc59d2280e4..e5e69a0ca13 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharPathHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharPathHandler.cpp
@@ -2,7 +2,7 @@
** SVGCharPathHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -60,7 +60,7 @@ void SVGCharPathHandler::appendChar (uint32_t c, double x, double y) {
// Apply text color changes only if the color of the entire font is black.
// Glyphs of non-black fonts (e.g. defined in a XeTeX document) can't change their color.
CharProperty<Color> &color = (_fontColor.get() != Color::BLACK) ? _fontColor : _color;
- bool applyColor = color.get() != Color::BLACK;
+ bool applyColor = color.get() != Color::BLACK || (SVGElement::USE_CURRENTCOLOR && SVGElement::CURRENTCOLOR == Color::BLACK);
bool applyMatrix = !_matrix->isIdentity();
bool applyOpacity = !_opacity->isFillDefault();
if (!_groupNode) {
@@ -85,16 +85,21 @@ void SVGCharPathHandler::appendChar (uint32_t c, double x, double y) {
GlyphMetrics metrics;
font->getGlyphMetrics(c, _vertical, metrics);
x -= metrics.wl;
- if (auto pf = font_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, nullptr);
- y += exact_metrics.h+(metrics.d-exact_metrics.h-exact_metrics.d)/2;
+ if (_vertical) {
+ auto physicalFont = font_cast<const PhysicalFont *>(font);
+ if (!physicalFont)
+ y += metrics.d;
+ else {
+ // 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;
+ physicalFont->getExactGlyphBox(c, exact_metrics, false, nullptr);
+ double ed = max(0.0, exact_metrics.d);
+ double eh = max(0.0, exact_metrics.h);
+ y += eh + (metrics.d - eh - ed) / 2;
+ }
}
- else
- y += metrics.d;
}
Matrix rotation(1);
if (_vertical && !font->verticalLayout()) {
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharPathHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharPathHandler.hpp
index 32fb1b3b748..b0c675df5c1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharPathHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharPathHandler.hpp
@@ -2,7 +2,7 @@
** SVGCharPathHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharTspanTextHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharTspanTextHandler.cpp
index 9c23f330500..5851eda4630 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharTspanTextHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharTspanTextHandler.cpp
@@ -2,7 +2,7 @@
** SVGCharTspanTextHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -46,7 +46,7 @@ void SVGCharTspanTextHandler::appendChar (uint32_t c, double x, double y) {
}
// Apply text color changes only if the color of the entire font is black.
// Glyphs of non-black fonts (e.g. defined in a XeTeX document) can't change their color.
- bool applyColor = _color.get() != Color::BLACK && _font.get()->color() == Color::BLACK;
+ bool applyColor = _color.get() != Color::BLACK || (SVGElement::USE_CURRENTCOLOR && _font.get()->color() == Color::BLACK);
bool applyOpacity = !_opacity->isFillDefault();
if (_xchanged || _ychanged || (_color.changed() && applyColor) || (_opacity.changed() && applyOpacity)) {
_tspanNode = pushContextNode(util::make_unique<SVGElement>("tspan"));
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharTspanTextHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharTspanTextHandler.hpp
index 168d616d8ed..dd6df1a8619 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharTspanTextHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGCharTspanTextHandler.hpp
@@ -2,7 +2,7 @@
** SVGCharTspanTextHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGElement.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGElement.cpp
index 68f7d2231c6..9664e892807 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGElement.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGElement.cpp
@@ -2,7 +2,7 @@
** SVGElement.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -27,6 +27,9 @@
using namespace std;
+bool SVGElement::USE_CURRENTCOLOR=false;
+Color SVGElement::CURRENTCOLOR;
+
void SVGElement::setClipPathUrl (const string &url) {
if (!url.empty())
@@ -41,7 +44,9 @@ void SVGElement::setClipRule (FillRule rule) {
void SVGElement::setFillColor (Color color, bool skipBlack) {
- if (color != Color::BLACK || !skipBlack)
+ if (USE_CURRENTCOLOR && color == CURRENTCOLOR)
+ addAttribute("fill", "currentColor");
+ else if (color != Color::BLACK || !skipBlack)
addAttribute("fill", color.svgColorString());
}
@@ -108,7 +113,7 @@ void SVGElement::setPoints (const vector<DPair> &points) {
void SVGElement::setStrokeColor (Color color) {
- addAttribute("stroke", color.svgColorString());
+ addAttribute("stroke", USE_CURRENTCOLOR && color == CURRENTCOLOR ? "currentColor" : color.svgColorString());
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGElement.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGElement.hpp
index 632b6a4a84b..dac3749eb4b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGElement.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGElement.hpp
@@ -2,7 +2,7 @@
** SVGElement.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -58,6 +58,9 @@ class SVGElement : public XMLElement {
void setStrokeWidth (double width);
void setStrokeMiterLimit (double limit);
void setTransform (const Matrix &matrix);
+
+ static bool USE_CURRENTCOLOR; ///< if true, apply color value "currentColor"
+ static Color CURRENTCOLOR; ///< color to be replaced with "currentColor"
};
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGOutput.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGOutput.cpp
index d5f219e7cd3..b7b47801317 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGOutput.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGOutput.cpp
@@ -2,7 +2,7 @@
** SVGOutput.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGOutput.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGOutput.hpp
index 9032543c478..e71f8c57904 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGOutput.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGOutput.hpp
@@ -2,7 +2,7 @@
** SVGOutput.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGSingleCharTextHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGSingleCharTextHandler.cpp
index d2a4f53ad1f..c4af8d627dd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGSingleCharTextHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGSingleCharTextHandler.cpp
@@ -2,7 +2,7 @@
** SVGSingleCharTextHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -29,7 +29,7 @@ void SVGSingleCharTextHandler::appendChar (uint32_t c, double x, double y) {
textNode->append(XMLString(font->unicode(c), false));
// Apply color changes only if the color differs from black and if the font color itself is black.
// Glyphs from non-black fonts (e.g. defined in a XeTeX document) can't change their color.
- if (_color.get() != Color::BLACK && font->color() == Color::BLACK)
+ if (font->color() == Color::BLACK && (_color.get() != Color::BLACK || (SVGElement::USE_CURRENTCOLOR && SVGElement::CURRENTCOLOR == Color::BLACK)))
textNode->setFillColor(_color);
_color.changed(false);
if (!_opacity->isFillDefault())
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGSingleCharTextHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGSingleCharTextHandler.hpp
index b97f463cfa9..15bbd59ac36 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGSingleCharTextHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGSingleCharTextHandler.hpp
@@ -2,7 +2,7 @@
** SVGSingleCharTextHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.cpp
index 74b6913b20a..f6f896dfd14 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.cpp
@@ -2,7 +2,7 @@
** SVGTree.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.hpp
index 0453e53ac3c..cc9338c535b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SVGTree.hpp
@@ -2,7 +2,7 @@
** SVGTree.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -92,8 +92,8 @@ class SVGTree {
private:
XMLDocument _doc;
- SVGElement *_root, *_page, *_defs;
- XMLCData *_styleCDataNode;
+ SVGElement *_root=nullptr, *_page=nullptr, *_defs=nullptr;
+ XMLCData *_styleCDataNode=nullptr;
std::unique_ptr<SVGCharHandler> _charHandler;
std::stack<SVGElement*> _defsContextStack;
std::stack<SVGElement*> _pageContextStack;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ShadingPatch.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ShadingPatch.cpp
index 0f6a20e9d32..e1d860febbe 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ShadingPatch.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ShadingPatch.cpp
@@ -2,7 +2,7 @@
** ShadingPatch.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ShadingPatch.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ShadingPatch.hpp
index a11b5dd3593..88300a7f463 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ShadingPatch.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ShadingPatch.hpp
@@ -2,7 +2,7 @@
** ShadingPatch.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SignalHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SignalHandler.cpp
index e1a99a581e9..8b2501fa2f3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SignalHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SignalHandler.cpp
@@ -2,7 +2,7 @@
** SignalHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SignalHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SignalHandler.hpp
index 9c343e04634..5c5f0d4850a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SignalHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SignalHandler.hpp
@@ -2,7 +2,7 @@
** SignalHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.cpp
index b63df621138..294a52422c5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.cpp
@@ -2,7 +2,7 @@
** SourceInput.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.hpp
index 5ce6c8302a2..e09d8705e11 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SourceInput.hpp
@@ -2,7 +2,7 @@
** SourceInput.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.cpp
new file mode 100644
index 00000000000..16cd1611020
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.cpp
@@ -0,0 +1,111 @@
+/*************************************************************************
+** SpecialActions.cpp **
+** **
+** This file is part of dvisvgm -- a fast DVI to SVG converter **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
+** **
+** This program is free software; you can redistribute it and/or **
+** modify it under the terms of the GNU General Public License as **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#include <cstring>
+#include "Calculator.hpp"
+#include "SpecialActions.hpp"
+
+using namespace std;
+
+/** Replaces constants of the form {?name} by their corresponding value.
+ * @param[in,out] str text to expand
+ * @param[in] actions interfcae to the world outside the special handler */
+static void expand_constants (string &str, SpecialActions &actions) {
+ bool repl_bbox = true;
+ while (repl_bbox) {
+ const auto pos = str.find("{?bbox ");
+ if (pos == string::npos)
+ repl_bbox = false;
+ else {
+ auto endpos = pos+7;
+ while (endpos < str.length() && isalnum(str[endpos]))
+ ++endpos;
+ if (str[endpos] != '}')
+ repl_bbox = false;
+ else {
+ BoundingBox &box = actions.bbox(str.substr(pos+7, endpos-pos-7));
+ str.replace(pos, endpos-pos+1, box.svgViewBoxString());
+ }
+ }
+ }
+ const struct Constant {
+ const char *name;
+ string val;
+ } constants[] = {
+ {"x", XMLString(actions.getX())},
+ {"y", XMLString(actions.getY())},
+ {"color", SVGElement::USE_CURRENTCOLOR && SVGElement::CURRENTCOLOR == actions.getColor() ? "currentColor" : actions.getColor().svgColorString()},
+ {"matrix", actions.getMatrix().toSVG()},
+ {"nl", "\n"},
+ {"pageno", to_string(actions.getCurrentPageNumber())},
+ {"svgfile", actions.getSVGFilePath(actions.getCurrentPageNumber()).relative()},
+ {"svgpath", actions.getSVGFilePath(actions.getCurrentPageNumber()).absolute()},
+ };
+ for (const Constant &constant : constants) {
+ const string pattern = string("{?")+constant.name+"}";
+ auto pos = str.find(pattern);
+ while (pos != string::npos) {
+ str.replace(pos, strlen(constant.name)+3, constant.val);
+ pos = str.find(pattern, pos+constant.val.length()); // look for further matches
+ }
+ }
+}
+
+
+/** Evaluates substrings of the form {?(expr)} where 'expr' is a math expression,
+ * and replaces the substring by the computed value.
+ * @param[in,out] str string to scan for expressions */
+static void evaluate_expressions (string &str, const SpecialActions &actions) {
+ auto left = str.find("{?("); // start position of expression macro
+ while (left != string::npos) {
+ auto right = str.find(")}", left+2); // end position of expression macro
+ if (right == string::npos)
+ break;
+ Calculator calc;
+ calc.setVariable("x", actions.getX());
+ calc.setVariable("y", actions.getY());
+ string expr = str.substr(left+3, right-left-3); // math expression to evaluate
+ if (util::normalize_space(expr).empty()) // no expression given, e.g. {?( )}
+ str.erase(left, right-left+2); // => replace with empty string
+ else {
+ try {
+ double val = calc.eval(expr);
+ XMLString valstr(val);
+ str.replace(left, right-left+2, valstr);
+ right = left+valstr.length()-1;
+ }
+ catch (CalculatorException &e) {
+ throw SpecialException(string(e.what())+" in '{?("+expr+")}'");
+ }
+ }
+ left = str.find("{?(", right+1); // find next expression macro
+ }
+}
+
+
+/** Returns a given string with macros and arithmetic expressions expanded.
+ * @param[in] text string to be processed
+ * @return the expanded text */
+string SpecialActions::expandText (const string &text) {
+ string ret = text;
+ evaluate_expressions(ret, *this);
+ expand_constants(ret, *this);
+ return ret;
+} \ No newline at end of file
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.hpp
index 9a55331605a..b1d43840163 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialActions.hpp
@@ -2,7 +2,7 @@
** SpecialActions.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -27,12 +27,17 @@
#include "Color.hpp"
#include "FilePath.hpp"
#include "Matrix.hpp"
+#include "MessageException.hpp"
#include "Opacity.hpp"
#include "SVGTree.hpp"
class XMLElement;
class XMLNode;
+struct SpecialException : public MessageException {
+ explicit SpecialException (const std::string &msg) : MessageException(msg) {}
+};
+
class SpecialActions {
public:
virtual ~SpecialActions () =default;
@@ -63,6 +68,7 @@ class SpecialActions {
virtual void lockOutput () {}
virtual void unlockOutput () {}
virtual bool outputLocked () const {return false;}
+ std::string expandText (const std::string &text);
static double PROGRESSBAR_DELAY; ///< progress bar doesn't appear before this time has elapsed (in sec)
};
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialHandler.hpp
index 81c3146d35a..2182919361c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialHandler.hpp
@@ -2,7 +2,7 @@
** SpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -24,28 +24,19 @@
#include <istream>
#include <list>
#include <vector>
-#include "MessageException.hpp"
-
class SpecialActions;
class SpecialManager;
-
-struct SpecialException : public MessageException {
- explicit SpecialException (const std::string &msg) : MessageException(msg) {}
-};
-
-
class SpecialHandler {
- friend class SpecialManager;
public:
virtual ~SpecialHandler () =default;
- virtual const char* info () const=0;
- virtual const char* name () const=0;
- virtual std::vector<const char*> prefixes() const =0;
+ virtual const char* info () const =0;
+ virtual const char* name () const =0;
+ virtual std::vector<const char*> prefixes () const =0;
virtual void setDviScaleFactor (double dvi2bp) {}
virtual void preprocess (const std::string &prefix, std::istream &is, SpecialActions &actions) {}
- virtual bool process (const std::string &prefix, std::istream &is, SpecialActions &actions)=0;
+ virtual bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) =0;
virtual void dviPreprocessingFinished () {}
virtual void dviBeginPage (unsigned pageno, SpecialActions &actions) {}
virtual void dviEndPage (unsigned pageno, SpecialActions &actions) {}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.cpp
index 0955f61aa48..21f70c4af2a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.cpp
@@ -2,7 +2,7 @@
** SpecialManager.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.hpp
index 55da303b70b..b4eb95c991c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/SpecialManager.hpp
@@ -2,7 +2,7 @@
** SpecialManager.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -21,12 +21,14 @@
#ifndef SPECIALMANAGER_HPP
#define SPECIALMANAGER_HPP
+#include <algorithm>
#include <memory>
#include <ostream>
#include <string>
#include <unordered_map>
#include <vector>
#include "SpecialHandler.hpp"
+#include "utility.hpp"
class SpecialActions;
@@ -38,6 +40,14 @@ class SpecialManager {
public:
SpecialManager (const SpecialManager &) =delete;
static SpecialManager& instance ();
+
+ template <class Handler>
+ static void registerHandler (const std::vector<std::string> &ignoredHandlerNames) {
+ const char *name = Handler::handlerName();
+ if (!name || find(ignoredHandlerNames.begin(), ignoredHandlerNames.end(), std::string(name)) == ignoredHandlerNames.end())
+ instance().registerHandler(util::make_unique<Handler>());
+ }
+
void registerHandler (std::unique_ptr<SpecialHandler> handler);
void registerHandlers (std::vector<std::unique_ptr<SpecialHandler>> &handlers, const char *ignorelist);
void unregisterHandlers ();
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp
index 196ce7affaa..93d4045248a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.cpp
@@ -2,7 +2,7 @@
** StreamReader.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -40,7 +40,7 @@ istream& StreamReader::replaceStream (istream &in) {
uint32_t StreamReader::readUnsigned (int bytes) {
uint32_t ret = 0;
for (bytes--; bytes >= 0 && !_is->eof(); bytes--) {
- uint32_t b = uint32_t(_is->get());
+ auto b = uint32_t(_is->get());
ret |= b << (8*bytes);
}
return ret;
@@ -62,7 +62,7 @@ uint32_t StreamReader::readUnsigned (int n, HashFunction &hashfunc) {
* @param[in] bytes number of bytes to read (max. 4)
* @return read integer */
int32_t StreamReader::readSigned (int bytes) {
- uint32_t ret = uint32_t(_is->get());
+ auto ret = uint32_t(_is->get());
if (ret & 128) // negative value?
ret |= 0xffffff00;
for (bytes-=2; bytes >= 0 && !_is->eof(); bytes--)
@@ -84,12 +84,12 @@ int32_t StreamReader::readSigned (int n, HashFunction &hashfunc) {
/** Reads a string terminated by a 0-byte. */
string StreamReader::readString () {
- if (!_is)
- throw StreamReaderException("no stream assigned");
string ret;
- while (!_is->eof() && _is->peek() > 0)
- ret += char(_is->get());
- _is->get(); // skip 0-byte
+ if (_is) {
+ while (!_is->eof() && _is->peek() > 0)
+ ret += char(_is->get());
+ _is->get(); // skip 0-byte
+ }
return ret;
}
@@ -102,7 +102,7 @@ string StreamReader::readString (HashFunction &hashfunc, bool finalZero) {
string ret = readString();
hashfunc.update(ret.data(), ret.length());
if (finalZero)
- hashfunc.update(0, 1);
+ hashfunc.update(nullptr, 1);
return ret;
}
@@ -111,11 +111,11 @@ string StreamReader::readString (HashFunction &hashfunc, bool finalZero) {
* @param[in] length number of characters to read
* @return the string read */
string StreamReader::readString (int length) {
- if (!_is)
- throw StreamReaderException("no stream assigned");
- length = max(0, length);
- string str(length, '\0');
- _is->read(&str[0], length); // read 'length' bytes and append '\0'
+ string str;
+ if (_is) {
+ str.resize(max(0, length));
+ _is->read(&str[0], streamsize(str.length())); // read 'length' bytes and append '\0'
+ }
return str;
}
@@ -149,7 +149,7 @@ vector<uint8_t> StreamReader::readBytes (int n, HashFunction &hashfunc) {
int StreamReader::readByte (HashFunction &hashfunc) {
int ret = readByte();
if (ret >= 0) {
- char c = ret & 0xff;
+ char c = char(ret & 0xff);
hashfunc.update(&c, 1);
}
return ret;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.hpp
index 138751c33cc..c5d06d4a3bb 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamReader.hpp
@@ -2,7 +2,7 @@
** StreamReader.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -50,6 +50,7 @@ class StreamReader {
int readByte (HashFunction &hashfunc);
void seek (std::streampos pos, std::ios::seekdir dir) {_is->seekg(pos, dir);}
void seek (std::streampos pos) {_is->seekg(pos);}
+ void skip (std::streampos n) {_is->seekg(n, std::ios::cur);}
std::streampos tell () const {return _is->tellg();}
int peek () const {return _is->peek();}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamWriter.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamWriter.cpp
index c534d318628..7f7909b5ef4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamWriter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamWriter.cpp
@@ -2,7 +2,7 @@
** StreamWriter.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamWriter.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamWriter.hpp
index 473306f16a4..059632076a9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamWriter.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/StreamWriter.hpp
@@ -2,7 +2,7 @@
** StreamWriter.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp
index bb06429a53e..4bec7c76666 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.cpp
@@ -2,7 +2,7 @@
** Subfont.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.hpp
index c6978ed46d0..b6167bb6361 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Subfont.hpp
@@ -2,7 +2,7 @@
** Subfont.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/System.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/System.cpp
index fc6db8b9e2d..f2107716202 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/System.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/System.cpp
@@ -2,7 +2,7 @@
** System.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/System.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/System.hpp
index f62f815165e..5b83e0d2273 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/System.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/System.hpp
@@ -2,7 +2,7 @@
** System.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/TFM.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/TFM.cpp
index c29de267bb4..5105f5c9b3f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/TFM.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/TFM.cpp
@@ -2,7 +2,7 @@
** TFM.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -20,7 +20,6 @@
#include <fstream>
#include <vector>
-#include "FileFinder.hpp"
#include "Length.hpp"
#include "Message.hpp"
#include "StreamReader.hpp"
@@ -35,47 +34,46 @@ using namespace std;
* @param[in] n number of words to be read */
template <typename T>
static void read_words (StreamReader &reader, vector<T> &v, unsigned n) {
- v.clear();
v.resize(n);
for (unsigned i=0; i < n; i++)
v[i] = reader.readUnsigned(4);
}
-TFM::TFM (istream &is) : _checksum(0), _firstChar(0), _lastChar(0), _designSize(0), _ascent(0), _descent(0) {
+void TFM::read (istream &is) {
if (!is)
return;
is.seekg(0);
StreamReader reader(is);
- uint16_t lf = uint16_t(reader.readUnsigned(2)); // length of entire file in 4 byte words
- uint16_t lh = uint16_t(reader.readUnsigned(2)); // length of header in 4 byte words
- _firstChar= uint16_t(reader.readUnsigned(2)); // smallest character code in font
- _lastChar = uint16_t(reader.readUnsigned(2)); // largest character code in font
- uint16_t nw = uint16_t(reader.readUnsigned(2)); // number of words in width table
- uint16_t nh = uint16_t(reader.readUnsigned(2)); // number of words in height table
- uint16_t nd = uint16_t(reader.readUnsigned(2)); // number of words in depth table
- uint16_t ni = uint16_t(reader.readUnsigned(2)); // number of words in italic corr. table
- uint16_t nl = uint16_t(reader.readUnsigned(2)); // number of words in lig/kern table
- uint16_t nk = uint16_t(reader.readUnsigned(2)); // number of words in kern table
- uint16_t ne = uint16_t(reader.readUnsigned(2)); // number of words in ext. char table
- uint16_t np = uint16_t(reader.readUnsigned(2)); // number of font parameter words
-
- if (6+lh+(_lastChar-_firstChar+1)+nw+nh+nd+ni+nl+nk+ne+np != lf)
+ auto lf = uint16_t(reader.readUnsigned(2)); // length of entire file in 4 byte words
+ auto lh = uint16_t(reader.readUnsigned(2)); // length of header in 4 byte words
+ auto bc = uint16_t(reader.readUnsigned(2)); // smallest character code in font
+ auto ec = uint16_t(reader.readUnsigned(2)); // largest character code in font
+ auto nw = uint16_t(reader.readUnsigned(2)); // number of words in width table
+ auto nh = uint16_t(reader.readUnsigned(2)); // number of words in height table
+ auto nd = uint16_t(reader.readUnsigned(2)); // number of words in depth table
+ auto ni = uint16_t(reader.readUnsigned(2)); // number of words in italic corr. table
+ auto nl = uint16_t(reader.readUnsigned(2)); // number of words in lig/kern table
+ auto nk = uint16_t(reader.readUnsigned(2)); // number of words in kern table
+ auto ne = uint16_t(reader.readUnsigned(2)); // number of words in ext. char table
+ auto np = uint16_t(reader.readUnsigned(2)); // number of font parameter words
+ if (6+lh+(ec-bc+1)+nw+nh+nd+ni+nl+nk+ne+np != lf)
throw FontMetricException("inconsistent length values");
- if (_firstChar >= _lastChar || _lastChar > 255 || ne > 256)
+ if (bc >= ec || ec > 255 || ne > 256)
throw FontMetricException("character codes out of range");
-
+ _firstChar = bc;
+ _lastChar = ec;
readHeader(reader);
is.seekg(24+lh*4); // move to char info table
readTables(reader, nw, nh, nd, ni);
- is.seekg(4*(lf-np), ios::beg); // move to param section
+ is.seekg(4*(lf-np)); // move to param section
readParameters(reader, np);
}
void TFM::readHeader (StreamReader &reader) {
_checksum = reader.readUnsigned(4);
- _designSize = double(FixWord(reader.readUnsigned(4)))*Length::pt2bp;
+ _designSize = double(FixWord(reader.readSigned(4)))*Length::pt2bp;
}
@@ -99,7 +97,7 @@ void TFM::readParameters (StreamReader &reader, int np) {
_params.resize(7);
np = min(np, 7);
for (int i=0; i < np; i++)
- _params[i] = reader.readUnsigned(4);
+ _params[i] = reader.readSigned(4);
for (int i=np; i < 7; i++)
_params[i] = 0;
}
@@ -134,7 +132,7 @@ double TFM::getQuad () const {
/** Returns the index to the entry of the character info table that describes the metric of a given character.
* @param[in] c character whose index is retrieved
* @return table index for character c, or -1 if there's no entry */
-int TFM::charIndex (int c) const {
+size_t TFM::charIndex (int c) const {
if (c < _firstChar || c > _lastChar || size_t(c-_firstChar) >= _charInfoTable.size())
return -1;
return c-_firstChar;
@@ -151,8 +149,8 @@ int TFM::charIndex (int c) const {
/** Returns the width of char c in PS point units. */
double TFM::getCharWidth (int c) const {
- int index = charIndex(c);
- if (index < 0)
+ size_t index = charIndex(c);
+ if (index == size_t(-1))
return 0;
index = (_charInfoTable[index] >> 24) & 0xFF;
return double(_widthTable[index]) * _designSize;
@@ -161,8 +159,8 @@ double TFM::getCharWidth (int c) const {
/** Returns the height of char c in PS point units. */
double TFM::getCharHeight (int c) const {
- int index = charIndex(c);
- if (index < 0)
+ size_t index = charIndex(c);
+ if (index == size_t(-1))
return 0;
index = (_charInfoTable[index] >> 20) & 0x0F;
return double(_heightTable[index]) * _designSize;
@@ -171,8 +169,8 @@ double TFM::getCharHeight (int c) const {
/** Returns the depth of char c in PS point units. */
double TFM::getCharDepth (int c) const {
- int index = charIndex(c);
- if (index < 0)
+ size_t index = charIndex(c);
+ if (index == size_t(-1))
return 0;
index = (_charInfoTable[index] >> 16) & 0x0F;
return double(_depthTable[index]) * _designSize;
@@ -181,8 +179,8 @@ double TFM::getCharDepth (int c) const {
/** Returns the italic correction of char c in PS point units. */
double TFM::getItalicCorr (int c) const {
- int index = charIndex(c);
- if (index < 0)
+ size_t index = charIndex(c);
+ if (index == size_t(-1))
return 0;
index = (_charInfoTable[index] >> 10) & 0x3F;
return double(_italicTable[index]) * _designSize;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/TFM.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/TFM.hpp
index 5e968ff2017..0ee44ec7ad2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/TFM.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/TFM.hpp
@@ -2,7 +2,7 @@
** TFM.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -32,7 +32,8 @@ class StreamReader;
class TFM : public FontMetrics {
public:
- explicit TFM (std::istream &is);
+ TFM () =default;
+ void read (std::istream &is) override;
double getCharWidth (int c) const override;
double getCharHeight (int c) const override;
double getCharDepth (int c) const override;
@@ -46,15 +47,14 @@ class TFM : public FontMetrics {
double getDescent () const override {return double(_descent)*_designSize;}
bool verticalLayout () const override {return false;}
uint32_t getChecksum () const override {return _checksum;}
- uint16_t firstChar () const override {return _firstChar;}
- uint16_t lastChar () const override {return _lastChar;}
+ uint32_t firstChar () const override {return _firstChar;}
+ uint32_t lastChar () const override {return _lastChar;}
protected:
- TFM () : _params(7) {}
void readHeader (StreamReader &reader);
void readTables (StreamReader &reader, int nw, int nh, int nd, int ni);
void readParameters (StreamReader &reader, int np);
- virtual int charIndex (int c) const;
+ virtual size_t charIndex (int c) const;
void setCharRange (int firstchar, int lastchar) {_firstChar=firstchar; _lastChar=lastchar;}
private:
@@ -67,7 +67,7 @@ class TFM : public FontMetrics {
std::vector<FixWord> _depthTable; ///< character depth in design size units
std::vector<FixWord> _italicTable; ///< italic corrections in design size units
std::vector<FixWord> _params; ///< values of the TFM's param section
- FixWord _ascent, _descent; ///< max. height and depth
+ FixWord _ascent=0, _descent=0; ///< max. height and depth
};
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/TensorProductPatch.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/TensorProductPatch.cpp
index 20c1e6aa93c..e0be6945009 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/TensorProductPatch.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/TensorProductPatch.cpp
@@ -2,7 +2,7 @@
** TensorProductPatch.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/TensorProductPatch.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/TensorProductPatch.hpp
index 7150d189c89..f81d0686b0d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/TensorProductPatch.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/TensorProductPatch.hpp
@@ -2,7 +2,7 @@
** TensorProductPatch.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Terminal.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Terminal.cpp
index e3b3e4c13a9..4604cb56134 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Terminal.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Terminal.cpp
@@ -2,7 +2,7 @@
** Terminal.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Terminal.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Terminal.hpp
index 897d2d8c030..80191b396ff 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Terminal.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Terminal.hpp
@@ -2,7 +2,7 @@
** Terminal.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ToUnicodeMap.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ToUnicodeMap.cpp
index 44142235722..c9d87e4c091 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ToUnicodeMap.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ToUnicodeMap.cpp
@@ -2,7 +2,7 @@
** ToUnicodeMap.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ToUnicodeMap.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ToUnicodeMap.hpp
index 447ca462321..dc0f2bc8043 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ToUnicodeMap.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ToUnicodeMap.hpp
@@ -2,7 +2,7 @@
** ToUnicodeMap.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/TpicSpecialHandler.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/TpicSpecialHandler.cpp
index 86b49b1d207..0ff9c881af2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/TpicSpecialHandler.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/TpicSpecialHandler.cpp
@@ -2,7 +2,7 @@
** TpicSpecialHandler.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -354,7 +354,7 @@ bool TpicSpecialHandler::process (const string &prefix, istream &is, SpecialActi
}
-vector<const char*> TpicSpecialHandler::prefixes() const {
+vector<const char*> TpicSpecialHandler::prefixes () const {
vector<const char*> pfx {"ar", "bk", "da", "dt", "fp", "ia", "ip", "pa", "pn", "sh", "sp", "tx", "wh"};
return pfx;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/TpicSpecialHandler.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/TpicSpecialHandler.hpp
index e8a56649f87..59f1786d491 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/TpicSpecialHandler.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/TpicSpecialHandler.hpp
@@ -2,7 +2,7 @@
** TpicSpecialHandler.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -28,10 +28,11 @@
class TpicSpecialHandler : public SpecialHandler {
public:
TpicSpecialHandler ();
- const char* info () const override {return "TPIC specials";}
- const char* name () const override {return "tpic";}
- std::vector<const char*> prefixes() const override;
bool process (const std::string &prefix, std::istream &is, SpecialActions &actions) override;
+ const char* info () const override {return "TPIC specials";}
+ const char* name () const override {return handlerName();}
+ static const char* handlerName () {return "tpic";}
+ std::vector<const char*> prefixes () const override;
double penwidth () const {return _penwidth;}
double grayLevel () const {return _grayLevel;}
Color fillColor (bool grayOnly) const;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/TriangularPatch.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/TriangularPatch.cpp
index a5867ac9f87..4b0bebfde08 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/TriangularPatch.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/TriangularPatch.cpp
@@ -2,7 +2,7 @@
** TriangularPatch.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/TriangularPatch.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/TriangularPatch.hpp
index 1ea03421a5a..82a22f2a8e8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/TriangularPatch.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/TriangularPatch.hpp
@@ -2,7 +2,7 @@
** TriangularPatch.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Unicode.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Unicode.cpp
index 91b01e90a6d..646acaa1270 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Unicode.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Unicode.cpp
@@ -2,7 +2,7 @@
** Unicode.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Unicode.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Unicode.hpp
index fb30b56fee6..7f04bcf83a2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Unicode.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Unicode.hpp
@@ -2,7 +2,7 @@
** Unicode.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/VFActions.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/VFActions.hpp
index 6ab3c1e854c..2c8d6e47cc9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/VFActions.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/VFActions.hpp
@@ -2,7 +2,7 @@
** VFActions.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.cpp
index 76fabb4994c..bf126039e4f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.cpp
@@ -2,7 +2,7 @@
** VFReader.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.hpp
index fb397898f63..b708ca711c8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/VFReader.hpp
@@ -2,7 +2,7 @@
** VFReader.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorIterator.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorIterator.hpp
index 486402ca621..1ec84f1e9f1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorIterator.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorIterator.hpp
@@ -2,7 +2,7 @@
** VectorIterator.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorStream.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorStream.hpp
index 04e7a99a8f4..10189944002 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorStream.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/VectorStream.hpp
@@ -2,7 +2,7 @@
** VectorStream.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp
index ddaa3daa0d2..b2adcb65e17 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp
@@ -2,7 +2,7 @@
** XMLDocument.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.hpp
index 7a2e06fd01b..c9694c6c2bd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.hpp
@@ -2,7 +2,7 @@
** XMLDocument.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp
index d5342e4d1e6..aaf381c65b2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp
@@ -2,7 +2,7 @@
** XMLNode.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -527,7 +527,7 @@ ostream& XMLCData::write (ostream &os) const {
void XMLCData::append (string &&str) {
if (_data.empty())
- _data = move(str);
+ _data = std::move(str);
else
_data += str;
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.hpp
index 829ea7c81c3..35e4d500bfd 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.hpp
@@ -2,7 +2,7 @@
** XMLNode.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLParser.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLParser.cpp
index c1da5373a6b..23fee696a35 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLParser.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLParser.cpp
@@ -2,7 +2,7 @@
** XMLParser.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLParser.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLParser.hpp
index 7dbbcc25a49..a181e4c2aff 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLParser.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLParser.hpp
@@ -2,7 +2,7 @@
** XMLParser.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLString.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLString.cpp
index 53f8bc1de1f..426b75b7d08 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLString.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLString.cpp
@@ -2,7 +2,7 @@
** XMLString.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLString.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLString.hpp
index 6f58756f19d..8731a26e843 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLString.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLString.hpp
@@ -2,7 +2,7 @@
** XMLString.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XXHashFunction.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XXHashFunction.hpp
index f93ae3eb38e..d26cd3c058c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XXHashFunction.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XXHashFunction.hpp
@@ -2,7 +2,7 @@
** XXHashFunction.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ZLibOutputStream.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ZLibOutputStream.hpp
index bc99621bd8b..7f3e7d72f4b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ZLibOutputStream.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ZLibOutputStream.hpp
@@ -2,7 +2,7 @@
** ZLibOutputStream.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/dvisvgm.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/dvisvgm.cpp
index 4c5bf550b23..8815fb77b8d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/dvisvgm.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/dvisvgm.cpp
@@ -2,7 +2,7 @@
** dvisvgm.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -309,11 +309,11 @@ static void init_fontmap (const CommandLine &cmdline) {
* options affecting the SVG output. */
static string svg_options_hash (const CommandLine &cmdline) {
// options affecting the SVG output
- vector<const CL::Option*> svg_options = {
+ const CL::Option* svg_options[] = {
&cmdline.bboxOpt, &cmdline.clipjoinOpt, &cmdline.colornamesOpt, &cmdline.commentsOpt,
- &cmdline.exactBboxOpt, &cmdline.fontFormatOpt, &cmdline.fontmapOpt, &cmdline.gradOverlapOpt,
- &cmdline.gradSegmentsOpt, &cmdline.gradSimplifyOpt, &cmdline.linkmarkOpt, &cmdline.magOpt,
- &cmdline.noFontsOpt, &cmdline.noMergeOpt, &cmdline.noSpecialsOpt, &cmdline.noStylesOpt,
+ &cmdline.currentcolorOpt, &cmdline.exactBboxOpt, &cmdline.fontFormatOpt, &cmdline.fontmapOpt,
+ &cmdline.gradOverlapOpt, &cmdline.gradSegmentsOpt, &cmdline.gradSimplifyOpt, &cmdline.linkmarkOpt,
+ &cmdline.magOpt, &cmdline.noFontsOpt, &cmdline.noMergeOpt, &cmdline.noSpecialsOpt, &cmdline.noStylesOpt,
&cmdline.optimizeOpt, &cmdline.precisionOpt, &cmdline.relativeOpt, &cmdline.zoomOpt
};
string idString = get_transformation_string(cmdline);
@@ -345,6 +345,13 @@ static void set_variables (const CommandLine &cmdline) {
SpecialActions::PROGRESSBAR_DELAY = cmdline.progressOpt.value();
}
Color::SUPPRESS_COLOR_NAMES = !cmdline.colornamesOpt.given();
+ if ((SVGElement::USE_CURRENTCOLOR = cmdline.currentcolorOpt.given())) {
+ Color color;
+ if (color.setRGBHexString(cmdline.currentcolorOpt.value()))
+ SVGElement::CURRENTCOLOR = color;
+ else
+ throw CL::CommandLineException("invalid color string '"+cmdline.currentcolorOpt.value()+"'");
+ }
SVGTree::CREATE_CSS = !cmdline.noStylesOpt.given();
SVGTree::USE_FONTS = !cmdline.noFontsOpt.given();
if (!SVGTree::setFontFormat(cmdline.fontFormatOpt.value())) {
@@ -431,6 +438,7 @@ static void convert_file (size_t fnameIndex, const CommandLine &cmdline) {
? static_cast<ImageToSVG*>(new EPSToSVG(srcin.getFilePath(), out))
: static_cast<ImageToSVG*>(new PDFToSVG(srcin.getFilePath(), out)));
img2svg->setPageTransformation(get_transformation_string(cmdline));
+ img2svg->setUserMessage(cmdline.messageOpt.value());
img2svg->convert(cmdline.pageOpt.value(), &pageinfo);
timer_message(start_time, img2svg->isSinglePageFormat() ? nullptr : &pageinfo);
}
@@ -444,6 +452,7 @@ static void convert_file (size_t fnameIndex, const CommandLine &cmdline) {
dvi2svg.setProcessSpecials(ignore_specials, true);
dvi2svg.setPageTransformation(get_transformation_string(cmdline));
dvi2svg.setPageSize(cmdline.bboxOpt.value());
+ dvi2svg.setUserMessage(cmdline.messageOpt.value());
dvi2svg.convert(cmdline.pageOpt.value(), &pageinfo);
timer_message(start_time, &pageinfo);
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/fonts/Base14Fonts.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/fonts/Base14Fonts.cpp
index 6f316ffca97..2861ad96c14 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/fonts/Base14Fonts.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/fonts/Base14Fonts.cpp
@@ -2,7 +2,7 @@
** Base14Fonts.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/fonts/Base14Fonts.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/fonts/Base14Fonts.hpp
index 8746f593d6f..9acf3d7d785 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/fonts/Base14Fonts.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/fonts/Base14Fonts.hpp
@@ -2,7 +2,7 @@
** Base14Fonts.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/macros.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/macros.hpp
index d4091c83b9d..cc546f72c2a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/macros.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/macros.hpp
@@ -2,7 +2,7 @@
** macros.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.cpp
index c058f342ef7..8fd7552dd6b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.cpp
@@ -2,7 +2,7 @@
** AttributeExtractor.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp
index a0feb099184..5c75974685b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/AttributeExtractor.hpp
@@ -2,7 +2,7 @@
** AttributeExtractor.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/ClipPathReassigner.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/ClipPathReassigner.cpp
index 28d9a643467..e04a31c18de 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/ClipPathReassigner.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/ClipPathReassigner.cpp
@@ -2,7 +2,7 @@
** ClipPathReassigner.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -71,6 +71,7 @@ void ClipPathReassigner::execute (XMLElement *defs, XMLElement *context) {
}
// replace clip path references
vector<XMLElement*> descendants;
+ defs->getDescendants(nullptr, "clip-path", descendants);
context->getDescendants(nullptr, "clip-path", descendants);
for (auto &mapEntry : clipPathMap) {
vector<XMLElement*> &identicalClipPathElements = mapEntry.second;
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/ClipPathReassigner.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/ClipPathReassigner.hpp
index 8d01a9db782..798d431ef7e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/ClipPathReassigner.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/ClipPathReassigner.hpp
@@ -2,7 +2,7 @@
** ClipPathReassigner.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/DependencyGraph.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/DependencyGraph.hpp
index b6bf7ef3dbd..81ab6d9615a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/DependencyGraph.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/DependencyGraph.hpp
@@ -2,7 +2,7 @@
** DependencyGraph.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/GroupCollapser.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/GroupCollapser.cpp
index 2eb87462455..6454ceb5cbf 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/GroupCollapser.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/GroupCollapser.cpp
@@ -2,7 +2,7 @@
** GroupCollapser.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/GroupCollapser.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/GroupCollapser.hpp
index 25f3cf23c43..f5edb946e72 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/GroupCollapser.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/GroupCollapser.hpp
@@ -2,7 +2,7 @@
** GroupCollapser.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/Makefile.in
index e8c96e795fc..9f108830241 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/Makefile.in
@@ -90,7 +90,6 @@ build_triplet = @build@
host_triplet = @host@
@HAVE_BROTLI_FALSE@am__append_1 = -I$(dvisvgm_srcdir)/libs/brotli/include
@HAVE_BROTLI_FALSE@am__append_2 = ../libs/brotli/libbrotli.a
-#endif TEXLIVE_BUILD
@HAVE_WOFF2_FALSE@am__append_3 = -I$(dvisvgm_srcdir)/libs/woff2/include
@HAVE_WOFF2_FALSE@am__append_4 = ../libs/woff2/libwoff2.a
subdir = dvisvgm-src/src/optimizer
@@ -383,16 +382,9 @@ liboptimizer_la_SOURCES = \
TransformSimplifier.hpp TransformSimplifier.cpp \
WSNodeRemover.hpp WSNodeRemover.cpp
-
-# Gets automake warnings:
-# dvisvgm-src/src/../libs/defs.am:9: warning: POTRACE_LIBS was already defined in condition TRUE, which includes condition !HAVE_POTRACE and !TEXLIVE_BUILD ...
-# dvisvgm-src/src/Makefile.am:14: 'dvisvgm-src/src/../libs/defs.am' included from here
-# configure.ac:51: ... 'POTRACE_LIBS' previously defined here
-#if !TEXLIVE_BUILD
-#POTRACE_CFLAGS = -I$(dvisvgm_srcdir)/libs/potrace
-#POTRACE_LIBS = ../libs/potrace/libpotrace.a
-#else
@HAVE_POTRACE_FALSE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
+#
+@TEXLIVE_BUILD_TRUE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
@HAVE_XXHASH_FALSE@XXHASH_CFLAGS = -I$(dvisvgm_srcdir)/libs/xxHash
@HAVE_XXHASH_FALSE@XXHASH_LIBS = ../libs/xxHash/libxxhash.a
AM_CXXFLAGS = -I$(dvisvgm_srcdir)/libs/variant/include $(XXHASH_CFLAGS)
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/OptimizerModule.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/OptimizerModule.hpp
index ac69a0cb5e3..dbf61eac922 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/OptimizerModule.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/OptimizerModule.hpp
@@ -2,7 +2,7 @@
** OptimizerModule.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/RedundantElementRemover.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/RedundantElementRemover.cpp
index 7dc17f04a7d..12fb9e08167 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/RedundantElementRemover.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/RedundantElementRemover.cpp
@@ -2,7 +2,7 @@
** RedundantElementRemover.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/RedundantElementRemover.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/RedundantElementRemover.hpp
index 88c8680d6ea..3cedd27dd6f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/RedundantElementRemover.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/RedundantElementRemover.hpp
@@ -2,7 +2,7 @@
** RedundantElementRemover.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/SVGOptimizer.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/SVGOptimizer.cpp
index d6a7f35bc43..402a83997f4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/SVGOptimizer.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/SVGOptimizer.cpp
@@ -2,7 +2,7 @@
** SVGOptimizer.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -21,6 +21,7 @@
#include <algorithm>
#include <array>
#include <map>
+#include <set>
#include "SVGOptimizer.hpp"
#include "../SVGTree.hpp"
@@ -30,7 +31,6 @@
#include "RedundantElementRemover.hpp"
#include "TextSimplifier.hpp"
#include "TransformSimplifier.hpp"
-#include "WSNodeRemover.hpp"
using namespace std;
@@ -39,35 +39,53 @@ string SVGOptimizer::MODULE_SEQUENCE;
SVGOptimizer::SVGOptimizer (SVGTree *svg) : _svg(svg) {
// optimizer modules available to the user; must be listed in default order
// _moduleEntries.emplace_back(ModuleEntry("remove-ws", util::make_unique<WSNodeRemover>()));
- _moduleEntries.emplace_back(ModuleEntry("simplify-text", util::make_unique<TextSimplifier>()));
- _moduleEntries.emplace_back(ModuleEntry("simplify-transform", util::make_unique<TransformSimplifier>()));
- _moduleEntries.emplace_back(ModuleEntry("group-attributes", util::make_unique<AttributeExtractor>()));
- _moduleEntries.emplace_back(ModuleEntry("collapse-groups", util::make_unique<GroupCollapser>()));
- _moduleEntries.emplace_back(ModuleEntry("remove-clippaths", util::make_unique<RedundantElementRemover>()));
- _moduleEntries.emplace_back(ModuleEntry("reassign-clippaths", util::make_unique<ClipPathReassigner>()));
+ _moduleEntries.emplace_back("simplify-text", util::make_unique<TextSimplifier>());
+ _moduleEntries.emplace_back("simplify-transform", util::make_unique<TransformSimplifier>());
+ _moduleEntries.emplace_back("group-attributes", util::make_unique<AttributeExtractor>());
+ _moduleEntries.emplace_back("collapse-groups", util::make_unique<GroupCollapser>());
+ _moduleEntries.emplace_back("remove-clippaths", util::make_unique<RedundantElementRemover>());
+ _moduleEntries.emplace_back("reassign-clippaths", util::make_unique<ClipPathReassigner>());
}
void SVGOptimizer::execute () {
if (!_svg || MODULE_SEQUENCE == "none")
return;
- if (MODULE_SEQUENCE.empty())
- MODULE_SEQUENCE = "remove-clippath"; // default behaviour of previous dvisvgm releases
+
+ vector<string> names = util::split(MODULE_SEQUENCE, ",", true);
+ set<string> removedNames;
+ if (names.empty())
+ names.emplace_back("remove-clippaths"); // default behaviour of previous dvisvgm releases
else {
- if (MODULE_SEQUENCE == "all") {
- for (const auto &entry: _moduleEntries)
- entry.module->execute(_svg->defsNode(), _svg->pageNode());
+ auto it = names.begin();
+ if (*it == "all" || (!it->empty() && it->at(0) == '-')) {
+ if (*it == "all")
+ it = names.erase(it);
+ // add names of all optimizer modules
+ for (const auto &moduleEntry : _moduleEntries) {
+ it = names.insert(it, moduleEntry.modname);
+ ++it;
+ }
+ }
+ }
+ // create sequence of module names to be considered
+ for (auto it=names.begin(); it != names.end();) {
+ if ((*it)[0] == '-') {
+ removedNames.insert(it->substr(1));
+ it = names.erase(it);
}
else {
- vector<string> names = util::split(MODULE_SEQUENCE, ",");
- auto it = find_if(names.begin(), names.end(), [](const string &name) {
- return name == "simplify-transform";
- });
- GroupCollapser::COMBINE_TRANSFORMS = (it != names.end());
- for (const string &name: names) {
- if (OptimizerModule *module = getModule(name))
- module->execute(_svg->defsNode(), _svg->pageNode());
- }
+ if ((*it)[0] == '+')
+ *it = it->substr(1);
+ ++it;
+ }
+ }
+ GroupCollapser::COMBINE_TRANSFORMS = (find(names.begin(), names.end(), "simplify-transform") != names.end());
+ // execute optimizer modules
+ for (const string &name: names) {
+ if (removedNames.find(name) == removedNames.end()) {
+ if (OptimizerModule *module = getModule(name))
+ module->execute(_svg->defsNode(), _svg->pageNode());
}
}
}
@@ -93,11 +111,13 @@ void SVGOptimizer::listModules (ostream &os) const {
* @return true if all names are known */
bool SVGOptimizer::checkModuleString (string &namestr, vector<string> &unknownNames) const {
unknownNames.clear();
- if (namestr.empty() || namestr == "all" || namestr == "none")
+ if (namestr.empty() || namestr == "none" || namestr == "all" || namestr.substr(0,4) == "all,")
return true;
vector<string> givenNames = util::split(namestr, ",");
- for (const string &name : givenNames) {
- if (!getModule(name))
+ for (string name : givenNames) {
+ if (name[0] == '-' || name[0] == '+')
+ name = name.substr(1);
+ if (!name.empty() && !getModule(name))
unknownNames.emplace_back(name);
}
return unknownNames.empty();
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/SVGOptimizer.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/SVGOptimizer.hpp
index 942cff8972d..a29c273704c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/SVGOptimizer.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/SVGOptimizer.hpp
@@ -2,7 +2,7 @@
** SVGOptimizer.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TextSimplifier.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TextSimplifier.cpp
index 05a5b40c470..25fec009978 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TextSimplifier.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TextSimplifier.cpp
@@ -2,7 +2,7 @@
** TextSimplifier.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TextSimplifier.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TextSimplifier.hpp
index 7d16f59e7aa..3ec9e3954f2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TextSimplifier.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TextSimplifier.hpp
@@ -2,7 +2,7 @@
** TextSimplifier.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TransformSimplifier.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TransformSimplifier.cpp
index 4cf3f67d4a4..6b36db15510 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TransformSimplifier.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TransformSimplifier.cpp
@@ -2,7 +2,7 @@
** TransformSimplifier.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TransformSimplifier.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TransformSimplifier.hpp
index 659a7b5f967..15052fb87e7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TransformSimplifier.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/TransformSimplifier.hpp
@@ -2,7 +2,7 @@
** TransformSimplifier.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/WSNodeRemover.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/WSNodeRemover.cpp
index 9d4dc6d847c..55f1ed77fb1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/WSNodeRemover.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/WSNodeRemover.cpp
@@ -2,7 +2,7 @@
** WSNodeRemover.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/WSNodeRemover.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/WSNodeRemover.hpp
index 5c7783ed623..3898ca3767f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/WSNodeRemover.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/optimizer/WSNodeRemover.hpp
@@ -2,7 +2,7 @@
** WSNodeRemover.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/options.dtd b/Build/source/texk/dvisvgm/dvisvgm-src/src/options.dtd
index 43f75b16919..49ff5aa4cf3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/options.dtd
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/options.dtd
@@ -3,7 +3,7 @@
** options.dtd **
** **
** This file is part of dvisvgm - a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -41,7 +41,7 @@
<!ELEMENT arg EMPTY>
<!ATTLIST arg
- default NMTOKEN #IMPLIED
+ default CDATA #IMPLIED
name CDATA #REQUIRED
optional (yes|no) #IMPLIED
type NMTOKEN #REQUIRED>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/options.xml b/Build/source/texk/dvisvgm/dvisvgm-src/src/options.xml
index 889fe7f0814..df8f40c6c2d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/options.xml
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/options.xml
@@ -3,7 +3,7 @@
** options.xml **
** **
** This file is part of dvisvgm - a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -21,193 +21,201 @@
<!DOCTYPE cmdline SYSTEM "options.dtd">
<cmdline class="CommandLine">
- <program>
- <usage>[options] dvifile</usage>
- <usage>--eps [options] epsfile</usage>
- <usage>--pdf [options] pdffile</usage>
- <description>This program converts DVI files, as created by TeX/LaTeX, as well as\nEPS and PDF files to the XML-based scalable vector graphics format SVG.</description>
- <copyright>Copyright (C) 2005-2023 Martin Gieseking &lt;martin.gieseking@uos.de></copyright>
- </program>
- <options>
- <section title="Input options">
- <option long="page" short="p">
- <arg type="string" name="ranges" default="1"/>
- <description>choose page(s) to convert</description>
- </option>
- <option long="fontmap" short="m">
- <arg type="string" name="filenames"/>
- <description>evaluate (additional) font map files</description>
- </option>
- <option long="eps" short="E" if="!defined(DISABLE_GS)">
- <description>convert EPS file to SVG</description>
- </option>
- <option long="pdf" short="P" if="!defined(DISABLE_GS)">
- <description>convert PDF file to SVG</description>
- </option>
- <option long="stdin">
- <description>read input file from stdin</description>
- </option>
- </section>
- <section title="SVG output options">
- <option long="bbox" short="b">
- <arg type="string" name="size" default="min"/>
- <description>set size of bounding box</description>
- </option>
- <option long="bitmap-format" short="B" if="!defined(DISABLE_GS)">
- <arg type="string" name="fmt" default="jpeg"/>
- <description>set format used to embed PS/EPS bitmaps</description>
- </option>
- <option long="clipjoin" short="j" if="!defined(DISABLE_GS)">
- <description>compute intersection of clipping paths</description>
- </option>
- <option long="colornames">
- <description>prefer color names to RGB values if possible</description>
- </option>
- <option long="comments">
- <description>add comments with additional information</description>
- </option>
- <option long="embed-bitmaps">
- <description>prevent references to external bitmap files</description>
- </option>
- <option long="font-format" short="f" if="!defined(DISABLE_WOFF)">
- <arg type="string" name="format" default="svg"/>
- <description>set file format of embedded fonts</description>
- </option>
- <option long="grad-overlap" if="!defined(DISABLE_GS)">
- <description>create overlapping color gradient segments</description>
- </option>
- <option long="grad-segments" if="!defined(DISABLE_GS)">
- <arg type="int" name="number" default="20"/>
- <description>number of color gradient segments per row</description>
- </option>
- <option long="grad-simplify" if="!defined(DISABLE_GS)">
- <arg type="double" name="delta" default="0.05"/>
- <description>reduce level of detail for small segments</description>
- </option>
- <option long="linkmark" short="L">
- <arg type="string" name="style" default="box"/>
- <description>select how to mark hyperlinked areas</description>
- </option>
- <option long="optimize" short="O">
- <arg name="modules" type="string" default="all" optional="yes"/>
- <description>perform several SVG optimizations</description>
- </option>
- <option long="output" short="o">
- <arg type="string" name="pattern"/>
- <description>set name pattern of output files</description>
- </option>
- <option long="precision" short="d">
- <arg type="int" name="number" default="0"/>
- <description>set number of decimal points (0-6)</description>
- </option>
- <option long="relative" short="R">
- <description>create relative path commands</description>
- </option>
- <option long="stdout" short="s">
- <description>write SVG output to stdout</description>
- </option>
- <option long="tmpdir">
- <arg type="string" name="path" optional="yes"/>
- <description>set/print the directory for temporary files</description>
- </option>
- <option long="no-fonts" short="n">
- <arg type="int" name="variant" default="0" optional="yes"/>
- <description>draw glyphs by using path elements</description>
- </option>
- <option long="no-merge">
- <description>don't merge adjacent text elements</description>
- </option>
- <option long="no-styles">
- <description>don't use CSS styles to reference fonts</description>
- </option>
- <option long="zip" short="z">
- <arg type="int" name="level" default="9" optional="yes"/>
- <description>create compressed .svgz file</description>
- </option>
- </section>
- <section title="SVG transformations">
- <option long="rotate" short="r">
- <arg type="double" name="angle"/>
- <description>rotate page content clockwise</description>
- </option>
- <option long="scale" short="c">
- <arg type="string" name="sx[,sy]"/>
- <description>scale page content</description>
- </option>
- <option long="translate" short="t">
- <arg type="string" name="tx[,ty]"/>
- <description>shift page content</description>
- </option>
- <option long="transform" short="T">
- <arg type="string" name="commands"/>
- <description>transform page content</description>
- </option>
- <option long="zoom" short="Z">
- <arg type="double" name="factor" default="1.0"/>
- <description>zoom page content</description>
- </option>
- </section>
- <section title="Processing options">
- <option long="cache" short="C">
- <arg type="string" name="dir" optional="yes"/>
- <description>set/print path of cache directory</description>
- </option>
- <option long="debug-glyphs" if="defined(TTFDEBUG)">
- <description>create PS files for all glyphs converted to TTF</description>
- </option>
- <option long="exact-bbox" short="e">
- <description>compute exact glyph bounding boxes</description>
- </option>
- <option long="keep">
- <description>keep temporary files</description>
- </option>
- <option long="libgs" if="!defined(HAVE_LIBGS) &amp;&amp; !defined(DISABLE_GS)">
- <arg name="filename" type="string"/>
- <description>set name of Ghostscript shared library</description>
- </option>
- <option long="mag" short="M">
- <arg type="double" name="factor" default="4"/>
- <description>magnification of Metafont output</description>
- </option>
- <option long="no-mktexmf">
- <description>don't try to create missing fonts</description>
- </option>
- <option long="no-specials" short="S">
- <arg type="string" name="prefixes" optional="yes"/>
- <description>don't process [selected] specials</description>
- </option>
- <option long="page-hashes" short="H">
- <arg type="string" name="params" optional="yes" default="xxh64"/>
- <description>activate usage of page hashes</description>
- </option>
- <option long="trace-all" short="a">
- <arg name="retrace" type="bool" optional="yes" default="false"/>
- <description>trace all glyphs of bitmap fonts</description>
- </option>
- </section>
- <section title="Message options">
- <option long="color">
- <description>colorize messages</description>
- </option>
- <option long="help" short="h">
- <arg name="mode" type="int" optional="yes" default="0"/>
- <description>print this summary of options and exit</description>
- </option>
- <option long="list-specials" short="l">
- <description>print supported special sets and exit</description>
- </option>
- <option long="progress">
- <arg name="delay" type="double" optional="yes" default="0.5"/>
- <description>enable progress indicator</description>
- </option>
- <option long="verbosity" short="v">
- <arg type="unsigned" name="level" default="7"/>
- <description>set verbosity level (0-7)</description>
- </option>
- <option long="version" short="V">
- <arg type="bool" name="extended" optional="yes" default="false"/>
- <description>print version and exit</description>
- </option>
- </section>
- </options>
+ <program>
+ <usage>[options] dvifile</usage>
+ <usage>--eps [options] epsfile</usage>
+ <usage>--pdf [options] pdffile</usage>
+ <description>This program converts DVI files, as created by TeX/LaTeX, as well as\nEPS and PDF files to the XML-based scalable vector graphics format SVG.</description>
+ <copyright>Copyright (C) 2005-2024 Martin Gieseking &lt;martin.gieseking@uos.de></copyright>
+ </program>
+ <options>
+ <section title="Input options">
+ <option long="page" short="p">
+ <arg type="string" name="ranges" default="1"/>
+ <description>choose page(s) to convert</description>
+ </option>
+ <option long="fontmap" short="m">
+ <arg type="string" name="filenames"/>
+ <description>evaluate (additional) font map files</description>
+ </option>
+ <option long="eps" short="E" if="!defined(DISABLE_GS)">
+ <description>convert EPS file to SVG</description>
+ </option>
+ <option long="pdf" short="P" if="!defined(DISABLE_GS)">
+ <description>convert PDF file to SVG</description>
+ </option>
+ <option long="stdin">
+ <description>read input file from stdin</description>
+ </option>
+ </section>
+ <section title="SVG output options">
+ <option long="bbox" short="b">
+ <arg type="string" name="size" default="min"/>
+ <description>set size of bounding box</description>
+ </option>
+ <option long="bitmap-format" short="B" if="!defined(DISABLE_GS)">
+ <arg type="string" name="fmt" default="jpeg"/>
+ <description>set format used to embed PS/EPS bitmaps</description>
+ </option>
+ <option long="clipjoin" short="j" if="!defined(DISABLE_GS)">
+ <description>compute intersection of clipping paths</description>
+ </option>
+ <option long="colornames">
+ <description>prefer color names to RGB values if possible</description>
+ </option>
+ <option long="comments">
+ <description>add comments with additional information</description>
+ </option>
+ <option long="currentcolor">
+ <arg type="string" name="color" default="#000" optional="yes"/>
+ <description>replace given color with 'currentColor'</description>
+ </option>
+ <option long="embed-bitmaps">
+ <description>prevent references to external bitmap files</description>
+ </option>
+ <option long="font-format" short="f" if="!defined(DISABLE_WOFF)">
+ <arg type="string" name="format" default="svg"/>
+ <description>set file format of embedded fonts</description>
+ </option>
+ <option long="grad-overlap" if="!defined(DISABLE_GS)">
+ <description>create overlapping color gradient segments</description>
+ </option>
+ <option long="grad-segments" if="!defined(DISABLE_GS)">
+ <arg type="int" name="number" default="20"/>
+ <description>number of color gradient segments per row</description>
+ </option>
+ <option long="grad-simplify" if="!defined(DISABLE_GS)">
+ <arg type="double" name="delta" default="0.05"/>
+ <description>reduce level of detail for small segments</description>
+ </option>
+ <option long="linkmark" short="L">
+ <arg type="string" name="style" default="box"/>
+ <description>select how to mark hyperlinked areas</description>
+ </option>
+ <option long="optimize" short="O">
+ <arg name="modules" type="string" default="all" optional="yes"/>
+ <description>perform several SVG optimizations</description>
+ </option>
+ <option long="output" short="o">
+ <arg type="string" name="pattern"/>
+ <description>set name pattern of output files</description>
+ </option>
+ <option long="precision" short="d">
+ <arg type="int" name="number" default="0"/>
+ <description>set number of decimal points (0-6)</description>
+ </option>
+ <option long="relative" short="R">
+ <description>create relative path commands</description>
+ </option>
+ <option long="stdout" short="s">
+ <description>write SVG output to stdout</description>
+ </option>
+ <option long="tmpdir">
+ <arg type="string" name="path" optional="yes"/>
+ <description>set/print the directory for temporary files</description>
+ </option>
+ <option long="no-fonts" short="n">
+ <arg type="int" name="variant" default="0" optional="yes"/>
+ <description>draw glyphs by using path elements</description>
+ </option>
+ <option long="no-merge">
+ <description>don't merge adjacent text elements</description>
+ </option>
+ <option long="no-styles">
+ <description>don't use CSS styles to reference fonts</description>
+ </option>
+ <option long="zip" short="z">
+ <arg type="int" name="level" default="9" optional="yes"/>
+ <description>create compressed .svgz file</description>
+ </option>
+ </section>
+ <section title="SVG transformations">
+ <option long="rotate" short="r">
+ <arg type="double" name="angle"/>
+ <description>rotate page content clockwise</description>
+ </option>
+ <option long="scale" short="c">
+ <arg type="string" name="sx[,sy]"/>
+ <description>scale page content</description>
+ </option>
+ <option long="translate" short="t">
+ <arg type="string" name="tx[,ty]"/>
+ <description>shift page content</description>
+ </option>
+ <option long="transform" short="T">
+ <arg type="string" name="commands"/>
+ <description>transform page content</description>
+ </option>
+ <option long="zoom" short="Z">
+ <arg type="double" name="factor" default="1.0"/>
+ <description>zoom page content</description>
+ </option>
+ </section>
+ <section title="Processing options">
+ <option long="cache" short="C">
+ <arg type="string" name="dir" optional="yes"/>
+ <description>set/print path of cache directory</description>
+ </option>
+ <option long="debug-glyphs" if="defined(TTFDEBUG)">
+ <description>create PS files for all glyphs converted to TTF</description>
+ </option>
+ <option long="exact-bbox" short="e">
+ <description>compute exact glyph bounding boxes</description>
+ </option>
+ <option long="keep">
+ <description>keep temporary files</description>
+ </option>
+ <option long="libgs" if="!defined(HAVE_LIBGS) &amp;&amp; !defined(DISABLE_GS)">
+ <arg name="filename" type="string"/>
+ <description>set name of Ghostscript shared library</description>
+ </option>
+ <option long="mag" short="M">
+ <arg type="double" name="factor" default="4"/>
+ <description>magnification of Metafont output</description>
+ </option>
+ <option long="no-mktexmf">
+ <description>don't try to create missing fonts</description>
+ </option>
+ <option long="no-specials" short="S">
+ <arg type="string" name="prefixes" optional="yes"/>
+ <description>don't process [selected] specials</description>
+ </option>
+ <option long="page-hashes" short="H">
+ <arg type="string" name="params" optional="yes" default="xxh64"/>
+ <description>activate usage of page hashes</description>
+ </option>
+ <option long="trace-all" short="a">
+ <arg name="retrace" type="bool" optional="yes" default="false"/>
+ <description>trace all glyphs of bitmap fonts</description>
+ </option>
+ </section>
+ <section title="Message options">
+ <option long="color">
+ <description>colorize messages</description>
+ </option>
+ <option long="help" short="h">
+ <arg name="mode" type="int" optional="yes" default="0"/>
+ <description>print this summary of options and exit</description>
+ </option>
+ <option long="list-specials" short="l">
+ <description>print supported special sets and exit</description>
+ </option>
+ <option long="message">
+ <arg name="text" type="string"/>
+ <description>print message text after writing an SVG file</description>
+ </option>
+ <option long="progress">
+ <arg name="delay" type="double" optional="yes" default="0.5"/>
+ <description>enable progress indicator</description>
+ </option>
+ <option long="verbosity" short="v">
+ <arg type="unsigned" name="level" default="15"/>
+ <description>set verbosity level (0-15)</description>
+ </option>
+ <option long="version" short="V">
+ <arg type="bool" name="extended" optional="yes" default="false"/>
+ <description>print version and exit</description>
+ </option>
+ </section>
+ </options>
</cmdline>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp
index e3a83726715..bba86bee7c0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/psdefs.cpp
@@ -2,7 +2,7 @@
** psdefs.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -35,131 +35,130 @@ const char *PSInterpreter::PSDEFS =
"tshapealpha known not{@SD/.setshapealpha{pop}put}if @SD/.setblendmode known no"
"t{@SD/.setblendmode{pop}put}if @SD/prseq{-1 1{-1 roll =only( )print}for(\\n)pr"
"int}put @SD/prcmd{( )exch(\\ndvi.)3{print}repeat prseq}put @SD/cvxall{{cvx}for"
-"all}put @SD/defpr{[exch[/copy @SD]cvxall 5 -1 roll dup 6 1 roll[/get/exec]cvxa"
-"ll 6 -1 roll dup 7 1 roll 4 -1 roll dup 5 1 roll dup length string cvs/prcmd c"
-"vx]cvx def}put @SD/querypos{{currentpoint}stopped{$error/newerror false put}{2"
-"(querypos)prcmd}ifelse}put @SD/applyscalevals{1 0 dtransform exch dup mul exch"
-" dup mul add sqrt 0 1 dtransform exch dup mul exch dup mul add sqrt 1 0 dtrans"
-"form dup mul exch dup dup mul 3 -1 roll add dup 0 eq{pop}{sqrt div}ifelse 3(ap"
-"plyscalevals)prcmd}put @SD/prpath{{2(moveto)prcmd}{2(lineto)prcmd}{6(curveto)p"
-"rcmd}{0(closepath)prcmd}pathforall}put @SD/nulldevice{@GD/@nulldev true put :n"
-"ulldevice 1 1(setnulldevice)prcmd}put @SD/charpath{/@dodraw false store :charp"
-"ath/@dodraw true store}put @SD/stringwidth{/@dodraw false store :stringwidth/@"
-"dodraw true store}put @SD/show{@dodraw @GD/@nulldev get not and{dup :gsave cur"
-"rentpoint 2{50 mul exch}repeat :newpath moveto 50 50/scale sysexec true charpa"
-"th fill :grestore/@dodraw false store :show/@dodraw true store}{:show}ifelse}p"
-"ut @SD/varxyshow{dup 0 ge{<</chr 3 -1 roll string/prc 5 -1 roll/arr 7 -1 roll/"
-"str 9 -1 roll/idx 0>>begin 0 chr length str length 1 sub{str exch chr length g"
-"etinterval/chr exch store :gsave chr show :grestore currentpoint prc moveto/id"
-"x idx 1 add store}for end}{pop pop show}ifelse}put @SD/xyshow{dup dup type/arr"
-"aytype eq exch length 0 gt and{dup length 2 idiv 2 index length exch idiv}{-1}"
-"ifelse{exch arr idx 2 mul get add exch arr idx 2 mul 1 add get add}exch varxys"
-"how}put @SD/xshow{dup dup type/arraytype eq exch length 0 gt and{dup length 2 "
-"index length exch idiv}{-1}ifelse{exch arr idx get add exch}exch varxyshow}put"
-" @SD/yshow{dup dup type/arraytype eq exch length 0 gt and{dup length 2 index l"
-"ength exch idiv}{-1}ifelse{arr idx get add}exch varxyshow}put @SD/awidthshow{{"
-"1 string dup 0 5 index put :gsave show :grestore pop 0 rmoveto 3 index eq{4 in"
-"dex 4 index rmoveto}if 1 index 1 index rmoveto}exch cshow 5{pop}repeat}put @SD"
-"/widthshow{0 0 3 -1 roll awidthshow}put @SD/ashow{0 0 0 6 3 roll awidthshow}pu"
-"t @SD/newpath{:newpath 1 1(newpath)prcmd}put @SD/stroke{@dodraw @GD/@nulldev g"
-"et not and{prcolor 0 1(newpath)prcmd prpath 0(stroke)prcmd :newpath}{:stroke}i"
-"felse}put @SD/fill{@dodraw @GD/@nulldev get not and{prcolor 0 1(newpath)prcmd "
-"prpath 0(fill)prcmd :newpath}{:fill}ifelse}put @SD/eofill{@dodraw @GD/@nulldev"
-" get not and{prcolor 0 1(newpath)prcmd prpath 0(eofill)prcmd :newpath}{:eofill"
-"}ifelse}put/.fillstroke{:gsave fill :grestore .swapcolors stroke .swapcolors}b"
-"ind def/.eofillstroke{:gsave eofill :grestore .swapcolors stroke .swapcolors}b"
-"ind def @SD/clip{:clip @GD/@nulldev get not{0 1(newpath)prcmd prpath 0(clip)pr"
-"cmd}if}put @SD/eoclip{:eoclip @GD/@nulldev get not{0 1(newpath)prcmd prpath 0("
-"eoclip)prcmd}if}put @SD/shfill{begin currentdict/ShadingType known currentdict"
-"/ColorSpace known and currentdict/DataSource known and currentdict/Function kn"
-"own not and ShadingType 4 ge{DataSource type/arraytype eq{<</DeviceGray 1/Devi"
-"ceRGB 3/DeviceCMYK 4/bgknown currentdict/Background known/bbknown currentdict/"
-"BBox known>>begin currentdict ColorSpace known{ShadingType ColorSpace load bgk"
-"nown{1 Background aload pop}{0}ifelse bbknown{1 BBox aload pop}{0}ifelse Shadi"
-"ngType 5 eq{VerticesPerRow}if DataSource aload length 4 add bgknown{ColorSpace"
-" load add}if bbknown{4 add}if ShadingType 5 eq{1 add}if(shfill)prcmd}if end}if"
-"}if end}put @SD/image{dup type/dicttype eq{dup}{<</Width 6 index/Height 7 inde"
-"x/colorimg false>>}ifelse @execimg}put @SD/colorimage{<<2 index{/Width 2 index"
-" 8 add index/Height 4 index 9 add index}{/Width 8 index/Height 9 index}ifelse/"
-"colorimg true>>@execimg}put/@imgbase(./)def/@imgdevice(jpeg)def/@execimg{@GD/@"
-"imgcnt 2 copy .knownget{1 add}{1}ifelse put begin<</imgdev null/imgid @GD/@img"
-"cnt get/ispng @imgdevice 0 3 getinterval(png)eq dup/suffix exch{(.png)}{(.jpg)"
-"}ifelse/colorimg currentdict/colorimg .knownget dup{pop}if/colordev 1 index cu"
-"rrentcolorspace dup length 1 ne exch 0 get/DeviceGray ne or or>>begin @imgdevi"
-"ce(png)ne @imgdevice(jpeg)ne and{@imgdevice cvn}{colordev{ispng{/png16m}{/jpeg"
-"}ifelse}{ispng{/pnggray}{/jpeggray}ifelse}ifelse}ifelse dup devicedict exch kn"
-"own{:gsave/imgdev exch finddevice def mark/OutputFile @imgbase imgid 20 string"
-" cvs strconcat suffix strconcat/PageSize[Width Height]/UseFastColor true ispng"
-"{@imgdevice(pngmonod)eq{/MinFeatureSize where{pop/MinFeatureSize MinFeatureSiz"
-"e}if}if}{/JPEGQ where{pop/JPEGQ JPEGQ}if}ifelse imgdev putdeviceprops setdevic"
-"e[Width 0 0 Height neg 0 Height]/setmatrix sysexec colorimg{:colorimage}{:imag"
-"e}ifelse/copypage sysexec mark/OutputFile()imgdev putdeviceprops pop :grestore"
-" imgid Width Height 3(image)prcmd}{pop colorimg{:colorimage}{:image}ifelse}ife"
-"lse end end}def/@rect{4 -2 roll moveto exch dup 0 rlineto exch 0 exch rlineto "
-"neg 0 rlineto closepath}bind def/@rectcc{4 -2 roll moveto 2 copy 0 lt exch 0 l"
-"t xor{dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto}{exch dup 0 rlineto"
-" exch 0 exch rlineto neg 0 rlineto}ifelse closepath}bind def @SD/rectclip{:new"
-"path dup type/arraytype eq{aload length 4 idiv{@rectcc}repeat}{@rectcc}ifelse "
-"clip :newpath}put @SD/rectfill{:gsave :newpath dup type/arraytype eq{aload len"
-"gth 4 idiv{@rectcc}repeat}{@rectcc}ifelse fill :grestore}put @SD/rectstroke{gs"
-"ave :newpath dup type/arraytype eq{aload length 4 idiv{@rect}repeat}{@rect}ife"
-"lse stroke grestore}put false setglobal @SD readonly pop/initclip 0 defpr/clip"
-"path 0 defpr/sysexec{@SD exch get exec}def/adddot{dup length 1 add string dup "
-"0 46 put dup 3 -1 roll 1 exch putinterval}def/setlinewidth{dup/setlinewidth sy"
-"sexec 1(setlinewidth)prcmd}def/setlinecap 1 defpr/setlinejoin 1 defpr/setmiter"
-"limit 1 defpr/setdash{mark 3 1 roll 2 copy/setdash sysexec exch aload length 1"
-" add -1 roll counttomark(setdash)prcmd pop}def/@setpagedevice{pop<<>>/setpaged"
-"evice sysexec matrix setmatrix newpath 0(setpagedevice)prcmd}def/@checknulldev"
-"{@GD/@nulldev get{currentpagedevice maxlength 0 ne{@GD/@nulldev false put 0 1("
-"setnulldevice)prcmd}if}if}def/prcolor{currentcolorspace @setcolorspace current"
-"rgbcolor 3(setrgbcolor)prcmd}def/printgstate{@dodraw @GD/@nulldev get not and{"
-"matrix currentmatrix aload pop 6(setmatrix)prcmd applyscalevals currentlinewid"
-"th 1(setlinewidth)prcmd currentlinecap 1(setlinecap)prcmd currentlinejoin 1(se"
-"tlinejoin)prcmd currentmiterlimit 1(setmiterlimit)prcmd revision dup 952 lt{po"
-"p}{.currentblendmode .setblendmode 952 eq{.currentopacityalpha .setopacityalph"
-"a .currentshapealpha .setshapealpha}{.currentalphaisshape{1}{0}ifelse 1(setalp"
-"haisshape)prcmd .currentstrokeconstantalpha 1(setstrokeconstantalpha)prcmd .cu"
-"rrentfillconstantalpha 1(setfillconstantalpha)prcmd}ifelse}ifelse prcolor curr"
-"entdash mark 3 1 roll exch aload length 1 add -1 roll counttomark(setdash)prcm"
-"d pop}if}def/strconcat{exch dup length 2 index length add string dup dup 4 2 r"
-"oll copy length 4 -1 roll putinterval}def/setgstate{/setgstate sysexec printgs"
-"tate}def/save{@UD begin/@saveID vmstatus pop pop def end :save @saveID 1(save)"
-"prcmd}def/restore{:restore @checknulldev printgstate @UD/@saveID known{@UD beg"
-"in @saveID end}{0}ifelse 1(restore)prcmd}def/gsave 0 defpr/grestore{:grestore "
-"@checknulldev printgstate 0(grestore)prcmd}def/grestoreall{:grestoreall @check"
-"nulldev setstate 0(grestoreall)prcmd}def/rotate{dup type/arraytype ne @dodraw "
-"and{dup 1(rotate)prcmd}if/rotate sysexec applyscalevals}def/scale{dup type/arr"
-"aytype ne @dodraw and{2 copy 2(scale)prcmd}if/scale sysexec applyscalevals}def"
-"/translate{dup type/arraytype ne @dodraw and{2 copy 2(translate)prcmd}if/trans"
-"late sysexec}def/setmatrix{dup/setmatrix sysexec @dodraw{aload pop 6(setmatrix"
-")prcmd applyscalevals}{pop}ifelse}def/initmatrix{matrix setmatrix}def/concat{m"
-"atrix currentmatrix matrix concatmatrix setmatrix}def/makepattern{gsave<</mx 3"
-" -1 roll>>begin<</XUID[1000000 @patcnt]>>copy mx/makepattern sysexec dup begin"
-" PatternType 2 lt{PatternType @patcnt BBox aload pop XStep YStep PaintType mx "
-"aload pop 15(makepattern)prcmd :newpath matrix setmatrix dup PaintProc 0 1(mak"
-"epattern)prcmd @GD/@patcnt @patcnt 1 add put}if end end grestore}def/setpatter"
-"n{dup begin PatternType end 1 eq{begin PaintType 1 eq{XUID aload pop exch pop "
-"1}{:gsave[currentcolorspace aload length -1 roll pop]/setcolorspace sysexec/se"
-"tcolor sysexec XUID aload pop exch pop currentrgbcolor :grestore 4}ifelse(setp"
-"attern)prcmd currentcolorspace 0 get/Pattern ne{[/Pattern currentcolorspace]/s"
-"etcolorspace sysexec}if currentcolorspace @setcolorspace end}{/setpattern syse"
-"xec}ifelse}def/setcolor{dup type/dicttype eq{setpattern}{/setcolor sysexec/cur"
-"rentrgbcolor sysexec setrgbcolor}ifelse}def/setcolorspace{dup/setcolorspace sy"
-"sexec @setcolorspace}def/@setcolorspace{dup type/arraytype eq{0 get}if/Pattern"
-" eq{1}{0}ifelse 1(setcolorspace)prcmd}def/setgray 1 defpr/setcmykcolor 4 defpr"
-"/sethsbcolor 3 defpr/setrgbcolor 3 defpr/.setalphaisshape{@SD/.setalphaisshape"
-" known{dup/.setalphaisshape sysexec}if{1}{0}ifelse 1(setalphaisshape)prcmd}bin"
-"d def/.setfillconstantalpha{@SD/.setfillconstantalpha known{dup/.setfillconsta"
-"ntalpha sysexec}if 1(setfillconstantalpha)prcmd}bind def/.setstrokeconstantalp"
-"ha{@SD/.setstrokeconstantalpha known{dup/.setstrokeconstantalpha sysexec}if 1("
-"setstrokeconstantalpha)prcmd}bind def/.setopacityalpha{false .setalphaisshape "
-"dup .setfillconstantalpha .setstrokeconstantalpha}bind def/.setshapealpha{true"
-" .setalphaisshape dup .setfillconstantalpha .setstrokeconstantalpha}bind def/."
-"setblendmode{dup/.setblendmode sysexec<</Normal 0/Compatible 0/Multiply 1/Scre"
-"en 2/Overlay 3/SoftLight 4/HardLight 5/ColorDodge 6/ColorBurn 7/Darken 8/Light"
-"en 9/Difference 10/Exclusion 11/Hue 12/Saturation 13/Color 14/Luminosity 15/Co"
-"mpatibleOverprint 16>>exch get 1(setblendmode)prcmd}def/@pdfpagecount{(r)file "
-"runpdfbegin pdfpagecount runpdfend}def/@pdfpagebox{(r)file runpdfbegin dup dup"
-" 1 lt exch pdfpagecount gt or{pop}{pdfgetpage/MediaBox pget pop aload pop}ifel"
-"se runpdfend}def DELAYBIND{.bindnow}if ";
+"all}put @SD/defpr{[exch/copy cvx @SD 4 index[/get/exec]cvxall 5 index 3 index "
+"dup length string cvs/prcmd cvx]cvx bind def}put @SD/querypos{{currentpoint}st"
+"opped{$error/newerror false put}{2(querypos)prcmd}ifelse}put @SD/applyscaleval"
+"s{1 0 dtransform exch dup mul exch dup mul add sqrt 0 1 dtransform exch dup mu"
+"l exch dup mul add sqrt 1 0 dtransform dup mul exch dup dup mul 3 -1 roll add "
+"dup 0 eq{pop}{sqrt div}ifelse 3(applyscalevals)prcmd}put @SD/prpath{{2(moveto)"
+"prcmd}{2(lineto)prcmd}{6(curveto)prcmd}{0(closepath)prcmd}pathforall}put @SD/n"
+"ulldevice{@GD/@nulldev true put :nulldevice 1 1(setnulldevice)prcmd}put @SD/ch"
+"arpath{/@dodraw false store :charpath/@dodraw true store}put @SD/stringwidth{/"
+"@dodraw false store :stringwidth/@dodraw true store}put @SD/show{@dodraw @GD/@"
+"nulldev get not and{dup :gsave currentpoint 2{50 mul exch}repeat :newpath move"
+"to 50 50/scale sysexec true charpath fill :grestore/@dodraw false store :show/"
+"@dodraw true store}{:show}ifelse}put @SD/varxyshow{dup 0 ge{<</chr 3 -1 roll s"
+"tring/prc 5 -1 roll/arr 7 -1 roll/str 9 -1 roll/idx 0>>begin 0 chr length str "
+"length 1 sub{str exch chr length getinterval/chr exch store :gsave chr show :g"
+"restore currentpoint prc moveto/idx idx 1 add store}for end}{pop pop show}ifel"
+"se}put @SD/xyshow{dup dup type/arraytype eq exch length 0 gt and{dup length 2 "
+"idiv 2 index length exch idiv}{-1}ifelse{exch arr idx 2 mul get add exch arr i"
+"dx 2 mul 1 add get add}exch varxyshow}put @SD/xshow{dup dup type/arraytype eq "
+"exch length 0 gt and{dup length 2 index length exch idiv}{-1}ifelse{exch arr i"
+"dx get add exch}exch varxyshow}put @SD/yshow{dup dup type/arraytype eq exch le"
+"ngth 0 gt and{dup length 2 index length exch idiv}{-1}ifelse{arr idx get add}e"
+"xch varxyshow}put @SD/awidthshow{{1 string dup 0 5 index put :gsave show :gres"
+"tore pop 0 rmoveto 3 index eq{4 index 4 index rmoveto}if 1 index 1 index rmove"
+"to}exch cshow 5{pop}repeat}put @SD/widthshow{0 0 3 -1 roll awidthshow}put @SD/"
+"ashow{0 0 0 6 3 roll awidthshow}put @SD/newpath{:newpath 1 1(newpath)prcmd}put"
+" @SD/stroke{@dodraw @GD/@nulldev get not and{prcolor 0 1(newpath)prcmd prpath "
+"0(stroke)prcmd :newpath}{:stroke}ifelse}put @SD/fill{@dodraw @GD/@nulldev get "
+"not and{prcolor 0 1(newpath)prcmd prpath 0(fill)prcmd :newpath}{:fill}ifelse}p"
+"ut @SD/eofill{@dodraw @GD/@nulldev get not and{prcolor 0 1(newpath)prcmd prpat"
+"h 0(eofill)prcmd :newpath}{:eofill}ifelse}put/.fillstroke{:gsave fill :grestor"
+"e .swapcolors stroke .swapcolors}bind def/.eofillstroke{:gsave eofill :grestor"
+"e .swapcolors stroke .swapcolors}bind def @SD/clip{:clip @GD/@nulldev get not{"
+"0 1(newpath)prcmd prpath 0(clip)prcmd}if}put @SD/eoclip{:eoclip @GD/@nulldev g"
+"et not{0 1(newpath)prcmd prpath 0(eoclip)prcmd}if}put @SD/shfill{begin current"
+"dict/ShadingType known currentdict/ColorSpace known and currentdict/DataSource"
+" known and currentdict/Function known not and ShadingType 4 ge{DataSource type"
+"/arraytype eq{<</DeviceGray 1/DeviceRGB 3/DeviceCMYK 4/bgknown currentdict/Bac"
+"kground known/bbknown currentdict/BBox known>>begin currentdict ColorSpace kno"
+"wn{ShadingType ColorSpace load bgknown{1 Background aload pop}{0}ifelse bbknow"
+"n{1 BBox aload pop}{0}ifelse ShadingType 5 eq{VerticesPerRow}if DataSource alo"
+"ad length 4 add bgknown{ColorSpace load add}if bbknown{4 add}if ShadingType 5 "
+"eq{1 add}if(shfill)prcmd}if end}if}if end}put @SD/image{dup type/dicttype eq{d"
+"up}{<</Width 6 index/Height 7 index/colorimg false>>}ifelse @execimg}put @SD/c"
+"olorimage{<<2 index{/Width 2 index 8 add index/Height 4 index 9 add index}{/Wi"
+"dth 8 index/Height 9 index}ifelse/colorimg true>>@execimg}put/@imgbase(./)def/"
+"@imgdevice(jpeg)def/@execimg{@GD/@imgcnt 2 copy .knownget{1 add}{1}ifelse put "
+"begin<</imgdev null/imgid @GD/@imgcnt get/ispng @imgdevice 0 3 getinterval(png"
+")eq dup/suffix exch{(.png)}{(.jpg)}ifelse/colorimg currentdict/colorimg .known"
+"get dup{pop}if/colordev 1 index currentcolorspace dup length 1 ne exch 0 get/D"
+"eviceGray ne or or>>begin @imgdevice(png)ne @imgdevice(jpeg)ne and{@imgdevice "
+"cvn}{colordev{ispng{/png16m}{/jpeg}ifelse}{ispng{/pnggray}{/jpeggray}ifelse}if"
+"else}ifelse dup devicedict exch known{:gsave/imgdev exch finddevice def mark/O"
+"utputFile @imgbase imgid 20 string cvs strconcat suffix strconcat/PageSize[Wid"
+"th Height]/UseFastColor true ispng{@imgdevice(pngmonod)eq{/MinFeatureSize wher"
+"e{pop/MinFeatureSize MinFeatureSize}if}if}{/JPEGQ where{pop/JPEGQ JPEGQ}if}ife"
+"lse imgdev putdeviceprops setdevice[Width 0 0 Height neg 0 Height]/setmatrix s"
+"ysexec colorimg{:colorimage}{:image}ifelse/copypage sysexec mark/OutputFile()i"
+"mgdev putdeviceprops pop :grestore imgid Width Height 3(image)prcmd}{pop color"
+"img{:colorimage}{:image}ifelse}ifelse end end}def/@rect{4 -2 roll moveto exch "
+"dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath}bind def/@rectcc{4 -"
+"2 roll moveto 2 copy 0 lt exch 0 lt xor{dup 0 exch rlineto exch 0 rlineto neg "
+"0 exch rlineto}{exch dup 0 rlineto exch 0 exch rlineto neg 0 rlineto}ifelse cl"
+"osepath}bind def @SD/rectclip{:newpath dup type/arraytype eq{aload length 4 id"
+"iv{@rectcc}repeat}{@rectcc}ifelse clip :newpath}put @SD/rectfill{:gsave :newpa"
+"th dup type/arraytype eq{aload length 4 idiv{@rectcc}repeat}{@rectcc}ifelse fi"
+"ll :grestore}put @SD/rectstroke{gsave :newpath dup type/arraytype eq{aload len"
+"gth 4 idiv{@rect}repeat}{@rect}ifelse stroke grestore}put false setglobal @SD "
+"readonly pop/initclip 0 defpr/clippath 0 defpr/sysexec{@SD exch get exec}def/a"
+"dddot{dup length 1 add string dup 0 46 put dup 3 -1 roll 1 exch putinterval}de"
+"f/setlinewidth{dup/setlinewidth sysexec 1(setlinewidth)prcmd}def/setlinecap 1 "
+"defpr/setlinejoin 1 defpr/setmiterlimit 1 defpr/setdash{mark 3 1 roll 2 copy/s"
+"etdash sysexec exch aload length 1 add -1 roll counttomark(setdash)prcmd pop}d"
+"ef/@setpagedevice{pop<<>>/setpagedevice sysexec matrix setmatrix newpath 0(set"
+"pagedevice)prcmd}def/@checknulldev{@GD/@nulldev get{currentpagedevice maxlengt"
+"h 0 ne{@GD/@nulldev false put 0 1(setnulldevice)prcmd}if}if}def/prcolor{curren"
+"tcolorspace @setcolorspace currentrgbcolor 3(setrgbcolor)prcmd}def/printgstate"
+"{@dodraw @GD/@nulldev get not and{matrix currentmatrix aload pop 6(setmatrix)p"
+"rcmd applyscalevals currentlinewidth 1(setlinewidth)prcmd currentlinecap 1(set"
+"linecap)prcmd currentlinejoin 1(setlinejoin)prcmd currentmiterlimit 1(setmiter"
+"limit)prcmd revision dup 952 lt{pop}{.currentblendmode .setblendmode 952 eq{.c"
+"urrentopacityalpha .setopacityalpha .currentshapealpha .setshapealpha}{.curren"
+"talphaisshape{1}{0}ifelse 1(setalphaisshape)prcmd .currentstrokeconstantalpha "
+"1(setstrokeconstantalpha)prcmd .currentfillconstantalpha 1(setfillconstantalph"
+"a)prcmd}ifelse}ifelse prcolor currentdash mark 3 1 roll exch aload length 1 ad"
+"d -1 roll counttomark(setdash)prcmd pop}if}def/strconcat{exch dup length 2 ind"
+"ex length add string dup dup 4 2 roll copy length 4 -1 roll putinterval}def/se"
+"tgstate{/setgstate sysexec printgstate}def/save{@UD begin/@saveID vmstatus pop"
+" pop def end :save @saveID 1(save)prcmd}def/restore{:restore @checknulldev pri"
+"ntgstate @UD/@saveID known{@UD begin @saveID end}{0}ifelse 1(restore)prcmd}def"
+"/gsave 0 defpr/grestore{:grestore @checknulldev printgstate 0(grestore)prcmd}d"
+"ef/grestoreall{:grestoreall @checknulldev setstate 0(grestoreall)prcmd}def/rot"
+"ate{dup type/arraytype ne @dodraw and{dup 1(rotate)prcmd}if/rotate sysexec app"
+"lyscalevals}def/scale{dup type/arraytype ne @dodraw and{2 copy 2(scale)prcmd}i"
+"f/scale sysexec applyscalevals}def/translate{dup type/arraytype ne @dodraw and"
+"{2 copy 2(translate)prcmd}if/translate sysexec}def/setmatrix{dup/setmatrix sys"
+"exec @dodraw{aload pop 6(setmatrix)prcmd applyscalevals}{pop}ifelse}def/initma"
+"trix{matrix setmatrix}def/concat{matrix currentmatrix matrix concatmatrix setm"
+"atrix}def/makepattern{gsave<</mx 3 -1 roll>>begin<</XUID[1000000 @patcnt]>>cop"
+"y mx/makepattern sysexec dup begin PatternType 2 lt{PatternType @patcnt BBox a"
+"load pop XStep YStep PaintType mx aload pop 15(makepattern)prcmd :newpath matr"
+"ix setmatrix dup PaintProc 0 1(makepattern)prcmd @GD/@patcnt @patcnt 1 add put"
+"}if end end grestore}def/setpattern{dup begin PatternType end 1 eq{begin Paint"
+"Type 1 eq{XUID aload pop exch pop 1}{:gsave[currentcolorspace aload length -1 "
+"roll pop]/setcolorspace sysexec/setcolor sysexec XUID aload pop exch pop curre"
+"ntrgbcolor :grestore 4}ifelse(setpattern)prcmd currentcolorspace 0 get/Pattern"
+" ne{[/Pattern currentcolorspace]/setcolorspace sysexec}if currentcolorspace @s"
+"etcolorspace end}{/setpattern sysexec}ifelse}def/setcolor{dup type/dicttype eq"
+"{setpattern}{/setcolor sysexec/currentrgbcolor sysexec setrgbcolor}ifelse}def/"
+"setcolorspace{dup/setcolorspace sysexec @setcolorspace}def/@setcolorspace{dup "
+"type/arraytype eq{0 get}if/Pattern eq{1}{0}ifelse 1(setcolorspace)prcmd}def/se"
+"tgray 1 defpr/setcmykcolor 4 defpr/sethsbcolor 3 defpr/setrgbcolor 3 defpr/.se"
+"talphaisshape{@SD/.setalphaisshape known{dup/.setalphaisshape sysexec}if{1}{0}"
+"ifelse 1(setalphaisshape)prcmd}bind def/.setfillconstantalpha{@SD/.setfillcons"
+"tantalpha known{dup/.setfillconstantalpha sysexec}if 1(setfillconstantalpha)pr"
+"cmd}bind def/.setstrokeconstantalpha{@SD/.setstrokeconstantalpha known{dup/.se"
+"tstrokeconstantalpha sysexec}if 1(setstrokeconstantalpha)prcmd}bind def/.setop"
+"acityalpha{false .setalphaisshape dup .setfillconstantalpha .setstrokeconstant"
+"alpha}bind def/.setshapealpha{true .setalphaisshape dup .setfillconstantalpha "
+".setstrokeconstantalpha}bind def/.setblendmode{dup/.setblendmode sysexec<</Nor"
+"mal 0/Compatible 0/Multiply 1/Screen 2/Overlay 3/SoftLight 4/HardLight 5/Color"
+"Dodge 6/ColorBurn 7/Darken 8/Lighten 9/Difference 10/Exclusion 11/Hue 12/Satur"
+"ation 13/Color 14/Luminosity 15/CompatibleOverprint 16>>exch get 1(setblendmod"
+"e)prcmd}def/@pdfpagecount{(r)file runpdfbegin pdfpagecount runpdfend}def/@pdfp"
+"agebox{(r)file runpdfbegin dup dup 1 lt exch pdfpagecount gt or{pop}{pdfgetpag"
+"e/MediaBox pget pop aload pop}ifelse runpdfend}def DELAYBIND{.bindnow}if ";
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/CmapTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/CmapTable.cpp
index 02731b57e9e..de24476ed62 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/CmapTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/CmapTable.cpp
@@ -2,7 +2,7 @@
** CmapTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/CmapTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/CmapTable.hpp
index d9c9eea5ae3..6c0b3fb7350 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/CmapTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/CmapTable.hpp
@@ -2,7 +2,7 @@
** CmapTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/GlyfTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/GlyfTable.cpp
index 4005b661e0e..c5bf302ed2b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/GlyfTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/GlyfTable.cpp
@@ -2,7 +2,7 @@
** GlyfTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/GlyfTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/GlyfTable.hpp
index 5ff80559a5d..774851b50cc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/GlyfTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/GlyfTable.hpp
@@ -2,7 +2,7 @@
** GlyfTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HeadTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HeadTable.cpp
index fff759898a6..0c908e20184 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HeadTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HeadTable.cpp
@@ -2,7 +2,7 @@
** HeadTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HeadTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HeadTable.hpp
index 6c51957ba0f..b1f8a9bfd24 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HeadTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HeadTable.hpp
@@ -2,7 +2,7 @@
** HeadTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HheaTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HheaTable.cpp
index 76a41d86da7..e00c91036c0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HheaTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HheaTable.cpp
@@ -2,7 +2,7 @@
** HheaTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HheaTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HheaTable.hpp
index 56fc1ddc4e2..561e0bcdde8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HheaTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HheaTable.hpp
@@ -2,7 +2,7 @@
** HheaTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HmtxTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HmtxTable.cpp
index 6e849768fdd..bf8624fe759 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HmtxTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HmtxTable.cpp
@@ -2,7 +2,7 @@
** HmtxTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -57,6 +57,6 @@ void HmtxTable::updateWidthData (uint32_t c, int16_t xmin, int16_t xmax) {
_runLengthOfAdvWidth++;
else
_runLengthOfAdvWidth = 1;
- _widthInfos.emplace_back(CharWidthInfo(xmin, w));
+ _widthInfos.emplace_back(xmin, w);
ttfWriter()->updateGlobalAdvanceWidth(w, _widthInfos.size()-_runLengthOfAdvWidth+1);
} \ No newline at end of file
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HmtxTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HmtxTable.hpp
index 95c9eba513f..489f02d835c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HmtxTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/HmtxTable.hpp
@@ -2,7 +2,7 @@
** HmtxTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/LocaTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/LocaTable.hpp
index 8ff51a7bb17..9253a291442 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/LocaTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/LocaTable.hpp
@@ -2,7 +2,7 @@
** LocaTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.in
index a4c38becec2..8312cc60d6e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/Makefile.in
@@ -90,7 +90,6 @@ build_triplet = @build@
host_triplet = @host@
@HAVE_BROTLI_FALSE@am__append_1 = -I$(dvisvgm_srcdir)/libs/brotli/include
@HAVE_BROTLI_FALSE@am__append_2 = ../libs/brotli/libbrotli.a
-#endif TEXLIVE_BUILD
@HAVE_WOFF2_FALSE@am__append_3 = -I$(dvisvgm_srcdir)/libs/woff2/include
@HAVE_WOFF2_FALSE@am__append_4 = ../libs/woff2/libwoff2.a
subdir = dvisvgm-src/src/ttf
@@ -389,16 +388,9 @@ libttf_la_SOURCES = \
VheaTable.hpp VheaTable.cpp \
VmtxTable.hpp VmtxTable.cpp
-
-# Gets automake warnings:
-# dvisvgm-src/src/../libs/defs.am:9: warning: POTRACE_LIBS was already defined in condition TRUE, which includes condition !HAVE_POTRACE and !TEXLIVE_BUILD ...
-# dvisvgm-src/src/Makefile.am:14: 'dvisvgm-src/src/../libs/defs.am' included from here
-# configure.ac:51: ... 'POTRACE_LIBS' previously defined here
-#if !TEXLIVE_BUILD
-#POTRACE_CFLAGS = -I$(dvisvgm_srcdir)/libs/potrace
-#POTRACE_LIBS = ../libs/potrace/libpotrace.a
-#else
@HAVE_POTRACE_FALSE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
+#
+@TEXLIVE_BUILD_TRUE@POTRACE_CFLAGS = $(POTRACE_INCLUDES)
@HAVE_XXHASH_FALSE@XXHASH_CFLAGS = -I$(dvisvgm_srcdir)/libs/xxHash
@HAVE_XXHASH_FALSE@XXHASH_LIBS = ../libs/xxHash/libxxhash.a
AM_CXXFLAGS = \
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/MaxpTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/MaxpTable.cpp
index 176c9ffcb0d..42e1058c515 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/MaxpTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/MaxpTable.cpp
@@ -2,7 +2,7 @@
** MaxpTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/MaxpTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/MaxpTable.hpp
index b1a08a1aea1..ea50b86ed93 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/MaxpTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/MaxpTable.hpp
@@ -2,7 +2,7 @@
** MaxpTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/NameTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/NameTable.cpp
index 949b6c336c6..312ddf973ba 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/NameTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/NameTable.cpp
@@ -2,7 +2,7 @@
** NameTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/NameTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/NameTable.hpp
index 78262ed927b..26de5811240 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/NameTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/NameTable.hpp
@@ -2,7 +2,7 @@
** NameTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/OS2Table.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/OS2Table.cpp
index 4ce5ff613b0..58ded2965e4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/OS2Table.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/OS2Table.cpp
@@ -2,7 +2,7 @@
** OS2Table.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/OS2Table.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/OS2Table.hpp
index 8861fdea7aa..042194df224 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/OS2Table.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/OS2Table.hpp
@@ -2,7 +2,7 @@
** OS2Table.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/PostTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/PostTable.cpp
index 650faf5467f..1f94f1654c6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/PostTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/PostTable.cpp
@@ -2,7 +2,7 @@
** PostTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/PostTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/PostTable.hpp
index 782f15085ea..d2a703dea1a 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/PostTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/PostTable.hpp
@@ -2,7 +2,7 @@
** PostTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFAutohint.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFAutohint.cpp
index fe6c6bafc29..c707c9e5aec 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFAutohint.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFAutohint.cpp
@@ -2,7 +2,7 @@
** TTFAutohint.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFAutohint.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFAutohint.hpp
index 9389d331142..081930b8f75 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFAutohint.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFAutohint.hpp
@@ -2,7 +2,7 @@
** TTFAutohint.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.cpp
index 2b04f3335f6..8d9f97011f0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.cpp
@@ -2,7 +2,7 @@
** TTFTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.hpp
index 7ebbdbbb783..21217349d4c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFTable.hpp
@@ -2,7 +2,7 @@
** TTFTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFWriter.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFWriter.cpp
index 2dacdfc567c..b3ec81cb07b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFWriter.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFWriter.cpp
@@ -2,7 +2,7 @@
** TTFWriter.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -368,14 +368,14 @@ bool TTFWriter::convertTTFToWOFF (istream &is, ostream &os) {
// read and process TTF header
vector<char> bufvec(12, 0);
is.read(&bufvec[0], 12);
- buffers.emplace_back(TableBuffer(0, std::move(bufvec)));
+ buffers.emplace_back(0, std::move(bufvec));
int numTables = buffers.back().getUInt16(4);
// read and process table records
bufvec.clear();
bufvec.resize(4 * 4 * numTables);
is.read(&bufvec[0], 4 * 4 * numTables);
- buffers.emplace_back(TableBuffer(0, std::move(bufvec)));
+ buffers.emplace_back(0, std::move(bufvec));
struct TableRecord {
TableRecord (const TableBuffer &buf, size_t ofs)
@@ -389,7 +389,7 @@ bool TTFWriter::convertTTFToWOFF (istream &is, ostream &os) {
tableRecords.reserve(numTables);
const TableBuffer &recbuf = buffers.back();
for (int i=0; i < numTables; i++)
- tableRecords.emplace_back(TableRecord(recbuf, 16*i));
+ tableRecords.emplace_back(recbuf, 16*i);
// read and process tables
for (const TableRecord &record : tableRecords) {
@@ -398,9 +398,9 @@ bool TTFWriter::convertTTFToWOFF (istream &is, ostream &os) {
is.seekg(record.offset);
is.read(&bufvec[0], record.length);
if (record.tag == TTFTable::name2id("head"))
- buffers.emplace_back(TableBuffer(record.tag, std::move(bufvec), HeadTable::offsetToChecksum()));
+ buffers.emplace_back(record.tag, std::move(bufvec), HeadTable::offsetToChecksum());
else
- buffers.emplace_back(TableBuffer(record.tag, std::move(bufvec)));
+ buffers.emplace_back(record.tag, std::move(bufvec));
}
return ttf_to_woff(std::move(buffers), os);
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFWriter.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFWriter.hpp
index 2580326859a..445696ee4b4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFWriter.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/TTFWriter.hpp
@@ -2,7 +2,7 @@
** TTFWriter.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VheaTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VheaTable.cpp
index d49b76f5231..e703a46fa1c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VheaTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VheaTable.cpp
@@ -2,7 +2,7 @@
** VheaTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VheaTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VheaTable.hpp
index 3031da49995..58521979af1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VheaTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VheaTable.hpp
@@ -2,7 +2,7 @@
** VheaTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VmtxTable.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VmtxTable.cpp
index 6873bac9d2d..d4c941750a5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VmtxTable.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VmtxTable.cpp
@@ -2,7 +2,7 @@
** VmtxTable.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -52,6 +52,6 @@ void VmtxTable::updateHeightData (uint32_t c, int16_t ymin, int16_t ymax) {
_runLengthOfAdvHeight++;
else
_runLengthOfAdvHeight = 1;
- _heightInfos.emplace_back(CharHeightInfo(ymin, h));
+ _heightInfos.emplace_back(ymin, h);
ttfWriter()->updateGlobalAdvanceHeight(h, _heightInfos.size()-_runLengthOfAdvHeight+1);
} \ No newline at end of file
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VmtxTable.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VmtxTable.hpp
index 4bcdda0df0c..c26585fcff7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VmtxTable.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/ttf/VmtxTable.hpp
@@ -2,7 +2,7 @@
** VmtxTable.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.cpp
index 947be916342..b4938f70edc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.cpp
@@ -2,7 +2,7 @@
** utility.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -58,7 +58,7 @@ vector<double> math::svd (const double (&m)[2][2]) {
theta = (a2-a1)/2;
}
}
- return vector<double>{phi, sx, sy, theta};
+ return {phi, sx, sy, theta};
}
@@ -68,7 +68,7 @@ vector<double> math::svd (const double (&m)[2][2]) {
* @param[in] t1 upper interval boundary
* @param[in] n number of slices the interval is divided into
* @param[in] f function to integrate */
-double math::integral (double t0, double t1, int n, const std::function<double(double)> &f) {
+double math::integral (double t0, double t1, int n, const function<double(double)> &f) {
double ti = t0, ui=0;
double h = (t1-t0)/n;
for (int i=0; i < n; i++) {
@@ -103,7 +103,7 @@ double math::normalize_0_2pi (double rad) {
* @param[in] str the string to process
* @param[in] ws characters treated as whitespace
* @return the trimmed string */
-string util::trim (const std::string &str, const char *ws) {
+string util::trim (const string &str, const char *ws) {
auto first = str.find_first_not_of(ws);
if (first == string::npos)
return "";
@@ -150,12 +150,13 @@ string util::replace (string str, const string &find, const string &repl) {
* returns the substrings.
* @param[in] str string to split
* @param[in] sep separator to look for
+ * @param[in] allowEmptyResult if true, the result vector is empty if str is empty; otherwise an empty string is inserted
* @return the substrings between the separators */
-vector<string> util::split (const string &str, const string &sep) {
+vector<string> util::split (const string &str, const string &sep, bool allowEmptyResult) {
vector<string> parts;
- if (str.empty() || sep.empty())
+ if ((str.empty() && !allowEmptyResult) || sep.empty())
parts.push_back(str);
- else {
+ else if (!str.empty()) {
string::size_type left=0;
while (left <= str.length()) {
auto right = str.find(sep, left);
@@ -183,13 +184,8 @@ string util::tolower (const string &str) {
/** Converts a double to a string and strips redundant trailing digits/dots. */
string util::to_string (double val) {
string str = std::to_string(val);
- if (str.find('.') != string::npos) { // double value and not an integer?
- auto pos = str.find_last_not_of('0');
- if (pos != string::npos) // trailing zeros
- str.erase(pos+1, string::npos);
- if (str.back() == '.') // trailing dot?
- str.pop_back();
- }
+ str.erase(str.find_last_not_of('0')+1, string::npos);
+ str.erase(str.find_last_not_of('.')+1, string::npos);
return str;
}
@@ -206,11 +202,69 @@ int util::ilog10 (int n) {
}
+/** Reads an integer string of the form (+|-)?[0-9]+ from an input stream
+ * ana appends it to a given one.
+ * @param[in] is stream to read from
+ * @param[out] str the read string is appended to this one
+ * @param[in] allow_leading_sign true if the first character may be '+' or '-'
+ * @return true if the string coule be read successfully */
+static bool read_int_string (istream &is, string &str, bool allow_leading_sign=true) {
+ string intstr;
+ if (is.peek() == '-' || is.peek() == '+') {
+ if (!allow_leading_sign)
+ return false;
+ intstr += char(is.get());
+ if (!isdigit(is.peek()))
+ return false;
+ }
+ while (isdigit(is.peek()))
+ intstr += char(is.get());
+ str += intstr;
+ return !intstr.empty();
+}
+
+
+/** Reads and parses a double from an input stream.
+ * @param[in] is stream to read from
+ * @param[out] value the read double value
+ * @return true if the value was read and parsed successfully */
+bool util::read_double (istream &is, double &value) {
+ is >> ws;
+ string numstr;
+ // read optional leading sign
+ bool plusminus = (is.peek() == '-' || is.peek() == '+');
+ if (plusminus)
+ numstr += char(is.get());
+ // read optional integer part (before decimal dot)
+ read_int_string(is, numstr, !plusminus);
+ if (is.peek() == '.') {
+ numstr += char(is.get());
+ // read fractional part (after decimal dot)
+ if (!read_int_string(is, numstr, false))
+ return false;
+ }
+ // read optional exponential part
+ if (std::tolower(is.peek()) == 'e') {
+ numstr += char(is.get());
+ if (!read_int_string(is, numstr))
+ return false;
+ }
+ try {
+ size_t count;
+ value = stod(numstr, &count);
+ return count == numstr.length();
+ }
+ catch (...) {
+ return false;
+ }
+}
+
+
/** Returns the contents of a file.
* @param[in] fname name/path of the file */
string util::read_file_contents (const string &fname) {
ifstream ifs(fname, ios::binary);
- return string(istreambuf_iterator<char>(ifs.rdbuf()), istreambuf_iterator<char>());
+ return {istreambuf_iterator<char>(ifs.rdbuf()), istreambuf_iterator<char>()};
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp
index 9b1b7006ad7..d12e3c67461 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/utility.hpp
@@ -2,7 +2,7 @@
** utility.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -69,9 +69,10 @@ std::string replace (std::string str, const std::string &find, const std::string
std::string to_string (double val);
std::string mimetype (const std::string &fname);
-std::vector<std::string> split (const std::string &str, const std::string &sep);
+std::vector<std::string> split (const std::string &str, const std::string &sep, bool allowEmptyResult=false);
int ilog10 (int n);
+bool read_double (std::istream &is, double &value);
std::string read_file_contents (const std::string &fname);
void write_file_contents (const std::string &fname, std::string::iterator start, std::string::iterator end);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/version.hpp.in b/Build/source/texk/dvisvgm/dvisvgm-src/src/version.hpp.in
index fc8d9ef2890..0a819bdaf11 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/version.hpp.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/version.hpp.in
@@ -2,7 +2,7 @@
** version.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/windows.hpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/windows.hpp
index 196bd5f4951..6eb2b45ba3f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/windows.hpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/windows.hpp
@@ -2,7 +2,7 @@
** windows.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/BezierTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/BezierTest.cpp
index 5a4724c6429..28e1ec5853c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/BezierTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/BezierTest.cpp
@@ -2,7 +2,7 @@
** BezierTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/BitmapTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/BitmapTest.cpp
index eacc8530ddb..043a77d045f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/BitmapTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/BitmapTest.cpp
@@ -2,7 +2,7 @@
** BitmapTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/BoundingBoxTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/BoundingBoxTest.cpp
index 6916dac08d4..872cf9858a9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/BoundingBoxTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/BoundingBoxTest.cpp
@@ -2,7 +2,7 @@
** BoundingBoxTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapManagerTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapManagerTest.cpp
index 185186b5f3f..ca4b612d861 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapManagerTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapManagerTest.cpp
@@ -2,7 +2,7 @@
** CMapManagerTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp
index c3387b30416..a30f78ed161 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapReaderTest.cpp
@@ -2,7 +2,7 @@
** CMapReaderTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapTest.cpp
index 10de080cf2e..2c555b6f934 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CMapTest.cpp
@@ -2,7 +2,7 @@
** CMapTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CalculatorTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CalculatorTest.cpp
index 9e0119371f0..65f24e8e215 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CalculatorTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CalculatorTest.cpp
@@ -2,7 +2,7 @@
** CalculatorTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/ColorSpecialTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/ColorSpecialTest.cpp
index cdbdb6b8f9e..43284c991d1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/ColorSpecialTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/ColorSpecialTest.cpp
@@ -2,7 +2,7 @@
** ColorSpecialTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/ColorTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/ColorTest.cpp
index ed41fb253c8..fd27478a85d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/ColorTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/ColorTest.cpp
@@ -2,7 +2,7 @@
** ColorTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CommandLineTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CommandLineTest.cpp
index 06a4d080781..67f8e3e6490 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/CommandLineTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/CommandLineTest.cpp
@@ -2,7 +2,7 @@
** CommandLineTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -35,7 +35,7 @@ TEST(CommandLineTest, noarg_short) {
EXPECT_TRUE(cmd.helpOpt.given());
EXPECT_FALSE(cmd.listSpecialsOpt.given());
EXPECT_FALSE(cmd.verbosityOpt.given());
- EXPECT_EQ(cmd.verbosityOpt.value(), 7u);
+ EXPECT_EQ(cmd.verbosityOpt.value(), 15u);
EXPECT_EQ(cmd.filenames().size(), 0u);
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/DVIReaderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/DVIReaderTest.cpp
index 47711a77c85..a4cc90090c6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/DVIReaderTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/DVIReaderTest.cpp
@@ -2,7 +2,7 @@
** DVIReaderTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/DependencyGraphTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/DependencyGraphTest.cpp
index fd8ee29fd12..3eaa8d4beee 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/DependencyGraphTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/DependencyGraphTest.cpp
@@ -2,7 +2,7 @@
** DependencyGraphTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/DirectoryTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/DirectoryTest.cpp
index ff7b276457a..2b679aa0f73 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/DirectoryTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/DirectoryTest.cpp
@@ -2,7 +2,7 @@
** DirectoryTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/DvisvgmSpecialTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/DvisvgmSpecialTest.cpp
index 873453ebb12..c3303275e29 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/DvisvgmSpecialTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/DvisvgmSpecialTest.cpp
@@ -2,7 +2,7 @@
** DvisvgmSpecialTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -47,15 +47,17 @@ class DvisvgmSpecialTest : public ::testing::Test {
protected:
class ActionsRecorder : public EmptySpecialActions {
public:
- void embed (const BoundingBox &bb) override {bbox.embed(bb);}
- double getX () const override {return -42;}
- double getY () const override {return 14;}
- bool defsEquals (const string &str) const {return defsString() == str;}
- bool pageEquals (const string &str) const {return pageString() == str;}
- bool bboxEquals (const string &str) const {return bbox.svgViewBoxString() == str;}
- string bboxString () const {return bbox.svgViewBoxString();}
- string defsString () const {return toString(svgTree().defsNode());}
- string pageString () const {return toString(svgTree().pageNode());}
+ void embed (const BoundingBox &bb) override {bbox.embed(bb);}
+ double getX () const override {return -42;}
+ double getY () const override {return 14;}
+ unsigned getCurrentPageNumber() const override {return 1;}
+ FilePath getSVGFilePath(unsigned pageno) const override {return FilePath("test.svg");}
+ bool defsEquals (const string &str) const {return defsString() == str;}
+ bool pageEquals (const string &str) const {return pageString() == str;}
+ bool bboxEquals (const string &str) const {return bbox.svgViewBoxString() == str;}
+ string bboxString () const {return bbox.svgViewBoxString();}
+ string defsString () const {return toString(svgTree().defsNode());}
+ string pageString () const {return toString(svgTree().pageNode());}
void clear () {
SpecialActions::svgTree().reset();
@@ -369,6 +371,14 @@ TEST_F(DvisvgmSpecialTest, processBBox) {
}
+TEST_F(DvisvgmSpecialTest, expandText) {
+ EXPECT_EQ(recorder.expandText(""), "");
+ EXPECT_EQ(recorder.expandText("static text"), "static text");
+ EXPECT_EQ(recorder.expandText("x={?x}, y={?y}"), "x=-42, y=14");
+ EXPECT_EQ(recorder.expandText("page:{?pageno}, file:{?svgfile}"), "page:1, file:test.svg");
+}
+
+
TEST_F(DvisvgmSpecialTest, fail4) {
std::istringstream iss("bbox abs 0 0 72.27xx 72.27"); // unknown unit
EXPECT_THROW(handler.process("", iss, recorder), SpecialException);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/EllipticalArcTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/EllipticalArcTest.cpp
index 7edd7666f6b..f08e3513e73 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/EllipticalArcTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/EllipticalArcTest.cpp
@@ -2,7 +2,7 @@
** EllipticalArcTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/EmSpecialTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/EmSpecialTest.cpp
index a2c12daeae7..3bde3cc2103 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/EmSpecialTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/EmSpecialTest.cpp
@@ -2,7 +2,7 @@
** EmSpecialTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FileFinderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FileFinderTest.cpp
index 95145fbb25a..fd9c9aeb5d7 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FileFinderTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FileFinderTest.cpp
@@ -2,7 +2,7 @@
** FileFinderTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FilePathTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FilePathTest.cpp
index 96ac6c85f8f..a2876ee02a6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FilePathTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FilePathTest.cpp
@@ -2,7 +2,7 @@
** FilePathTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FileSystemTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FileSystemTest.cpp
index 5e4f5059d6d..2952392af38 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FileSystemTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FileSystemTest.cpp
@@ -2,7 +2,7 @@
** FileSystemTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontCacheTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontCacheTest.cpp
index c53aed2841d..88d446454e2 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontCacheTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontCacheTest.cpp
@@ -2,7 +2,7 @@
** FontCacheTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontManagerTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontManagerTest.cpp
index c754f6be119..6d6eea6aef1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontManagerTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontManagerTest.cpp
@@ -2,7 +2,7 @@
** FontManagerTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontMapTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontMapTest.cpp
index 2ce66ac94c4..9ec3b7233a5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontMapTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/FontMapTest.cpp
@@ -2,7 +2,7 @@
** FontMapTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFGlyphTracerTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFGlyphTracerTest.cpp
index 5cf923bf197..74a8ed35a04 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFGlyphTracerTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFGlyphTracerTest.cpp
@@ -2,7 +2,7 @@
** GFGlyphTracerTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFReaderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFReaderTest.cpp
index 7baee9eed36..e23f079ff60 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFReaderTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/GFReaderTest.cpp
@@ -2,7 +2,7 @@
** GFReaderTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/GhostscriptTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/GhostscriptTest.cpp
index 2ae3991b603..411a3b5cb8d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/GhostscriptTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/GhostscriptTest.cpp
@@ -2,7 +2,7 @@
** GhostscriptTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/GraphicsPathParserTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/GraphicsPathParserTest.cpp
index 7de23c9374e..3d94790fdc9 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/GraphicsPathParserTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/GraphicsPathParserTest.cpp
@@ -2,7 +2,7 @@
** GraphicsPathParserTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -150,7 +150,20 @@ TEST(GraphicsPathParserTest, combined) {
}
-TEST(GraphicsPathParserTest, error) {
+TEST(GraphicsPathParserTest, floats) {
+ GraphicsPathParser<double> parser;
+ auto path = parser.parse("M10 10.1L20.2 50.3Q 100 100 -10.1 -10.2 Z C 10e-1 2e2 30 40 50 60Z");
+ ostringstream oss;
+ path.writeSVG(oss, false);
+ EXPECT_EQ(oss.str(), "M10 10.1L20.2 50.3Q100 100-10.1-10.2ZC1 200 30 40 50 60Z");
+ oss.str("");
+ path = parser.parse("m10 10.1l20.2 50.3q 100 100 -10.1 -10.2 z c 10 20 30 40 50 60 z");
+ path.writeSVG(oss, false);
+ EXPECT_EQ(oss.str(), "M10 10.1L30.2 60.4Q130.2 160.4 20.1 50.2ZC20 30.1 40 50.1 60 70.1Z");
+}
+
+
+TEST(GraphicsPathParserTest, error1) {
GraphicsPathParser<int> parser;
EXPECT_THROW(parser.parse("10 20"), GraphicsPathParserException); // missing command
EXPECT_THROW(parser.parse("M10 "), GraphicsPathParserException); // missing y-coordinate
@@ -161,3 +174,15 @@ TEST(GraphicsPathParserTest, error) {
EXPECT_THROW(parser.parse("A 10 20 45 2 0 100 100"), GraphicsPathParserException); // invalid large-arc-flag
EXPECT_THROW(parser.parse("A 10 20 45 0 5 100 100"), GraphicsPathParserException); // invalid sweep-flag
}
+
+
+TEST(GraphicsPathParserTest, error2) {
+ GraphicsPathParser<double> parser;
+ EXPECT_THROW(parser.parse("10 20"), GraphicsPathParserException); // missing command
+ EXPECT_THROW(parser.parse("M"), GraphicsPathParserException); // missing coordinates
+ EXPECT_THROW(parser.parse("M10.1 "), GraphicsPathParserException); // missing y-coordinate
+ EXPECT_THROW(parser.parse("M 10 20..5"), GraphicsPathParserException); // invalid double dots
+ EXPECT_THROW(parser.parse("M 10 20.5."), GraphicsPathParserException); // invalid trailing dot
+ EXPECT_THROW(parser.parse("M 10-20.1+"), GraphicsPathParserException); // invalid trailing plus
+ EXPECT_THROW(parser.parse("M.+10.20"), GraphicsPathParserException); // invalid plus after dot
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/GraphicsPathTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/GraphicsPathTest.cpp
index 973542984bf..ff1c12948e3 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/GraphicsPathTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/GraphicsPathTest.cpp
@@ -2,7 +2,7 @@
** GraphicsPathTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/HashFunctionTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/HashFunctionTest.cpp
index 7c2704c86c1..0cac1e9be3f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/HashFunctionTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/HashFunctionTest.cpp
@@ -2,7 +2,7 @@
** HashFunctionTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/JFMReaderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/JFMReaderTest.cpp
index 6ca10c7a837..a4f85b728fe 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/JFMReaderTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/JFMReaderTest.cpp
@@ -2,7 +2,7 @@
** JFMReaderTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -40,7 +40,8 @@ class JFMReaderTest : public ::testing::Test {
string fname = string(SRCDIR)+"/data/cidjmgr0-h.tfm";
ifstream ifs(fname, ios::binary);
ASSERT_TRUE(ifs.is_open()) << "failed opening " << fname;
- jfm = util::make_unique<JFM>(ifs);
+ jfm = util::make_unique<JFM>();
+ jfm->read(ifs);
}
protected:
@@ -51,8 +52,8 @@ class JFMReaderTest : public ::testing::Test {
TEST_F(JFMReaderTest, properties) {
EXPECT_EQ(jfm->getChecksum(), 0u);
EXPECT_FALSE(jfm->verticalLayout());
- EXPECT_EQ(jfm->firstChar(), 0);
- EXPECT_EQ(jfm->lastChar(), 1);
+ EXPECT_EQ(jfm->firstChar(), 0u);
+ EXPECT_EQ(jfm->lastChar(), 1u);
EXPECT_EQ(jfm->minChar(), 13143u);
EXPECT_EQ(jfm->maxChar(), 14696u);
EXPECT_DOUBLE_EQ(jfm->getDesignSize(), 10.0*72.0/72.27);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp
index c0f4f76041b..6ee6c3aab38 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/LengthTest.cpp
@@ -2,7 +2,7 @@
** LengthTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-src/tests/Makefile.am
index 3197481f7a5..81d28d2622c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/Makefile.am
@@ -1,5 +1,5 @@
## This file is part of dvisvgm
-## Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de>
+## Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de>
##
## Process this file with automake.
@@ -24,20 +24,13 @@ EXTRA_DIST = gtest/LICENSE \
include ../libs/defs.am
-LIBS_CFLAGS = $(XXHASH_CFLAGS)
-LIBS_LIBS = $(POTRACE_LIBS) $(XXHASH_LIBS)
+LIBS_CFLAGS = $(XXHASH_CFLAGS) -I$(dvisvgm_srcdir)/libs/md5
+LIBS_LIBS = $(POTRACE_LIBS) $(XXHASH_LIBS) ../libs/md5/libmd5.a
+
if ENABLE_WOFF
LIBS_LIBS += $(WOFF2_LIBS) $(BROTLI_LIBS)
endif
-if USE_BUNDLED_MD5
-LIBS_CFLAGS += -I$(dvisvgm_srcdir)/libs/md5
-LIBS_LIBS += ../libs/md5/libmd5.a
-else
-LIBS_CFLAGS += $(LIBCRYPTO_CFLAGS)
-LIBS_LIBS += $(LIBCRYPTO_LIBS)
-endif
-
AM_CXXFLAGS = -I$(dvisvgm_srcdir)/src -I$(dvisvgm_srcdir)/libs/variant/include \
-Wall -Wno-mismatched-tags \
-DBUILDDIR='"$(abs_builddir)"' -DSRCDIR='"$(abs_srcdir)"' \
@@ -253,6 +246,12 @@ MessageExceptionTest_SOURCES = MessageExceptionTest.cpp testutil.hpp
MessageExceptionTest_CPPFLAGS = -I$(dvisvgm_srcdir)/tests/gtest/include $(LIBS_CFLAGS)
MessageExceptionTest_LDADD = $(TESTLIBS)
+TESTS += OFMReaderTest
+check_PROGRAMS += OFMReaderTest
+OFMReaderTest_SOURCES = OFMReaderTest.cpp testutil.hpp
+OFMReaderTest_CPPFLAGS = -I$(dvisvgm_srcdir)/tests/gtest/include $(LIBS_CFLAGS)
+OFMReaderTest_LDADD = $(TESTLIBS)
+
TESTS += PageRagesTest
check_PROGRAMS += PageRagesTest
PageRagesTest_SOURCES = PageRagesTest.cpp testutil.hpp
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/tests/Makefile.in
index 05fd5a87b91..2222a330a5c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/Makefile.in
@@ -92,10 +92,6 @@ host_triplet = @host@
@HAVE_WOFF2_FALSE@am__append_3 = -I$(dvisvgm_srcdir)/libs/woff2/include
@HAVE_WOFF2_FALSE@am__append_4 = ../libs/woff2/libwoff2.a
@ENABLE_WOFF_TRUE@am__append_5 = $(WOFF2_LIBS) $(BROTLI_LIBS)
-@USE_BUNDLED_MD5_TRUE@am__append_6 = -I$(dvisvgm_srcdir)/libs/md5
-@USE_BUNDLED_MD5_TRUE@am__append_7 = ../libs/md5/libmd5.a
-@USE_BUNDLED_MD5_FALSE@am__append_8 = $(LIBCRYPTO_CFLAGS)
-@USE_BUNDLED_MD5_FALSE@am__append_9 = $(LIBCRYPTO_LIBS)
TESTS = hashcheck$(EXEEXT) BezierTest$(EXEEXT) BitmapTest$(EXEEXT) \
BoundingBoxTest$(EXEEXT) CalculatorTest$(EXEEXT) \
CMapManagerTest$(EXEEXT) CMapReaderTest$(EXEEXT) \
@@ -111,8 +107,8 @@ TESTS = hashcheck$(EXEEXT) BezierTest$(EXEEXT) BitmapTest$(EXEEXT) \
GraphicsPathParserTest$(EXEEXT) GraphicsPathTest$(EXEEXT) \
HashFunctionTest$(EXEEXT) JFMReaderTest$(EXEEXT) \
LengthTest$(EXEEXT) MapLineTest$(EXEEXT) MatrixTest$(EXEEXT) \
- MessageExceptionTest$(EXEEXT) PageRagesTest$(EXEEXT) \
- PageSizeTest$(EXEEXT) PairTest$(EXEEXT) \
+ MessageExceptionTest$(EXEEXT) OFMReaderTest$(EXEEXT) \
+ PageRagesTest$(EXEEXT) PageSizeTest$(EXEEXT) PairTest$(EXEEXT) \
PapersizeSpecialTest$(EXEEXT) PDFParserTest$(EXEEXT) \
PSInterpreterTest$(EXEEXT) RangeMapTest$(EXEEXT) \
ShadingPatchTest$(EXEEXT) SpecialManagerTest$(EXEEXT) \
@@ -142,8 +138,8 @@ check_PROGRAMS = hashcheck$(EXEEXT) BezierTest$(EXEEXT) \
GraphicsPathParserTest$(EXEEXT) GraphicsPathTest$(EXEEXT) \
HashFunctionTest$(EXEEXT) JFMReaderTest$(EXEEXT) \
LengthTest$(EXEEXT) MapLineTest$(EXEEXT) MatrixTest$(EXEEXT) \
- MessageExceptionTest$(EXEEXT) PageRagesTest$(EXEEXT) \
- PageSizeTest$(EXEEXT) PairTest$(EXEEXT) \
+ MessageExceptionTest$(EXEEXT) OFMReaderTest$(EXEEXT) \
+ PageRagesTest$(EXEEXT) PageSizeTest$(EXEEXT) PairTest$(EXEEXT) \
PapersizeSpecialTest$(EXEEXT) PDFParserTest$(EXEEXT) \
PSInterpreterTest$(EXEEXT) RangeMapTest$(EXEEXT) \
ShadingPatchTest$(EXEEXT) SpecialManagerTest$(EXEEXT) \
@@ -196,222 +192,223 @@ am__DEPENDENCIES_1 = $(am__append_4)
am__DEPENDENCIES_2 = $(am__append_2)
@ENABLE_WOFF_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) \
@ENABLE_WOFF_TRUE@ $(am__DEPENDENCIES_2)
-am__DEPENDENCIES_4 =
-@USE_BUNDLED_MD5_FALSE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_4)
-am__DEPENDENCIES_6 = $(POTRACE_LIBS) $(XXHASH_LIBS) \
- $(am__DEPENDENCIES_3) $(am__append_7) $(am__DEPENDENCIES_5)
-am__DEPENDENCIES_7 = libgtest.la ../src/libdvisvgm.la \
- $(am__DEPENDENCIES_6)
-BezierTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+am__DEPENDENCIES_4 = $(POTRACE_LIBS) $(XXHASH_LIBS) \
+ ../libs/md5/libmd5.a $(am__DEPENDENCIES_3)
+am__DEPENDENCIES_5 = libgtest.la ../src/libdvisvgm.la \
+ $(am__DEPENDENCIES_4)
+BezierTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_BitmapTest_OBJECTS = BitmapTest-BitmapTest.$(OBJEXT)
BitmapTest_OBJECTS = $(am_BitmapTest_OBJECTS)
-BitmapTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+BitmapTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_BoundingBoxTest_OBJECTS = \
BoundingBoxTest-BoundingBoxTest.$(OBJEXT)
BoundingBoxTest_OBJECTS = $(am_BoundingBoxTest_OBJECTS)
-BoundingBoxTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+BoundingBoxTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_CMapManagerTest_OBJECTS = \
CMapManagerTest-CMapManagerTest.$(OBJEXT)
CMapManagerTest_OBJECTS = $(am_CMapManagerTest_OBJECTS)
-CMapManagerTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+CMapManagerTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_CMapReaderTest_OBJECTS = CMapReaderTest-CMapReaderTest.$(OBJEXT)
CMapReaderTest_OBJECTS = $(am_CMapReaderTest_OBJECTS)
-CMapReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+CMapReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_CMapTest_OBJECTS = CMapTest-CMapTest.$(OBJEXT)
CMapTest_OBJECTS = $(am_CMapTest_OBJECTS)
-CMapTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+CMapTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_CalculatorTest_OBJECTS = CalculatorTest-CalculatorTest.$(OBJEXT)
CalculatorTest_OBJECTS = $(am_CalculatorTest_OBJECTS)
-CalculatorTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+CalculatorTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_ColorSpecialTest_OBJECTS = \
ColorSpecialTest-ColorSpecialTest.$(OBJEXT)
ColorSpecialTest_OBJECTS = $(am_ColorSpecialTest_OBJECTS)
-ColorSpecialTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+ColorSpecialTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_ColorTest_OBJECTS = ColorTest-ColorTest.$(OBJEXT)
ColorTest_OBJECTS = $(am_ColorTest_OBJECTS)
-ColorTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+ColorTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_CommandLineTest_OBJECTS = \
CommandLineTest-CommandLineTest.$(OBJEXT)
CommandLineTest_OBJECTS = $(am_CommandLineTest_OBJECTS)
-CommandLineTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+CommandLineTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_DVIReaderTest_OBJECTS = DVIReaderTest-DVIReaderTest.$(OBJEXT)
DVIReaderTest_OBJECTS = $(am_DVIReaderTest_OBJECTS)
-DVIReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+DVIReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_DependencyGraphTest_OBJECTS = \
DependencyGraphTest-DependencyGraphTest.$(OBJEXT)
DependencyGraphTest_OBJECTS = $(am_DependencyGraphTest_OBJECTS)
-DependencyGraphTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+DependencyGraphTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_DirectoryTest_OBJECTS = DirectoryTest-DirectoryTest.$(OBJEXT)
DirectoryTest_OBJECTS = $(am_DirectoryTest_OBJECTS)
-DirectoryTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+DirectoryTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_DvisvgmSpecialTest_OBJECTS = \
DvisvgmSpecialTest-DvisvgmSpecialTest.$(OBJEXT)
DvisvgmSpecialTest_OBJECTS = $(am_DvisvgmSpecialTest_OBJECTS)
-DvisvgmSpecialTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+DvisvgmSpecialTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_EllipticalArcTest_OBJECTS = \
EllipticalArcTest-EllipticalArcTest.$(OBJEXT)
EllipticalArcTest_OBJECTS = $(am_EllipticalArcTest_OBJECTS)
-EllipticalArcTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+EllipticalArcTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_EmSpecialTest_OBJECTS = EmSpecialTest-EmSpecialTest.$(OBJEXT)
EmSpecialTest_OBJECTS = $(am_EmSpecialTest_OBJECTS)
-EmSpecialTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+EmSpecialTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_FileFinderTest_OBJECTS = FileFinderTest-FileFinderTest.$(OBJEXT)
FileFinderTest_OBJECTS = $(am_FileFinderTest_OBJECTS)
-FileFinderTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+FileFinderTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_FilePathTest_OBJECTS = FilePathTest-FilePathTest.$(OBJEXT)
FilePathTest_OBJECTS = $(am_FilePathTest_OBJECTS)
-FilePathTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+FilePathTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_FileSystemTest_OBJECTS = FileSystemTest-FileSystemTest.$(OBJEXT)
FileSystemTest_OBJECTS = $(am_FileSystemTest_OBJECTS)
-FileSystemTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+FileSystemTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_FontCacheTest_OBJECTS = FontCacheTest-FontCacheTest.$(OBJEXT)
FontCacheTest_OBJECTS = $(am_FontCacheTest_OBJECTS)
-FontCacheTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+FontCacheTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_FontManagerTest_OBJECTS = \
FontManagerTest-FontManagerTest.$(OBJEXT)
FontManagerTest_OBJECTS = $(am_FontManagerTest_OBJECTS)
-FontManagerTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+FontManagerTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_FontMapTest_OBJECTS = FontMapTest-FontMapTest.$(OBJEXT)
FontMapTest_OBJECTS = $(am_FontMapTest_OBJECTS)
-FontMapTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+FontMapTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_GFGlyphTracerTest_OBJECTS = \
GFGlyphTracerTest-GFGlyphTracerTest.$(OBJEXT)
GFGlyphTracerTest_OBJECTS = $(am_GFGlyphTracerTest_OBJECTS)
-GFGlyphTracerTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+GFGlyphTracerTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_GFReaderTest_OBJECTS = GFReaderTest-GFReaderTest.$(OBJEXT)
GFReaderTest_OBJECTS = $(am_GFReaderTest_OBJECTS)
-GFReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+GFReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_GhostscriptTest_OBJECTS = \
GhostscriptTest-GhostscriptTest.$(OBJEXT)
GhostscriptTest_OBJECTS = $(am_GhostscriptTest_OBJECTS)
-GhostscriptTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+GhostscriptTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_GraphicsPathParserTest_OBJECTS = \
GraphicsPathParserTest-GraphicsPathParserTest.$(OBJEXT)
GraphicsPathParserTest_OBJECTS = $(am_GraphicsPathParserTest_OBJECTS)
-GraphicsPathParserTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+GraphicsPathParserTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_GraphicsPathTest_OBJECTS = \
GraphicsPathTest-GraphicsPathTest.$(OBJEXT)
GraphicsPathTest_OBJECTS = $(am_GraphicsPathTest_OBJECTS)
-GraphicsPathTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+GraphicsPathTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_HashFunctionTest_OBJECTS = \
HashFunctionTest-HashFunctionTest.$(OBJEXT)
HashFunctionTest_OBJECTS = $(am_HashFunctionTest_OBJECTS)
-HashFunctionTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+HashFunctionTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_JFMReaderTest_OBJECTS = JFMReaderTest-JFMReaderTest.$(OBJEXT)
JFMReaderTest_OBJECTS = $(am_JFMReaderTest_OBJECTS)
-JFMReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+JFMReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_LengthTest_OBJECTS = LengthTest-LengthTest.$(OBJEXT)
LengthTest_OBJECTS = $(am_LengthTest_OBJECTS)
-LengthTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+LengthTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_MapLineTest_OBJECTS = MapLineTest-MapLineTest.$(OBJEXT)
MapLineTest_OBJECTS = $(am_MapLineTest_OBJECTS)
-MapLineTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+MapLineTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_MatrixTest_OBJECTS = MatrixTest-MatrixTest.$(OBJEXT)
MatrixTest_OBJECTS = $(am_MatrixTest_OBJECTS)
-MatrixTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+MatrixTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_MessageExceptionTest_OBJECTS = \
MessageExceptionTest-MessageExceptionTest.$(OBJEXT)
MessageExceptionTest_OBJECTS = $(am_MessageExceptionTest_OBJECTS)
-MessageExceptionTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+MessageExceptionTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
+am_OFMReaderTest_OBJECTS = OFMReaderTest-OFMReaderTest.$(OBJEXT)
+OFMReaderTest_OBJECTS = $(am_OFMReaderTest_OBJECTS)
+OFMReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_PDFParserTest_OBJECTS = PDFParserTest-PDFParserTest.$(OBJEXT)
PDFParserTest_OBJECTS = $(am_PDFParserTest_OBJECTS)
-PDFParserTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+PDFParserTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_PSInterpreterTest_OBJECTS = \
PSInterpreterTest-PSInterpreterTest.$(OBJEXT)
PSInterpreterTest_OBJECTS = $(am_PSInterpreterTest_OBJECTS)
-PSInterpreterTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+PSInterpreterTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_PageRagesTest_OBJECTS = PageRagesTest-PageRagesTest.$(OBJEXT)
PageRagesTest_OBJECTS = $(am_PageRagesTest_OBJECTS)
-PageRagesTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+PageRagesTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_PageSizeTest_OBJECTS = PageSizeTest-PageSizeTest.$(OBJEXT)
PageSizeTest_OBJECTS = $(am_PageSizeTest_OBJECTS)
-PageSizeTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+PageSizeTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_PairTest_OBJECTS = PairTest-PairTest.$(OBJEXT)
PairTest_OBJECTS = $(am_PairTest_OBJECTS)
-PairTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+PairTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_PapersizeSpecialTest_OBJECTS = \
PapersizeSpecialTest-PapersizeSpecialTest.$(OBJEXT)
PapersizeSpecialTest_OBJECTS = $(am_PapersizeSpecialTest_OBJECTS)
-PapersizeSpecialTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+PapersizeSpecialTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_RangeMapTest_OBJECTS = RangeMapTest-RangeMapTest.$(OBJEXT)
RangeMapTest_OBJECTS = $(am_RangeMapTest_OBJECTS)
-RangeMapTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+RangeMapTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_SVGOutputTest_OBJECTS = SVGOutputTest-SVGOutputTest.$(OBJEXT)
SVGOutputTest_OBJECTS = $(am_SVGOutputTest_OBJECTS)
-SVGOutputTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+SVGOutputTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_ShadingPatchTest_OBJECTS = \
ShadingPatchTest-ShadingPatchTest.$(OBJEXT)
ShadingPatchTest_OBJECTS = $(am_ShadingPatchTest_OBJECTS)
-ShadingPatchTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+ShadingPatchTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_SpecialManagerTest_OBJECTS = \
SpecialManagerTest-SpecialManagerTest.$(OBJEXT)
SpecialManagerTest_OBJECTS = $(am_SpecialManagerTest_OBJECTS)
-SpecialManagerTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+SpecialManagerTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_SplittedCharInputBufferTest_OBJECTS = SplittedCharInputBufferTest-SplittedCharInputBufferTest.$(OBJEXT)
SplittedCharInputBufferTest_OBJECTS = \
$(am_SplittedCharInputBufferTest_OBJECTS)
-SplittedCharInputBufferTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+SplittedCharInputBufferTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_StreamInputBufferTest_OBJECTS = \
StreamInputBufferTest-StreamInputBufferTest.$(OBJEXT)
StreamInputBufferTest_OBJECTS = $(am_StreamInputBufferTest_OBJECTS)
-StreamInputBufferTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+StreamInputBufferTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_StreamReaderTest_OBJECTS = \
StreamReaderTest-StreamReaderTest.$(OBJEXT)
StreamReaderTest_OBJECTS = $(am_StreamReaderTest_OBJECTS)
-StreamReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+StreamReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_StreamWriterTest_OBJECTS = \
StreamWriterTest-StreamWriterTest.$(OBJEXT)
StreamWriterTest_OBJECTS = $(am_StreamWriterTest_OBJECTS)
-StreamWriterTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+StreamWriterTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_StringMatcherTest_OBJECTS = \
StringMatcherTest-StringMatcherTest.$(OBJEXT)
StringMatcherTest_OBJECTS = $(am_StringMatcherTest_OBJECTS)
-StringMatcherTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+StringMatcherTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_SubfontTest_OBJECTS = SubfontTest-SubfontTest.$(OBJEXT)
SubfontTest_OBJECTS = $(am_SubfontTest_OBJECTS)
-SubfontTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+SubfontTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_TFMReaderTest_OBJECTS = TFMReaderTest-TFMReaderTest.$(OBJEXT)
TFMReaderTest_OBJECTS = $(am_TFMReaderTest_OBJECTS)
-TFMReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+TFMReaderTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_TensorProductPatchTest_OBJECTS = \
TensorProductPatchTest-TensorProductPatchTest.$(OBJEXT)
TensorProductPatchTest_OBJECTS = $(am_TensorProductPatchTest_OBJECTS)
-TensorProductPatchTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+TensorProductPatchTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_ToUnicodeMapTest_OBJECTS = \
ToUnicodeMapTest-ToUnicodeMapTest.$(OBJEXT)
ToUnicodeMapTest_OBJECTS = $(am_ToUnicodeMapTest_OBJECTS)
-ToUnicodeMapTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+ToUnicodeMapTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_TpicSpecialTest_OBJECTS = \
TpicSpecialTest-TpicSpecialTest.$(OBJEXT)
TpicSpecialTest_OBJECTS = $(am_TpicSpecialTest_OBJECTS)
-TpicSpecialTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+TpicSpecialTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_TriangularPatchTest_OBJECTS = \
TriangularPatchTest-TriangularPatchTest.$(OBJEXT)
TriangularPatchTest_OBJECTS = $(am_TriangularPatchTest_OBJECTS)
-TriangularPatchTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+TriangularPatchTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_UnicodeTest_OBJECTS = UnicodeTest-UnicodeTest.$(OBJEXT)
UnicodeTest_OBJECTS = $(am_UnicodeTest_OBJECTS)
-UnicodeTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+UnicodeTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_UtilityTest_OBJECTS = UtilityTest-UtilityTest.$(OBJEXT)
UtilityTest_OBJECTS = $(am_UtilityTest_OBJECTS)
-UtilityTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+UtilityTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_VectorIteratorTest_OBJECTS = \
VectorIteratorTest-VectorIteratorTest.$(OBJEXT)
VectorIteratorTest_OBJECTS = $(am_VectorIteratorTest_OBJECTS)
-VectorIteratorTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+VectorIteratorTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_VectorStreamTest_OBJECTS = \
VectorStreamTest-VectorStreamTest.$(OBJEXT)
VectorStreamTest_OBJECTS = $(am_VectorStreamTest_OBJECTS)
-VectorStreamTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+VectorStreamTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_XMLNodeTest_OBJECTS = XMLNodeTest-XMLNodeTest.$(OBJEXT)
XMLNodeTest_OBJECTS = $(am_XMLNodeTest_OBJECTS)
-XMLNodeTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+XMLNodeTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
am_XMLStringTest_OBJECTS = XMLStringTest-XMLStringTest.$(OBJEXT)
XMLStringTest_OBJECTS = $(am_XMLStringTest_OBJECTS)
-XMLStringTest_DEPENDENCIES = $(am__DEPENDENCIES_7)
+XMLStringTest_DEPENDENCIES = $(am__DEPENDENCIES_5)
nodist_hashcheck_OBJECTS = hashcheck-hashcheck.$(OBJEXT)
hashcheck_OBJECTS = $(nodist_hashcheck_OBJECTS)
-hashcheck_DEPENDENCIES = $(am__DEPENDENCIES_6)
+hashcheck_DEPENDENCIES = $(am__DEPENDENCIES_4)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -460,6 +457,7 @@ am__depfiles_remade = ./$(DEPDIR)/BezierTest-BezierTest.Po \
./$(DEPDIR)/MapLineTest-MapLineTest.Po \
./$(DEPDIR)/MatrixTest-MatrixTest.Po \
./$(DEPDIR)/MessageExceptionTest-MessageExceptionTest.Po \
+ ./$(DEPDIR)/OFMReaderTest-OFMReaderTest.Po \
./$(DEPDIR)/PDFParserTest-PDFParserTest.Po \
./$(DEPDIR)/PSInterpreterTest-PSInterpreterTest.Po \
./$(DEPDIR)/PageRagesTest-PageRagesTest.Po \
@@ -544,11 +542,12 @@ SOURCES = $(libgtest_la_SOURCES) $(BezierTest_SOURCES) \
$(HashFunctionTest_SOURCES) $(JFMReaderTest_SOURCES) \
$(LengthTest_SOURCES) $(MapLineTest_SOURCES) \
$(MatrixTest_SOURCES) $(MessageExceptionTest_SOURCES) \
- $(PDFParserTest_SOURCES) $(PSInterpreterTest_SOURCES) \
- $(PageRagesTest_SOURCES) $(PageSizeTest_SOURCES) \
- $(PairTest_SOURCES) $(PapersizeSpecialTest_SOURCES) \
- $(RangeMapTest_SOURCES) $(SVGOutputTest_SOURCES) \
- $(ShadingPatchTest_SOURCES) $(SpecialManagerTest_SOURCES) \
+ $(OFMReaderTest_SOURCES) $(PDFParserTest_SOURCES) \
+ $(PSInterpreterTest_SOURCES) $(PageRagesTest_SOURCES) \
+ $(PageSizeTest_SOURCES) $(PairTest_SOURCES) \
+ $(PapersizeSpecialTest_SOURCES) $(RangeMapTest_SOURCES) \
+ $(SVGOutputTest_SOURCES) $(ShadingPatchTest_SOURCES) \
+ $(SpecialManagerTest_SOURCES) \
$(SplittedCharInputBufferTest_SOURCES) \
$(StreamInputBufferTest_SOURCES) $(StreamReaderTest_SOURCES) \
$(StreamWriterTest_SOURCES) $(StringMatcherTest_SOURCES) \
@@ -576,11 +575,12 @@ DIST_SOURCES = $(libgtest_la_SOURCES) $(BezierTest_SOURCES) \
$(HashFunctionTest_SOURCES) $(JFMReaderTest_SOURCES) \
$(LengthTest_SOURCES) $(MapLineTest_SOURCES) \
$(MatrixTest_SOURCES) $(MessageExceptionTest_SOURCES) \
- $(PDFParserTest_SOURCES) $(PSInterpreterTest_SOURCES) \
- $(PageRagesTest_SOURCES) $(PageSizeTest_SOURCES) \
- $(PairTest_SOURCES) $(PapersizeSpecialTest_SOURCES) \
- $(RangeMapTest_SOURCES) $(SVGOutputTest_SOURCES) \
- $(ShadingPatchTest_SOURCES) $(SpecialManagerTest_SOURCES) \
+ $(OFMReaderTest_SOURCES) $(PDFParserTest_SOURCES) \
+ $(PSInterpreterTest_SOURCES) $(PageRagesTest_SOURCES) \
+ $(PageSizeTest_SOURCES) $(PairTest_SOURCES) \
+ $(PapersizeSpecialTest_SOURCES) $(RangeMapTest_SOURCES) \
+ $(SVGOutputTest_SOURCES) $(ShadingPatchTest_SOURCES) \
+ $(SpecialManagerTest_SOURCES) \
$(SplittedCharInputBufferTest_SOURCES) \
$(StreamInputBufferTest_SOURCES) $(StreamReaderTest_SOURCES) \
$(StreamWriterTest_SOURCES) $(StringMatcherTest_SOURCES) \
@@ -921,8 +921,6 @@ KPSE_LIBS = @KPSE_LIBS@
LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCRYPTO_CFLAGS = @LIBCRYPTO_CFLAGS@
-LIBCRYPTO_LIBS = @LIBCRYPTO_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@@ -1037,9 +1035,9 @@ EXTRA_DIST = gtest/LICENSE gtest/include gtest/src/gtest.cc \
@HAVE_POTRACE_FALSE@POTRACE_LIBS = ../libs/potrace/libpotrace.a
@HAVE_XXHASH_FALSE@XXHASH_CFLAGS = -I$(dvisvgm_srcdir)/libs/xxHash
@HAVE_XXHASH_FALSE@XXHASH_LIBS = ../libs/xxHash/libxxhash.a
-LIBS_CFLAGS = $(XXHASH_CFLAGS) $(am__append_6) $(am__append_8)
-LIBS_LIBS = $(POTRACE_LIBS) $(XXHASH_LIBS) $(am__append_5) \
- $(am__append_7) $(am__append_9)
+LIBS_CFLAGS = $(XXHASH_CFLAGS) -I$(dvisvgm_srcdir)/libs/md5
+LIBS_LIBS = $(POTRACE_LIBS) $(XXHASH_LIBS) ../libs/md5/libmd5.a \
+ $(am__append_5)
AM_CXXFLAGS = -I$(dvisvgm_srcdir)/src -I$(dvisvgm_srcdir)/libs/variant/include \
-Wall -Wno-mismatched-tags \
-DBUILDDIR='"$(abs_builddir)"' -DSRCDIR='"$(abs_srcdir)"' \
@@ -1149,6 +1147,9 @@ MatrixTest_LDADD = $(TESTLIBS)
MessageExceptionTest_SOURCES = MessageExceptionTest.cpp testutil.hpp
MessageExceptionTest_CPPFLAGS = -I$(dvisvgm_srcdir)/tests/gtest/include $(LIBS_CFLAGS)
MessageExceptionTest_LDADD = $(TESTLIBS)
+OFMReaderTest_SOURCES = OFMReaderTest.cpp testutil.hpp
+OFMReaderTest_CPPFLAGS = -I$(dvisvgm_srcdir)/tests/gtest/include $(LIBS_CFLAGS)
+OFMReaderTest_LDADD = $(TESTLIBS)
PageRagesTest_SOURCES = PageRagesTest.cpp testutil.hpp
PageRagesTest_CPPFLAGS = -I$(dvisvgm_srcdir)/tests/gtest/include $(LIBS_CFLAGS)
PageRagesTest_LDADD = $(TESTLIBS)
@@ -1429,6 +1430,10 @@ MessageExceptionTest$(EXEEXT): $(MessageExceptionTest_OBJECTS) $(MessageExceptio
@rm -f MessageExceptionTest$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(MessageExceptionTest_OBJECTS) $(MessageExceptionTest_LDADD) $(LIBS)
+OFMReaderTest$(EXEEXT): $(OFMReaderTest_OBJECTS) $(OFMReaderTest_DEPENDENCIES) $(EXTRA_OFMReaderTest_DEPENDENCIES)
+ @rm -f OFMReaderTest$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(OFMReaderTest_OBJECTS) $(OFMReaderTest_LDADD) $(LIBS)
+
PDFParserTest$(EXEEXT): $(PDFParserTest_OBJECTS) $(PDFParserTest_DEPENDENCIES) $(EXTRA_PDFParserTest_DEPENDENCIES)
@rm -f PDFParserTest$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(PDFParserTest_OBJECTS) $(PDFParserTest_LDADD) $(LIBS)
@@ -1582,6 +1587,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MapLineTest-MapLineTest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MatrixTest-MatrixTest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageExceptionTest-MessageExceptionTest.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OFMReaderTest-OFMReaderTest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PDFParserTest-PDFParserTest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PSInterpreterTest-PSInterpreterTest.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PageRagesTest-PageRagesTest.Po@am__quote@ # am--include-marker
@@ -2119,6 +2125,20 @@ MessageExceptionTest-MessageExceptionTest.obj: MessageExceptionTest.cpp
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(MessageExceptionTest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MessageExceptionTest-MessageExceptionTest.obj `if test -f 'MessageExceptionTest.cpp'; then $(CYGPATH_W) 'MessageExceptionTest.cpp'; else $(CYGPATH_W) '$(srcdir)/MessageExceptionTest.cpp'; fi`
+OFMReaderTest-OFMReaderTest.o: OFMReaderTest.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(OFMReaderTest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT OFMReaderTest-OFMReaderTest.o -MD -MP -MF $(DEPDIR)/OFMReaderTest-OFMReaderTest.Tpo -c -o OFMReaderTest-OFMReaderTest.o `test -f 'OFMReaderTest.cpp' || echo '$(srcdir)/'`OFMReaderTest.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/OFMReaderTest-OFMReaderTest.Tpo $(DEPDIR)/OFMReaderTest-OFMReaderTest.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='OFMReaderTest.cpp' object='OFMReaderTest-OFMReaderTest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(OFMReaderTest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o OFMReaderTest-OFMReaderTest.o `test -f 'OFMReaderTest.cpp' || echo '$(srcdir)/'`OFMReaderTest.cpp
+
+OFMReaderTest-OFMReaderTest.obj: OFMReaderTest.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(OFMReaderTest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT OFMReaderTest-OFMReaderTest.obj -MD -MP -MF $(DEPDIR)/OFMReaderTest-OFMReaderTest.Tpo -c -o OFMReaderTest-OFMReaderTest.obj `if test -f 'OFMReaderTest.cpp'; then $(CYGPATH_W) 'OFMReaderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/OFMReaderTest.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/OFMReaderTest-OFMReaderTest.Tpo $(DEPDIR)/OFMReaderTest-OFMReaderTest.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='OFMReaderTest.cpp' object='OFMReaderTest-OFMReaderTest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(OFMReaderTest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o OFMReaderTest-OFMReaderTest.obj `if test -f 'OFMReaderTest.cpp'; then $(CYGPATH_W) 'OFMReaderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/OFMReaderTest.cpp'; fi`
+
PDFParserTest-PDFParserTest.o: PDFParserTest.cpp
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(PDFParserTest_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PDFParserTest-PDFParserTest.o -MD -MP -MF $(DEPDIR)/PDFParserTest-PDFParserTest.Tpo -c -o PDFParserTest-PDFParserTest.o `test -f 'PDFParserTest.cpp' || echo '$(srcdir)/'`PDFParserTest.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/PDFParserTest-PDFParserTest.Tpo $(DEPDIR)/PDFParserTest-PDFParserTest.Po
@@ -3020,6 +3040,13 @@ MessageExceptionTest.log: MessageExceptionTest$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+OFMReaderTest.log: OFMReaderTest$(EXEEXT)
+ @p='OFMReaderTest$(EXEEXT)'; \
+ b='OFMReaderTest'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
PageRagesTest.log: PageRagesTest$(EXEEXT)
@p='PageRagesTest$(EXEEXT)'; \
b='PageRagesTest'; \
@@ -3370,6 +3397,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/MapLineTest-MapLineTest.Po
-rm -f ./$(DEPDIR)/MatrixTest-MatrixTest.Po
-rm -f ./$(DEPDIR)/MessageExceptionTest-MessageExceptionTest.Po
+ -rm -f ./$(DEPDIR)/OFMReaderTest-OFMReaderTest.Po
-rm -f ./$(DEPDIR)/PDFParserTest-PDFParserTest.Po
-rm -f ./$(DEPDIR)/PSInterpreterTest-PSInterpreterTest.Po
-rm -f ./$(DEPDIR)/PageRagesTest-PageRagesTest.Po
@@ -3478,6 +3506,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/MapLineTest-MapLineTest.Po
-rm -f ./$(DEPDIR)/MatrixTest-MatrixTest.Po
-rm -f ./$(DEPDIR)/MessageExceptionTest-MessageExceptionTest.Po
+ -rm -f ./$(DEPDIR)/OFMReaderTest-OFMReaderTest.Po
-rm -f ./$(DEPDIR)/PDFParserTest-PDFParserTest.Po
-rm -f ./$(DEPDIR)/PSInterpreterTest-PSInterpreterTest.Po
-rm -f ./$(DEPDIR)/PageRagesTest-PageRagesTest.Po
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/MapLineTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/MapLineTest.cpp
index b38f2742815..71d035658d1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/MapLineTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/MapLineTest.cpp
@@ -2,7 +2,7 @@
** MapLineTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/MatrixTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/MatrixTest.cpp
index 3ff8257b436..b5a8fdc3fdc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/MatrixTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/MatrixTest.cpp
@@ -2,7 +2,7 @@
** MatrixTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/MessageExceptionTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/MessageExceptionTest.cpp
index 4de260b2723..8ec162c414d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/MessageExceptionTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/MessageExceptionTest.cpp
@@ -2,7 +2,7 @@
** MessageExceptionTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/OFMReaderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/OFMReaderTest.cpp
new file mode 100644
index 00000000000..231d411caea
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/OFMReaderTest.cpp
@@ -0,0 +1,128 @@
+/*************************************************************************
+** OFMReaderTest.cpp **
+** **
+** This file is part of dvisvgm -- a fast DVI to SVG converter **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
+** **
+** This program is free software; you can redistribute it and/or **
+** modify it under the terms of the GNU General Public License as **
+** published by the Free Software Foundation; either version 3 of **
+** the License, or (at your option) any later version. **
+** **
+** This program is distributed in the hope that it will be useful, but **
+** WITHOUT ANY WARRANTY; without even the implied warranty of **
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the **
+** GNU General Public License for more details. **
+** **
+** You should have received a copy of the GNU General Public License **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+*************************************************************************/
+
+#include <gtest/gtest.h>
+#include <fstream>
+#include <string>
+#include <vector>
+#include "Length.hpp"
+#include "OFM.hpp"
+
+#ifndef SRCDIR
+#define SRCDIR "."
+#endif
+
+using namespace std;
+
+
+class OFMReaderTest : public ::testing::Test {
+ public:
+ void SetUp () override {
+ string fname = string(SRCDIR)+"/data/omarab.ofm";
+ ifstream ifs(fname, ios::binary);
+ ASSERT_TRUE(ifs.is_open()) << "failed to open " << fname;
+ ofm0.read(ifs);
+ scale0 = ofm0.getDesignSize();
+ ifs.close();
+
+ fname = string(SRCDIR)+"/data/upjf-g.ofm";
+ ifs.open(fname, ios::binary);
+ ASSERT_TRUE(ifs.is_open()) << "failed to open " << fname;
+ ofm1.read(ifs);
+ scale1 = ofm1.getDesignSize();
+ }
+
+ protected:
+ OFM0 ofm0;
+ OFM1 ofm1;
+ double scale0=0, scale1=0;
+};
+
+
+TEST_F(OFMReaderTest, properties) {
+ EXPECT_EQ(ofm0.getChecksum(), 0x9DCC4880u);
+ EXPECT_FALSE(ofm0.verticalLayout());
+ EXPECT_EQ(ofm0.firstChar(), 0x21u);
+ EXPECT_EQ(ofm0.lastChar(), 0x059Fu);
+ EXPECT_NEAR(ofm0.getDesignSize(), 10.0*Length::pt2bp, 0.000001);
+
+ EXPECT_EQ(ofm1.getChecksum(), 0u);
+ EXPECT_FALSE(ofm1.verticalLayout());
+ EXPECT_EQ(ofm1.firstChar(), 0x2600u);
+ EXPECT_EQ(ofm1.lastChar(), 0xFFFFu);
+ EXPECT_NEAR(ofm1.getDesignSize(), 10.0*Length::pt2bp, 0.000001);
+}
+
+
+TEST_F(OFMReaderTest, charWidth) {
+ EXPECT_NEAR(ofm0.getCharWidth(0x029D), 0.853*scale0, 0.0001);
+ EXPECT_NEAR(ofm0.getCharWidth(0x02A0), 0.444*scale0, 0.0001);
+ EXPECT_NEAR(ofm0.getCharWidth(0x1000), 0, 0.0001);
+
+ EXPECT_NEAR(ofm1.getCharWidth(0x2600), 1.0*scale1, 0.0001);
+ EXPECT_NEAR(ofm1.getCharWidth(0xFF00), 0.5*scale1, 0.0001);
+ EXPECT_NEAR(ofm1.getCharWidth(0xFF01), 0.5*scale1, 0.0001);
+}
+
+
+TEST_F(OFMReaderTest, charHeight) {
+ EXPECT_NEAR(ofm0.getCharHeight(0x029D), 0.298*scale0, 0.0001);
+ EXPECT_NEAR(ofm0.getCharHeight(0x02A0), 0.685*scale0, 0.0001);
+ EXPECT_DOUBLE_EQ(ofm0.getCharHeight(0x1000), 0);
+
+ EXPECT_NEAR(ofm1.getCharHeight(0x2600), 0.9*scale1, 0.0001);
+ EXPECT_NEAR(ofm1.getCharHeight(0xFF00), 0.9*scale1, 0.0001);
+ EXPECT_NEAR(ofm1.getCharHeight(0xFF01), 0.9*scale1, 0.0001);
+}
+
+
+TEST_F(OFMReaderTest, charDepth) {
+ EXPECT_NEAR(ofm0.getCharDepth(0x029D), 0.3*scale0, 0.0001);
+ EXPECT_NEAR(ofm0.getCharDepth(0x02A0), 0, 0.0001);
+ EXPECT_NEAR(ofm0.getCharDepth(0x1000), 0, 0.0001);
+
+ EXPECT_NEAR(ofm1.getCharDepth(0x2600), 0.1*scale1, 0.0001);
+ EXPECT_NEAR(ofm1.getCharDepth(0xFF00), 0.1*scale1, 0.0001);
+ EXPECT_NEAR(ofm1.getCharDepth(0xFF01), 0.1*scale1, 0.0001);
+}
+
+
+TEST_F(OFMReaderTest, italicCorr) {
+ EXPECT_DOUBLE_EQ(ofm0.getItalicCorr(0x029D), 0);
+ EXPECT_DOUBLE_EQ(ofm0.getItalicCorr(0x02A0), 0);
+ EXPECT_DOUBLE_EQ(ofm0.getItalicCorr(0x1000), 0);
+
+ EXPECT_DOUBLE_EQ(ofm1.getItalicCorr(0x2600), 0);
+ EXPECT_DOUBLE_EQ(ofm1.getItalicCorr(0xFF00), 0);
+ EXPECT_DOUBLE_EQ(ofm1.getItalicCorr(0xFF01), 0);
+}
+
+
+TEST_F(OFMReaderTest, params) {
+ EXPECT_NEAR(ofm0.getSpace(), 0.5*scale0, 0.0001);
+ EXPECT_NEAR(ofm0.getSpaceShrink(), 0.1*scale0, 0.0001);
+ EXPECT_NEAR(ofm0.getSpaceStretch(), 0.3*scale0, 0.0001);
+ EXPECT_NEAR(ofm0.getQuad(), 1.0*scale0, 0.0001);
+
+ EXPECT_NEAR(ofm1.getSpace(), 0, 0.0001);
+ EXPECT_NEAR(ofm1.getSpaceShrink(), 0, 0.0001);
+ EXPECT_NEAR(ofm1.getSpaceStretch(), 0.1*scale1, 0.0001);
+ EXPECT_NEAR(ofm1.getQuad(), 1.0*scale1, 0.0001);
+}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PDFParserTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PDFParserTest.cpp
index 555ced406d0..feb977f8185 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PDFParserTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PDFParserTest.cpp
@@ -2,7 +2,7 @@
** PDFParserTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PSInterpreterTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PSInterpreterTest.cpp
index 76f27af3a99..28c75a74513 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PSInterpreterTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PSInterpreterTest.cpp
@@ -2,7 +2,7 @@
** PSInterpreterTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PageRagesTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PageRagesTest.cpp
index 465c806a481..8e1b3f45142 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PageRagesTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PageRagesTest.cpp
@@ -2,7 +2,7 @@
** PageRagesTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PageSizeTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PageSizeTest.cpp
index cb69f76a289..d53af5196ca 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PageSizeTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PageSizeTest.cpp
@@ -2,7 +2,7 @@
** PageSizeTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PairTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PairTest.cpp
index a5c9b8f896a..7aac710db86 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PairTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PairTest.cpp
@@ -2,7 +2,7 @@
** PairTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PapersizeSpecialTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PapersizeSpecialTest.cpp
index 9f49f935be8..41e31889d58 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/PapersizeSpecialTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/PapersizeSpecialTest.cpp
@@ -2,7 +2,7 @@
** PapersizeSpecialTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/RangeMapTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/RangeMapTest.cpp
index 25701fcd6f7..1409071bd45 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/RangeMapTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/RangeMapTest.cpp
@@ -2,7 +2,7 @@
** RangeMapTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/SVGOutputTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/SVGOutputTest.cpp
index 9ea39e63118..ee3f8b984ae 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/SVGOutputTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/SVGOutputTest.cpp
@@ -2,7 +2,7 @@
** SVGOutputTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/ShadingPatchTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/ShadingPatchTest.cpp
index 8d79ba5a4f4..31ed9cd5c1c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/ShadingPatchTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/ShadingPatchTest.cpp
@@ -2,7 +2,7 @@
** ShadingPatchTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/SpecialManagerTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/SpecialManagerTest.cpp
index a425029c74c..99439feb85b 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/SpecialManagerTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/SpecialManagerTest.cpp
@@ -2,7 +2,7 @@
** SpecialManagerTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/SplittedCharInputBufferTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/SplittedCharInputBufferTest.cpp
index de393100e21..7ad96f2ed8f 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/SplittedCharInputBufferTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/SplittedCharInputBufferTest.cpp
@@ -2,7 +2,7 @@
** SplittedCharInputBufferTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamInputBufferTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamInputBufferTest.cpp
index 428c50f9458..bbc03c7f3d0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamInputBufferTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamInputBufferTest.cpp
@@ -2,7 +2,7 @@
** StreamInputBufferTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamReaderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamReaderTest.cpp
index c1ed3b60bcb..01ab6f4a1c8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamReaderTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamReaderTest.cpp
@@ -2,7 +2,7 @@
** StreamReaderTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamWriterTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamWriterTest.cpp
index 931ca040956..a16fbfc6f4d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamWriterTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/StreamWriterTest.cpp
@@ -2,7 +2,7 @@
** StreamWriterTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/StringMatcherTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/StringMatcherTest.cpp
index 5383595fc5c..b15ec1ff9b5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/StringMatcherTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/StringMatcherTest.cpp
@@ -2,7 +2,7 @@
** StringMatcherTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/SubfontTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/SubfontTest.cpp
index 1a43465cfb6..b9dd448ac75 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/SubfontTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/SubfontTest.cpp
@@ -2,7 +2,7 @@
** SubfontTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/TFMReaderTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/TFMReaderTest.cpp
index 40d40e29675..3e6b9011e48 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/TFMReaderTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/TFMReaderTest.cpp
@@ -2,7 +2,7 @@
** TFMReaderTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -40,7 +40,8 @@ class TFMReaderTest : public ::testing::Test {
string fname = string(SRCDIR)+"/data/cmr10.tfm";
ifstream ifs(fname, ios::binary);
ASSERT_TRUE(ifs.is_open()) << "failed opening " << fname;
- tfm = util::make_unique<TFM>(ifs);
+ tfm = util::make_unique<TFM>();
+ tfm->read(ifs);
}
protected:
@@ -52,8 +53,8 @@ TEST_F(TFMReaderTest, properties) {
ASSERT_NE(tfm, nullptr);
EXPECT_EQ(tfm->getChecksum(), 0x4BF16079u);
EXPECT_FALSE(tfm->verticalLayout());
- EXPECT_EQ(tfm->firstChar(), 0);
- EXPECT_EQ(tfm->lastChar(), 127);
+ EXPECT_EQ(tfm->firstChar(), 0u);
+ EXPECT_EQ(tfm->lastChar(), 127u);
EXPECT_DOUBLE_EQ(tfm->getDesignSize(), 10.0*72.0/72.27);
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/TensorProductPatchTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/TensorProductPatchTest.cpp
index 3381d46d7f7..accff638bb4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/TensorProductPatchTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/TensorProductPatchTest.cpp
@@ -2,7 +2,7 @@
** TensorProductPatchTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/ToUnicodeMapTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/ToUnicodeMapTest.cpp
index 2cc49e2b3ec..f0eee80dc9e 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/ToUnicodeMapTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/ToUnicodeMapTest.cpp
@@ -2,7 +2,7 @@
** ToUnicodeMapTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/TpicSpecialTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/TpicSpecialTest.cpp
index 04f112792a7..66cccbd3798 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/TpicSpecialTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/TpicSpecialTest.cpp
@@ -2,7 +2,7 @@
** TpicSpecialTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/TriangularPatchTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/TriangularPatchTest.cpp
index 068a2806811..6ed87f5d7e6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/TriangularPatchTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/TriangularPatchTest.cpp
@@ -2,7 +2,7 @@
** TriangularPatchTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/UnicodeTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/UnicodeTest.cpp
index c5429810f4a..cad32eee521 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/UnicodeTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/UnicodeTest.cpp
@@ -2,7 +2,7 @@
** UnicodeTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/UtilityTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/UtilityTest.cpp
index 4c920e417cf..8a1d138d8fc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/UtilityTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/UtilityTest.cpp
@@ -2,7 +2,7 @@
** UtilityTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -80,6 +80,9 @@ TEST(UtilityTest, split) {
ASSERT_EQ(parts.size(), 1u);
EXPECT_EQ(parts[0], "");
+ parts = split("", ",", true);
+ ASSERT_EQ(parts.size(), 0u);
+
parts = split("abcde", "");
ASSERT_EQ(parts.size(), 1u);
EXPECT_EQ(parts[0], "abcde");
@@ -188,3 +191,38 @@ TEST(UtilityTest, ilog2) {
EXPECT_EQ(ilog2(uint32_t(0xffffffff >> i)), 31-i);
}
}
+
+
+TEST(UtilityTest, read_double) {
+ istringstream iss("123 -456 .123 -.456 0.123 -0.456 +123.456 -123.456 10e-3 -1e-3 4.5e2 1.23e-3 2.30.4");
+ double value=0;
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, 123.0, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, -456.0, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, .123, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, -.456, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, .123, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, -.456, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, 123.456, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, -123.456, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, 10e-3, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, -1e-3, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, 4.5e2, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, 1.23e-3, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, 2.3, 0.000001);
+ EXPECT_TRUE(util::read_double(iss, value));
+ EXPECT_NEAR(value, .4, 0.000001);
+ EXPECT_FALSE(util::read_double(iss, value)); // eof, no further characters to read
+} \ No newline at end of file
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/VectorIteratorTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/VectorIteratorTest.cpp
index 45d54e245db..cbe02e2658c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/VectorIteratorTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/VectorIteratorTest.cpp
@@ -2,7 +2,7 @@
** VectorIteratorTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/VectorStreamTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/VectorStreamTest.cpp
index 497b3266eb9..794336ec2d4 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/VectorStreamTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/VectorStreamTest.cpp
@@ -2,7 +2,7 @@
** VectorStreamTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/XMLNodeTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/XMLNodeTest.cpp
index bc65c681b08..33105fd37f5 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/XMLNodeTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/XMLNodeTest.cpp
@@ -2,7 +2,7 @@
** XMLNodeTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/XMLStringTest.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/XMLStringTest.cpp
index 65944573f72..09758dc9e4d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/XMLStringTest.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/XMLStringTest.cpp
@@ -2,7 +2,7 @@
** XMLStringTest.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/check-conv b/Build/source/texk/dvisvgm/dvisvgm-src/tests/check-conv
index 89ba4fd9b53..5c352e68f17 100755
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/check-conv
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/check-conv
@@ -2,7 +2,7 @@
# This file is part of the dvisvgm package and published under the
# terms of the GNU General Public License version 3 or later.
# See file COPYING for further details.
-# Copyright (C) 2009-2023 Martin Gieseking <martin.gieseking@uos.de>
+# Copyright (C) 2009-2024 Martin Gieseking <martin.gieseking@uos.de>
files=(sample frktest)
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/Makefile.am b/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/Makefile.am
index 52caa64fef1..60e79bca814 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/Makefile.am
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/Makefile.am
@@ -1,5 +1,5 @@
## This file is part of dvisvgm
-## Copyright (C) 2016-2023 Martin Gieseking <martin.gieseking@uos.de>
+## Copyright (C) 2016-2024 Martin Gieseking <martin.gieseking@uos.de>
##
## Process this file with automake.
@@ -14,11 +14,13 @@ EXTRA_DIST = \
frktest-nf-cmp.svg \
frktest-wf-cmp.svg \
lmmono12-regular.otf \
+ omarab.ofm \
+ ot1.cmap \
sample.dvi \
sample-nf-cmp.svg \
sample.sfd \
sample-wf-cmp.svg \
sample_v2.dvi \
sample_v3.dvi \
- ot1.cmap
+ upjf-g.ofm
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/Makefile.in b/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/Makefile.in
index 944d2376915..95e477202fc 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/Makefile.in
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/Makefile.in
@@ -190,8 +190,6 @@ KPSE_LIBS = @KPSE_LIBS@
LCOV = @LCOV@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCRYPTO_CFLAGS = @LIBCRYPTO_CFLAGS@
-LIBCRYPTO_LIBS = @LIBCRYPTO_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@@ -301,13 +299,15 @@ EXTRA_DIST = \
frktest-nf-cmp.svg \
frktest-wf-cmp.svg \
lmmono12-regular.otf \
+ omarab.ofm \
+ ot1.cmap \
sample.dvi \
sample-nf-cmp.svg \
sample.sfd \
sample-wf-cmp.svg \
sample_v2.dvi \
sample_v3.dvi \
- ot1.cmap
+ upjf-g.ofm
all: all-am
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/omarab.ofm b/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/omarab.ofm
new file mode 100644
index 00000000000..a231c1d6e04
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/omarab.ofm
Binary files differ
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/upjf-g.ofm b/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/upjf-g.ofm
new file mode 100644
index 00000000000..507aa833b4e
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/data/upjf-g.ofm
Binary files differ
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/genhashcheck.py b/Build/source/texk/dvisvgm/dvisvgm-src/tests/genhashcheck.py
index efa1f1ef48c..e94fa1b6576 100755
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/genhashcheck.py
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/genhashcheck.py
@@ -2,7 +2,7 @@
# This file is part of the dvisvgm package and published under the
# terms of the GNU General Public License version 3 or later.
# See file COPYING for further details.
-# Copyright (C) 2016-2023 Martin Gieseking <martin.gieseking@uos.de>
+# Copyright (C) 2016-2024 Martin Gieseking <martin.gieseking@uos.de>
import re
import sys
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/normalize.xsl b/Build/source/texk/dvisvgm/dvisvgm-src/tests/normalize.xsl
index 89df7ea746d..807d373c9d0 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/normalize.xsl
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/normalize.xsl
@@ -2,7 +2,7 @@
<!-- *********************************************************************
** Stylesheet to rearrange font-/path-elements in an SVG file. **
** It's part of the dvisvgm package. **
-** Copyright (C) 2009-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2009-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -21,115 +21,115 @@
** of the GNU general public license version 3 or later. **
***********************************************************************-->
<xsl:stylesheet version="1.0"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:exsl="http://exslt.org/common"
- xmlns:str="http://exslt.org/strings"
- xmlns:mg="my-namespace"
- extension-element-prefixes="exsl str"
- exclude-result-prefixes="svg xlink exsl str mg">
-
- <xsl:key name="path-by-id" match="/svg:defs/svg:path" use="@id"/>
-
-
- <xsl:variable name="styles-rtf">
- <xsl:for-each select="str:tokenize(/*/svg:style[@type='text/css'], '&#10;')">
- <xsl:sort select="substring-after(., ' ')"/>
- <mg:style new-id="f{position()}" id="{substring-before(substring-after(., '.'), ' ')}">
- <xsl:value-of select="substring-after(., ' ')"/>
- </mg:style>
- </xsl:for-each>
- </xsl:variable>
-
- <xsl:variable name="styles" select="exsl:node-set($styles-rtf)/mg:style"/>
-
- <xsl:variable name="num-paths" select="count(/*/svg:defs/svg:path)"/>
-
- <xsl:variable name="defs-rtf">
- <xsl:for-each select="/*/svg:defs/svg:path">
- <xsl:sort select="@d"/>
- <mg:path id="{@id}" new-id="g{position()}"/>
- </xsl:for-each>
- <xsl:for-each select="/*/svg:defs/svg:use">
- <xsl:sort select="concat(key('path-by-id', substring(@xlink:href, 2))/@d, @transform)"/>
- <mg:use id="{@id}" new-id="g{position()+$num-paths}"/>
- </xsl:for-each>
- </xsl:variable>
-
- <xsl:variable name="defs" select="exsl:node-set($defs-rtf)"/>
-
-
- <xsl:template match="*|@*">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template match="svg:defs[svg:path]">
- <xsl:copy>
- <xsl:apply-templates select="svg:path">
- <xsl:sort select="@d"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="svg:use">
- <xsl:sort select="$defs/mg:use[@id=current()/@id]/@new-id"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template match="svg:defs[svg:font]">
- <xsl:copy>
- <xsl:apply-templates>
- <xsl:sort select="@id"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template match="svg:defs/svg:path">
- <path id="{$defs/mg:path[@id=current()/@id]/@new-id}" d="{@d}"/>
- </xsl:template>
-
-
- <xsl:template match="svg:defs/text()"/>
-
-
- <xsl:template match="svg:use">
- <xsl:variable name="href" select="substring(@xlink:href, 2)"/>
- <xsl:copy>
- <xsl:apply-templates select="@*"/>
- <xsl:if test="ancestor::svg:defs">
- <xsl:attribute name="id">
- <xsl:value-of select="$defs/mg:use[@id=current()/@id]/@new-id"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:attribute name="xlink:href">
- <xsl:value-of select="concat('#', $defs/*[@id=$href]/@new-id)"/>
- </xsl:attribute>
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template match="svg:style[@type='text/css']">
- <style type="text/css">
- <xsl:for-each select="$styles">
- <xsl:value-of select="concat('text.f', position(), ' ', ., '&#10;')"/>
- </xsl:for-each>
- </style>
- </xsl:template>
-
-
- <xsl:template match="svg:text">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:attribute name="class">
- <xsl:value-of select="$styles[@id=current()/@class]/@new-id"/>
- </xsl:attribute>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:str="http://exslt.org/strings"
+ xmlns:mg="my-namespace"
+ extension-element-prefixes="exsl str"
+ exclude-result-prefixes="svg xlink exsl str mg">
+
+ <xsl:key name="path-by-id" match="/svg:defs/svg:path" use="@id"/>
+
+
+ <xsl:variable name="styles-rtf">
+ <xsl:for-each select="str:tokenize(/*/svg:style[@type='text/css'], '&#10;')">
+ <xsl:sort select="substring-after(., ' ')"/>
+ <mg:style new-id="f{position()}" id="{substring-before(substring-after(., '.'), ' ')}">
+ <xsl:value-of select="substring-after(., ' ')"/>
+ </mg:style>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="styles" select="exsl:node-set($styles-rtf)/mg:style"/>
+
+ <xsl:variable name="num-paths" select="count(/*/svg:defs/svg:path)"/>
+
+ <xsl:variable name="defs-rtf">
+ <xsl:for-each select="/*/svg:defs/svg:path">
+ <xsl:sort select="@d"/>
+ <mg:path id="{@id}" new-id="g{position()}"/>
+ </xsl:for-each>
+ <xsl:for-each select="/*/svg:defs/svg:use">
+ <xsl:sort select="concat(key('path-by-id', substring(@xlink:href, 2))/@d, @transform)"/>
+ <mg:use id="{@id}" new-id="g{position()+$num-paths}"/>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:variable name="defs" select="exsl:node-set($defs-rtf)"/>
+
+
+ <xsl:template match="*|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+
+ <xsl:template match="svg:defs[svg:path]">
+ <xsl:copy>
+ <xsl:apply-templates select="svg:path">
+ <xsl:sort select="@d"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="svg:use">
+ <xsl:sort select="$defs/mg:use[@id=current()/@id]/@new-id"/>
+ </xsl:apply-templates>
+ </xsl:copy>
+ </xsl:template>
+
+
+ <xsl:template match="svg:defs[svg:font]">
+ <xsl:copy>
+ <xsl:apply-templates>
+ <xsl:sort select="@id"/>
+ </xsl:apply-templates>
+ </xsl:copy>
+ </xsl:template>
+
+
+ <xsl:template match="svg:defs/svg:path">
+ <path id="{$defs/mg:path[@id=current()/@id]/@new-id}" d="{@d}"/>
+ </xsl:template>
+
+
+ <xsl:template match="svg:defs/text()"/>
+
+
+ <xsl:template match="svg:use">
+ <xsl:variable name="href" select="substring(@xlink:href, 2)"/>
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:if test="ancestor::svg:defs">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$defs/mg:use[@id=current()/@id]/@new-id"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="concat('#', $defs/*[@id=$href]/@new-id)"/>
+ </xsl:attribute>
+ </xsl:copy>
+ </xsl:template>
+
+
+ <xsl:template match="svg:style[@type='text/css']">
+ <style type="text/css">
+ <xsl:for-each select="$styles">
+ <xsl:value-of select="concat('text.f', position(), ' ', ., '&#10;')"/>
+ </xsl:for-each>
+ </style>
+ </xsl:template>
+
+
+ <xsl:template match="svg:text">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:attribute name="class">
+ <xsl:value-of select="$styles[@id=current()/@class]/@new-id"/>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
</xsl:stylesheet>
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/tests/testmain.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/tests/testmain.cpp
index 4c73ce4cf88..4d2ae842622 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/tests/testmain.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/tests/testmain.cpp
@@ -2,7 +2,7 @@
** testmain.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2023 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2024 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **