Roblox UtilitiesDevlHub Roblox Documentation

Class

GetTextBoundsParams

NotReplicated
Inherits
Instance › Object
Memory category
Instances

Use with TextService:GetTextBoundsAsync() to measure the size of text.

Pass this instance to TextService:GetTextBoundsAsync() to measure the size of text.

Properties 5#

FontDatatype.FontThe Font of the text being measured.ReadSafe
RichTextbooleanDetermines whether the measured text is interpreted using rich text markup.ReadSafe
SizefloatThe size of the text being measured.ReadSafe
TextstringThe text being measured.ReadSafe
WidthfloatThe width of the container for line breaking.ReadSafe

Font: Datatype.Font#

ReadSafe

The Font of the text being measured. Corresponds to the TextLabel.FontFace property on text objects.

Not to be confused with Font. This is an object that you can create using Font.new().

RichText: boolean#

ReadSafe

Determines whether the text being measured is interpreted using rich text markup. Corresponds to the TextLabel.RichText property on text objects.

By default, the value is false, meaning the GetTextBoundsParams.Text string is measured verbatim. When set to true, rich text formatting tags in the string are parsed rather than measured as literal characters, so the returned bounds reflect the styled text.

Size: float#

ReadSafe

The size of the text that is being measured. Corresponds to the TextLabel.TextSize property.

Text: string#

ReadSafe

The text being measured.

Width: float#

ReadSafe

The width of the container for line breaking. By default, the value is 0, which means no line breaking will be performed. You can set it to the width of the container that you'll be putting the text into.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed