🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6146

Re: Flattenpath (was letter height)

#6146
From: Peter Davis
Date: Wed, 29 May 1991 14:40
39 lines
2558 bytes
In article <1356@kosman.UUCP>, kevin@kosman.UUCP (Kevin O'Gorman) writes...
>bkph@rice-chex.ai.mit.edu (Berthold K.P. Horn) writes:
> 
> 
>}If you don't execute flattenpath before pathbox, you will get a bounding
>}box for the knots and control points of the path, not of the pat itself.
>} ...
> 
>}In a properly designed Type 1 font this is not a problem since there must be
>                                            ^^^^^^^^^^^^^
>}knots at all extrema of the outline and so all control points lie in or on the
>}character outline bounding box.  But in some Type 1 fonts this is not the
>}case, and it certainly isn't the case in the typical Type 3 font (if there
>}is such a thing)...
> 
>Is this really true?  I'm wondering about the case of rotated letterforms
>and slanted letterforms.  I think it's easy in such a case for there to
>be real extensions of the path beyond the BB of the control points.
>Try a 45-degree rotated dot or something...  Granted, this is not *common*
>but if you're looking for full generality in your algorithms, it's wise
>to think of such things.

You don't have to worry about the path extending outside the bounding box of
the control points.  The control polygon always completely contains the
curve, so the bbox of the polygon also contains the curve.  However, you may
have extra room in the bbox for the control points, which you don't want.

In order to invert a character, you need to know not the bounding box of
the path defining the character's outline, but rather the bounding box of
the area on the surface which will be marked when the character is drawn.

Yes, this will be affected by the value of the flatness parameter in the
graphics state, but that probably won't have a perceptible affect on the
results in this case.  In fact, I think all Adobe PS interpreters effectively
flatten a path before rendering it anyway, so really doing flattenpath is
giving you a more accurate measure of the size of the character mark.

-pd
Technical Details
Message-ID: <1991May29.144539.20143@engage.pko.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!nntpd.lkg.dec.com!engage!3d.enet.dec.com!davis

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!nntpd.lkg.dec.com!engage!3d.enet.dec.com!davis
From: davis@3d.enet.dec.com (Peter Davis)
Newsgroups: comp.lang.postscript
Subject: Re: Flattenpath (was letter height)
Message-ID: <1991May29.144539.20143@engage.pko.dec.com>
Date: 29 May 91 14:40:44 GMT
Sender: newsdaemon@engage.pko.dec.com (USENET News Daemon)
Distribution: comp.lang.postscript
Organization: Digital Equipment Corporation
Lines: 39