History log of /inkscape/src/extension/internal/text_reassemble.c
Revision Date Author Comments Expand
4eb9446837011e32e75978f10d405765add7aabf 11-Mar-2016 mathog <>

patch for bug 1538361, work around limits in mingw/MSVCRT

abc6f255f9df130fdd70e5426fddabb3ea7d96dc 21-May-2015 mathog <>

patch for bug 1457612

41fe3f808697419ddead60fc7bcc425166c05c26 26-Feb-2015 mathog <>

fix for bug 1425317

03c8da1e3cbc24addba48fdfee4654cfe08fd613 25-Jul-2014 mathog <>

sync with libTere version of text_reassemble.c

c393c084261647e46e3ccce207f5f67e84a77321 24-Jul-2014 mathog <>

Fix for bug 1336753

9fc716fd65f6ca61f4a66845dc554e989b41b965 22-Jul-2014 Markus Engel <markus.engel@tum.de>

Fixed parentheses.

de94547c5bd6a8fd2e8c9e5ddfafebc81d5ab871 26-Mar-2014 David Mathog <mathog@caltech.edu>

Second patch for analyzer warnings in libuemf.

2bf3910a9fbe18eb8fb519f02f9d49d68df7ee7a 25-Mar-2014 David Mathog <mathog@caltech.edu>

Patch for several issues in libuemf. ----- The patch: 1. Removes half a dozen or so code lines that didn't do anything. 2. Fixes a couple of missing tests for pointers which cannot be NULL. (Note that in many instances the pseudoobject functions in upmf.c do accept null pointers because the objects being constructed have optional parts.) 3. There was one "real" potential memory leak (line 6276 in upmf.c, numbers before the patch). I fixed the others too, but they just never happen (iconv would have to fail in some strange way.) There are no (real) memory access violations or memory leaks in any of this either in standalone libUEMF testing or in use as part of Inkscape as determined from valgrind runs.

5da08901f6f284dfb64e741ed2f6287d9cfc087a 08-Feb-2014 mathog <mathog@caltech.edu>

EMF/WMF support: Various changes (see bug #1263242 c35 for details) EMF support: - linear gradients: improve numeric stability on round-trip editing - linear gradients: fix scaling issue libTERE/text_reassemble update: - improve handling of whitespace created with large x kerns - fix handling of absolute RTL-positioning of LTR text in EMF files WMF support: - fix support for 'textout' records and Placeable headers - add support for CREATEPATTERNBRUSH - fix offset on load if opened via GUI (bug #1250250)

86df60ed2c0ede4dad6684c75acd907f6146c1b6 09-Oct-2013 JazzyNico <nicoduf@yahoo.fr>

Documentation/Translation. Fix for Bug #1236382 (Typos in comments and message, localization context needed) by Yuri Chornoivan.

6a55cc6751be1162fa737fa656ffae0729c2e2a0 31-Aug-2013 Krzysztof KosiƄski <tweenk.pl@gmail.com>

Move libuemf to a separate directory. Rename libunicode-convert to symbol_convert and put it in libuemf.

/inkscape/configure.ac /inkscape/po/POTFILES.in /inkscape/src/CMakeLists.txt /inkscape/src/Makefile.am Makefile_insert emf-inout.cpp emf-inout.h emf-print.cpp emf-print.h text_reassemble.c wmf-inout.cpp wmf-inout.h wmf-print.cpp wmf-print.h /inkscape/src/libnrtype/Layout-TNG-Output.cpp /inkscape/src/libuemf/CMakeLists.txt /inkscape/src/libuemf/Makefile_insert /inkscape/src/libuemf/README /inkscape/src/libuemf/makefile.in /inkscape/src/libuemf/symbol_convert.c /inkscape/src/libuemf/symbol_convert.h /inkscape/src/libuemf/uemf.c /inkscape/src/libuemf/uemf.h /inkscape/src/libuemf/uemf_endian.c /inkscape/src/libuemf/uemf_endian.h /inkscape/src/libuemf/uemf_print.c /inkscape/src/libuemf/uemf_print.h /inkscape/src/libuemf/uemf_utf.c /inkscape/src/libuemf/uemf_utf.h /inkscape/src/libuemf/uwmf.c /inkscape/src/libuemf/uwmf.h /inkscape/src/libuemf/uwmf_endian.c /inkscape/src/libuemf/uwmf_endian.h /inkscape/src/libuemf/uwmf_print.c /inkscape/src/libuemf/uwmf_print.h /inkscape/src/libunicode-convert/Makefile_insert /inkscape/src/libunicode-convert/README /inkscape/src/style.h
9a8ade3834e2a67c1d95bcfc900ab36be37a03a5 19-Jun-2013 David Mathog <>

changes_2013_05_22a.patch: 1. Resolves issue of bug #988601 message 170 (Support of 'Unset' styles in EMF export). 2. Implements CSS 3 (and CSS 2) text-decoration support. Note that it does not yet provide any method of adding these features - at present it just shows whatever is in the SVG. This new code is also used to display EMF/WMF strike-through and underline text decorations when these files are read in. Those decorations may also be written out to EMF/WMF. Other text decoration features, like overline, or dotted lines, are dropped. For SVG text-decoration -line, -style, -color are all implemented. CSS3 provides two ways to represent the same state, this code uses the compound text-decoration method rather than the 3 fields method. Also it leaves out keywords that are not needed and would break backwards compatibility. For instance: text-decoration: underline solid is valid, but would break CSS2. Solid is the default, so that sort of case is written as: text-decoration: underline If the state is CSS3 specific all of the needed fields are of course include, like text-decoration: underline wavy red 3. It incorporates the fix for bug 1181326 (Text edit mishandles span of just colored spaces) 4. It incorporates further changes to text editing so that style can be changed on spans consisting of only spaces when text decorations are present in the span. 5. It incorporates code to disable text decorations when text so marked is mapped onto a path. 6. Fixed more bugs in Hebrew language support than I can remember. Hebrew language export/import to EMF now works quite well. (See the examples in libTERE v 0.7.) WMF does not support unicode and for all intents and purposes Inkscape has no way to read or write Hebrew to it. Some of more important things that now work that didn't (or didn't always): Hebrew diacritical marks, R/L/center justification, and bidirectional text. The Hebrew fonts "Ezra SIL" and "EZRA SIL SR" should be installed before viewing the libTERE examples, otherwise font substitutions will cause some text shifts. 7. Implemented font failover in Text Reassemble, which makes the process more robust. (Again, see the examples in libTERE. )

5530d4cb2db040e48228f2f4a525e3dabb15b057 19-Mar-2013 David Mathog <>

changes_2013_03_18c.patch This set of patches does the following: 1. Fixed a typo ( where "+ sizeof()" should have been "* sizeof()") which caused a memory problem for EMF/WMF files with very large numbers of hatches. 2. Added support for background mode, background color, and textcolor in hatches. EMF/WMF files change these parameters but the change may be silent until many records later. This has the odd effect that a stroke or fill may be defined (in SVG) and then it is ignored later and replaced with one with a different background color. 3. Fixed WMF output so that it wasn't adding +1 to the number of pixels for Width and Height. (Allows WMF files to go through several cycles of save as, open without changing sizes.) 4. Cleaned up indenting of [ew]mf-{print|inout}.* files, to make them compliant with the inkscape standard. All indents are (I hope) now 4*i deep. 5. Added underline/strikeout support for text read from EMF/WMF files. Inkscape itself cannot currently render this, but it makes it into the SVG, and it shows up correctly when that SVG is read by Opera. 6. Took out all the "throw" calls, replacing them with g_error(). If this comes up again in debugging a define can be used to remap the g_error to temporarily reintroduce the throw so that gdb can catch them. 7. Took out the "%6lf" format changes from patch 11724, retained the "127" length limit in the same sscanf. 8. Put the C type casts back in, reversing those changes from patch 11724. This is a style issue, and I could not find clear guidance for which way to go. (Nor a good rationale for keeping the lengthier C++ syntax.) So I reviewed a large swath of other inkscape code to see if there was a trend and found a very large number of other sections that were using C style casts instead of the more verbose C++ forms. So I kept it the way it has been. 9. The locale changes from 11724 were of course retained.

10b77f97a176647caa068363224704062325ec4a 08-Mar-2013 David Mathog <>

changes_2013_02_25a.patch New: WMF import/export implements WMF (Windows Metafile) read and write. Inkscape previously supported that through uniconverter, which was not very good with WMF files. The new version now has a complete wmf-print/wmf-inout implementation, analogous to the previous emf-print/emf-inout. This handles images, patterns, and various other goodies to the extent that WMF does. WMF is a bit primitive, many fields are only 16 bits, so it even more resolution sapping issues than does EMF. Given the choice, always use the latter format.

7221236468b0b60c925a058fb7a1919a141202d4 13-Feb-2013 David Mathog <>

changes_2013_02_01b.patch EMF import: - Fix for EMF files with MODIFYWINDOWTRANSFORM records containing rotations - Add support for embedded PNG and JPG images - Fix for PowerPoint patterns EMF export: - Rotated images are exported using MODIFYWINDOWTRANSFORM records - Add output option to allow unrotated output (e.g. for PowerPoint 2003) - Don't rotate hatch and image fills on export libTERE: - Fix bug with misplaced words in LTR text (fix for RTL untested)

77158fc70d508e2e4deee0bd3783ea8ba56c9c61 13-Dec-2012 David Mathog <>

preliminary release of the EMF import text reassembly feature. (based on libTERE (TExt REassembly), not yet published) libTERE examines all the text in an EMF file, which consists only of little chunks in different formats, and attempts to reassemble it into an editable SVG text object, with color, different fonts and so forth. (only tested with English)