Open epagone opened 4 years ago
Can you provide the full content of your source file?
Here is a MWE:
digraph dpi_bug {
graph [dpi = 300]; #comment this line or set dpi = 72 and the rendering is ok
A -> B;
}
While creating it, I realised that is the zoom level wrong with non-default values of dpi
that crops the graph. In my complex, original case the zoom was so wrong that I obtained a blank canvas.
I think this is a bug from GraphViz. I tried to generate an SVG using dot
directly:
echo 'digraph dpi_bug { graph [dpi = 300]; A -> B; }' | dot -Tsvg > test.svg
And the generated graph also have wrong image size.
There is a workaround from https://gitlab.com/graphviz/graphviz/issues/1406 to changes -Tsvg
to -Tsvg:cairo
, but the font shape in generated SVG looks bad to me, so I don’t want to use it.
I think unless GraphViz fix its SVG output, there is not much I can do.
With
graph [dpi = 300]
the preview is blank.