surface.CreateFont

From GMod Wiki

Jump to: navigation, search
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: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Surface.CreateFont]Surface.CreateFont [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionCreates two fonts, with AA turned on; one of a set scale, one scaled based on screen size.
Used onNewerClient.png
Code
surface.CreateFont ("coolvetica", 20, 400, true, false, "CV20") --unscaled
surface.CreateFont ("coolvetica", ScreenScale(20), 400, true, false, "CV20Scaled") --scaled
OutputN/A


Additional Notes

If working with fonts, remember to issue "gm_clearfonts" on the client to rebuild fonts when you reload the map.

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox