Article View: comp.lang.postscript
Article #1986Re: Defining a font vs. defining a procedure
From: Dick Dunn
Date: Thu, 27 Aug 1992 07:05
Date: Thu, 27 Aug 1992 07:05
21 lines
1368 bytes
1368 bytes
tvz@zandtwerk.Princeton.EDU () writes: >Suppose that I want to put a star shape down at 100 or 200 points >on a page. Which is better, to define a procedure that draws the >star shape or to define a temporary font with the star shape? >How much is the difference in terms of performance (memory/speed)? With these parameters (and assuming that the star is not huge--i.e., that it's small enough to fit in the font cache) you are much better off using a font. The procedure gets executed--all the rendering and rasterization--every time. The only thing you really save is in using "bind" to save some operator lookups, and that's inconsequential compared to the character rendering time. With a font, the star character gets converted to a bitmap only once. That's most of the work. Then, each time you show the character, the bits just get blopped into the page bitmap. -- Dick Dunn rcd@raven.eklektix.com -or- raven!rcd Boulder, Colorado Cats!
Technical Details
Message-ID:
<1992Aug27.070502@eklektix.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!asuvax!ncar!csn!raven!rcdReferences:
<1992Aug26.104914.16859@Princeton.EDU>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!asuvax!ncar!csn!raven!rcd From: rcd@raven.eklektix.com (Dick Dunn) Subject: Re: Defining a font vs. defining a procedure Message-ID: <1992Aug27.070502@eklektix.com> Organization: eklektix - Boulder, Colorado References: <1992Aug26.104914.16859@Princeton.EDU> Date: Thu, 27 Aug 1992 07:05:02 GMT Lines: 21