Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the following graphviz graph:

digraph finite_state_machine {
    a -> b [ label = "c" ];
}

The output of this graph should be

correct graph

And this is indeed what I get if I try to use dot to generate a file (e.g. by dot -Tsvg test.dot > test.svg).

When I try to use dotty to display it, however, all the labels appear as periods:

incorrect graph

What causes this problem, and how can I solve this? I have used dotty a lot in the past on similar graphs, both on Windows and on Linux, and never saw this behavior.

Ubuntu 10.04.3 LTS, Graphviz version 2.20.2 (dotty version 96c).

share|improve this question
1  
Are the right fonts installed? –  Sardathrion Sep 12 '11 at 13:17
    
@Sard I don't know, how can I check? –  Oak Sep 12 '11 at 13:18
    
Have a look at $HOME/.xsession-errors and/or /var/log/Xorg.0.log to see if there are errors there. Start dotty in a console (so you can see any messages send to stderr). Look at what fonts you have installed and force a font in the dot file to see if it makes any difference. –  Sardathrion Sep 12 '11 at 14:09
1  
sounds like a missing font to me. –  hbdgaf Sep 20 '11 at 14:30

3 Answers 3

My solution is too simple. I examined /var/log/Xorg.0.log and found the following:

[    52.308] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    52.308]    Entry deleted from font path.
[    52.308] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    52.308]    Entry deleted from font path.
...
[    52.314] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    52.314]    Entry deleted from font path.
[    52.314] (WW) The directory "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" does not exist.
[    52.314]    Entry deleted from font path.

So, I installed the indicated packages:

xfonts-100dpi
xfonts-cyrillic
...
defoma
psfontmgr
x-ttcidfont-conf

I rebotted and Dotty graphs became beautiful, but the default font name remains unknown for me.

share|improve this answer

As others have mentioned your font configuration isn't working. You can read more about how to configure that here:

http://www.graphviz.org/doc/info/attrs.html#d:fontname

share|improve this answer
    
I tried forcing specific fonts and I tried manually installing fonts used by graphviz - neither helped. I also think that the fact dot does work, just dotty doesn't, hints that this isn't a font issue –  Oak Nov 1 '11 at 14:01
up vote 0 down vote accepted

I've found some internal document in a company I briefly worked for that mentioned dotty is faulty on Ubuntu 10.04, and urging users to upgrade their OS as a way to solve that. The reason this happens is still a mystery to me, and "upgrade your OS" is a pretty poor solution, but still - it should solve the issue, so posting it here as an answer.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.