pub struct TextProperties {
pub metrics: Metrics,
pub align: Option<Align>,
pub attrs: Attrs<'static>,
pub wrap: Wrap,
pub shaping: Shaping,
}Expand description
The style of a font
Fields§
§metrics: MetricsThe metrics of the font (font size and line height)
By default this is set to Metrics { font_size: 14.0, line_height: 16.0 }.
align: Option<Align>The text alignment
Setting to None will use Align::Right for RTL lines, and Align::Left
for LTR lines.
By default this is set to None.
attrs: Attrs<'static>The text attributes
By default this is set to:
Attrs {
color_opt: None,
family: Family::SansSerif,
stretch: Stretch::Normal,
style: Style::Normal,
weight: Weight::NORMAL,
metadata: 0,
}wrap: WrapThe text wrapping
By default this is set to Wrap::None.
shaping: ShapingThe text shaping
By default this is set to Shaping::Basic.
Trait Implementations§
Source§impl Clone for TextProperties
impl Clone for TextProperties
Source§fn clone(&self) -> TextProperties
fn clone(&self) -> TextProperties
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextProperties
impl Debug for TextProperties
Source§impl Default for TextProperties
impl Default for TextProperties
Source§impl PartialEq for TextProperties
impl PartialEq for TextProperties
impl Copy for TextProperties
impl StructuralPartialEq for TextProperties
Auto Trait Implementations§
impl Freeze for TextProperties
impl RefUnwindSafe for TextProperties
impl Send for TextProperties
impl Sync for TextProperties
impl Unpin for TextProperties
impl UnwindSafe for TextProperties
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