🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3652

Re: limitcheck in flattenpath

#3652
From: Woody Baker Eagle Signal
Date: Tue, 13 Nov 1990 05:31
17 lines
1345 bytes
In article <1642@umriscc.isc.umr.edu>, jmd@franklin.ee.umr.edu (Jim Dumser) writes:
> limitcheck errors in flattenpath when trying to center text.  It doesn't
The problem is totaly implementation limited.  There is nothing that you can
do about it, except do things diffrently.  I certainly would not do charpath
flattenpath to center text.  Try (string ) stringwidth.  This will give
you the width of the string.  From there, it is fairly trivial to center the
text horizontaly.  To center the text verticaly, however, is something else.
What I'd do is to get the bounding box for the FONT from the font
directory.  This will allow you to determine the total height for the
hightest character at your font size.  Divide it by 2 and use that as 
a fixed dy value.  Actually, something other than 2 looks better.
> 
> which returns dx dy on the stack.  When I call it as
> 

Cheers
Woody
Technical Details
Message-ID: <1698@chinacat.Unicom.COM>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!chinacat!woody
References: <1642@umriscc.isc.umr.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!chinacat!woody
From: woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal)
Newsgroups: comp.lang.postscript
Subject: Re: limitcheck in flattenpath
Summary: 1500 segments
Message-ID: <1698@chinacat.Unicom.COM>
Date: 13 Nov 90 05:31:52 GMT
References: <1642@umriscc.isc.umr.edu>
Organization: a guest of Unicom Systems Development, Austin
Lines: 17