surface.GetTextSize
From GMod Wiki
| Function | |
| Syntax |
surface.GetTextSize( String Text ) Where is this used? |
| Description: | |
| Gets the height and width of a string of text. Only works if the font is already set. | |
| Returns: | Integer Width, Integer Height |
| Part of Library: | Surface |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Surface.GetTextSize]Surface.GetTextSize [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- This function seems to return the width of ampersands (&) as 0. The best way to prevent this is to replace all of the ampersands in the string with a character of similar width. You should use string.gsub for this.