Difference between revisions of "Text Formatting"
Jump to navigation
Jump to search
m (Added Mark) |
m (spelling corection) |
||
(One intermediate revision by the same user not shown) | |||
Line 52: | Line 52: | ||
| | | | ||
| TBD | | TBD | ||
+ | |- | ||
+ | | closeall | ||
+ | | | ||
+ | | closes all format specifiers that came before this tag | ||
+ | |- | ||
+ | | closeallblock | ||
+ | | | ||
+ | | creates a block for the above closeall tag to operate in, e.g. <b><closeallblock><i>Blabla</closeall></closeallblock></b> prevents the <b> tag from being closed | ||
|- | |- | ||
| font | | font |
Revision as of 04:00, 8 August 2022
This article or section is a Stub. You can help the Neos Wiki by expanding it.
NeosVR supports a variety of text formatting tags. These tags can be added to text within various Neos Components to provide additional formatting options.
There are two types of tags
- Tags which wrap around the text they affect. These come in pairs with the text you wish to affect in the middle.
<tag>
opens, and</tag>
closes. For example,<b>hello</b>
would appear as hello - Tags which are standalone and signal usually advanced processing. For example
<noparse length=12>
will not parse the next 12 characters with formatting tags.
With these tags you can produce bold, italic, underlined, and struckthrough text with the b, i, u, and s tags, respectively.
A full list of tags follows:
neos uses TextMeshPro to render text internally, therefor the list of supported tags are simply the ones supported by TextMeshPro. http://digitalnativestudios.com/textmeshpro/docs/rich-text/
citation for neos uses textMeshPro: https://discord.com/channels/402159838827905024/402159839251398666/446341993925443607
Tag | Example | Description |
---|---|---|
align | <align=left>Text</align> | Sets text alignment. Valid argunments are left, center, and right. |
alpha | TBD | |
color | <color=#FF0000>Text</color> | Sets text color. Takes a hex-encoded RGB color. |
b | <b>Text</b> | Shows text in boldface |
i | <i>Text</i> | Shows text in italics |
cspace | TBD | |
closeall | closes all format specifiers that came before this tag | |
closeallblock | creates a block for the above closeall tag to operate in, e.g. <b><closeallblock><i>Blabla</closeall></closeallblock></b> prevents the <b> tag from being closed | |
font | TBD | |
indent | TBD | |
line-height | TBD | |
line-indent | TBD | |
link | TBD | |
lowercase | <lowercase>Text</lowercase> | Forces all characters to be lowercase |
uppercase | <uppercase>Text</uppercase> | Forces all characters to be uppercase |
smallcaps | <smallcaps>Text</smallcaps> | Renders lowercase characters as small uppercase characters |
margin | TBD | |
mark | <mark=#ffff00aa></mark> | Used to highlight text in an RGBA hex color. Note that alpha should be filled in, otherwise the highlight will be opaque over the text. |
mspace | TBD | |
noparse | <noparse>Text</noparse> | Prevents the contents of the tag from being parsed as rich text |
nobr | <nobr>Text</nobr> | Prevents the contents of the tag from being broken across lines. Useful for bounded text. |
page | TBD | |
pos | TBD | |
size | <size=16>Text</size> | Sets the size of the text. This is absolute; the size of the Text component is completely ignored. |
space | TBD | |
sprite | TBD | |
s | <s>Text</s> | Shows text with a line through it |
u | <u>Text</u> | Shows text with a line beneath it |
style | TBD | |
sub | <sub>Text</sub> | Displays the text in subscript |
sup | <sup>Text</sup> | Displays the text in superscript |
voffset | TBD | |
width | TBD |