🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1046

Re: PSsetfont

#1046
From: moose
Date: Mon, 14 Sep 1992 18:00
41 lines
1818 bytes
In article <1992Sep11.160744.2376@axion.bt.co.uk> agray@axion.bt.co.uk (Andy  
Gray) writes:
> Having a slight problem with PSsetfont and I can't find the answer on my  
system,
> can anyone help?

I'm going to assume you know about the Font object but don't want to use it for  
some reason.  Otherwise, ignore the rest.

> but would like to code it inline as
> 
> 	PSfindfont("Times-Roman");
> 	PSscalefont(12.0);
> 	PSsetfont(???);

I would recommend using PSselectfont instead as it is less postscript to send  
to the Window Server.

> 
> The last line is the one that causes me grief. I'm supposed to send it a
> reference, any clues?

After quickly going through the disassembly, we see that if we pass in 8, the  
following postscript is emitted

8 execuserobject setfont

If 9 is passed in

9 execuserobject setfont

is emitted.  So, I would say that you pass in the user object that your font  
is.  Since neither PSfindfont, nor PSscalefont create the user object, you  
probably have to do that manually.  Overall, quite a painful process when you  
can use either PSselectfont, or just make your own wrap.

--
Michael Rutman			|	moose@svcdudes.com
Cubist				|	makes me a NeXT programmer
Software Ventures		|	maker of MicroPhone Pro
#include <std.disclaimer>	|	really offensive political statement
Technical Details
Message-ID: <1992Sep14.180035.8033@svcdudes.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!olivea!spool.mu.edu!yale.edu!jvnc.net!rutgers!cmcl2!psinntp!psinntp!svc!news
References: <1992Sep11.160744.2376@axion.bt.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!olivea!spool.mu.edu!yale.edu!jvnc.net!rutgers!cmcl2!psinntp!psinntp!svc!news
From: moose@svcdudes.com
Newsgroups: comp.sys.next.programmer
Subject: Re: PSsetfont
Message-ID: <1992Sep14.180035.8033@svcdudes.com>
Date: 14 Sep 92 18:00:35 GMT
References: <1992Sep11.160744.2376@axion.bt.co.uk>
Sender: news@svcdudes.com
Reply-To: moose@svcdudes.com
Distribution: na
Organization: Software Ventures, Inc.
Lines: 41