There doesn't seem to be code in place to warn a user if they used an invalid font in a function, particularly in panels.To use a font, self made or otherwise, simply use the name of it in place of the 'font' argument, such as:ĭraw.SimpleText ( "Hello!", "MyFont", 100, 100, color_white ) Notes If you make a change to a surface.CreateFont function in a script while the game is running, you will need to run gm_clearfonts in order for the changes to your font(s) to show. This is a developer console command and should never be called from a mod/gamemode. However, you can call the console command gm_clearfonts to clear all of the known custom fonts. Custom fonts persist even if the game server (local or network) is reloaded, so if the font "MyFont" already exists then nothing will be created. Surface.CreateFont ( "akbar", 48, 500, true, true, "MyFont" ) Creating FontsĬustom fonts should be defined in the hook GM:Initialize, using the surface.CreateFont function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |