I'm displaying a diagram with graphviz and need emoji to display but I constantly get display errors as shown here:
in this case should be (1 )
My understanding from graphviz font path attribute and dot guide pdf quoted below, I should be able to change the fontpath to load an emoji capable font like NotoColorEmoji.
For bitmap output, such as GIF or JPG, dot relies on having these fonts available during layout. Most precompiled installations of Graphviz use the fontconfig library for matching font names to available fontfiles. fontconfig comes with a set of utilities for showing matches and installing fonts. Please refer to the fontconfig documentation, or the external Graphviz FontFAQ or for further details. If Graphviz is built without fontconfig (which usually means you compiled it from source code on your own), the fontpath attribute can specify a list of directories3 which should be searched for the font files. If this is not set, dot will use the DOTFONTPATH environment variable or, if this is not set, the GDFONTPATH environment variable. If none of these is set, dot uses a built-in list.
The only information I can find on changing the fontpath is from a 10 year old question and dead links on graphviz.org.
At the moment I'm testing in repl.it so it's possible the path isn't jiving somehow. End goal is to update my current docker image somehow with the font file. So far it seems I haven't been successful in loading the font at all and I still have no guarantee it will display emoji. I'm open to other suggestions to display emoji (hopefully with graphviz).
digraph tree {
fontpath="/"
"foo" [label="bar", shape=triangle, color=black fillcolor=peru, style=filled, fontname="NotoColorEmojis"]