Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002279graphvizOutput Generationpublic2013-05-06 11:072016-05-10 03:31
ReporterRomesnil 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformLinuxOSArchlinuxOS Version
Summary0002279: Text overflows in svg output
DescriptionUsing some fonts (Palatino-Italic for example), text overflows its node when rendering using graphviz native SVG driver.
Steps To Reproducedigraph test {
        "1" [label="text overflow",shape=box,fontname="Palatino"];
        "2" [label="text overflow",shape=box,fontname="Palatino-Italic"];
}
Additional Informationoutput in verbose mode:

dot - graphviz version 2.30.1 (20130303.0813)
libdir = "/usr/lib/graphviz"
Activated plugin library: libgvplugin_pango.so.6
Using textlayout: textlayout:cairo
Activated plugin library: libgvplugin_core.so.6
Using render: svg:core
Using device: svg:svg:core
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
The plugin configuration file:
        /usr/lib/graphviz/config6
                was successfully loaded.
    render : cairo dot fig gd map pic pov ps svg tk vml vrml xdot
    layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout : textlayout
    device : bmp canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gv ico imap imap_np ismap jpe jpeg jpg pdf pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz vrml wbmp x11 xdot xlib
    loadimage : (lib) eps gd gd2 gif jpe jpeg jpg png ps svg
fontname: "Palatino" resolved to: (PangoCairoFcFont) "URW Palladio L, Roman" /usr/share/fonts/Type1/p052003l.pfb
fontname: "Palatino-Italic" resolved to: (ps:pango URW Palladio L, REGULAR ITALIC) (PangoCairoFcFont) "URW Palladio L, Italic" /usr/share/fonts/Type1/p052023l.pfb
network simplex: 1 nodes 0 edges maxiter=2147483647 balance=1
network simplex: 1 nodes 0 edges 0 iter 0.00 sec
network simplex: 1 nodes 0 edges maxiter=2147483647 balance=1
network simplex: 1 nodes 0 edges 0 iter 0.00 sec
Maxrank = 0, minrank = 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross test: 0 crossings, 0.00 secs.
network simplex: 2 nodes 1 edges maxiter=2147483647 balance=2
network simplex: 2 nodes 1 edges 0 iter 0.00 sec
routesplines: 0 edges, 0 boxes 0.00 sec
Using render: svg:core
Using device: svg:svg:core
gvRenderJobs test: 0.00 secs.
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSION2.30.1
Attached Files? file icon text_overflow.svg [^] (1,142 bytes) 2013-05-06 11:07

- Relationships

-  Notes
User avatar (0000336)
erg (administrator)
2013-05-06 11:37

The SVG standard is very loose as to what font environments are required for SVG viewers. If the fonts used by Graphviz differ significantly from those supported by the viewer, it is quite possible to get the overflow you are seeing. (The same problem holds for PostScript output, for the same reason, though the PostScript standard does provide for about dozen faces.) Thus, when I view the output of your graph in Firefox, it looks great; if I use Inkscape, I get overflow.

The only way to avoid this problem is to embed fonts in the SVG output. Try using -Tsvg:cairo.
User avatar (0000337)
Romesnil (reporter)
2013-05-06 11:49

Oh, I understand. But I didn't get the problem, because the overflow occurs in Firefox and Inkscape for me. Using -Tsvg:cairo solves my problem. Thanks!

- Issue History
Date Modified Username Field Change
2013-05-06 11:07 Romesnil New Issue
2013-05-06 11:07 Romesnil File Added: text_overflow.svg
2013-05-06 11:37 erg Note Added: 0000336
2013-05-06 11:49 Romesnil Note Added: 0000337


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker