GetTextBoundsParams
Use with TextService:GetTextBoundsAsync() to measure the size of text.
| Memory category | Instances |
|---|
Member index 5
Description
Pass this instance to TextService:GetTextBoundsAsync() to measure the size of text.
History 17
- 731 Change Default of Width from to 0
- 731 Change Default of Size from to 20
- 731 Change Default of RichText from to false
- 731 Change Default of Font from to
- 726 Change Default of Width from 0 to
- 726 Change Default of Size from 20 to
- 726 Change Default of RichText from false to
- 726 Change Default of Font from to
- 631 Add RichText
- 553 Change Default of Width from to 0
- 553 Change Default of Size from to 20
- 553 Change Default of Font from to
- 529 Add Width
- 529 Add Text
- 529 Add Size
- 529 Add Font
- 529 Add GetTextBoundsParams
Members 5
Font
| Type | Default | |
|---|---|---|
| Font | ||
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().
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | true |
RichText
| Type | Default | |
|---|---|---|
| bool | false | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | true |
Size
| Type | Default | |
|---|---|---|
| float | 20 | |
The size of the text that is being measured. Corresponds to the TextLabel.TextSize property.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | true |
Text
| Type | Default | |
|---|---|---|
| string | ||
The text being measured.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | true |
Width
| Type | Default | |
|---|---|---|
| float | 0 | |
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.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | true |