Custom font for HUD not working

I have two files, on the serverside file I have


resource.AddFile( "resource/fonts/couture-bld.otf" );

And on the clientside I have


surface.CreateFont( "HealthFont",
	font    = "Lato Light", -- Not file name, font name
	size    = 24,
	weight  = 400,
	antialias = true,
	shadow = true
})

I have

For some reason, the font isn’t downloading at all. I have it placed in “mygamemode/resource/fonts/font here.otf”
When I create text on the screen with “HealthFont” it’s just the default font.

Correct me if im wrong but, dosent garry’s mod only support .ttf fonts?

Yeah, I’ve never heard of supporting .otf either… But I could be wrong :stuck_out_tongue:

create a lua file called sv_font.lua
paste this


resource.AddFile("resource/fonts/font.otf/ttf")

and then a cl_font.lua
paste this


surface.CreateFont( "name", {
    font = "Font name not .otf file name",    
	size = 20,
	weight = 100,
	blursize = 0,
	scanlines = 0,
	antialias = true,
	underline = false,
	italic = false,
	strikeout = false,
	symbol = false,
	rotary = false,
	shadow = false,
	additive = false,
	outline = false,
})

Edit:That should work,i have it on my hud and no problems

I have his on my serverside now


resource.AddFile("resource/fonts/couture-bld.otf/ttf")

And this on my clientside


surface.CreateFont( "HealthFont", {
    font = "Coature",    
	size    = 24,
	weight  = 400,
	antialias = true,
	shadow = true
})

Should it say that it’s downloading it when i join? It just says dl’ing workshop addons.
Even though i have the CVARS set to “1”, it still doesn’t download anything besides workshop stuff.

EDIT:

okay, now i have this in sv_hud.lua


resource.AddFile("resource/fonts/primetime.ttf");

and this in cl_hud.lua


surface.CreateFont( "HealthFont", {
    font = "PRIMETIME",    
	size    = 24,
	weight  = 400,
	antialias = true,
	shadow = true
})

Still no download. No idea what to do next.

You can’t download something you already have?

Remove the font on your machine then join your server and check?