テキストフォーマット

From Neos Wiki
Revision as of 13:42, 9 February 2023 by Aesc (talk | contribs) (Created page with "セクションの最初に開始タグを配置します。タグの中のテキストは、その名前(この例では<tt>b</tt>)を表します。セクションの終...")
Jump to navigation Jump to search

This article or section is a Stub. You can help the Neos Wiki by expanding it.


Other languages:
English • ‎日本語

NeosVRは、様々なテキストフォーマットタグをサポートしています。これらのタグは、様々なNeosコンポーネント内のテキストに追加して使用することができます。

Formatting(書式設定)

テキストを装飾するためのテキストフォーマットシステムは、HTMLからヒントを得ていますが、標準的なHTMLと厳密に互換性があることは意図していません。基本的な考え方は、テキストのセクションは、マッチするタグのペアで囲むことができるということです。 例えば、<b> タグは太字にします: 私たちは人間<b>でない</b>のか? → 私たちは人間でないのか?

例にあるように、タグは角括弧<の中にあるテキストの断片に過ぎないのです。

セクションの最初に開始タグを配置します。タグの中のテキストは、その名前(この例ではb)を表します。セクションの終わりには、もう一つのタグを置きます。これは閉じタグです。名前は開始タグと同じですが、名前の前にスラッシュ/が付きます。すべての開始タグには、それに対応する終了タグが必要です。開閉タグを閉じなければ、本文の終わりまでスタイルは続きます。

The tags are not displayed to the user directly but are interpreted as instructions for styling the text they enclose.

Parameters

Some tags have a simple all-or-nothing effect on the text but others might allow for variations. For example, the color tag needs to know which color to apply. Information like this is added to tags by the use of parameters. For example: We are <color=green>Devo</color>..

Note that the ending tag doesn't include the parameter value.

Tag parameters cannot include extra characters. For example, this: We are <color =green>Devo</color>. does not work because of the space before the = character.

これらのタグを使って、それぞれb、i、u、sタグで、'太字斜体下線打ち消し線のテキストを作成することができます。

Unlike HTML, tags don't necesarily have to fully encapsulate one another, so writing <b>bold text<i>bold italic text</b>italic text</i> is totally fine.

All tags can have trailing spacebars meaning that writing a tag such as <b   >Bold Text</b> is totally fine.

For parameters, instead of writing an equal sign it's possible to use a space bar so writing <color red>Red Text</color> is totally fine.

Tags that don't accept parameters can still have the parameter separator (=) and still parse so writing <b=>Bold Text</b> is totally fine.

タグの完全なリストは次のとおりです。

Color Names

The color tag (and alpha tag) can accept colors by name, the list of allowed color names and their values is as follows:

タグ 説明
align <align=left>Text</align> テキストの配置を設定します。有効な引数はleft、center、rightです。
alpha 未定
color <color=#FF0000>Text</color> テキストの色を設定します。16進数で表現されたRGBカラーを使用できます。
b <b>Text</b> テキストを太字にします。
i <i>Text</i> テキストを斜体にします。
cspace 未定
closeall このタグの前にあるすべての書式指定子を閉じます。
closeallblock 上記のcloseallタグが動作するブロックを作成します。例: <b><closeallblock><i>hogehoge</closeall></closeallblock></b>は <b>が閉じられるのを防ぎます。
font 未定
indent 未定
line-height 未定
line-indent 未定
link 未定
lowercase <lowercase>Text</lowercase> すべての文字を強制的に小文字にします。
uppercase <uppercase>Text</uppercase> すべての文字を強制的に大文字にします。
smallcaps <smallcaps>Text</smallcaps> 小文字を小さな大文字にして表示します。
margin 未定
mark <mark=#ffff00aa></mark> テキストをRGBA16進色でハイライトするために使用します。アルファ値が入力されている必要があり、入力されていない場合はテキストが不透明になることに注意してください。
mspace 未定
noparse <noparse>Text</noparse> タグの内容がリッチテキストとして解析されるのを防ぎます。
nobr <nobr>Text</nobr> タグの内容が改行して壊れてしまうのを防ぎます。境界線のあるテキストに便利です。
page 未定
pos 未定
size <size=16>Text</size> テキストのサイズを設定します。これは絶対的なもので、Textコンポーネントのサイズは完全に無視されます。
space 未定
sprite 未定
s <s>Text</s> テキストに線を引いて表示します。
u <u>Text</u> テキストに下線を引いて表示します。
style 未定
sub <sub>Text</sub> テキストを下付きで表示します。
sup <sup>Text</sup> テキストを上付きで表示します。
voffset 未定
width 未定
Name Value
clear rgba(0,0,0,0)
white rgb(1,1,1)
gray rgb(0.5,0.5,0.5)
black rgb(0,0,0)
red rgb(1,0,0)
green rgb(0,1,0)
blue rgb(0,0,1)
yellow rgb(1,1,0)
cyan rgb(0,1,1)
magenta rgb(1,0,1)
orange rgb(1,0.5,0)
purple rgb(0.5,0,1)
lime rgb(0.75,1,0)
pink rgb(1,0,0.5)
brown rgb(0.25,0,0)