Skip to content
Max Cobb edited this page Dec 24, 2020 · 3 revisions

With RUIText you can easily create an Entity with the specified text placed with its bounding box centre at the middle of your entity.

See RUIText documentation here.

With the very simplest example, you could just write RUIText(with: "hello"), and the result will be an Entity containing a mesh of the word "hello", with the origin being the centre of the mesh bounding box. Other properties include colour, font, and width and height dimensions for purposes of text wrapping.

Hello Text

Text Symbols

When I want to add an icon like ❤︎, ✓ or ♻︎ to my application, my least favourite thing to do is create or download a 3D asset to include in my app. Instead, with many symbols included in the default font (such as ascii symbols), we can create our 3D model with RUIText, like this:

RUIText(with: "❤︎ ✓ ♻︎ ●", color: .systemOrange)

Text Icons

Clone this wiki locally