pub struct ResolvedFontSpec {
pub family: String,
pub size: f32,
pub weight: u16,
pub style: FontStyle,
pub color: Rgba,
}Expand description
A resolved (non-optional) font specification produced after theme resolution.
Unlike FontSpec, all fields are required (non-optional)
because resolution has already filled in all defaults.
Fields§
§family: StringFont family name.
size: f32Font size in logical pixels. Converted from platform points during
resolution if font_dpi was set on the source ThemeDefaults.
weight: u16CSS font weight (100–900).
style: FontStyleFont style (normal, italic, oblique).
color: RgbaFont color.
Trait Implementations§
Source§impl Clone for ResolvedFontSpec
impl Clone for ResolvedFontSpec
Source§fn clone(&self) -> ResolvedFontSpec
fn clone(&self) -> ResolvedFontSpec
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 ResolvedFontSpec
impl Debug for ResolvedFontSpec
Source§impl Default for ResolvedFontSpec
impl Default for ResolvedFontSpec
Source§fn default() -> ResolvedFontSpec
fn default() -> ResolvedFontSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ResolvedFontSpec
impl<'de> Deserialize<'de> for ResolvedFontSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ResolvedFontSpec
impl PartialEq for ResolvedFontSpec
Source§impl Serialize for ResolvedFontSpec
impl Serialize for ResolvedFontSpec
impl StructuralPartialEq for ResolvedFontSpec
Auto Trait Implementations§
impl Freeze for ResolvedFontSpec
impl RefUnwindSafe for ResolvedFontSpec
impl Send for ResolvedFontSpec
impl Sync for ResolvedFontSpec
impl Unpin for ResolvedFontSpec
impl UnsafeUnpin for ResolvedFontSpec
impl UnwindSafe for ResolvedFontSpec
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