GNOME Bugzilla – Bug 701106
Error in text rendering when exporting (with cairo)
Last modified: 2019-03-20 11:58:15 UTC
Created attachment 245417 [details] Overlapping rendered characters in exported dia diagram When exporting a simple flowchart (to a png, svg, pdf for example) the text rendering for text within diagram elements seems to fail in places, writing characters on top of one another. It also effects general text elements (those that are not within a block/shape). This tends to make the exported images un-usable. On screen in the dia window it looks fine, though the output, for example, looks like this (see attachment also): http://i.imgur.com/Kv5LBUL.png The system is running Dia 0.97.1, on CentOS 5.7.
From the command line if I change the export time I can get it to render correctly using png-libart. This command produces bad rendered characters: dia -e test.png -n cairo-png flow_diagram.dia while this one seems to be OK: dia -e test.png -n png-libart flow_diagram.dia
The libart renderer is still using pango-FT2 (deprecated). The cairo renderer uses pango-cairo if available. Maybe an issue with pango not initialized the same without the windowing system. Does exporting with cairo from the GUI work correctly? What's the output of 'dia --version --verbose'?
The 'many formats' are all done with cairo, right? Do you use the anti-aliased renderer? Does the anti-aliased rendering still work with libart plug-in disabled?
Created attachment 249873 [details] Example diagram For me exporting to EMF and WMF with cairo fails too. Also 'Copy Diagram' to Word 2003 has issues and no text is shown. Other exports work. I'm using Dia Portable 0.97.2 on Win XP SP3. Attached is a sample diagram, cairo generated files will follow.
Created attachment 249874 [details] Cairo EMF
Created attachment 249875 [details] Cairo WMF
Created attachment 249876 [details] Cairo PNG (transparent)
Created attachment 249877 [details] Cairo Png
(In reply to comment #4) > For me exporting to EMF and WMF with cairo fails too. Also 'Copy Diagram' to > Word 2003 has issues and no text is shown. Other exports work. > I'm using Dia Portable 0.97.2 on Win XP SP3. > From my understanding this is a completely different issue. For Word only WMF fails (paste special with EMF works for me). The original report sounds like all cairo export on CentOS via cairo has the issue. But bug reports should not be about guessing. So still NEEDINFO regarding the original report (comment #2)
Ok, sorry. I thought it's the same due to the bug topic. And no, even with paste special it doesn't work for me. It's not a big problem though, because I don't paste diagrams to Word, I always link to graphics. And other exports work fine. :) Should I create a new bug ticket or is there one for 'Cairo WMF and EMF: text failing' already?
I don't know if this[1] Gentoo bug is related. I have found a very similar issue about image exporting that (I hope) is related to this. I am running Dia 0.97.2(-r1) on Gentoo. There is some more information at [1]. [1] is about SVG export, but with PNG export I get horrible results. When exporting through File->Export... all letters are piled upon one another and there are spaces where there shouldn't be. I will attach both the source file and the exported one. However with SVG export only some letters are rendered badly. [1] https://bugs.gentoo.org/show_bug.cgi?id=479728
Created attachment 250812 [details] Test diagram (source file)
Created attachment 250813 [details] Test diagram (PNG export)
(In reply to comment #1) > From the command line if I change the export time I can get it to render > correctly using png-libart. > > This command produces bad rendered characters: > > dia -e test.png -n cairo-png flow_diagram.dia > > > while this one seems to be OK: > > dia -e test.png -n png-libart flow_diagram.dia I get the similar results (with my attachment [1] as input): $ dia -e test-chart-cairo.png -t cairo-png test-chart.dia gives me badly rendered characters (identical with the File->Export... case[2]). $ dia -e test-chart-libart.png -t png-libart test-chart.dia works like a charm! [1] https://bugzilla.gnome.org/attachment.cgi?id=250812 [2] https://bugzilla.gnome.org/attachment.cgi?id=250813
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/325.