Max Alekseyev wrote:


Relying on the additional, separately supplied resources is not harmful.
But silently ignoring the absence of *necessary* resource is, especially when such behavior produces an incorrect result.


There is a complementary problem/complication. Graphviz uses fontconfig to resolve your font name. It always returns some font, but we have no way of knowing if it found the font you wanted or anything close to it. You could, say, supply a valid font name for one of the extra fonts provided with ghostscript, but unless everything was set up correctly for fontconfig, it might use something totally different. In this case, you can't win. If you use -Tps:cairo, the text wouldn't look the way you wanted. If you use -Tps, the sizes would be
incorrect.

I've got it. But I need to understand a reason of the current behavior.
It is possible that graphviz's output is perfectly valid and it has nothing to with this bugreport, but in this case something wrong is with ghostscript (or its debian installation) and this bugreport needs to be moved over to it.


Nothing is wrong with any of these except they are perhaps not as user-friendly as one might like.

Arguing again by analogy, I can create a C program linked against the expat dynamic library:

 cc -o prog prog.o -lexpat

assuming I have libexpat on my machine.

I can then try to run prog on a different machine. It's not going to work unless I have a compatible expat dynamic library on the second machine. Despite this, I don't expect the linker to say:

Warning: this program requires libexpat to run.

Similarly with graphviz and ghostscript. If you specify fontname="freefont/FreeSans", dot can resolve this and
produce valid postscript output containing

   /freefont/FreeSans set_font

When you run ghostscript on the generated postscript, it is up to you to make sure the ghostscript environment can
find and load this font.

Since they all use Ghostscript in one way or another, let's check possible differences
between our installations.

My Ghostscript's version is:

GPL Ghostscript 8.61 (2007-11-21)

and it processes 2.ps as follows:

$ gs -dNOPAUSE -sDEVICE=png256 -sOutputFile=temp.png -dBATCH 2.ps
GPL Ghostscript 8.61 (2007-11-21)
Copyright (C) 2007 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusRomNo9L-Regu font from /var/lib/defoma/gs.d/dirs/fonts/n021003l.pfb... 2747096 1312855 2226936 926661 2 done. Loading NimbusRomNo9L-ReguItal font from /var/lib/defoma/gs.d/dirs/fonts/n021023l.pfb... 2884336 1450466 2347512 1044651 2 done. Loading NimbusRomNo9L-Medi font from /var/lib/defoma/gs.d/dirs/fonts/n021004l.pfb... 3008052 1589335 2347512 1046791 2 done. Loading NimbusRomNo9L-MediItal font from /var/lib/defoma/gs.d/dirs/fonts/n021024l.pfb... 3125196 1710964 2347512 1049059 2 done. Loading NimbusSanL-Regu font from /var/lib/defoma/gs.d/dirs/fonts/n019003l.pfb... 3222244 1826571 2347512 1051495 2 done. Loading NimbusSanL-ReguItal font from /var/lib/defoma/gs.d/dirs/fonts/n019023l.pfb... 3319292 1927030 2347512 1053635 2 done. Loading NimbusSanL-Bold font from /var/lib/defoma/gs.d/dirs/fonts/n019004l.pfb... 3416340 2029516 2347512 1055885 2 done. Loading NimbusSanL-BoldItal font from /var/lib/defoma/gs.d/dirs/fonts/n019024l.pfb... 3493292 2127494 2347512 1058025 2 done. Loading NimbusMonL-Regu font from /var/lib/defoma/gs.d/dirs/fonts/n022003l.pfb... 3630532 2258983 2347512 1060165 2 done. Loading NimbusMonL-ReguObli font from /var/lib/defoma/gs.d/dirs/fonts/n022023l.pfb... 3667292 1995719 2367608 681887 2 done. Loading NimbusMonL-Bold font from /var/lib/defoma/gs.d/dirs/fonts/n022004l.pfb... 3764340 2127772 2367608 684027 2 done. Loading NimbusMonL-BoldObli font from /var/lib/defoma/gs.d/dirs/fonts/n022024l.pfb... 3881484 2253263 2367608 686167 2 done.

The resulting file temp.png is of size 2908 bytes and contains a white rectangle (of size 612x792).

Could you please check what happens in your system?

My results were identical, except my gs is GPL Ghostscript 8.60 (2007-08-01)

On the other hand, if I run

 gs -dNOPAUSE -g612x1500 -sDEVICE=png256 -sOutputFile=temp.png -dBATCH 2.ps

the resulting file temp.png is of size 15413 bytes and contains part of the full drawing, showing various nodes and edges.
(See attachedment.)

   Emden

<<inline: temp.png>>

Reply via email to