[−][src]Struct druid::FontDescriptor
A collection of attributes that describe a font.
This is provided as a convenience; library consumers may wish to have a single type that represents a specific font face at a specific size.
Fields
family: FontFamily
The font's FontFamily
.
size: f64
The font's size.
weight: FontWeight
The font's FontWeight
.
style: FontStyle
The font's FontStyle
.
Implementations
impl FontDescriptor
[src]
pub const fn new(family: FontFamily) -> Self
[src]
Create a new descriptor with the provided FontFamily
.
pub const fn with_size(self, size: f64) -> Self
[src]
Buider-style method to set the descriptor's font size.
pub const fn with_weight(self, weight: FontWeight) -> Self
[src]
Buider-style method to set the descriptor's FontWeight
.
pub const fn with_style(self, style: FontStyle) -> Self
[src]
Buider-style method to set the descriptor's FontStyle
.
Trait Implementations
impl Clone for FontDescriptor
[src]
pub fn clone(&self) -> FontDescriptor
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Data for FontDescriptor
[src]
impl Debug for FontDescriptor
[src]
impl Default for FontDescriptor
[src]
impl Into<Value> for FontDescriptor
[src]
impl PartialEq<FontDescriptor> for FontDescriptor
[src]
pub fn eq(&self, other: &FontDescriptor) -> bool
[src]
pub fn ne(&self, other: &FontDescriptor) -> bool
[src]
impl StructuralPartialEq for FontDescriptor
[src]
impl ValueType for FontDescriptor
[src]
pub fn try_from_value(value: &Value) -> Result<Self, ValueTypeError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for FontDescriptor
[src]
impl Send for FontDescriptor
[src]
impl Sync for FontDescriptor
[src]
impl Unpin for FontDescriptor
[src]
impl UnwindSafe for FontDescriptor
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AnyEq for T where
T: PartialEq<T> + Any,
[src]
T: PartialEq<T> + Any,
pub fn equals(&self, other: &(dyn Any + 'static)) -> bool
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
pub fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
pub fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,