Derma Question.

Well, i’m working on a Derma and i need to set a texts size, i can’t seem to find the right function. I’ve tried everything.

DLabel:SetSize(40) Doesn’t work, neither does
DLabel:SetSize(40,40)

You mean as the text itself or the area the text is in?

For text size, I’d take a look at **[Surface.CreateFont

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Surface.CreateFont)**

For the size of the ‘box’ the text is in, you could always use **[Panel.SizeToContents

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Panel.SizeToContents)**

So, I would make a Surface.CreatFont with the example shown on the Wiki page, then make a DLabel that sets the font to, in my case, “coolvetica”

That didn’t work.

Edit
Excuse my stupidity, i’m fairly new to Derma. I figured that it was CV20. Thanks.

Quick question, where in that example is the size function?

Argument two

Tried changing the value right next to the font name but nothing happens, am i doing something wrong?

This here works. (Im using it myself)

[lua]
local Text = vgui.Create( “DLabel”, smenu )-- Change smenu to your DPanel
Text:SetText( “Put your text here
– Doing that goes to next line.!” ) – Test to be displayed
Text:SetPos( 190, 350 ) – The pos of the text
Text:SetFont( “Trebuchet24” )
Text:SetTextColor( Color( 255,102,0,255 ) ) – Color of text
Text:SizeToContents() – You NEED this!
[/lua]

Go here for a list of fonts: http://wiki.garrysmod.com/?title=Working_with_Fonts

Thanks guys, got it working.