Changing font size and color

Previous topic - Next topic

pnunbe

Hi,
I tried to change font size and color by means of the tool built-in in GLB in a sample game: "The first game" in GLB Help, which contains some print statements.
I added the two statements:
   LOADFONT "largefont.png",2
   SETFONT 2
but nothing changed although the font was much larger and red.
May this be due to the fact that I have the free version of GLB or did I miss some step?

Moru

You have to make sure the program can find the file. Better put it in the Media folder and include the line:

Code (glbasic) Select
SETCURRENTDIR("Media")

Darmakwolf

Here's a demo program I made to help you. Just run it and press the right arrow key to change to another font.
As you'll see - all you need is a font file in the Media folder, then you just use loadfont at the beginning of the
program, and setfont in the main loop before you print your text. Hope it helps! :) (project attached as .zip)

[attachment deleted by admin]

pnunbe