GDAL3AI@cc1.kuleuven.ac.be (09/27/90)
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) BTW. I find the Width by using IntuiTextLength (or something like that, can't remember... is that right too ???) If you can help me with this, please respond as fast as possible, 'cos I'll leave soon.. MB
BAXTER_A@wehi.dn.mu.oz (09/30/90)
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) > BTW. I find the Width by using IntuiTextLength (or something like that, > can't remember... is that right too ???) > If you can help me with this, please respond as fast as possible, 'cos > I'll leave soon.. > > MB 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. 2) Yes Regards Alan
bj@cbmvax.commodore.com (Brian Jackson) (10/01/90)
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" | ----------------------------------------------------------------------------
dlcogswe@vela.acs.oakland.edu (Dan Cogswell) (10/02/90)
In article <14753@cbmvax.commodore.com> bj@cbmvax.commodore.com (Brian Jackson) writes: >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 :) > ---------------------------------------------------------------------------- > | Brian Jackson Software Engineer @ Commodore-Amiga Inc. | So how does one find the height of the other fonts that preferences lets you set (titlebar and icon fonts)? -- Dan Cogswell "In a world full of Ninja Turtles, it's INET: dlcogswe@vela.acs.oakland.edu nice to see Aikido Yoshinkai has BITNET: dlcogswell@oakland preserved it's dignity." HAIRNET: <fill-in dumb joke> -- Gozo Shioda, 1990
bj@cbmvax.commodore.com (Brian Jackson) (10/03/90)
In article <3220@vela.acs.oakland.edu> dlcogswe@vela.acs.oakland.edu (Dan Cogswell) writes: >So how does one find the height of the other fonts that preferences lets >you set (titlebar and icon fonts)? > To get the title bar font you can screen = LockPubScreen( "WorkBench" ) ; bar_font_hgt = screen->Font->ta_YSize ; UnlockPubScreen( NULL, screen ) ; As to the icon's font, I defer to Peter Cherna :) >Dan Cogswell bj ------------------------------------------------------------------------ | Brian Jackson Software Engineer @ Commodore-Amiga Inc. GEnie: B.J. | | bj@cbmvax.commodore.com or ...{uunet|rutgers}!cbmvax!bj | | "Seek simplicity, and distrust it." | ------------------------------------------------------------------------