After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701106 - Error in text rendering when exporting (with cairo)
Error in text rendering when exporting (with cairo)
Status: RESOLVED OBSOLETE
Product: dia
Classification: Other
Component: exports
0.97.x
Other Linux
: Normal major
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2013-05-27 23:36 UTC by Corey
Modified: 2019-03-20 11:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Overlapping rendered characters in exported dia diagram (7.66 KB, image/png)
2013-05-27 23:36 UTC, Corey
Details
Example diagram (1.12 KB, application/octet-stream)
2013-07-23 09:25 UTC, Bart.S
Details
Cairo EMF (3.43 KB, application/octet-stream)
2013-07-23 09:26 UTC, Bart.S
Details
Cairo WMF (4.62 KB, application/octet-stream)
2013-07-23 09:27 UTC, Bart.S
Details
Cairo PNG (transparent) (2.58 KB, image/png)
2013-07-23 09:28 UTC, Bart.S
Details
Cairo Png (2.98 KB, image/png)
2013-07-23 09:28 UTC, Bart.S
Details
Test diagram (source file) (1.93 KB, application/x-dia-diagram)
2013-08-04 17:25 UTC, Karl Lindén
Details
Test diagram (PNG export) (24.61 KB, image/png)
2013-08-04 17:26 UTC, Karl Lindén
Details

Description Corey 2013-05-27 23:36:53 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.
Comment 1 Corey 2013-05-27 23:53:15 UTC
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
Comment 2 Hans Breuer 2013-07-21 14:02:37 UTC
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'?
Comment 3 Hans Breuer 2013-07-21 14:10:37 UTC
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?
Comment 4 Bart.S 2013-07-23 09:25:59 UTC
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.
Comment 5 Bart.S 2013-07-23 09:26:34 UTC
Created attachment 249874 [details]
Cairo EMF
Comment 6 Bart.S 2013-07-23 09:27:10 UTC
Created attachment 249875 [details]
Cairo WMF
Comment 7 Bart.S 2013-07-23 09:28:24 UTC
Created attachment 249876 [details]
Cairo PNG (transparent)
Comment 8 Bart.S 2013-07-23 09:28:44 UTC
Created attachment 249877 [details]
Cairo Png
Comment 9 Hans Breuer 2013-07-23 21:27:35 UTC
(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)
Comment 10 Bart.S 2013-07-24 09:02:06 UTC
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?
Comment 11 Karl Lindén 2013-08-04 17:24:19 UTC
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
Comment 12 Karl Lindén 2013-08-04 17:25:32 UTC
Created attachment 250812 [details]
Test diagram (source file)
Comment 13 Karl Lindén 2013-08-04 17:26:03 UTC
Created attachment 250813 [details]
Test diagram (PNG export)
Comment 14 Karl Lindén 2013-08-04 17:37:44 UTC
(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
Comment 15 GNOME Infrastructure Team 2019-03-20 11:58:15 UTC
-- 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.