学ぶ
エンジンクラス
GetTextBoundsParams
複製されていません

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。


概要
継承されたメンバー
コードサンプル
テキストサイズの測定
local TextService = game:GetService("TextService")
-- パラメータを宣言
local params = Instance.new("GetTextBoundsParams")
params.Text = "こんにちは世界!"
params.Font = Font.new("rbxasset://fonts/families/GrenzeGotisch.json", Enum.FontWeight.Thin)
params.Size = 20
params.Width = 200
local success, bounds = pcall(function()
return TextService:GetTextBoundsAsync(params)
end)
if success then
print(bounds)
end

APIリファレンス
プロパティ
Font
並列読み取り
機能: UI
GetTextBoundsParams.Font:Font

RichText
並列読み取り
機能: UI
GetTextBoundsParams.RichText:boolean

Size
並列読み取り
機能: UI
GetTextBoundsParams.Size:number

Text
並列読み取り
機能: UI
GetTextBoundsParams.Text:string

Width
並列読み取り
機能: UI
GetTextBoundsParams.Width:number

©2026 Roblox Corporation。Roblox(ロブロックス)、RobloxロゴおよびPowering Imaginationは、米国並びにその他の国における登録商標および非登録商標です。