GetTextBoundsParams
GetTextBoundsParams : Instance
Overview
GetTextBoundsParams is an object that contains the conditions used when the size of text is measured.
After the string to measure, the font, the size, and the width used for wrapping are specified, it is passed to the GetTextBoundsAsync() method of TextService.
Properties
Font
Font
Specifies the font applied to the text to measure.
This corresponds to the FontFace property of TextLabel and TextButton.
Code Samples
local Params = Instance.new("GetTextBoundsParams")
Params.Font = Font.fromName("NotoSans", Enum.FontWeight.Bold, Enum.FontStyle.Normal)Size
number
Specifies the size of the text to measure in pixels.
This corresponds to the TextSize property of TextLabel and TextButton.
Code Samples
Text
string
Specifies the text to measure.
Code Samples
Width
number
Specifies the width used as the wrapping reference in pixels.
The default value is 0, and the text is measured as a single line without wrapping when the value is 0. Specifying the width of the area where the text is displayed returns the size of the text after it is wrapped.
Code Samples
Methods
Events
See also
TextServiceLast updated