SetFont for GUI Commands?

BlitzPlus Forums/BlitzPlus Programming/SetFont for GUI Commands?

-=Darkheart=-(Posted 2005) [#1]
I have a problem, I have an app which works fine, UNLESS the person using it has their display set to Large Fonts. Then my app is a mess, all the text is too big and doesn't fit in the boxes or on the buttons.

I thought I could get around this by using Loadfont, Setfont to load a font in and then set it's size etc. Thus removing the dependance on the default system font.

Not so...2D Graphics mode needs to be set before you can use setfont and that leaves me with a big ugly Window on the screen behind my app. If you don't set the 2D graphics mode you get a crash with the error "invalid graphics handle". I don't think setfont actually works with the GUI font's either...

Is there any way to enforce a font and size other than the system font and without using Graphics x,x,x,x? As users can (and do) change the size and style of the font used it can easily break my app if anything other than default.

From my searches it looks like this could be a bug reported over 6 months ago, is there a credible workaround?

Darkheart


WolRon(Posted 2005) [#2]
fntFixedSys = LoadFont("FixedSys", 14)
If fntFixedSys > 0 Then SetTextAreaFont ListingArea, fntFixedSys



-=Darkheart=-(Posted 2005) [#3]
Wolron doesn't that just set the font within a TextArea and not on the buttons/label/gadgets etc?

Darkheart


Mr Brine(Posted 2005) [#4]
Yo Darkheart,

Have you checked out the 'setgadgetfont' help page?


-=Darkheart=-(Posted 2005) [#5]
No I had not, thanks!

Darkheart