Whenever I use graphviz (2.12) I get a long string of these errors: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing? SVG output looks fine, but bitmap output looks very ugly, and use some default X font instead. The error appears regardless of the output setting. I do have Type1 fonts installed. Reproducible: Always Steps to Reproduce:
Confirm inability of graphviz 2.12 to locate font. Running dot -v on a graph containing fontname="Helvetica" the following log is printed: dot: fontname "Helvetica" resolved to "[internal arial]" version 2.8 printed instead: dot: fontname=Helvetica fontpath=/usr/share/fonts/default/ghostscript/n019003l.afm The graph in 2.12 is generated with a low res monotype font instead of the required one.
Same symptom here, and here's some potentially helpful info: It doesn't appear that graphviz is (properly/at all) linked against fontconfig: # ldd `which dot` linux-gate.so.1 => (0xb7f6f000) libgvc.so.3 => /usr/lib/libgvc.so.3 (0xb7ef9000) libgraph.so.3 => /usr/lib/libgraph.so.3 (0xb7eef000) libcdt.so.3 => /usr/lib/libcdt.so.3 (0xb7eea000) libpathplan.so.3 => /usr/lib/libpathplan.so.3 (0xb7ee2000) libm.so.6 => /lib/libm.so.6 (0xb7ebd000) libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7e9e000) libz.so.1 => /lib/libz.so.1 (0xb7e8c000) libltdl.so.3 => /usr/lib/libltdl.so.3 (0xb7e86000) libdl.so.2 => /lib/libdl.so.2 (0xb7e82000) libc.so.6 => /lib/libc.so.6 (0xb7d5e000) /lib/ld-linux.so.2 (0xb7f70000)
I've found a fix to propose for this issue. I created an overlay ebuild for graphviz-2.12 and changed --with-libgd to --with-mylibgd (directing graphviz to use its own gd library over any system libgd), and added --with-fontconfig as well. Now graphviz finds the fonts successfully via fontconfig. Attached below is the modified ebuild. Since it now prefers its internal gd library to any system libgd, I've also removed the dependency on media-libs/gd. Please review and advise.
Created attachment 115961 [details] Ebuild for graphviz 2.12 to fix "font not found" issues Adjusted ebuild as described above.
works fine for me thank you very much
The new ebuild also works for me (I had this problem with the images generated by doxygen). Great work!
The attached ebuild worked as expected. Is it going to replace the broken 2.12?
Created attachment 136640 [details, diff] patch against recent ebuild Confirm behavior described in comment #1. Fixed using this small patch based on comment #3.
Fixed in 2.16.1