[comp.lang.postscript] Real-world limits on path sizes

bb@beach.cis.ufl.edu (Brian Bartholomew) (08/01/90)

I have a question on effective path lengths.  I am using the following
code, designed to accumulate the width of a multi-font string (this
is a quick hack for labels, so no flames about design):

        /accum 0 def
	newpath
	0 0 moveto
(before step 1)
        /ZapfDingbats findfont [0.19 0 0 0.25 0 0] makefont setfont
        (\053) false charpath flattenpath pathbbox currentpoint
        newpath moveto
        /accum pop exch pop sub 2 div neg accum add def
(after step 1)
        0.1 0 rmoveto
(before step 2)
        /NewCenturySchlbk-Bold findfont [0.19 0 0 0.25 0 0] makefont setfont
        (savvy.math.ufl.edu) false charpath flattenpath pathbbox currentpoint
        newpath moveto
        /accum pop exch pop sub 2 div neg accum add def
(after step 2)


and I am getting a limitcheck error on the command flattenpath.
Ehandler.ps dumps the strings on the stack, and the last one shown is
"before step 2".  This tells me that the flattenpath is failing when
it tries to flatten the path that contains "savvy.math.ufl.edu".  The
scaling at this point is in inches, so the characters are a reasonable
size.  On the average, how many characters can I expect to fit in a
LaserWriter II Model M6000's path length?

Thanks in advance.


"Any sufficiently advanced technology is indistinguishable from a rigged demo."
-------------------------------------------------------------------------------
Brian Bartholomew	UUCP:       ...gatech!uflorida!beach.cis.ufl.edu!bb
University of Florida	Internet:   bb@beach.cis.ufl.edu
--
"Any sufficiently advanced technology is indistinguishable from a rigged demo."
-------------------------------------------------------------------------------
Brian Bartholomew	UUCP:       ...gatech!uflorida!beach.cis.ufl.edu!bb
University of Florida	Internet:   bb@beach.cis.ufl.edu

phillips@tegra.COM (Steve Phillips) (08/03/90)

In article <24004@uflorida.cis.ufl.EDU> bb@beach.cis.ufl.edu () writes:
>
>I have a question on effective path lengths.  I am using the following
>code, designed to accumulate the width of a multi-font string...

[ description of limitcheck error on flattenpath deleted... ]

You probably already know this, but I'll mention it anyway... :^)
You can use the "setflat" operator to increase the number of
characters you can do a flattenpath on.  Setflat controls the
closeness of the approximation when you convert each bezier to
line segments, so by increasing the allowable error in the
approximation you can decrease the number of line segments
in the path.

The limitcheck error is caused because you're exceeding the
maximum number of path segments per path.  I don't know what
the limitation is for your printer, but on old LaserWriters
I think it was 1500.

- Steve

-- 
============================================================================
Steve Phillips                                         Tegra-Varityper, Inc.
tegra!phillips@uunet.com                               Billerica, MA
============================================================================