surface.SetFont

From GMod Wiki

Jump to: navigation, search
Function
Syntax surface.SetFont( String Font Name )
Where is this used?
Description:
Sets the Font for all Text drawn in its function until you set the Font again.
Returns: nil
Part of Library: surface
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Surface.SetFont]Surface.SetFont [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionThis example creates a font then sets its.
Used onNewerClient.png
Code
surface.CreateFont("akbar",25,400,false,false,"simpsons") --In the gmod fonts folder is akbar
surface.SetFont("simpsons")
 
OutputN/A


Additional Notes

See Also

Fonts

What the fonts look like in game.

Below is a list of fonts that exist by default in Garry's Mod:

DebugFixed
DebugFixedSmall
DefaultFixedOutline
MenuItem
Default
TabLarge
DefaultBold
DefaultUnderline
DefaultSmall
DefaultSmallDropShadow
DefaultVerySmall
DefaultLarge
UiBold
MenuLarge
ConsoleText
Marlett
Trebuchet18
Trebuchet19
Trebuchet20
Trebuchet22
Trebuchet24
HUDNumber
HUDNumber1
HUDNumber2
HUDNumber3
HUDNumber4
HUDNumber5
HudHintTextLarge
HudHintTextSmall
CenterPrintText
HudSelectionText
DefaultFixed
DefaultFixedDropShadow
CloseCaption_Normal
CloseCaption_Bold
CloseCaption_BoldItalic
TitleFont
TitleFont2
ChatFont
TargetID
TargetIDSmall
HL2MPTypeDeath
BudgetLabel
Special fonts that you might also use.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox