• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED Font size doesn't affect the draw text function in Draw GUI Event. Why?

NastyMonk

Member
I set the font size and use the proper draw set font function in the Draw GUI event and then draw text in that event. However, the text size doesn't seem to change at all.

Is it supposed to behave like this?

Here is the code in the draw GUI event

GML:
/// @description Insert description here
// You can write your code in this editor
/// @description Insert description here
// You can write your code in this editor

if (obj_player.captured==true) {
    // code here
    
    draw_set_font(fnt_Game);
    draw_set_halign(fa_middle);
    draw_set_valign(fa_center);
    draw_text_color(view_wport[0]/2,view_hport[0]/2,"Captured",c_red,c_red,c_red,c_red,1);
}
fnt_Game looks like this.
1585101710690.png
 
Last edited:

chamaeleon

Member
I set the font size and use the proper draw set font function in the Draw GUI event and then draw text in that event. However, the text size doesn't seem to change at all.

Is it supposed to behave like this?
Post your draw code between [CODE] and [/CODE] tags.
 

TsukaYuriko

☄️
Forum Staff
Moderator
I set the font size and use the proper draw set font function in the Draw GUI event and then draw text in that event. However, the text size doesn't seem to change at all.
Change from what, specifically? The default? If so, you may have an old rendered texture of the font in your cache. Try clicking the paint brush button next to the run button in the IDE - this will clear the asset cache and should rebuilt the font's texture at its current settings.

If this still doesn't yield the expected results: Does the code you posted work as expected in a normal Draw event?
 

NastyMonk

Member
Change from what, specifically? The default? If so, you may have an old rendered texture of the font in your cache. Try clicking the paint brush button next to the run button in the IDE - this will clear the asset cache and should rebuilt the font's texture at its current settings.

If this still doesn't yield the expected results: Does the code you posted work as expected in a normal Draw event?
Thank you.
 
Top