2

I am working in a minimal Ubuntu instance — specifically, the ubuntu:14.04 Docker image — and I want an installation of Graphviz that supports the Adobe Symbol font (the standard PostScript font where all the letters are Greek).

Using this dot file greek.dot as input:

digraph {
  Rock     [fontname = "Symbol"]
  Scissors [fontname = "Symbol"]
  Paper    [fontname = "Symbol"]
  Rock -> Scissors -> Paper -> Rock
}

If I apt-get install graphviz and run dot -Tpng -o greek.png greek.dot on this, I get:

enter image description here

If I instead try to build from source:

apt-get install -y build-essential ghostscript libpng-dev libgd-dev fontconfig

wget -O - http://graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz | tar zxv -C /tmp && \
    cd /tmp/graphviz-2.38.0 && \
    ./configure --enable-swig=no && make && make install && \
    cd / && \
    rm -rf /tmp/graphviz-2.38.0

running dot now gives:

enter image description here

If I use HTML entities for the Greek letters directly:

digraph {
  Rock     [label = "Ροck"]
  Scissors [label = "Σcissors&invalid;"]
  Paper    [label = "Paπer"]
  Rock -> Scissors -> Paper -> Rock
}

(The &invalid; is so that we can see that GraphViz knows π is a legitimate entity.)

With apt-get install graphviz, I get this:

enter image description here

but with the Graphviz build from source, I get:

enter image description here

This page suggests that I might need to install urw-fonts, but the link given there keeps timing out, and I'm having trouble finding this resource elsewhere.

Exactly what packages do I need to install to get Symbol to work?

2
  • I've found that doing apt-get install libgs-dev and rebuilding gives the same output as the prebuilt Graphviz. The experimentation continues.
    – jwodder
    Jan 15, 2015 at 15:31
  • Addendum to the above: apt-get install libpango1.0-dev was also required, and I apparently don't understand apt-get purge.
    – jwodder
    Jan 15, 2015 at 17:23

0

You must log in to answer this question.

Browse other questions tagged .