GameMaker: Studio

GameMaker: Studio

View Stats:
Freefork Nov 22, 2016 @ 7:10pm
Does anyone know how to apply one font to one text?
I want to make a screen with two texts in different fonts. How should I do that?
< >
Showing 1-4 of 4 comments
Thew Nov 22, 2016 @ 8:34pm 
Diveyoc Nov 22, 2016 @ 11:22pm 
I assume you have multiple draw text strings and you just want to change 1 of them.

draw_set_font(font1); - change font for your one particular string
draw_text("sample text");
draw_set_font(font2); - then set it back to your original font

Or instead of (font2) you could use(-1) which sets it to the default font.
Freefork Nov 23, 2016 @ 4:36am 
Oh! It is that simple? Well, thanks guys! I thought doing that:

Originally posted by Diveyoc:
I assume you have multiple draw text strings and you just want to change 1 of them.

draw_set_font(font1); - change font for your one particular string
draw_text("sample text");
draw_set_font(font2); - then set it back to your original font

Or instead of (font2) you could use(-1) which sets it to the default font.

would cause previous fonts to change.
Originally posted by Olaf Tyson:
Oh! It is that simple? Well, thanks guys! I thought doing that:

Originally posted by Diveyoc:
I assume you have multiple draw text strings and you just want to change 1 of them.

draw_set_font(font1); - change font for your one particular string
draw_text("sample text");
draw_set_font(font2); - then set it back to your original font

Or instead of (font2) you could use(-1) which sets it to the default font.

would cause previous fonts to change.

When changing fonts, or colors, or even surfaces, just think of it as if you were drawing in real life and changing your writing style, marker color, or paper being written on.

Once you make the change everything else you do will be using that font, color, or surface until you tell it to change again.
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Nov 22, 2016 @ 7:10pm
Posts: 4