SVGs are broken in subtle ways (spacing issues)

The same example, processed with dot -Tsvg:cairo and then loaded into MacOS Safari (latest release) looks good. I’ll attach the image.

I’m sorry to see these problems. The most obvious suspect is the port of PangoCairo to the environment that manifests this problem (some version of Windows?) The bug appears to be outside Graphviz. Graphviz is oblivious to how any renderer handles individual glyphs.

If someone would like to pursue this, probably that means submitting a bug to the GTK project. Perhaps they would be responsive to an example created by making small modifications to their demo text rendering program at PangoCairo – 1.0: Rendering with Cairo

It’s tempting at this point to conclude it was a mistake to even have SVG drivers in Graphviz, because of these problems. TGraphviz is certainly dependent on precise text rendering and that looks like the Achilles’ heel of SVG. For better or worse, though, SVG is also quite useful as one of the only structured formats Graphviz generates.

It’s interesting that MacOS core graphics doesn’t support SVG in any way. Also, Adobe Illustrator .ai file format is proprietary; apparently they did not find SVG to be sufficient, either, although Adobe was involved with defining its standard.