surface.CreateFont
From GMod Wiki
Function | |
Syntax |
surface.CreateFont( String font_name, Number size, Number weight, Boolean antialiasing, Boolean additive, String new_font_name, Boolean drop_shadow, Boolean outlined, Number blur ) Where is this used? |
Description: | |
Creates a font to be used in surface.SetFont | |
Returns: | nil |
Part of Library: | surface |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Surface.CreateFont]Surface.CreateFont [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- font_name is the name of the font you wish to use (i.e Arial, Tahoma, etc) This must be the truetype font name, not the file name.
- size is the size in pixels. It is capped at 128.
- weight is the boldness of the font. 400 is normal, 700 is bold.
- new_font_name is the name of the font you are creating. This is the name that you use in surface.SetFont.
If working with fonts, remember to issue "gm_clearfonts" on the client to rebuild fonts when you reload the map.