how to graphviz in chinese characters?
Free Excel tool to easily create Graphviz data visualizations.
Brought to you by:
jjlong150
just want to create relation with chinese characters but the visualizaiton doesnt work.
I would assume FONT issue? but as it was mentioend UTF-8 charaters are supported?
Thanks!
陳國榕 Chen, Winston
蔡昕燁 Tsai, Bell
裘靜婷 Chio, Tina
陳韋曲 Chen, Stanley
秦天傑 Chin, Steven
鄧智遠 Deng, Eric
It is quite simple. You must specify the fontname attribute with the name of the font to use.
I believe that Graphviz's default font is "Times Roman". In Excel the font may appear as Chinese, but the font used in an Excel cell is not passed to Graphviz. It is up to the user to specify the font to Graphviz.
There are multiple ways you can specify a fontname
1. Design a style using the 'Style Designer' worksheet, save it, and applying it where desired.
2. Use the "Extra Attributes" column to specify the fontname in the data, or
3. specify the fontname on the 'settings' worksheet as a Graph option (-Gfontname="FangSong").
I have attached an example showing your names using the default font, and then using the FangSong font. This example uses the second option, and uses the Extra Attributes column to toggle the font.
I've included a screen print, and an exported version of the spreadsheet. You can use the "Import JSON" feature on the Exchage tab to generate the workbook in Excel.
I hope this helps,
Jeff
Last edit: Jeffrey Long 2020-06-12
Closing ticket, not a defect. The font name must be specified in the data to override Graphviz's default western font.
Many thanks Jeffrey! I couldnt find a way to modify the western font but the JSON file made it as best example! now JSON is the file for ongoing work :-)