surface.SetFont
From GMod Wiki
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: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Surface.SetFont]Surface.SetFont [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | This example creates a font then sets its. |
---|---|
Used on | |
Code | surface.CreateFont("akbar",25,400,false,false,"simpsons") --In the gmod fonts folder is akbar surface.SetFont("simpsons") |
Output | N/A |
Additional Notes
- Font Name - The name of the font after creating it with surface.CreateFont()
- Setting to an undefined font will cause weird random draw errors.
- Click here for a guide for using fonts.
See Also
Fonts
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