Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000424graphvizDotpublic2004-06-29 20:162011-04-28 04:02
ReporterDag Lem 
Assigned Toerg 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSx86-Linux-2.4 (RedHat Linux 9)OS Version
Summary0000424: <td align="left"> misalignment of multiple rows in HTML-like labels
Description



dot -Tps -o test.ps test.dot



See the attached example.



The problem seems to be that there is an automatic cell padding in a <td>
which depends on the width of the text, and which is present regardless of
alignment.



This implies that rows with different widths do not align properly.
Both left and right aligment is affected.



Suggestion: Look for miscalculation of bounding box for text.
If the automatic cell padding is there on purpose then please reconsider,
it is IMO not desirable regardless of this bug.
Steps To Reproduce

digraph network {
node [shape=plaintext]
"A" [label=<
<table border="0" cellborder="1" cellspacing="0">
  <tr><td align="left">narrow</td></tr>
  <tr><td align="left">somewhat wider</td></tr>
  <tr><td align="left">even wider to show the pattern</td></tr>
</table>
>];
}
Additional Information
Please tell me if/when you have patched code for me to test.
[erg] The problem appears to be that the version of dot used by Dag
is not using libfreetype. It thus uses the built-in text size estimator.
Despite our recent update of the numbers used to compute this, the
numbers computed are terrible. Thus,

\<TABLE\>
\<TR\>\<TD\> \<TD\>"somewhat wider"\<TD\>"even wider to show the pattern"\</TR\>
\<TR\>\<TD\>estimate\<TD\>102\<TD\>224\</TR\>
\<TR\>\<TD\>actual\<TD\>92\<TD\>172\</TR\>
\<TR\>\<TD\>libgd\<TD\>94\<TD\>177\</TR\>
\</TABLE>

The current workaround is to rebuild with libfreetype.

TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
We were using width 1.0 for space characters, assuming
this was a no-op, I guess, but postscript has a real width for these which
it uses in stringwidth. This meant our estimate was badly off if the
string contains spaces. We now use the correct value.
FORMER-ID482
INPUT-FILE
OUTPUT-FILEhttp://www.graphviz.org/bugs/b482.ps [^]
STATUS-COMMENTFixed (1 July 2004)
VERSION     1.12
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:02 user1 New Issue
2011-04-28 04:02 user1 Assigned To => erg


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