2
1
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:
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:
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:
but with the Graphviz build from source, I get:
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?
I've found that doing
apt-get install libgs-dev
and rebuilding gives the same output as the prebuilt Graphviz. The experimentation continues. – jwodder – 2015-01-15T15:31:59.813Addendum to the above:
apt-get install libpango1.0-dev
was also required, and I apparently don't understandapt-get purge
. – jwodder – 2015-01-15T17:23:29.820