home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / amiga / programm / 15779 < prev    next >
Encoding:
Text File  |  1992-11-13  |  2.6 KB  |  57 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!utcsri!skule.ecf!torn!watserv2.uwaterloo.ca!watmath!undergrad.math.waterloo.edu!pejanes
  3. From: pejanes@undergrad.math.waterloo.edu (Peter Janes)
  4. Subject: Re: Wrong font in some IntuiText's (but not others)?
  5. Message-ID: <BxMGDC.G9L@undergrad.math.waterloo.edu>
  6. Organization: University of Waterloo
  7. References: <BxI8sJ.MBG@undergrad.math.waterloo.edu>
  8. Date: Thu, 12 Nov 1992 21:15:10 GMT
  9. Lines: 46
  10.  
  11. Okay, I know it's bad form to follow up one's own posts, but here goes
  12. anyway...
  13.  
  14. Yes, I _have_ read the Libraries RKM for info. on screens and windows.  I
  15. know I _can_ do a SetFont for the window's RastPort font.  My question is,
  16. _why_ do I have to?  From Libraries, it says that initializing the screen
  17. with a pointer to my_font sets that font for the screen's RastPort.  It also
  18. says that the window's RastPort gets the same attributes as the screen.  So
  19. shouldn't the window's RastPort font be my_font as well?  If not, why not?
  20.  
  21. As another example of bad style (8-) I've included my original posting that
  22. describes the problem.  But it's not that long, which is at least _slightly_
  23. redeeming.... 8-)
  24.  
  25. Again, thanks in advance for any help....
  26.  
  27. In article <BxI8sJ.MBG@undergrad.math.waterloo.edu> pejanes@descartes.uwaterloo.ca (Peter Janes) writes:
  28. >Here's an interesting problem:
  29. >
  30. >I'm having problems programming fonts under 2.04.  Here's what I've done:
  31. >
  32. >  Opened a custom screen, with screen.Font=&my_font;
  33. >  Created two sets of (global) IntuiText structures: one for gadget text, one
  34. >    for instruction text.
  35. >  Opened a window on the custom screen.
  36. >
  37. >Both sets of structures have ITextFont=NULL.  From what I understand, this
  38. >should render the text in the screen's font (my_font).
  39. >
  40. >The problem is, the gadget text is rendered correctly (i.e. in the font
  41. >specified in the Screen structure); the instruction text, printed via
  42. >PrintIText(), is rendered in the "default system font".
  43. >
  44. >IntuiText that's initialized locally in a function and PrintIText()'ed is also
  45. >rendered in the "default system font".
  46. >
  47. >What am I doing wrong?  From what I understand, IntuiText with
  48. >ITextFont=NULL is supposed to be rendered in the window's rastport font,
  49. >which is taken from the screen's font.  I've tried opening the screen with a
  50. >normal NewScreen structure, an ExtNewScreen structure, and an ExtNewScreen
  51. >structure with the SA_Font tag.  No luck.
  52.  
  53. -- 
  54. Peter Janes                       // | "Now, here's a song that answers the
  55.  (pejanes@descartes.uwaterloo.ca)//  |  rhetorical question 'Is that any good?'"
  56.    Certified Amiga Developer   \X/   |    --Moxy Fruvous, "That's Any Good"   
  57.