home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!newshost!root
- From: mferris@trirex.com (Mike Ferris)
- Subject: Re: PSsetfont
- Message-ID: <1992Sep15.195006.3459@Trirex.COM>
- Sender: root@Trirex.COM (Operator)
- Organization: Trirex Systems Inc.
- References: <dillon.0nol@overload.Berkeley.CA.US>
- Date: Tue, 15 Sep 1992 19:50:06 GMT
- Lines: 35
-
- Matthew Dillon writes
- >In article <1992Sep12.224836.17946@next.cambridge.ma.us>
- simsong@next.cambridge.ma.us (Simson L. Garfinkel) writes:
- >>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];
- >
- > Don't you want to free the old aFont ?
- >
- > -Matt
- >
- >--
- >
- > Matthew Dillon dillon@Overload.Berkeley.CA.US
- > 1005 Apollo Way uunet.uu.net!overload!dillon
- > Incline Village, NV. 89451 ham: KC6LVW (no mail drop)
- > USA Sandel-Avery Engineering (702)831-8000
-
- DON'T free Font objects. Notice the "newFont" instead of "initFont"
- method. Fonts are shared. If you ask for a Times-Roman 12 point font
- again, you'll get the original aFont.
-
- --
- Mike Ferris
- Trirex Systems, Inc.
- mferris@trirex.com
-