href="void:javascript{callSomeFunction('parameters')}"
DOT transforms single quotes to &-encoded XML entities, thus making JavaScript nonworking. The solution would be to do not mask single quotes - it is unnecessary inside double quotes.
I've downloaded the sources of graphviz graphviz-2.2.tar.gz, and fixed that problem (the fix is not generic, it will work for my specific input, but I'm not sure about other inputs).
Now, when I run the compiled ./dot -Tpng -oa.png input.dot, it says that it cannot find Helvetica font, and the generated png image has wrong layout because of missing font. I've already met a similar problem while working with RedHat73 version of graphviz, because that version does not work with fontconfig. It looks like my compiled binary also does not use fontconfig, which is strange - ./configure reported that it locates fontconfig headers and libraries, it only did not locate fontconfig-config. I tried to find fontconfig-config with no success. It does not seem to be part of fontconfig-devel, which was installed on my system by default.
The question is: how to compile graphviz properly, so it will use fontconfig and locate all necessary fonts? I did not find hints in FAQs and documentation.
BTW, I do not understand why my compiled dot searches for Helvetica while the version from RPM uses Times-Roman (if I'm not mistaken).
Thank you in advance.
P.S. Output of dot:
[andrew@localhost graphviz]$ ./dot -Tpng -oa.png ./test/cmap_test.dot
Error: Could not find/open font : Helvetica in /usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/common/share/fonts/ttf
Are you saying that ./test/cmap_test.dot is not explicitly setting "Helvetica" as its font?
[ellson] Oops I just noticed that cmap_test.dot was attached to the report.
It does contain explicit selection of Helvetica, which explains why it is not searching for the default Times-Roman.
Did you ./configure --with-mylibgd ? Does the ldd output show "libgd" or "libgvgd" ?
[ellson] > Hi John, > > I've understood what was the problem, or at least fixed it > First I have that RPM package installed, and it put all libraries under > /usr/local/lib/graphviz/ > > It shouldn't. It should install all its libraries in /usr/lib/graphviz/ Are you sure that these aren't from a previous locally-built install? The default prefix for local builds is /usr/local.
> Then, before compiling graphviz sources, I removed that RPM package by > running 'rpm -e graphviz' > It removed the package but not libraries. >
You might also want to do a "make unistall" from your local build tree.
Also. Graphviz uses the builtin -rpath mechanism to find its libraries and doesn't need anything in LD_LIBRARY_PATH. If you have LD_LIBRARY_PATH set that might cause it to find the wrong libraries.
> I've understood it after > looking on output of 'ldd `which ./dot`' - thank you for the hint > When executing, dot worked with those libraries, and this somehow cased > the problem with fonts. > > I renamed '/usr/local/lib/graphviz' to '/usr/local/lib/graphviz-save', > so that ld could not find them. > Then I put all the libraries compiled from sources instead of them, and > dot started to work correctly. > I still do not understand why the "old" libraries did not find fonts - > they are from the same graphviz version, just from RPM. > > RPMs built for vanilla RH73 or RH9 systems don't have fontconfig support.
> Anyway, I think you may assume this case closed. > >
OK Good.
> Most probably, I should do "make install" to have all the things on > their places. > > The -rpath mechanism assumes installation.
If you are building locally you can build for any location you like by use of ./configure --prefix=/my/install/location/ Graphviz will be installed in bin/, lib/, share/, ... under this prefix.
> BTW, could you please tell me if it is possible to link dot statically > with libraries like 'libgraph', 'libcommon', 'libgvrender', etc? > >
You are supposed to be able to "./configure --disable-shared --enable-static" but I think there
was a bug report on this recently.
Owner: ellson
Status: Fixed