pub struct Text {Show 15 fields
pub id: Option<String>,
pub text: String,
pub style: TextRole,
pub font_size: Option<f32>,
pub font_family: Option<String>,
pub color: Option<Rgba>,
pub background: Option<Rgba>,
pub outline: Option<Rgba>,
pub max_lines: Option<u32>,
pub opacity: Option<f32>,
pub fade: Option<f64>,
pub at: Option<f64>,
pub duration: Option<f64>,
pub inset: Option<Inset>,
pub align: Option<Align>,
}Expand description
Text in one of the theme’s styles.
Fields§
§id: Option<String>The node’s name, for other nodes to refer to.
text: StringThe text; \n starts a line.
style: TextRoleThe theme style it starts from. Default body.
font_size: Option<f32>Font size in pixels. Default: the style’s.
font_family: Option<String>Family. Default: the theme’s.
color: Option<Rgba>Color. Default: the theme’s text color.
background: Option<Rgba>A box of this color behind each line.
outline: Option<Rgba>A band of this color around the glyphs.
max_lines: Option<u32>The most lines it may take: with fonts to measure by, a longer text shrinks until it fits. Default: no limit.
opacity: Option<f32>Opacity, 0..=1. Default 1.
fade: Option<f64>Seconds of fade in and out. Default none.
at: Option<f64>Seconds from the parent’s start (an overlay’s: the video’s). Ignored in a sequence, which places its children one after another.
duration: Option<f64>Length in seconds. Default: the node’s own (a video’s, a caption file’s), else what its parent gives it.
inset: Option<Inset>Pixels kept clear inside the parent’s area: one number for every
side, or [top, right, bottom, left].
align: Option<Align>Where in its area the picture or text lies. Default center.