O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting Font Size and Appearance

As you can see by the previous examples, the appearance of the text didn’t look too spectacular. It was plain white, was relatively small, and used a standard font. You can change all that by loading fonts, specifying their attributes, and then applying those fonts and attributes to your string of text.

In Blitz3D, you use the LoadFont command to bring fonts into the program and specify their attributes. You can create different font variables so that applying different styles to your text becomes quite easy. Once your fonts are loaded, you can use the SetFont command to apply your font to a specific line of text.

Let’s look at a typical line of code used to load a font:

FntArial14U=LoadFont("Arial",14,False,False,True) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required