home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / programm / 6130 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  1.5 KB

  1. Path: sparky!uunet!snorkelwacker.mit.edu!ai-lab!next.cambridge.ma.us!simsong
  2. From: simsong@next.cambridge.ma.us (Simson L. Garfinkel)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: PSsetfont
  5. Message-ID: <1992Sep12.224836.17946@next.cambridge.ma.us>
  6. Date: 12 Sep 92 22:48:36 GMT
  7. References: <1992Sep11.160744.2376@axion.bt.co.uk>
  8. Sender: simsong@next.cambridge.ma.us
  9. Reply-To: simsong@next.cambridge.ma.us
  10. Organization: Simson Garfinkel and Associates, Inc.
  11. Lines: 50
  12.  
  13. Don't use the PS wraps for fonts; use the Font class.  It's  much faster.
  14.  
  15.     id    aFont = [Font newFont:"Times-Roman" size:12.0];
  16.  
  17.     [aFont set];
  18.     PSmoveto(323,321)
  19.     PSshow("foobar");
  20.  
  21. to change the size, use:
  22.  
  23.     aFont = [Font newFont:[aFont name] size:aNewSize];
  24.  
  25.  
  26. In article <1992Sep11.160744.2376@axion.bt.co.uk> agray@axion.bt.co.uk (Andy  
  27. Gray) writes:
  28. > Having a slight problem with PSsetfont and I can't find the answer on my  
  29. system,
  30. > can anyone help?
  31. > The raw PostScript required is
  32. >     /Times-Roman findfont 12 scalefont setfont
  33. > I can wrap this as
  34. >     defineps tm12()
  35. >         /Times-Roman findfont 12 scalefont setfont
  36. >     endps
  37. > but would like to code it inline as
  38. >     PSfindfont("Times-Roman");
  39. >     PSscalefont(12.0);
  40. >     PSsetfont(???);
  41. > The last line is the one that causes me grief. I'm supposed to send it a
  42. > reference, any clues?
  43. > Thanks
  44. > Andy Gray
  45.  
  46.  
  47. --
  48.  
  49. ................................................................simson
  50.  
  51. -- 
  52.  
  53. ................................................................simson
  54.