Home
  • English
  • 中文
Home
  • English
  • 中文
  • Get Started

    • Install
    • Hello LGUI
    • Custom Button
    • Use custom font
    • Prefab workflow
    • Interaction
    • Button from scratch
  • Sample Projects

    • Sample Projects
  • Prefab Workflow

    • LGUI Prefab
    • PrefabEditor
    • LGUILifeCycleBehaviour
    • LGUIPrefabInterface
  • Rendering

    • LGUICanvas
    • Screen Space Overlay
    • World Space - UE Renderer
    • World Space - LGUI Renderer
    • LGUI render flow
    • UICanvasGroup
  • Visual Components

    • UIText
    • UIEffect
    • TextAnimation
    • UIBackgroundBlur
    • UIBackgroundPixelate
  • Events

    • LGUIEventDelegate
    • LGUIEventSystem
  • Interaction Components

    • UISelectable component
  • Layout

    • Basic Layout
    • Auto Layout
  • Tween Animation

    • LTween
    • Use LTween for UI element
  • Performance

    • LGUI Stat
  • ReleaseNotes

    • LGUI 3.x
    • LGUI 2.x
  • FAQ

    • Why use prefab?
    • Update project from LGUI2 to LGUI3
    • Project 3d world position to LGUI's screen 2d position
    • Deproject LGUI's screen position to world
    • Use custom material for UI elements
    • Disable interaction component
    • Find Child by DisplayName
    • Get actor or component inside prefab
    • Anti-aliasing

UIText

UIText can render UE4's text/string with LGUIFont. Properties

Property:Function:
FontThe Font used to display the text.
TextThe text displayed by the control.
SizeThe size of the displayed text.
SpaceThe horizontal and vertical separation between characters.
H AlignThe horizontal alignment of the text.
V AlignThe vertical alignment of the text.
Overflow TypeThe method used to handle the situation where the text is too wide or too tall to fit in rectangle. The options are Horizontal Overflow and Vertical Overflow and Clamp Content.
Adjust WidthValid when Overflow Type is Horizontal Overflow. Set the rectangle's width to real with of text content.
Adjust HeightValid when "Overflow Type* is Vertical Overflow. Set the rectangle's height to real height of text content.
Font StyleThe style applied to the text. The options are None, Bold, Italic, Bold and Italic.
Rich TextShould markup elements in the text be interpreted as Rich Text styling?

RichText reference

Check "Rich Text" property in UIText to make it work:

Suported tags

TagDescriptionExample
bRenders the text in boldface.This is a <b>LGUI</b> example.
iRenders the text in italics.This is a <i>LGUI</i> example.
uRenders the text with underline.This is a <u>LGUI</u> example.
sRenders the text with strikethrough.This is a <s>LGUI</s> example.
sizeSets the size of the text according to the parameter value.This is a <size=18>LGUI</size> example.
This is a <size=+4>LGUI</size> example.
This is a <size=-4>LGUI</size> example.
colorSets the color of the text according to the parameter value. The color can be specified in the traditional HTML format. #rrggbbaa ...where the letters correspond to pairs of hexadecimal digits denoting the red, green, blue and alpha (transparency) values for the color. For example, cyan at full opacity would be specified by color=#00ffffff...
Another option is to use the name of the color, This is easier to understand but naturally, the range of colors is limited and full opacity is always assumed. The sheet blow shows supported color name.
This is a <color=#ff000000>LGUI</color> example.
This is a <color=red>LGUI</color> example.
supRenders the text with superscript.This is a <sup>LGUI</sup> example.
subRenders the text with subscript.This is a <sub>LGUI</sub> example.
CustomTagThis is useful when you need to select a range of text.This is a <MyTag>LGUI</MyTag> example.

Suported color names

Collor nameHex valueSwatch
black#000000ff
white#ffffffff
gray#808080ff
silver#c0c0c0ff
red#ff0000ff
green#008000ff
blue#0000ffff
orange#ffa500ff
purple#800080ff
yellow#ffff00ff
Last Updated:
Contributors: lf2007hf
Next
UIEffect