[cairo] SVG to EMF quality

Alberto Ruiz aruiz at gnome.org
Thu Sep 3 17:38:14 PDT 2009


2009/9/3 Jan Struyf <jan.struyf at cs.kuleuven.be>:
>
> Dear Shixin Zeng,
>
>> I've produced some pictures with matplotlib for my paper, which
>> prefers enhanced MetaFile (EMF). However, current maplotlib
>> doesn't support EMF output, but svg. So I tried to convert svg
>> to emf via cairo, as mentioned in this
>> thread:http://lists.cairographics.org/archives/cairo/2009-January/016215.html
>>
>> But the problem is that the quality of the output emf file is
>> pretty low. Is this caused by my badly programming or the
>> limitation of this method itself? Thanks
>
> I think the Cairo Win32 backend converts most operations to
> bitmaps, which causes the poor quality EMF files. Support for
> GDIPlus on Windows could make high quality EMF output possible,
> but it is controversial because GDIPlus comes, as far as I know,
> only by default with Microsoft Visual C and is not available by
> default in MingW/GCC. Here is an old track on this topic:

That can be tricked as we did on Gtk+ for our pixbuf loaders and
Abiword, basically we have pointers to gdi+  functions and we only
load them on runtime, hence we don't need any headers whatsoever.

Have a look:
http://git.gnome.org/cgit/gdip-pixbuf-loader/tree/src/io-gdip-native.h

> <http://lists.cairographics.org/archives/cairo/2005-January/002689.html>
>
> I'm not sure what the current status is.
>
> You could consider using "pstoedit", which produces pretty decent
> EMF files, especially with the shareware plugin. You can find
> this software here:
>
> <http://www.pstoedit.net/>
>
> I hope this helps.
>
> Best,
>
> Jan
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>



-- 
Un saludo,
Alberto Ruiz


More information about the cairo mailing list