Derma Setting Fonts

Hello,

So I’ve been trying to set a font for my basic derma Im making. I’ve tried using surface.CreateFont and surface.SetFont, whatever they’re. My DLabel which shows my username doesn’t change font at all, it just remains to use the default one.

Here’s my code, it’s basic, I know it is a WIP.

[LUA]
if CLIENT then
net.Receive( ‘Openpls’, function()
local base = vgui.Create( ‘DPanel’ )
base:SetSize( 960, 1080 )
base:Center()
base:SetVisible( true )
base:MakePopup()

	function base:Paint( w, h )
		draw.RoundedBox( 0, 0, 0, w, h, Color( 18, 18, 18, 250 ) )
	end


local playername = vgui.Create( “DLabel”, base )
playername:SetPos( 10, 10 )
playername:SetText( LocalPlayer():Nick() )
playername:SizeToContents()

end )

end

if SERVER then
util.AddNetworkString( ‘isply’ )
util.AddNetworkString( ‘Openpls’ )
local chatCommands = {
“!srcb”,
}
hook.Add( “PlayerSay”, “ChatCheck”, function( ply, text, bteam )
if ( table.HasValue( chatCommands, text:lower() ) ) then
net.Start( ‘Openpls’ )
net.Send( ply )
net.Start( ‘isply’ )
net.Send( ply )
return “”
end
end )
end
[/LUA]

Any help would be awesome!

Thanks

DLabel/SetFont Use the wiki, that’s why it’s there