Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial rendering with graph [dpi /= 72] #25

Open
epagone opened this issue Oct 20, 2019 · 3 comments
Open

Partial rendering with graph [dpi /= 72] #25

epagone opened this issue Oct 20, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@epagone
Copy link

epagone commented Oct 20, 2019

With graph [dpi = 300] the preview is blank.

@EFanZh
Copy link
Owner

EFanZh commented Oct 22, 2019

Can you provide the full content of your source file?

@epagone
Copy link
Author

epagone commented Oct 22, 2019

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.

@epagone epagone changed the title graph [dpi = 300] does not render Partial rendering with graph [dpi /= 72] Oct 22, 2019
@EFanZh
Copy link
Owner

EFanZh commented Oct 23, 2019

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.

@EFanZh EFanZh added the bug Something isn't working label Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants