home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / programm / 6171 < prev    next >
Encoding:
Text File  |  1992-09-15  |  1.3 KB  |  47 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!newshost!root
  3. From: mferris@trirex.com (Mike Ferris)
  4. Subject: Re:  PSsetfont
  5. Message-ID: <1992Sep15.195006.3459@Trirex.COM>
  6. Sender: root@Trirex.COM (Operator)
  7. Organization: Trirex Systems Inc.
  8. References: <dillon.0nol@overload.Berkeley.CA.US>
  9. Date: Tue, 15 Sep 1992 19:50:06 GMT
  10. Lines: 35
  11.  
  12. Matthew Dillon writes
  13. >In article <1992Sep12.224836.17946@next.cambridge.ma.us>  
  14. simsong@next.cambridge.ma.us (Simson L. Garfinkel) writes:
  15. >>Don't use the PS wraps for fonts; use the Font class.  It's  much  
  16. faster.
  17. >>
  18. >>    id    aFont = [Font newFont:"Times-Roman" size:12.0];
  19. >>
  20. >>    [aFont set];
  21. >>    PSmoveto(323,321)
  22. >>    PSshow("foobar");
  23. >>
  24. >>to change the size, use:
  25. >>
  26. >>    aFont = [Font newFont:[aFont name] size:aNewSize];
  27. >
  28. >    Don't you want to free the old aFont ?
  29. >
  30. >                    -Matt
  31. >
  32. >--
  33. >
  34. >    Matthew Dillon        dillon@Overload.Berkeley.CA.US
  35. >    1005 Apollo Way        uunet.uu.net!overload!dillon
  36. >    Incline Village, NV. 89451    ham: KC6LVW (no mail drop)
  37. >    USA             Sandel-Avery Engineering (702)831-8000
  38.  
  39. DON'T free Font objects.  Notice the "newFont" instead of "initFont"  
  40. method.  Fonts are shared.  If you ask for a Times-Roman 12 point font  
  41. again, you'll get the original aFont.
  42.  
  43. --
  44. Mike Ferris
  45. Trirex Systems, Inc.
  46. mferris@trirex.com
  47.