pub struct TextStyle {Show 22 fields
pub font: Option<String>,
pub face: Option<String>,
pub font_file: Option<PathBuf>,
pub font_index: u32,
pub size: f32,
pub colour: [f32; 4],
pub highlight: Option<[f32; 4]>,
pub position: [f32; 2],
pub anchor: [f32; 2],
pub alignment: Align,
pub bold: bool,
pub italic: bool,
pub line_height: f32,
pub max_width: f32,
pub tracking: f32,
pub uppercase: bool,
pub shadow: Option<Shadow>,
pub outline: Option<Outline>,
pub box_: Option<BoxStyle>,
pub delay: f64,
pub fade_in: f64,
pub fade_out: f64,
}Expand description
A fully resolved text look. Lengths are px at the timeline’s frame_size.
Fields§
§font: Option<String>§face: Option<String>§font_file: Option<PathBuf>A font file to load (absolute, or relative to the timeline’s directory).
font_index: u32Face index in a collection (.ttc).
size: f32§colour: [f32; 4]§highlight: Option<[f32; 4]>Colour of *marked* spans; None leaves asterisks as text.
position: [f32; 2]Where anchor lands: offset from the frame’s middle, fractions of the frame, y down.
anchor: [f32; 2]Point of the text box placed at position: fractions of the box, [0, 0] top left.
alignment: Align§bold: bool§italic: bool§line_height: f32Line height as a multiple of size.
max_width: f32Wrap width, fraction of the frame width.
tracking: f32Extra space between letters, in ems.
uppercase: bool§shadow: Option<Shadow>§outline: Option<Outline>§box_: Option<BoxStyle>§delay: f64Seconds from the clip’s start before the text shows.
fade_in: f64§fade_out: f64Implementations§
Trait Implementations§
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Forget for TextStyle
impl Freeze for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnsafeUnpin for TextStyle
impl UnwindSafe for TextStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more