From: ellson Date: Thu, 8 Nov 2007 22:07:24 +0000 (+0000) Subject: fix the nojustify.dot issue by using the postscript interpreter X-Git-Tag: LAST_LIBGRAPH~32^2~5048 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40c861ee53807350de82e7bfbef66415fa5f1969;p=graphviz fix the nojustify.dot issue by using the postscript interpreter to stretch the string to fit the expected width. --- diff --git a/lib/common/ps.txt b/lib/common/ps.txt index 0c3cfca20..f10f3e407 100644 --- a/lib/common/ps.txt +++ b/lib/common/ps.txt @@ -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