I'm using graphviz (under Windows) to generate graphs for my presentation. One looks like this:

 digraph minex {
 graph [fontname = "adobe-source-sans-fonts"];
 node [fontname = "adobe-source-sans-fonts"];
 edge [fontname = "courier bold"];

    node [shape = circle]; 
   q1 [label=1] 
  q2 [label=2];

   subgraph cluster_0
      q1->q2 [style=invisible dir=none]

Now in the preview window of GVEdit (or in a .jpg file) the "A" and the "r" are displayed as italic font as they should be, but in a .pdf file, it's the normal (upright) font. Do I have to embed the font in the PDF? If so, how can I do this?

  • What exactly do you mean by "in a .pdf file"? Do you create a pdf file from your graph and then include that in your LaTeX file? If so, how do you create the pdf? Or do you compile the graph within your LaTeX file? If so, could you provide a minimal example LaTeX document that includes the graph? – Marijn Jul 26 '19 at 15:12
  • The former. I use dot to create a pdf file which I embed in the Latex file. And even if I open this pdf in Acrobat, the font is not italic. – Jan Jul 26 '19 at 15:14
  • In that case your question is more or less off-topic, because it it not about LaTeX but about Graphviz. You could try asking on Stack Overflow. I tried your example file in Linux and there it works ok (the A and r are italic) so it might be a specific issue with Windows or with your setup. If you want to make your question on-topic here then you can try using the graphviz LaTeX package, see mirrors.ctan.org/macros/latex/contrib/graphviz/graphviz.pdf (for pdflatex or latex). – Marijn Jul 26 '19 at 15:28
  • Yeah, I kind of realised the off-topic-ness when I wrote my last comment. I'll try Stackoverflow now. Also thanks for the tip with the graphviz package; I already tried that, but I couldn't get the non-standard fonts to work at all. – Jan Jul 27 '19 at 13:01
  • Ok, I'll vote to close the question then, good luck on Stack Overflow :) – Marijn Jul 27 '19 at 13:07

Browse other questions tagged or ask your own question.