I have created a dot file.which contain some korean language in some node's label .i created png file with help of graphvig tool but that created png doesn't support korean language it appear as square box. if i create svg file then it works fine. help me how to resolve this.
I met the same problem, and adding the following lines helped me:
strict digraph {
node [ fontname="Adobe Kaiti Std" ];
edge [ fontname="Adobe Heiti Std" ];
}
I had the same problem, when a .png
file is generated, the non-ascii chars is not rendered correctly.
My alternative solution is to use the .svg
output (via some command like: dot -Tsvg my_graph.gv
), which left the font-finding problem to the svg viewer.
You can open the .svg
file with a Web Browser. And most Web Browser also support the save as
function to convert the .svg
file to .png
if you insist on the .png
format.
Hope this helpful
Also try running dot -v to see what plugins and font files are being loaded. Generally we expect UTF-8 to work (a lot of work was done on this over the years), and text layout through the cairopango driver works well. A downside is that pango now does its own font lookup which is somewhat of a black box to other code. (pango recently dropped fontconfig, which is understandable. We did not ever discover a way to determine if fontconfig failed to find a good match for a given specification - it would cheerfully return e.g. a typewriter font when it could not find any other match.) Hope this helps a little. Stephen North (for the graphviz project)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With