Get Text Size

Get Text Size

Choose your operating system:

Windows

macOS

Linux

Returns the width and height of a string.

Target is HUD

Get Text Size
Target
Text
Font
Select Asset
Scale
Out Width
Out Height

Inputs

Target
HUD Object Reference
Text
String

String to draw

Font
Font Object Reference

Font to draw text. If NULL, default font is chosen.

Scale
Float (single-precision)

Scale multiplier to control size of the text.

Outputs

Out Width
Float (single-precision)

Returns the width in pixels of the string.

Out Height
Float (single-precision)

Returns the height in pixels of the string.