Get the width of the string
text | Specify the character string for which you want to obtain the width. |
Returns the width of the specified string in pixels
This method allows you to get the width you need when drawing the specified string with the current font settings.