Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!rutgers!cbmvax!bj From: bj@cbmvax.commodore.com (Brian Jackson) Newsgroups: comp.sys.amiga Subject: Re: default font height under 2.0 Message-ID: <14753@cbmvax.commodore.com> Date: 1 Oct 90 14:20:41 GMT References: <90270.152921GDAL3AI@cc1.kuleuven.ac.be> <13554@wehi.dn.mu.oz> Reply-To: bj@cbmvax.commodore.com (Brian Jackson) Organization: Commodore, West Chester, PA Lines: 29 In article <13554@wehi.dn.mu.oz> BAXTER_A@wehi.dn.mu.oz writes: >In article <90270.152921GDAL3AI@cc1.kuleuven.ac.be>, GDAL3AI@cc1.kuleuven.ac.be writes: >> I'm looking for a way to find the heigth of the default system font >> under 2.0 . The problem I have is the following: I want to print a >> text in a window via PrintIText. I want to determine the window >> heigth before opening it so I get a nice window that fits around >> the text. What is the right way to do this ??? (under 2.0) > >1) AskFont(rp, textAttr) > struct RastPort *rp; > struct TextAttr *textAttr > > FUNCTION: This function fills the text attributes structure with the > attributes of the current font in the rasport. While I guess you could use this round-about method (I assume that the RastPort in question would be the screen's ?) I'd be hesitant to do it that way. He wants the default system font which is guaranteed to be in GfxBase->DefaultFont. Easier to access, too :) bj >Regards Alan ---------------------------------------------------------------------------- | Brian Jackson Software Engineer @ Commodore-Amiga Inc. | | bj@cbmvax.commodore.com or ...{uunet|rutgers}!cbmvax!bj GEnie: B.J. | | "Now there's a look in your eyes, like black holes in the sky" | ----------------------------------------------------------------------------