🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: PSsetfont

#992
From: Simson L. Garfinkel
Date: Sat, 12 Sep 1992 22:48
50 lines
1576 bytes
Don't use the PS wraps for fonts; use the Font class.  It's  much faster.

	id	aFont = [Font newFont:"Times-Roman" size:12.0];

	[aFont set];
	PSmoveto(323,321)
	PSshow("foobar");

to change the size, use:

	aFont = [Font newFont:[aFont name] size:aNewSize];


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?
> 
> The raw PostScript required is
> 
> 	/Times-Roman findfont 12 scalefont setfont
> 
> I can wrap this as
> 
> 	defineps tm12()
> 		/Times-Roman findfont 12 scalefont setfont
> 	endps
> 
> but would like to code it inline as
> 
> 	PSfindfont("Times-Roman");
> 	PSscalefont(12.0);
> 	PSsetfont(???);
> 
> The last line is the one that causes me grief. I'm supposed to send it a
> reference, any clues?
> 
> Thanks
> 
> Andy Gray


--

................................................................simson

-- 

................................................................simson
Technical Details
Message-ID: <1992Sep12.224836.17946@next.cambridge.ma.us>
Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!ai-lab!next.cambridge.ma.us!simsong
References: <1992Sep11.160744.2376@axion.bt.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!ai-lab!next.cambridge.ma.us!simsong
From: simsong@next.cambridge.ma.us (Simson L. Garfinkel)
Newsgroups: comp.sys.next.programmer
Subject: Re: PSsetfont
Message-ID: <1992Sep12.224836.17946@next.cambridge.ma.us>
Date: 12 Sep 92 22:48:36 GMT
References: <1992Sep11.160744.2376@axion.bt.co.uk>
Sender: simsong@next.cambridge.ma.us
Reply-To: simsong@next.cambridge.ma.us
Organization: Simson Garfinkel and Associates, Inc.
Lines: 50