• 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!

font editor panel and font functions

K

krugen

Guest
So I downloaded a font from Google and created a font resource:
https://docs2.yoyogames.com/index.html?page=source/_build/3_scripting/4_gml_reference/fonts/font_add.html

How do I proceed then? Do I need to do font_add()? Do I need to do some code with font functions?
https://docs2.yoyogames.com/index.html?page=source/_build/3_scripting/4_gml_reference/fonts/font_add.html

Create event:
Code:
font_in_use = font_add(font_questrial, 18, false, false, 32, 127);

draw_set_font(font_in_use);

draw_set_color(c_black);
Draw event:
Code:
draw_text(20, 20, "game is building");
Nothing happens


Updates:
If I do draw_set_font(font_questrial) without using font_add, it works.
 
Last edited by a moderator:
So I downloaded a font from Google and created a font resource
If I do draw_set_font(font_questrial) without using font_add, it works.
If you added the font in the IDE as a font resource, then you do not need to use font_add. The link to font_add in the manual tells you that it is used to add fonts into your game when the font is installed in your system (ie: in your OS, not the IDE). So you would just use draw_set_font to use the font that you have already added into the IDE yourself by creating the font resource.
 
K

krugen

Guest
If you added the font in the IDE as a font resource, then you do not need to use font_add. The link to font_add in the manual tells you that it is used to add fonts into your game when the font is installed in your system (ie: in your OS, not the IDE). So you would just use draw_set_font to use the font that you have already added into the IDE yourself by creating the font resource.
Right, thanks, mate. Have a nice day.
 
Top