Path: utzoo!utgpu!watmath!clyde!att!ucbvax!bloom-beacon!apple!well!shf From: shf@well.UUCP (Stuart H. Ferguson) Newsgroups: comp.sys.amiga.tech Subject: Re: What font does Intuition use? Keywords: Intuition, IntuiText, TextAttr Message-ID: <10289@well.UUCP> Date: 9 Jan 89 23:05:29 GMT References: <10236@well.UUCP> <3235@amiga.UUCP> Reply-To: shf@well.UUCP (Stuart H. Ferguson) Organization: The Blue Planet Lines: 48 +-- jimm@cloyd.UUCP (Jim Mackraz) writes: | In article <10236@well.UUCP> shf@well.UUCP (Stuart H. Ferguson) writes: | )When I create an IntuiText structure, I give it a pointer to a TextAttr | )structure to use for rendering the text. I assume that the specified font | )needs to be in memory for Intuition to find it, and that if it doesn't, | )it will just pick a font. Any way to find out what font it really is using? | | It uses the current rastport font, if there is a rastport involved (e.g., | PrintIText( rp, itest, l, t )). If not, the situation is somewhat | ill-defined. This is the case, I think, since this is for menus. Just what rastport is involved with rendering menus seems entirely vague and deeply hidden in the bowels of the Intuition input device. | Why not do what Intuition does? Take the rastport (or a copy of it, or | a new rastport with InitRastPort() ), try an OpenFont(), if succeeds, use | the height of the font returned, else, use the font set in the rastport. The main reason is just that I don't really know what's going on. When Intuition goes to render a menu, does it do an OpenFont() each time? If so, can the menu font change if the "xyz.font" mentioned in the MenuItem TextAttr suddenly becomes available? If this is the case, then nothing I do can predict the behavior of the menu rendering. I can make an educated *guess*, but I can't really *know* what Intuition is going to use as the font this time. If the best I can do is a guess, then why bother? The solution seems to be for me to pick the font directly -- i.e., try OpenDiskFont() and if it works, keep that font open the whole time I want to use menus. If not, then modify the TextAttr to reflect the font I really got, ala. GetFontInfo() or whatever. Seems like a silly thing for me to have to do myself though. I think I'll just stick to topaz8/9. It simpler. | )As an aside: Why doesn't Intuition look on disk for the font if it can't | )find it in memory? | | It has to do with general principles and specific problems. The general | principle is something like "Intuition shouldn't call the DOS." Hadn't thought about that. Yes, of course you shouldn't call DOS without a Process, and a library may not have one. Also the mutual wait states, etc. Thanx for explaining this. -- Stuart Ferguson (shf@well.UUCP) Action by HAVOC