Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000540graphvizOutput Generationpublic2004-12-14 08:062011-04-28 04:02
ReporterRobin Johnson 
Assigned Toellson 
PlatformOS*-Linux-GentooOS Version
Summary0000540: Graphviz-1.16 fails to find Times-Roman font - FontConfig failures

Before the FontConfig integration, for each font specified as a name,
the system would loop over possible font file extensions,
then font pathes, then font filenames.
extensions = ttf,pfa,pfb,dfont
pathes = /usr/X11R6/lib/X11/fonts/TrueType/:/usr/X11R6/lib/X11/fonts/truetype/ (...etc)
names = Times-Roman, Times_New_Roman, Times-New-Roman, TimesNewRoman, Times, times

In 1.16, the FontConfig implementation appears to screw up
the last loop and repeatedly checks the first filename (Times-Roman).

The output given is:
Error: Could not find/open font : Times-Roman
However, if I use fc-list manually:
curie-int / $ fc-list -V
fontconfig version 2.2.2
curie-int / $ fc-list 'Times-Roman'
Times:style=Bold Italic

Possibly this is an error in how FC is being used?

The only work-around that works is for me to pass fontname=times for each of -N,-E
Steps To Reproduce

digraph G {
"Node1" [ URL="http://link1",label="This [^] is a label",shape="box" ];
"Node2" [ URL="http://link2",fontsize="14" [^] ];
"Node3" [ URL="http://link3",fontsize="20" [^] ];
"Node1" -> "Node2" [ label="Edge Label",color="red" ];
Additional Information

[ellson] I don't know how Graphviz was configured for Gentoo. Would you please send me
the output of:
    ldd `which dot`

Also the output from:
    echo 'digraph G {hello->world}' | dot -v

[Alejandro Mery <[email protected]>]:
$ echo 'digraph G {hello->world}' | dot -v
dot: fontname=Times-Roman fontpath=[internal times]
network simplex: 2 nodes 1 edges 0 iter 0.00 sec
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross G: 0 crossings, 0.00 secs.
network simplex: 3 nodes 2 edges 0 iter 0.00 sec
routesplines: 1 edges, 3 boxes, 0 splines 0.00 sec
digraph G {
        node [label="\N"];
        graph [bb="0,0,58,108"];
        hello [pos="29,90", width="0.75", height="0.50"];
        world [pos="29,18", width="0.81", height="0.50"];
        hello -> world [pos="e,29,36 29,72 29,64 29,55 29,46"];

$ echo 'digraph G {hello->world}' | dot -Tpng -o test.png
Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing? : Times-Roman

$ fc-list -V
fontconfig version 2.2.2

$ fc-list 'Times-Roman'
Times:style=Bold Italic

$ ldd `which fc-list` => (0xffffe000) => /usr/X11/lib/ (0xb7fbe000) => /usr/lib/ (0xb7f56000) => /usr/lib/ (0xb7f37000) => /lib/ (0xb7e4b000)
        /lib/ (0xb7fef000)

$ dot -V
dot version 2.2.1 (Sat Jun 18 17:04:20 UTC 2005)

$ ldd `which dot` => (0xffffe000) => /usr/lib/graphviz/ (0x40013000) => /usr/lib/graphviz/ (0x4005f000) => /usr/lib/ (0x4006e000) => /usr/X11/lib/ (0x400bf000) => /usr/X11/lib/ (0x400cc000) => /usr/lib/ (0x40181000) => /usr/X11/lib/ (0x4019b000) => /usr/lib/ (0x401be000) => /usr/lib/ (0x4021e000) => /usr/lib/ (0x4024c000) => /usr/lib/graphviz/ (0x40267000) => /usr/lib/graphviz/ (0x40280000) => /lib/ (0x4028b000) => /usr/lib/graphviz/ (0x402ab000) => /usr/lib/graphviz/ (0x402b4000) => /lib/ (0x402b9000) => /usr/X11/lib/ (0x403a4000) => /lib/ (0x403b0000)
        /lib/ (0x40000000)

[Michail Vidiassov <[email protected]>]:
There is code in gd/gdft.c that hardcodes translation from
Postcript names of core fonts to fontconfig names of URW fonts (!).
(That is where the error message
"Didn't find expected font family. Perhaps URW Type 1 fonts need
comes from.)

Thus other fonts capable to act as core Postscript fonts may be
ignored (depends on Fontconfig config).

Good news is that the hack is compiled in conditionally,
thus easy to disable.

Use the Search, Luke!
The problem has already been reported here, see [^]
TagsNo tags attached.
VERSION     1.16
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:02 user1 New Issue
2011-04-28 04:02 user1 Assigned To => user695

MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker