Skip to content

struct

TextSpec

pub struct TextSpec {
    pub text: String,
    pub font: String,
    pub size: f32,
    pub depth: f32,
    pub bevel: f32,
    pub align: TextAlign3,
    pub line_height: f32,
    pub letter_spacing: f32,
    pub curve: f32,
}

text3d: a string set in a font.

Fields

text

pub text: String

The text, with n between lines.

font

pub font: String

The font's URL (TTF, OTF, WOFF, WOFF2, or a .wmodel glyph set).

size

pub size: f32

Em size in scene units.

depth

pub depth: f32

Extrusion depth (0 = flat).

bevel

pub bevel: f32

Bevel width on the front and back edges (0 = none).

align

pub align: TextAlign3

How lines line up with the position.

line_height

pub line_height: f32

Line spacing, in ems.

letter_spacing

pub letter_spacing: f32

Extra space between letters, in ems.

curve

pub curve: f32

How closely curves are followed, in ems (smaller = smoother).

Trait implementations