[Output Generation] Postscript (PS) output incorrect for fonts that have spaces in their name
Ported Issue from Mantis Original ID: 2495 Reported By: wvh
SEVERITY: MINOR Submitted: 2014-10-14 09:31:39
OS: DEBIAN
OS BUILD: UNSTABLE
PLATFORM: LINUX
DESCRIPTION
I'm trying to export a dot graph to an output that supports links.
When using a font with spaces in its name (e.g. "PT Sans"), ps
and ps2
output renderers generate faulty postscript. The postscript fails to load in evince
(crashes), shows an empty document (okular) and returns an error with ps2pdf.
Excerpt from the generate postscript:
14 /PT Sans set_font
Presumably the space between "PT" and "Sans" has to be escaped somehow.
The ps:cairo
renderer includes the font with its real name:
/FontName /PTSans-Regular def
... so that renderer works fine, but I would like to include the URLs from the dot file, and I think only the ps2
renderer supports link export at this moment.
I tried to escape the spaces in the postscript output with backslash or quotes, but that's apparently not valid postscript either and I'm not crazy enough to read the full postscript specification.
STEPS TO REPRODUCE
To reproduce,
- change the font:
graph [fontname = "PT Sans"];
node [fontname = "PT Sans"];
edge [fontname = "PT Sans"];
- export to
ps
orps2
.