omnibus EMF issue patch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
David Mathog |
Bug Description
This omnibus patch addresses issues related to EMF import/export as discussed in the following reports:
Reports related to EMF support addressed by omnibus patch (2012-08-22):
Bug #818539 import of emf files with embedded bitmaps
Bug #902245 EMF problems on import into Powerpoint
Bug #919728 EMF export text scaling, positioning issue
Bug #942050 hidden object results from WMF import
Bug #1027144 EMF path rendering issues
Reports related to font handling (win32) addressed by omnibus patch (2012-08-22):
Bug #165665 non-Unicode symbol fonts do not work on Windows
Bug #942137 Extension to convert symbol <-> unicode
Bug #948245 Symbol font character for A0-FF generally wrong
Other reports whose patches have been included in omnibus patch (2012-08-22):
Bug #1029584 Two bugs relating to line patterns
Bug #1048845 boolean logic fails on some SVG files
Additional changes related to other reports (comment #60):
Bug #366744 Multi-line text object in plain SVG behaves strangely after re-opening
The omnibus patch does the following:
1. creates an EMF with a high resolution DC if one is available on the system. This increases the resolution of the DC above that of the Display, which is the current source for the DC.
2. automatic conversion of Symbol, Wingdings, and Zapf Dingbats to unicode on import of EMF files. Text in either 0-254 or in the MS PUA unicode region are converted. Other file imports, and other fonts, are not affected. (SVG files should not have nonunicode text in them, but EMF files often do. This and the next feature make it easy to keep the nonunicode fonts in the EMF files, but still have all Unicode fonts in the SVG file.)
3. optional Unicode -> Symbol, Wingdings, Dingbats conversion on export to EMF file.
4. optional use of Microsoft PUA for nonunicode character conversions (default is values 0-254, no MS PUA). Some applications
expect Symbol font to be in the MS PUA region, others in the 0-254 region.
5. optional compensation for MS PowerPoint bug when it imports text from EMF. (When the EMF is imported with "insert picture from file" text is where it should be, but when it is ungrouped to convert to internal PPT objects the text moves in complicated ways.) This option moves text by corresponding amounts in the opposite direction, so that if it is imported into PPT and then ungrouped it ends up in the desired locations.
6. support for bitmap import from EMF files.
7. support for bitmap export to EMF files. (Note, for both import/export pictures should not be rotated, they may be stretched. )
8. Corrects erroneous placement of superscript/
9. Changes graphic model used in EMF. (To MM_TEXT, which results in simpler geometric conversions, so less code throughout emf-win32-
Important - feature 2 routes through src/libnrtype/
Related branches
- Martin Owens: Approve (merge)
-
Diff: 48503 lines (+46736/-372) (has conflicts)83 files modifiedpackaging/win32/languages/Hebrew.nsh (+113/-0)
po/POTFILES.in (+2/-1)
share/extensions/Makefile.am (+1/-0)
share/extensions/fontfix.conf (+55/-0)
share/extensions/hershey.inx (+86/-0)
share/extensions/hershey.py (+109/-0)
share/extensions/hersheydata.py (+58/-0)
share/extensions/render_gear_rack.inx (+21/-0)
share/extensions/render_gear_rack.py (+105/-0)
share/extensions/text_merge.inx (+34/-0)
share/extensions/text_merge.py (+199/-0)
src/2geom/generic-rect.h (+1/-1)
src/Makefile.am (+5/-4)
src/attributes-test.h (+3/-0)
src/attributes.cpp (+3/-0)
src/attributes.h (+4/-1)
src/display/drawing-context.h (+15/-0)
src/display/drawing-text.cpp (+286/-16)
src/display/drawing-text.h (+12/-3)
src/display/nr-style.cpp (+58/-0)
src/display/nr-style.h (+37/-0)
src/extension/CMakeLists.txt (+11/-4)
src/extension/init.cpp (+9/-9)
src/extension/internal/Makefile_insert (+20/-4)
src/extension/internal/emf-inout.cpp (+3549/-0)
src/extension/internal/emf-inout.h (+211/-0)
src/extension/internal/emf-print.cpp (+2202/-0)
src/extension/internal/emf-print.h (+138/-0)
src/extension/internal/emf-win32-inout.h (+0/-57)
src/extension/internal/text_reassemble.c (+2884/-0)
src/extension/internal/text_reassemble.h (+386/-0)
src/extension/internal/uemf.c (+5523/-0)
src/extension/internal/uemf.h (+2889/-0)
src/extension/internal/uemf_endian.c (+1783/-0)
src/extension/internal/uemf_endian.h (+37/-0)
src/extension/internal/uemf_print.c (+2358/-0)
src/extension/internal/uemf_print.h (+169/-0)
src/extension/internal/uemf_utf.c (+552/-0)
src/extension/internal/uemf_utf.h (+53/-0)
src/extension/internal/uwmf.c (+6880/-0)
src/extension/internal/uwmf.h (+2492/-0)
src/extension/internal/uwmf_endian.c (+1772/-0)
src/extension/internal/uwmf_endian.h (+39/-0)
src/extension/internal/uwmf_print.c (+1616/-0)
src/extension/internal/uwmf_print.h (+48/-0)
src/extension/internal/wmf-inout.cpp (+3235/-0)
src/extension/internal/wmf-inout.h (+213/-0)
src/extension/internal/wmf-print.cpp (+1994/-0)
src/extension/internal/wmf-print.h (+147/-0)
src/helper/action-context.cpp (+84/-0)
src/helper/action-context.h (+89/-0)
src/helper/geom.cpp (+310/-0)
src/helper/geom.h (+5/-0)
src/layer-model.cpp (+259/-0)
src/layer-model.h (+104/-0)
src/libnrtype/FontInstance.cpp (+35/-0)
src/libnrtype/Layout-TNG-Compute.cpp (+172/-62)
src/libnrtype/Layout-TNG-Output.cpp (+264/-50)
src/libnrtype/Layout-TNG.h (+4/-0)
src/libnrtype/font-instance.h (+2/-0)
src/libunicode-convert/Makefile_insert (+5/-0)
src/libunicode-convert/README (+1/-0)
src/libunicode-convert/makefile.in (+17/-0)
src/libunicode-convert/unicode-convert.c (+1008/-0)
src/libunicode-convert/unicode-convert.h (+51/-0)
src/splivarot.cpp (+280/-0)
src/splivarot.h (+2/-0)
src/style.cpp (+306/-88)
src/style.h (+49/-6)
src/text-editing.cpp (+38/-20)
src/ui/dialog/new-from-template.cpp (+59/-0)
src/ui/dialog/new-from-template.h (+39/-0)
src/ui/dialog/template-load-tab.cpp (+281/-0)
src/ui/dialog/template-load-tab.h (+102/-0)
src/ui/dialog/template-widget.cpp (+117/-0)
src/ui/dialog/template-widget.h (+48/-0)
src/ui/widget/unit-tracker.cpp (+263/-0)
src/ui/widget/unit-tracker.h (+74/-0)
src/widgets/connector-toolbar.cpp (+3/-0)
src/widgets/dash-selector.cpp (+75/-11)
src/widgets/dash-selector.h (+5/-0)
src/widgets/eraser-toolbar.cpp (+168/-0)
src/widgets/eraser-toolbar.h (+0/-35)
- Krzysztof Kosinski: Needs Fixing
- Martin Owens: Pending requested
-
Diff: 49457 lines (+44253/-3969)64 files modifiedconfigure.ac (+1/-0)
po/POTFILES.in (+2/-1)
share/extensions/Makefile.am (+1/-0)
share/extensions/fontfix.conf (+55/-0)
src/2geom/generic-rect.h (+1/-1)
src/Makefile.am (+5/-4)
src/attributes-test.h (+3/-0)
src/attributes.cpp (+3/-0)
src/attributes.h (+4/-1)
src/display/drawing-context.h (+15/-0)
src/display/drawing-text.cpp (+286/-16)
src/display/drawing-text.h (+12/-3)
src/display/nr-style.cpp (+58/-0)
src/display/nr-style.h (+37/-0)
src/extension/CMakeLists.txt (+8/-4)
src/extension/init.cpp (+9/-9)
src/extension/internal/Makefile_insert (+20/-4)
src/extension/internal/emf-inout.cpp (+3549/-0)
src/extension/internal/emf-inout.h (+211/-0)
src/extension/internal/emf-print.cpp (+2202/-0)
src/extension/internal/emf-print.h (+138/-0)
src/extension/internal/emf-win32-inout.cpp (+0/-2582)
src/extension/internal/emf-win32-inout.h (+0/-57)
src/extension/internal/emf-win32-print.cpp (+0/-928)
src/extension/internal/emf-win32-print.h (+0/-113)
src/extension/internal/text_reassemble.c (+2884/-0)
src/extension/internal/text_reassemble.h (+386/-0)
src/extension/internal/uemf.c (+5523/-0)
src/extension/internal/uemf.h (+2889/-0)
src/extension/internal/uemf_endian.c (+1783/-0)
src/extension/internal/uemf_endian.h (+37/-0)
src/extension/internal/uemf_print.c (+2358/-0)
src/extension/internal/uemf_print.h (+169/-0)
src/extension/internal/uemf_utf.c (+552/-0)
src/extension/internal/uemf_utf.h (+53/-0)
src/extension/internal/uwmf.c (+6880/-0)
src/extension/internal/uwmf.h (+2492/-0)
src/extension/internal/uwmf_endian.c (+1772/-0)
src/extension/internal/uwmf_endian.h (+39/-0)
src/extension/internal/uwmf_print.c (+1616/-0)
src/extension/internal/uwmf_print.h (+48/-0)
src/extension/internal/wmf-inout.cpp (+3235/-0)
src/extension/internal/wmf-inout.h (+213/-0)
src/extension/internal/wmf-print.cpp (+1994/-0)
src/extension/internal/wmf-print.h (+147/-0)
src/helper/geom.cpp (+310/-0)
src/helper/geom.h (+5/-0)
src/libnrtype/FontInstance.cpp (+35/-0)
src/libnrtype/Layout-TNG-Compute.cpp (+172/-62)
src/libnrtype/Layout-TNG-Output.cpp (+264/-50)
src/libnrtype/Layout-TNG.h (+4/-0)
src/libnrtype/font-instance.h (+2/-0)
src/libunicode-convert/Makefile_insert (+5/-0)
src/libunicode-convert/README (+1/-0)
src/libunicode-convert/makefile.in (+17/-0)
src/libunicode-convert/unicode-convert.c (+1008/-0)
src/libunicode-convert/unicode-convert.h (+51/-0)
src/splivarot.cpp (+217/-3)
src/splivarot.h (+2/-0)
src/style.cpp (+303/-94)
src/style.h (+49/-6)
src/text-editing.cpp (+38/-20)
src/widgets/dash-selector.cpp (+75/-11)
src/widgets/dash-selector.h (+5/-0)
tags: | added: emf exporting importing |
description: | updated |
description: | updated |
Changed in inkscape: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → 0.49 |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in inkscape: | |
assignee: | nobody → David Mathog (mathog) |
description: | updated |
Changed in inkscape: | |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
> However, since this code has only been tested on Windows I
> cannot exclude the possibility that it might do something
> untoward on another platform.
Testing 'multiple.patch' on OS X 10.7.2 Lion (64bit, llvm-gcc-4.2, debug build) against r11296:
1) patch does not apply: 'newfile' is created in topdir and overwritten for each newly added file
$ patch -p0 --dry-run < ../../_ patch/todo/ 988601- emf-omnibus- multiple. patch s.txt /internal/ emf-win32- inout.cpp /internal/ emf-win32- print.cpp /internal/ emf-win32- print.h /Layout- TNG-Output. cpp
patching file ./build.xml
patching file ./src/CMakeList
patching file ./src/extension
patching file ./src/extension
patching file ./src/extension
patching file ./src/libnrtype
patching file ./src/Makefile.am
(Stripping trailing CRs from patch.)
patching file newfile
(Stripping trailing CRs from patch.)
patching file newfile
(Stripping trailing CRs from patch.)
patching file newfile
(Stripping trailing CRs from patch.)
patching file newfile
(Stripping trailing CRs from patch.)
patching file newfile
patching file newfile
$
2) working around issue 1, 'make' fails due to error in 'src/Makefile.am':
automake-1.11: cannot open < src/libunicode- convert/ libunicode- convert: No such file or directory src/Makefile. in] Error 1
make[2]: *** [../../
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
3) after fixing issue 2 (typo in 'src/Makefile.am'), 'make' fails with this error:
src/libunicode- convert/ Makefile_ insert: 8: bad characters in variable name `libunicode- convert_ libunicode- convert_ a_SOURCES' am:131: `src/libunicode -convert/ Makefile_ insert' included from here convert/ Makefile_ insert: 8: variable `libunicode- convert_ libunicode- convert_ a_SOURCES' is defined but no program or convert/ Makefile_ insert: 8: library has `libunicode- convert_ libunicode- convert_ a' as canonical name (possible typo) am:131: `src/libunicode -convert/ Makefile_ insert' included from here src/Makefile. in] Error 1
src/Makefile.
src/libunicode-
src/libunicode-
src/Makefile.
make[2]: *** [../../
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
No idea how to correctly address this: I did manage to get 'make' succeed by renaming all instances (file names and references) of 'libunicode- convert' to 'libunicodeconv ert', but I don't know if that's the appropriate fix, nor what exactly causes automake to fail (possibly the error is related to <http:// www.gnu. org/software/ automake/ manual/ html_node/ Canonicalizatio n.html# Canonicalizatio n>)
During compilation, I get this warning: rt/unicodeconve rt.o libunicodeconve rt/unicodeconve rt.c: In function ‘table_filler’: libunicodeconve rt/unicodeconve rt.c:1004: warning: comparison between signed and unsigned
CC libunicodeconve
../../src/
../../src/
Question: Does this new library have to be built and linked to on platforms other than Windows at all? Or could it be useful outside of EMF import/export for enhanced font support?
- Internal EMF import/export support in Inkscape is proprietary to the Windows port of Inkscape and not available on other platforms (the 'emf-win32-*' sources are not compiled).
- AFAICT, the specific font configuration file 'fontfix.conf' gets neither installed on non-wi...