Menu

#6 how to graphviz in chinese characters?

1.0
closed
nobody
None
2020-06-15
2020-06-12
No

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

1 Attachments

Discussion

  • Jeffrey Long

    Jeffrey Long - 2020-06-12

    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

     
    🎉
    1

    Last edit: Jeffrey Long 2020-06-12
  • Jeffrey Long

    Jeffrey Long - 2020-06-12
    • status: open --> closed
     
  • Jeffrey Long

    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.

     
    👍
    1
  • ignacio seron

    ignacio seron - 2020-06-15

    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 :-)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.