UI rich text は、シンプルなマークアップタグを使用して、文字列のセクションを強調、イタリック、下線、色を塗り、ストロークバージョンなどをスタイルに応用します。You can apply styling tags to TextLabel、TextButton、および TextBox オブジェクト。
リッチテキストを有効にする
プロパティウィンドウの [リッチテキスト] プロパティを通じて、または [クラス.ローカルスクリプト] プロパティを設定して、リッチテキスト を有効にする必要があります。

local title = Instance.new("TextLabel")title.RichText = truetitle.Text = "Use a <b>bold title</b>"
サポートされたタグ
リッチテキストタグは、XML/HTML タグと似ていますが、フォーマットされたテキストの周りに開始タグと終了タグを含める必要があります。
<b>Formatted text</b>
タグを逆順に開いた方法で閉じると、他のタグを中にネストすることもできます。
<b><i><u>Formatted text</u></i></b>
色
<font color=""> </font>
I want the <font color="#FF7800">orange</font> candy.``I want the <font color="rgb(255,125,0)">orange</font> candy.

サイズ
<font size=""> </font>
<font size="40">This is big.</font> <font size="20">This is small.</font>

フォント面
<font face=""> </font>
<font face="Michroma">This is Michroma face.</font>

フォントファミリー
<font family=""> </font>
<font family="rbxasset://fonts/families/Michroma.json">This is Michroma face.</font>

フォントの重量
<font weight=""> </font>
This is normal. <font weight="heavy">This is heavy.</font>``This is normal. <font weight="900">This is heavy.</font>

ストローク
<stroke> </stroke>
You won <stroke color="#00A2FF" joins="miter" thickness="2" transparency="0.25">25 gems</stroke>.

透明度
<font transparency=""> </font>
Text at <font transparency="0.5">50% transparency</font>.

大きな
<b> </b>
Text in <b>bold</b>.

イタリック
<i> </i>
Text <i>italicized</i>.

[Underline]
<u> </u>
Text <u>underlined</u>.

ストライクスルー
Text with strikethrough

行の空行
<br />
New line occurs after this sentence.<br />Next sentence...次の文...

大文字
<uppercase> </uppercase>``<uc> </uc>
<uppercase>Uppercase</uppercase> makes words read loudly!``<uc>Uppercase</uc> makes words read loudly!

小さなキャップ
<smallcaps> </smallcaps>``<sc> </sc>
My name is <smallcaps>Diva Dragonslayer</smallcaps>.``My name is <sc>Diva Dragonslayer</sc>.

マーク
<mark> </mark>
Text <mark color="#009966" transparency="0">highlighted</mark>.

コメント
<!-- -->
After this is a comment...<!--This does not appear in the final text--> and now more text...

脱出フォーム
特定のキャラクターを < または > といったようにレンダリングし、リッチテキストタグの一部として考慮されないようにするには、彼らの エスケープフォーム に書き込むことができます。
Personagem | 逃脱 | Exemplo | Resultado |
---|---|---|---|
<) | < | 10 < 100 ]] | 10 <100 |
> | ><1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1< | 100 > 10 | 100 > 10 |
"título de exemplo" | " | Meet "Diva Dragonslayer" | Conheça "Diva Dragonslayer" |
“ | ' | Diva's pet is a falcon! | Animal de estimação da Diva é um falcão! |
和 | & | Render another escape form <b>&lt;</b> by escaping an ampersand | Render outro formulário de fuga < ao escapar de um ampersand |