GLBasic forum

Main forum => GLBasic - en => Topic started by: jkirchner on 2009-Jan-22

Title: LOADFONT and SETFONT Question
Post by: jkirchner on 2009-Jan-22
Forgive the question if it is simple, I just got GLB this weekend and have been reading the help file and working through the exercises but I have a question.  The font was very small on the Hello World example so I read through the help and found the LOADFONT and SETFONT commands.  I also worked out how to make the font with the utility and save it and all.

My question is regarding the input fields.  I put LOADFONT "font_name.bmp", 1 but what exactly does that 1 mean?  I cannot find it referenced in the help file.  Also, SETFONT 1....what does the number mean there?  I played with them and actually had setfont accept a .5.  When I tried a 4 the font did not show (probably due also the the x, y it was given; though with the .5 it appeared again.  This is when I was working with the first game and trying to modify it further.).

If I missed where it was defined in the manual/help please tell me where; if not could someone explain what the numbers do?  Thanks.

John
Title: Re: LOADFONT and SETFONT Question
Post by: trucidare on 2009-Jan-22
The 1 is the Picture Number.

LOADFONT "blah.bmp",1 loads blah in number 1 then you can do SETFONT 1.
Title: Re: LOADFONT and SETFONT Question
Post by: jkirchner on 2009-Jan-22
Ohhhh.  That makes sense then.

So, if I get this right, if I have say 2 fonts I want to use I could assign one to number 1 and the other to number 2 and then could reference them before print commands with just a setfont 1 or setfont 2?

EDIT:  Never mind the question here, I tested my question and it does work.  I see this is very much like loading other pictures. 

Thanks for your help.