0

I have the following minimal dot code:

digraph {
    charset = utf8;
    rankdir = LR;
    "ε" -> "V" [label="V:V"];
    "ε" -> "ε" [label="C:C"];
    "V" -> "V" [label = "C:C"];
    "V" -> "ε" [label = "V:V́ "];
}

Note that the last V in the last line is followed by an acute combining diacritic (it is correctly combined with the V in my editor, FWIW). This diacritic does not appear high enough over the V after calling dot -Tpdf foo.dot -o foo.pdf. Instead, as you can see below, it is overlaid:

Digraph with one V having a misaligned acute accent

How do I fix this? I'm using dot version 2.38.0 on Ubuntu (xenial).

sautedman
  • 112
  • 10

1 Answers1

2

I think this works already. If you look closely at your image, you will see the diacritic:

enter image description here

I think it's just the font that needs to be changed. Referring to Graphviz: change font for the whole graph?, I modified your dot code and added a font:

digraph {
    graph [fontname = "helvetica"];
    node [fontname = "helvetica"];
    edge [fontname = "helvetica"];

    charset = utf8;
    ...

This is what I get:

enter image description here

tk421
  • 5,775
  • 6
  • 23
  • 34
  • The issue persists with Helvetica on my Linux machine. Why did you pick Helvetica (aka, what quality does Helvetica have on your machine that enables it to work)? – sautedman Aug 24 '18 at 20:13
  • That's what was mentioned in the question. You can run `fc-list` and try a different font name. FWIW, I don't have an Ubuntu running but I tried on Mac and CentOS and it worked. – tk421 Aug 24 '18 at 22:20