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