Question:
How do you make your font bold in Game Maker Studio 1.x?


Answer:

Remember, we can draw font on the screen using the following code:

draw_font(50,50,"Hello World!");

To make this font bold, we need to first define a new font.

If you right click on the font folder on the left, select Create Font. (You can also create a font by clicking edit at the top of the screen and selecting Create Font.)

When you do this, a new font will be created (usually with a filename like font0) and the Font Properties menu will open. In this menu you can change many options for this particular font, but what we are looking for is the style section. In the style section you can specify that you want this font to be bold. Go ahead and click it. You can also name your font something unique for your game like fontBold1.

Now let's add a line to our code:

draw_set_font(fontBold1);
draw_font(50,50,"Hello World!");

The function draw_set_font allows you to set the font for the rest of the text that will be drawn. And so since we set this font (fontBold1) to be bold in the settings, it will display bold in the game! Once you test it out, try out other fonts and styles!

This is a basic way to get bold font into your game, but there are many other ways to customize your text for your game, but that's for another tutorial!

Page updated: March 23rd, 2015 @ 6:21 AM Eastern Time
Game Making Tutorials
Find tutorials about your favorite game creation software! Use the navigation below!

Game Maker: Studio
Help, References, and Tutorials
RPG Maker Fes
Help, References, and Tutorials
smileBASIC
Help, References, and Tutorials

Need Help?
Search answers to game development questions or ask a question yourself
Get exclusive updates from ExecuteCode.com!
Join the Email List
Download Books
Search Downloadable Books from ExecuteCode.com
Copyright 2010-2018 ExecuteCode.com.
All Rights Reserved.