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 153609 - Wrong (too small) text size in multiline text using PANGO eps export, also in zoom
Wrong (too small) text size in multiline text using PANGO eps export, also in...
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: exports
0.94
Other Linux
: Normal normal
: ---
Assigned To: Dia maintainers
Dia maintainers
: 122429 151533 151544 153842 159320 161875 162320 166077 166781 167368 171329 172833 300605 300672 304076 306867 307116 309766 310835 312052 317743 317799 323438 324291 331261 333231 335232 356781 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-09-24 03:10 UTC by Sampo Kellomaki
Modified: 2006-10-08 09:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Diagram demonstrating size problem in multiline text (21.97 KB, application/octet-stream)
2004-09-24 03:38 UTC, Sampo Kellomaki
  Details
esp export of the previous .dia, demoing text size problem in multiline text (37.51 KB, application/postscript)
2004-09-24 03:40 UTC, Sampo Kellomaki
  Details
Patch to disable font caching, avoiding size corruption problem (workaround) (447 bytes, patch)
2004-12-17 23:06 UTC, Laurence Withers
none Details | Review
Diagram with lots of text (997.93 KB, application/x-dia-diagram)
2005-02-07 22:22 UTC, Lars Clausen
  Details

Description Sampo Kellomaki 2004-09-24 03:10:04 UTC
If I create multiline text item (using default sans font) and then
export the diagram using PANGO font eps export, the resultant
eps file renders with some lines of the text in right size, but
others in very tiny size. There is no definite pattern to this,
but apparently last line tends to be right size while others
are randomly wrong sizes (not always same wrong size).

Similar problem appears to occur if I zoom in (e.g. 200%) while
editing the diagram: multiline text in the zomoed view has its
lines in different sizes. In this case the problem goes away
if I return to 100% view. The visual effect is very similar
to the eps export problem, thus I believe they may have same
root cause.

Workaround: do not create multiline text items. Instead create
a text item for each line. Suboptimal, but bearable.

--Sampo
Comment 1 Sampo Kellomaki 2004-09-24 03:38:54 UTC
Created attachment 31891 [details]
Diagram demonstrating size problem in multiline text

This diagram reproduces the bug. Pay attention to string

Fonte
unidireccional
de radiação

If you export this diagram as eps, the words "Fonte" and "Unidireccional"
will appear (unreadably) tiny while "de radiação" (the last line) will
appear currectly. There are some other multiline texts such as

50
mm

that have similar problems.

The exported eps will appear incorrect at least under gs-8.13 and
acroread-5.0.5, both on ix86 Linux.

I'll also attach the eps as exported by me.

--Sampo
Comment 2 Sampo Kellomaki 2004-09-24 03:40:10 UTC
Created attachment 31892 [details]
esp export of the previous .dia, demoing text size problem in multiline text

Result of exporting demo.dia
Comment 3 Hans Breuer 2004-11-26 15:37:43 UTC
*** Bug 159320 has been marked as a duplicate of this bug. ***
Comment 4 Hans Breuer 2004-11-27 01:06:34 UTC
*** Bug 153842 has been marked as a duplicate of this bug. ***
Comment 5 Laurence Withers 2004-12-17 23:06:23 UTC
Created attachment 34950 [details] [review]
Patch to disable font caching, avoiding size corruption problem (workaround)

Although I can't fix this (the code is just too complicated to trace for
someone unfamiliar with it), I have found that disabling the pango layout hash
table lookups solves the drawing problem. I also can't reproduce any problem
with EPS files, but that might just be blind luck.

Attached is a patch to disable that. It's not a solution, but it is a 
workaround for those of us who need something like Dia but can't get any work
done with this bug.

If any of the Dia developers are interested in helping me fix this (you'll
probably just need to tell me why the pango layout stuff is called recursively
and multiple times for each single draw operation), then either contact me via
email or on Jabber at l.withers@jabber.org
Comment 6 Sampo Kellomaki 2004-12-20 20:55:51 UTC
I can confirm that this patch (removal of font caching) fixes the
problem for me in both EPS export and zooming cases. Lack of
font caching has no noticeable performance impact on my machine.

I have also noticed that the Pango EPS export is inferior
to the Latin-1 EPS export in many other ways. Most annoying
is that if diagram is wider than high, the Pango EPS export
gratuitously inserts some PS code (bounding box?) that
causes epstopdf to turn the image in landscape orientation.
Overall, I have come to seriously mistrust the Pango EPS export.

--Sampo
Comment 7 Hans Breuer 2004-12-22 23:26:50 UTC
I can't confirm there is no "notable performance impact". Here are
the numbers (obvoiusly the cache gives no benefit when a particular
size is used once, thus zooming out *and* in again) :

render-test.dia, DiaGdkRenderer, cached
data_render(100%) took 0.007594 seconds
data_render(70.7107%) took 0.80772 seconds
data_render(50%) took 1.17371 seconds
data_render(35.3553%) took 0.52543 seconds
data_render(25%) took 1.8894 seconds
data_render(17.6777%) took 0.555931 seconds
data_render(12.5%) took 0.197765 seconds
data_render(8.83883%) took 0.58174 seconds ***tweak warning
data_render(12.5%) took 0.016257 seconds
data_render(17.6777%) took 0.030712 seconds
data_render(25%) took 0.078582 seconds
data_render(35.3553%) took 0.038963 seconds
data_render(50%) took 0.061452 seconds
data_render(70.7107%) took 0.051567 seconds
data_render(100%) took 0.017604 seconds

render-test.dia, DiaLibartRenderer, cached

data_render(100%) took 0.218115 seconds
data_render(70.7107%) took 0.865666 seconds
data_render(50%) took 1.18098 seconds
data_render(35.3553%) took 0.529298 seconds
data_render(25%) took 1.8001 seconds
data_render(17.6777%) took 0.579032 seconds
data_render(12.5%) took 0.992647 seconds ***tweak warning
data_render(17.6777%) took 0.047259 seconds
data_render(25%) took 0.080562 seconds
data_render(35.3553%) took 0.049305 seconds
data_render(50%) took 0.069063 seconds
data_render(70.7107%) took 0.063167 seconds
data_render(100%) took 0.028715 seconds

data_render(100%) took 0.027931 seconds
data_render(70.7107%) took 0.061703 seconds
data_render(50%) took 0.072573 seconds
data_render(35.3553%) took 0.044825 seconds
data_render(25%) took 0.078248 seconds
data_render(17.6777%) took 0.046632 seconds
data_render(25%) took 0.068329 seconds
data_render(35.3553%) took 0.039873 seconds
data_render(50%) took 0.055611 seconds
data_render(70.7107%) took 0.054095 seconds
data_render(100%) took 0.029269 seconds
data_render(70.7107%) took 0.052236 seconds
data_render(100%) took 0.029765 seconds

** removed the text
data_render(100%) took 0.000134 seconds
data_render(70.7107%) took 0.002269 seconds
data_render(50%) took 0.006061 seconds
data_render(35.3553%) took 0.005264 seconds
data_render(25%) took 0.002132 seconds
data_render(17.6777%) took 0.006327 seconds
data_render(12.5%) took 0.006999 seconds
data_render(17.6777%) took 0.00245 seconds
data_render(25%) took 0.002175 seconds
data_render(35.3553%) took 0.002041 seconds
data_render(50%) took 0.002108 seconds
data_render(70.7107%) took 0.010439 seconds
data_render(100%) took 0.00578 seconds

 
Comment 8 Hans Breuer 2004-12-22 23:29:34 UTC
*** Bug 161875 has been marked as a duplicate of this bug. ***
Comment 9 Hans Breuer 2004-12-31 19:20:31 UTC
*** Bug 162320 has been marked as a duplicate of this bug. ***
Comment 10 Lars Clausen 2005-02-06 08:27:50 UTC
*** Bug 166077 has been marked as a duplicate of this bug. ***
Comment 11 Lars Clausen 2005-02-07 22:21:00 UTC
The patch is in current CVS.  If you want to see slowdowns, see the attached
leak.dia.  I'm seeing render times of up to 6 seconds on this.
Comment 12 Lars Clausen 2005-02-07 22:22:27 UTC
Created attachment 37138 [details]
Diagram with lots of text
Comment 13 Lars Clausen 2005-02-07 22:23:09 UTC
*** Bug 151544 has been marked as a duplicate of this bug. ***
Comment 14 Lars Clausen 2005-02-12 14:03:13 UTC
*** Bug 166781 has been marked as a duplicate of this bug. ***
Comment 15 Lars Clausen 2005-02-13 16:32:21 UTC
*** Bug 122429 has been marked as a duplicate of this bug. ***
Comment 16 Lars Clausen 2005-02-14 19:22:24 UTC
*** Bug 167368 has been marked as a duplicate of this bug. ***
Comment 17 Lars Clausen 2005-02-28 16:32:32 UTC
*** Bug 151533 has been marked as a duplicate of this bug. ***
Comment 18 Lars Clausen 2005-03-23 17:28:04 UTC
*** Bug 171329 has been marked as a duplicate of this bug. ***
Comment 19 Lars Clausen 2005-04-06 16:45:13 UTC
*** Bug 172833 has been marked as a duplicate of this bug. ***
Comment 20 Lars Clausen 2005-04-15 06:10:13 UTC
*** Bug 300605 has been marked as a duplicate of this bug. ***
Comment 21 Lars Clausen 2005-04-15 06:11:17 UTC
*** Bug 300672 has been marked as a duplicate of this bug. ***
Comment 22 Hans Breuer 2005-05-15 10:37:09 UTC
*** Bug 304076 has been marked as a duplicate of this bug. ***
Comment 23 Lars Clausen 2005-06-09 17:45:12 UTC
*** Bug 306867 has been marked as a duplicate of this bug. ***
Comment 24 Hans Breuer 2005-06-10 13:48:13 UTC
*** Bug 307116 has been marked as a duplicate of this bug. ***
Comment 25 Hans Breuer 2005-06-11 20:48:59 UTC
Current cvs still has the buggy font cache. And it can even crash on it, 
see bug #307320
Comment 26 Hans Breuer 2005-07-08 18:42:26 UTC
*** Bug 309766 has been marked as a duplicate of this bug. ***
Comment 27 Lars Clausen 2005-07-16 18:37:35 UTC
Confirming:)
Comment 28 Hans Breuer 2005-07-20 19:37:11 UTC
*** Bug 310835 has been marked as a duplicate of this bug. ***
Comment 29 Lars Clausen 2005-08-02 05:49:35 UTC
*** Bug 312052 has been marked as a duplicate of this bug. ***
Comment 30 Hans Breuer 2005-10-08 22:03:25 UTC
*** Bug 317799 has been marked as a duplicate of this bug. ***
Comment 31 Hans Breuer 2005-10-08 22:09:33 UTC
*** Bug 317743 has been marked as a duplicate of this bug. ***
Comment 32 Lars Clausen 2005-11-07 03:38:50 UTC
Cache now ifdef'd out.
Comment 33 Lars Clausen 2005-12-07 10:54:15 UTC
*** Bug 323438 has been marked as a duplicate of this bug. ***
Comment 34 Hans Breuer 2005-12-27 14:38:56 UTC
*** Bug 324291 has been marked as a duplicate of this bug. ***
Comment 35 Hans Breuer 2006-02-17 15:58:59 UTC
*** Bug 331261 has been marked as a duplicate of this bug. ***
Comment 36 Lars Clausen 2006-03-05 18:05:35 UTC
*** Bug 333231 has been marked as a duplicate of this bug. ***
Comment 37 Lars Clausen 2006-03-20 21:26:18 UTC
*** Bug 335232 has been marked as a duplicate of this bug. ***
Comment 38 Lars Clausen 2006-10-08 09:33:45 UTC
*** Bug 356781 has been marked as a duplicate of this bug. ***