home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17410 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.5 KB  |  31 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!gumby!destroyer!fmsrl7!ukma!kherron
  3. From: kherron@ms.uky.edu (Kenneth Herron)
  4. Subject: Newbie font/screen question
  5. Message-ID: <1992Dec15.215729.24166@ms.uky.edu>
  6. Distribution: na
  7. Date: Wed, 16 Dec 1992 02:57:29 GMT
  8. Organization: University Of Kentucky, Dept. of Math Sciences
  9. Lines: 20
  10.  
  11. I'm writing my first graphics-using program, and have a simple question
  12. about setting a font for the screen.  The font I'm using is disk-based
  13. (Helvetica 13, in particular).
  14.  
  15. The .Font field of the NewScreen struct is a TextAttr rather than a 
  16. TextFont, implying the system does its own OpenFont() or OpenDiskFont() 
  17. when the screen is opened.  Xoper confirms this; the use count on the 
  18. font I'm specifying goes up by two (why two?) when the screen opens.
  19.  
  20. So, besides setting up the TextAttr, what's the minimum I need to
  21. do with the font?  I'm guessing the OS only does an OpenFont() so
  22. the font has to already be in memory; I can assure this by calling
  23. OpenDiskFont() first, but that leaves an extra use count lying around,
  24. so I'm wondering if there's a simpler way.  I suspect AddFont() and
  25. RemFont() figure into this...
  26. -- 
  27. Kenneth Herron                                              kherron@ms.uky.edu
  28. University of Kentucky                                         +1 606 257 2975
  29. Dept. of Mathematics     "Your ball goes over them, it sails off the edge into
  30. a huge cauldren of fire-breathing dragons."  "And they call this a par three?"
  31.