1

Goal: draw a flowchart which contains non-Latin1 symbols.

Problem: GraphViz does not provide all node shapes necessary for drawing a flowchart (e.g. "Document", "Predefined Process" etc). Fortunately, a person named Jason Brazile created a nice library of missing shapes. However, it works only when using the PostScript driver (dot -Tps).

There are two basic PostScript drivers in GraphViz: built-in driver which does not support Unicode, and Cairo which does, but apparently does not support external PostScript procedures (the user-defined PS shapes are absent in the resulting layout).

Question: How do I use UTF-8 labels and flowchart shapes at the same time?

1 Answer 1

0

I asked the GraphViz developers about this and looks like the answer is that there is no way to do that:

We looked at this problem years ago. The native graphviz -Tps Postscript driver does not have any custom font loading capabilites. As mentioned here: http://tldp.org/HOWTO/Unicode-HOWTO-5.html
rendering utf-8 fonts in Postscript is a do-it-yourself job. It would probably take weeks or months of work, but if you want to try to make this modification to graphviz, it might be possible to appropriate code from one of the other tools mentioned in that website. (Make sure it is non-GPL code, otherwise it can't be distributed!)

Another option would be to modify the cairopango driver to render text on top of a user shape after it is loaded. (Do we not already support this? It seems obvious.) Then either find a way to render external graphviz PS shapes after they are loaded and copy the rendered images into the cairopango canvas (hey we already import ghostscript into graphviz) or convert the custom PS shapes externally into images that can be loaded by the cairopango driver. This might not take as much time.

Either way, it will take an expert C programmer.

Probably none of us have much time to work on this (our time would be better used trying to get funding to support the project in a more general way, but we all have other jobs now) but you could offer a bounty on bountysource and see what happens....

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .