GetTextBoundsParams
GetTextBoundsParams : Instance
Overview
GetTextBoundsParams는 텍스트 크기를 측정할 때 사용할 조건을 담는 오브젝트입니다.
측정할 문자열과 폰트, 크기, 줄바꿈 기준 너비를 지정한 뒤 TextService의 GetTextBoundsAsync() 메서드에 전달합니다.
Properties
Font
Font
측정할 텍스트에 적용할 폰트를 지정합니다.
TextLabel과 TextButton의 FontFace 속성에 대응합니다.
Code Samples
local Params = Instance.new("GetTextBoundsParams")
Params.Font = Font.fromName("NotoSans", Enum.FontWeight.Bold, Enum.FontStyle.Normal)Size
number
측정할 텍스트의 크기를 Pixel 단위로 지정합니다.
TextLabel과 TextButton의 TextSize 속성에 대응합니다.
Code Samples
Text
string
측정할 텍스트를 지정합니다.
Code Samples
Width
number
줄바꿈 기준이 되는 너비를 Pixel 단위로 지정합니다.
기본값은 0이며, 0인 경우 줄바꿈을 하지 않고 한 줄로 측정합니다. 텍스트를 표시할 영역의 너비를 지정하면 여러 줄로 나누어진 상태의 크기를 구할 수 있습니다.
Code Samples
Methods
Events
See also
TextServiceLast updated