]> granicus.if.org Git - graphviz/commitdiff
fix the nojustify.dot issue by using the postscript interpreter
authorellson <devnull@localhost>
Thu, 8 Nov 2007 22:07:24 +0000 (22:07 +0000)
committerellson <devnull@localhost>
Thu, 8 Nov 2007 22:07:24 +0000 (22:07 +0000)
to stretch the string to fit the expected width.

lib/common/ps.txt

index 0c3cfca206d3a0bdb2d9812c96cd8706c45927ff..f10f3e4079cd12a63f35600981eea50947bbf60f 100644 (file)
@@ -80,17 +80,15 @@ cleartomark
        scalefont setfont
 } def
 
-% draw aligned label in bounding box aligned to current point
-/alignedtext {                 % width adj text
+% draw text fitted to its expected width
+/alignedtext {                 % width text
        /text exch def
-       /adj exch def
        /width exch def
        gsave
                width 0 gt {
-                       text stringwidth pop adj mul 0 rmoveto
+                       [] 0 setdash
+                       text stringwidth pop width exch sub text length div 0 text ashow
                } if
-               [] 0 setdash
-               text show
        grestore
 } def