home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17577 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.6 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!netsys!ukma!cs.widener.edu!dsinc!bagate!cbmvax!peter
  2. From: peter@cbmvax.commodore.com (Peter Cherna)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Newbie font/screen question
  5. Message-ID: <37971@cbmvax.commodore.com>
  6. Date: 16 Dec 92 21:17:22 GMT
  7. References: <1992Dec15.215729.24166@ms.uky.edu>
  8. Reply-To: peter@cbmvax.commodore.com (Peter Cherna)
  9. Distribution: na
  10. Organization: Commodore-Amiga, Inc.  West Chester, PA.
  11. Lines: 32
  12.  
  13. In article <1992Dec15.215729.24166@ms.uky.edu> kherron@ms.uky.edu (Kenneth Herron) writes:
  14. >So, besides setting up the TextAttr, what's the minimum I need to
  15. >do with the font?  I'm guessing the OS only does an OpenFont() so
  16. >the font has to already be in memory; I can assure this by calling
  17. >OpenDiskFont() first, but that leaves an extra use count lying around,
  18.  
  19. Use counts are free, so don't worry about it.  Indeed, the correct
  20. way is:
  21.  
  22.     if ( OpenDiskFont( ... ) )
  23.     {
  24.         if ( OpenScreen( ... ) )
  25.         {
  26.             ...
  27.             CloseScreen( ... );
  28.         }
  29.         CloseFont( ... );
  30.     }
  31.     
  32. >I suspect AddFont() and RemFont() figure into this...
  33.  
  34. No, those are used to add/remove a TextFont to the public font list.  This is
  35. automatically handled by OpenDiskFont().
  36.  
  37. >Kenneth Herron                                              kherron@ms.uky.edu
  38.  
  39.      Peter
  40. --
  41. Peter Cherna, User Interface Development Group, Commodore-Amiga, Inc.
  42. {uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
  43. My opinions do not necessarily represent the opinions of my employer.
  44. "Opinions enlarged to show detail"
  45.