Number: 1504
Title: Postscript font name broken in gd if no pango + cairo
Submitter: Stephen North
Date: Thu Oct 30 15:31:56 2008
Subsys: Dot
Version: 2.21.0
System: x86-Linux-
Severity: major
./configure --with-pangocairo=no make make install

In graphviz fontnames like Times-Bold or Helvetica-Italic the modifier is ignored.

You can find a list of the 35 standard fontnames many places, like

The output is supposed to be the same, regardless of whether Cairo is available or what output codegen is chosen.

digraph G { node [fontname="Times-BoldItalic", label=ABCDE] ; A B C }
dot -v reports Using render: cairo:cairo Using device: png:cairo:cairo

good grief. cairo is definitely disabled in config.h

i ran dot-c for good measure, too, but that didn't help.

[ellson] Any chance you still have a lib/graphviz/ installed from a previous build? "dot -c" doesn't care when it was built, only that it loads at run time, so disabling pango at configure time for a new build isn't sufficient to ensure that a pango plugin isn't found.

Might be safest to do a "rm -rf <prefix>/lib/graphviz" before you do a "make install"

[north] OK, I did the suggested rm, reinstalled, and that didn't make any difference.

I recompiled *with* cairopango, and that didn't help either. I just can't get Times-Bold.

This is Fedora 9 on my desktop.

Also, I notice that the PNGs have a grey or transparent background, not white. Is that what everyone else is getting now?

[ellson] I've put in a partial fix for discussion. Times-Bold should work now, but others like Times-Italic still need to be fixed similarly, if this fix is OK.

I made separate copies of psfontResolve() for pango and for gd (pango v fontconfig syntax) and removed the original one from fontmetrics.c.

I changed the entry for "Times-Bold" in lib/common/ps_font_equiv.txt from: TIMES, "medium" to: "Times", "bold"

Is this an OK direction?
Owner: ellson
Status: *