0

I followed the instructions here to change the default node shape: How to set default node shape to box instead of oval?

Input file:

digraph Blah {
  rankdir="LR"
  node [shape="box"];
  A -> B -> C;
  B -> D;
}

I then use the command dot -v -Txdot gt.dot > gt.xdot.

Output (verbose):

dot - graphviz version 2.44.0 ()
libdir = "/usr/lib/graphviz"
Activated plugin library: libgvplugin_core.so.6
Using render: xdot:core
Using device: xdot:xdot:core
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
The plugin configuration file:
        /usr/lib/graphviz/config6
                was successfully loaded.
    render      :  cairo dot dot_json fig json json0 map mp pic pov ps svg tk visio vml xdot xdot_json
    layout      :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout  :  textlayout
    device      :  canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 mp pdf pic plain plain-ext png pov ps ps2 svg svgz tk vdx vml vmlz x11 xdot xdot1.2 xdot1.4 xdot_json xlib
    loadimage   :  (lib) eps gif jpe jpeg jpg png ps svg
pack info:
  mode   undefined
  size   0
  flags  0
  margin 8
pack info:
  mode   node
  size   0
  flags  0
fontname: "Times-Roman" resolved to: (ps:pango  FreeSerif,  REGULAR) (PangoCairoFcFont) "FreeSerif, Regular" /root/.fonts/FreeSerif.otf
Illegal instruction

But, when I remove the node [shape="box"]; line, it works. What am I doing wrong?

1 Answers1

0

[this file worked correctly on my linux system with two versions of Graphviz]
You aren't doing anything wrong, but your font library info may be messed up?
/root/.fonts seems like a weird place for fonts.
What is the -v output when you use the default node shape? Does it still reference /root/.fonts?

sroush
  • 5,375
  • 2
  • 5
  • 11
  • Yes, it refers to the same location even without the shape change. /root/.fonts is the same as ~/.fonts (as I am the root user), which is one of the standard locations for fontconfig (per https://wiki.debian.org/Fonts#Manually). – user16790133 Aug 31 '21 at 05:26
  • ... and even when the fonts are installed in /usr/share/fonts the same error occurs. – user16790133 Aug 31 '21 at 05:32