pub struct TextConfig {
pub font_id: u16,
pub font_size: f32,
pub letter_spacing: f32,
pub line_height: f32,
pub wrap_mode: TextElementConfigWrapMode,
pub alignment: TextAlignment,
}Fields§
§font_id: u16Cotis does not manage font identity automatically.
Assign a stable ID per loaded font and provide it through this field.
font_size: f32The font size of the text.
letter_spacing: f32The spacing between letters.
line_height: f32The height of each line of text.
A value of 0.0 is treated by some renderers as “use backend default”.
wrap_mode: TextElementConfigWrapModeDefines the text wrapping behavior.
alignment: TextAlignmentThe alignment of the text.
Trait Implementations§
Source§impl Clone for TextConfig
impl Clone for TextConfig
Source§fn clone(&self) -> TextConfig
fn clone(&self) -> TextConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextConfig
Source§impl Debug for TextConfig
impl Debug for TextConfig
Auto Trait Implementations§
impl Freeze for TextConfig
impl RefUnwindSafe for TextConfig
impl Send for TextConfig
impl Sync for TextConfig
impl Unpin for TextConfig
impl UnsafeUnpin for TextConfig
impl UnwindSafe for TextConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<H, TailTarget, Source, Idx> Embed<RenderTList<H, TailTarget>, There<Idx>> for Sourcewhere
TailTarget: IsRenderList,
Source: Embed<TailTarget, Idx>,
impl<H, TailTarget, Source, Idx> Embed<RenderTList<H, TailTarget>, There<Idx>> for Sourcewhere
TailTarget: IsRenderList,
Source: Embed<TailTarget, Idx>,
Source§fn embed(self) -> RenderTList<H, TailTarget>
fn embed(self) -> RenderTList<H, TailTarget>
Converts
self into Target.