Creating a font

Hello this is my first post. The reason I’m posting this is I’m creating a HUD that uses a custom font and are using the surface.CreateFont function and I need to know where I set the font in the table does the font being used need to be in a certain directory.

surface.CreateFont( "CoolestFont", {
	font = "Arial", -- This part.
	size = 13,
	weight = 500,
	blursize = 0,
	scanlines = 0,
	antialias = true,
	underline = false,
	italic = false,
	strikeout = false,
	symbol = false,
	rotary = false,
	shadow = false,
	additive = false,
	outline = false,
} )

It must be in a clientside file.

Meaning it was send to the client with AddCSLuaFile() on the server, and then ran on the client with include() if necessary.

Ensure that you only create each font once. Garry’s Mod doesn’t release fonts when you disconnect from a server–meaning if you auto-refresh the code, create fonts in loops, or reconnect to the server, eventually you’ll run out of memory just by loading the same font over-and-over again.

I think you misunderstood him, he wants to know where to put custom fonts.

You put the files into resource/fonts/ and put the font name into the table. NOT THE FILE NAME.